@humandialog/forms.svelte 1.3.13 → 1.3.14
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/Floating_container.svelte +20 -8
- package/components/Floating_container.svelte.d.ts +2 -0
- package/components/combo/combo.svelte +0 -1
- package/components/document/editor.svelte +2 -15
- package/components/list/List.d.ts +1 -0
- package/components/list/List.js +1 -0
- package/components/list/internal/list.element.svelte +12 -10
- package/components/list/internal/list.element.svelte.d.ts +2 -2
- package/components/list/internal/list.inserter.svelte +5 -5
- package/components/list/list.svelte +8 -6
- package/components/list/list.svelte.d.ts +2 -2
- package/components/menu.js +6 -8
- package/components/sidebar/sidebar.item.svelte +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/modal.svelte +25 -1
- package/package.json +1 -1
- package/stores.js +13 -3
- package/updates.js +1 -0
- package/utils.d.ts +1 -0
- package/utils.js +3 -1
|
@@ -8,7 +8,8 @@ let visible = false;
|
|
|
8
8
|
let toolbar;
|
|
9
9
|
let props = {};
|
|
10
10
|
let around_rect;
|
|
11
|
-
let
|
|
11
|
+
let rootElement;
|
|
12
|
+
let internalElement;
|
|
12
13
|
export async function show(around, _toolbar, _props = {}) {
|
|
13
14
|
if (around instanceof DOMRect) {
|
|
14
15
|
x = around.left;
|
|
@@ -20,6 +21,9 @@ export async function show(around, _toolbar, _props = {}) {
|
|
|
20
21
|
around_rect = new DOMRect(x, y, 0, 0);
|
|
21
22
|
}
|
|
22
23
|
const was_visible = visible;
|
|
24
|
+
if (!was_visible && toolbar == _toolbar && internalElement && internalElement.reload) {
|
|
25
|
+
internalElement.reload();
|
|
26
|
+
}
|
|
23
27
|
visible = true;
|
|
24
28
|
toolbar = _toolbar;
|
|
25
29
|
props = _props;
|
|
@@ -27,6 +31,7 @@ export async function show(around, _toolbar, _props = {}) {
|
|
|
27
31
|
props.onHide = () => {
|
|
28
32
|
hide();
|
|
29
33
|
};
|
|
34
|
+
props.onSizeChanged = () => onSizeChanged();
|
|
30
35
|
hide_window_indicator = 0;
|
|
31
36
|
window.addEventListener("click", on_before_window_click, true);
|
|
32
37
|
if (isDeviceSmallerThan("sm")) {
|
|
@@ -51,7 +56,7 @@ export async function show(around, _toolbar, _props = {}) {
|
|
|
51
56
|
}
|
|
52
57
|
await tick();
|
|
53
58
|
if (!was_visible)
|
|
54
|
-
|
|
59
|
+
rootElement.addEventListener("click", on_before_container_click, true);
|
|
55
60
|
cssPosition = calculatePosition(x, y, around_rect, true, false);
|
|
56
61
|
}
|
|
57
62
|
export function isVisible() {
|
|
@@ -62,7 +67,15 @@ export function hide() {
|
|
|
62
67
|
cssPosition = calculatePosition(x, y, around_rect, false, false);
|
|
63
68
|
$toolsActionsOperations = [];
|
|
64
69
|
window.removeEventListener("click", on_before_window_click, true);
|
|
65
|
-
|
|
70
|
+
rootElement?.removeEventListener("click", on_before_container_click, true);
|
|
71
|
+
}
|
|
72
|
+
export function isSameToolbar(_toolbar) {
|
|
73
|
+
return _toolbar == toolbar;
|
|
74
|
+
}
|
|
75
|
+
async function onSizeChanged() {
|
|
76
|
+
cssPosition = calculatePosition(x, y, around_rect, true, true);
|
|
77
|
+
await tick();
|
|
78
|
+
cssPosition = calculatePosition(x, y, around_rect, true, false);
|
|
66
79
|
}
|
|
67
80
|
let hide_window_indicator = 0;
|
|
68
81
|
function on_before_window_click() {
|
|
@@ -91,7 +104,7 @@ function calculatePosition(x2, y2, around, visible2, fresh) {
|
|
|
91
104
|
const margin = 5;
|
|
92
105
|
let myRect = null;
|
|
93
106
|
if (!fresh) {
|
|
94
|
-
myRect =
|
|
107
|
+
myRect = rootElement.getBoundingClientRect();
|
|
95
108
|
if (myRect && myRect.height == 0)
|
|
96
109
|
myRect = null;
|
|
97
110
|
}
|
|
@@ -113,7 +126,7 @@ function calculatePosition(x2, y2, around, visible2, fresh) {
|
|
|
113
126
|
} else {
|
|
114
127
|
let myRect = null;
|
|
115
128
|
if (!fresh) {
|
|
116
|
-
myRect =
|
|
129
|
+
myRect = rootElement.getBoundingClientRect();
|
|
117
130
|
if (myRect && myRect.height == 0)
|
|
118
131
|
myRect = null;
|
|
119
132
|
}
|
|
@@ -131,7 +144,6 @@ function calculatePosition(x2, y2, around, visible2, fresh) {
|
|
|
131
144
|
}
|
|
132
145
|
result = `left:${x2}px; top:${y2}px; width: max-content; height:max-content; display: block`;
|
|
133
146
|
}
|
|
134
|
-
console.log(result);
|
|
135
147
|
return result;
|
|
136
148
|
}
|
|
137
149
|
</script>
|
|
@@ -139,7 +151,7 @@ function calculatePosition(x2, y2, around, visible2, fresh) {
|
|
|
139
151
|
<div id="__hd_svelte_floating_container"
|
|
140
152
|
class="p-2 bg-stone-100 dark:bg-stone-800 rounded-lg shadow z-30 fixed"
|
|
141
153
|
style={cssPosition}
|
|
142
|
-
bind:this={
|
|
143
|
-
<svelte:component this={toolbar} {...props} />
|
|
154
|
+
bind:this={rootElement}>
|
|
155
|
+
<svelte:component this={toolbar} {...props} bind:this={internalElement} />
|
|
144
156
|
</div>
|
|
145
157
|
|
|
@@ -4,6 +4,7 @@ declare const __propDef: {
|
|
|
4
4
|
show?: ((around: DOMRect | DOMPoint, _toolbar: any, _props?: {}) => Promise<void>) | undefined;
|
|
5
5
|
isVisible?: (() => boolean) | undefined;
|
|
6
6
|
hide?: (() => void) | undefined;
|
|
7
|
+
isSameToolbar?: ((_toolbar: any) => boolean) | undefined;
|
|
7
8
|
};
|
|
8
9
|
events: {
|
|
9
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -17,5 +18,6 @@ export default class FloatingContainer extends SvelteComponentTyped<FloatingCont
|
|
|
17
18
|
get show(): (around: DOMRect | DOMPoint, _toolbar: any, _props?: {}) => Promise<void>;
|
|
18
19
|
get isVisible(): () => boolean;
|
|
19
20
|
get hide(): () => void;
|
|
21
|
+
get isSameToolbar(): (_toolbar: any) => boolean;
|
|
20
22
|
}
|
|
21
23
|
export {};
|
|
@@ -76,20 +76,6 @@ export function run(onStop = void 0) {
|
|
|
76
76
|
let suggestionRange = void 0;
|
|
77
77
|
export function getFormattingOperations(withCaptions = false) {
|
|
78
78
|
let result = [];
|
|
79
|
-
if (isDeviceSmallerThan("sm")) {
|
|
80
|
-
result = [
|
|
81
|
-
{
|
|
82
|
-
caption: "Back to edit",
|
|
83
|
-
icon: FaArrowLeft,
|
|
84
|
-
action: (fi) => {
|
|
85
|
-
editor?.commands.focus();
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
separator: true
|
|
90
|
-
}
|
|
91
|
-
];
|
|
92
|
-
}
|
|
93
79
|
commands.forEach((c2) => {
|
|
94
80
|
if (c2.separator) {
|
|
95
81
|
result.push({ separator: true });
|
|
@@ -98,7 +84,8 @@ export function getFormattingOperations(withCaptions = false) {
|
|
|
98
84
|
caption: withCaptions ? c2.caption : "",
|
|
99
85
|
icon: c2.icon,
|
|
100
86
|
action: (f) => c2.on_choice(suggestionRange),
|
|
101
|
-
activeFunc: c2.is_active
|
|
87
|
+
activeFunc: c2.is_active,
|
|
88
|
+
tbr: "B"
|
|
102
89
|
});
|
|
103
90
|
}
|
|
104
91
|
});
|
package/components/list/List.js
CHANGED
|
@@ -21,8 +21,8 @@ export let item;
|
|
|
21
21
|
export let title = "";
|
|
22
22
|
export let summary = "";
|
|
23
23
|
export let typename = void 0;
|
|
24
|
-
export let toolbarOperations;
|
|
25
|
-
export let contextMenu;
|
|
24
|
+
export let toolbarOperations = void 0;
|
|
25
|
+
export let contextMenu = void 0;
|
|
26
26
|
let definition = getContext("rList-definition");
|
|
27
27
|
let placeholder = "";
|
|
28
28
|
let props_sm;
|
|
@@ -47,10 +47,10 @@ if (!typename) {
|
|
|
47
47
|
}
|
|
48
48
|
let item_key = "";
|
|
49
49
|
let keys = Object.keys(item);
|
|
50
|
-
if (keys.includes("
|
|
51
|
-
item_key = "Id";
|
|
52
|
-
else if (keys.includes("$ref"))
|
|
50
|
+
if (keys.includes("$ref"))
|
|
53
51
|
item_key = "$ref";
|
|
52
|
+
else if (keys.includes("Id"))
|
|
53
|
+
item_key = "Id";
|
|
54
54
|
else if (keys.length > 0)
|
|
55
55
|
item_key = keys[0];
|
|
56
56
|
if (!title)
|
|
@@ -152,9 +152,11 @@ function getHRef() {
|
|
|
152
152
|
return "";
|
|
153
153
|
}
|
|
154
154
|
function activate_row(e, item2) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
e
|
|
155
|
+
if (toolbarOperations) {
|
|
156
|
+
activateItem("props", item2, toolbarOperations(item2));
|
|
157
|
+
if (e)
|
|
158
|
+
e.stopPropagation();
|
|
159
|
+
}
|
|
158
160
|
}
|
|
159
161
|
function on_contextmenu(e) {
|
|
160
162
|
if (!contextMenu)
|
|
@@ -318,7 +320,7 @@ export function scrollToView() {
|
|
|
318
320
|
{#key item[summary] }
|
|
319
321
|
{#if is_row_active}
|
|
320
322
|
<p id={element_id}
|
|
321
|
-
class=" text-sm
|
|
323
|
+
class=" text-sm
|
|
322
324
|
text-stone-400"
|
|
323
325
|
use:editable={{
|
|
324
326
|
action: (text) => {change_summary(text)},
|
|
@@ -330,7 +332,7 @@ export function scrollToView() {
|
|
|
330
332
|
</p>
|
|
331
333
|
{:else}
|
|
332
334
|
<p id={element_id}
|
|
333
|
-
class=" text-sm
|
|
335
|
+
class=" text-sm
|
|
334
336
|
text-stone-400"
|
|
335
337
|
on:click={(e) => on_active_row_clicked(e, 'bottom')}>
|
|
336
338
|
{item[summary]}
|
|
@@ -5,8 +5,8 @@ declare const __propDef: {
|
|
|
5
5
|
title?: string | undefined;
|
|
6
6
|
summary?: string | undefined;
|
|
7
7
|
typename?: string | undefined;
|
|
8
|
-
toolbarOperations
|
|
9
|
-
contextMenu
|
|
8
|
+
toolbarOperations?: undefined;
|
|
9
|
+
contextMenu?: undefined;
|
|
10
10
|
activate?: (() => void) | undefined;
|
|
11
11
|
editProperty?: ((field: string) => void) | undefined;
|
|
12
12
|
scrollToView?: (() => void) | undefined;
|
|
@@ -26,7 +26,7 @@ async function onSummaryChanged(text) {
|
|
|
26
26
|
}
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
|
-
<section class="
|
|
29
|
+
<section class=" my-1 w-full text-base text-stone-700 dark:text-stone-400 cursor-default rounded-md border border-transparent bg-stone-200 dark:bg-stone-700">
|
|
30
30
|
<div class="flex flex-row">
|
|
31
31
|
{#if icon}
|
|
32
32
|
<!--Icon size={3}
|
|
@@ -36,8 +36,8 @@ async function onSummaryChanged(text) {
|
|
|
36
36
|
{/if}
|
|
37
37
|
|
|
38
38
|
<p class=" ml-3 py-1
|
|
39
|
-
text-
|
|
40
|
-
sm:
|
|
39
|
+
text-base font-semibold min-h-[1.75rem]
|
|
40
|
+
sm:min-h-[1.25rem]
|
|
41
41
|
whitespace-nowrap overflow-clip flex-none w-1/2 sm:w-1/3" tabindex="0"
|
|
42
42
|
bind:this={titleElement}
|
|
43
43
|
use:editable={{
|
|
@@ -51,8 +51,8 @@ async function onSummaryChanged(text) {
|
|
|
51
51
|
{#if editSummary}
|
|
52
52
|
<p bind:this={summaryElement}
|
|
53
53
|
class=" ml-10 sm:ml-9
|
|
54
|
-
sm:
|
|
55
|
-
text-
|
|
54
|
+
sm:min-h-[1rem]
|
|
55
|
+
text-sm min-h-[1.5rem]
|
|
56
56
|
text-stone-400"
|
|
57
57
|
use:editable={{
|
|
58
58
|
action: onSummaryChanged,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { setContext, getContext, afterUpdate, tick, onMount } from "svelte";
|
|
2
|
-
import { data_tick_store, contextItemsStore, contextTypesStore
|
|
2
|
+
import { data_tick_store, contextItemsStore, contextTypesStore } from "../../stores";
|
|
3
3
|
import { activateItem, getActive, clearActiveItem, parseWidthDirective, getPrev, getNext, swapElements, getLast, insertAfter } from "../../utils";
|
|
4
4
|
import { rList_definition } from "./List";
|
|
5
5
|
import List_element from "./internal/list.element.svelte";
|
|
@@ -13,8 +13,8 @@ export let orderAttrib = void 0;
|
|
|
13
13
|
export let context = "";
|
|
14
14
|
export let typename = "";
|
|
15
15
|
export let c = "";
|
|
16
|
-
export let toolbarOperations;
|
|
17
|
-
export let contextMenu;
|
|
16
|
+
export let toolbarOperations = void 0;
|
|
17
|
+
export let contextMenu = void 0;
|
|
18
18
|
export let key = "";
|
|
19
19
|
export const CLEAR_SELECTION = 0;
|
|
20
20
|
export const KEEP_SELECTION = -1;
|
|
@@ -26,6 +26,7 @@ export const MIN_ORDER = 0;
|
|
|
26
26
|
let definition = new rList_definition();
|
|
27
27
|
setContext("rList-definition", definition);
|
|
28
28
|
setContext("rIs-table-component", true);
|
|
29
|
+
definition.name = `List ${a}`;
|
|
29
30
|
let item = null;
|
|
30
31
|
let items = void 0;
|
|
31
32
|
let ctx = context ? context : getContext("ctx");
|
|
@@ -35,7 +36,8 @@ const END_OF_LIST = {};
|
|
|
35
36
|
let rows = [];
|
|
36
37
|
let activate_after_dom_update = null;
|
|
37
38
|
let inserter;
|
|
38
|
-
|
|
39
|
+
if (toolbarOperations)
|
|
40
|
+
clearActiveItem("props");
|
|
39
41
|
let last_tick = -1;
|
|
40
42
|
$:
|
|
41
43
|
setup($data_tick_store, $contextItemsStore);
|
|
@@ -55,10 +57,10 @@ function setup(...args) {
|
|
|
55
57
|
function getItemKey(item2) {
|
|
56
58
|
if (key)
|
|
57
59
|
return item2[key];
|
|
58
|
-
else if (item2.Id)
|
|
59
|
-
return item2.Id;
|
|
60
60
|
else if (item2.$ref)
|
|
61
61
|
return item2.$ref;
|
|
62
|
+
else if (item2.Id)
|
|
63
|
+
return item2.Id;
|
|
62
64
|
else
|
|
63
65
|
return 0;
|
|
64
66
|
}
|
|
@@ -9,8 +9,8 @@ declare const __propDef: {
|
|
|
9
9
|
context?: string | undefined;
|
|
10
10
|
typename?: string | undefined;
|
|
11
11
|
c?: string | undefined;
|
|
12
|
-
toolbarOperations
|
|
13
|
-
contextMenu
|
|
12
|
+
toolbarOperations?: undefined;
|
|
13
|
+
contextMenu?: undefined;
|
|
14
14
|
key?: string | undefined;
|
|
15
15
|
CLEAR_SELECTION?: 0 | undefined;
|
|
16
16
|
KEEP_SELECTION?: -1 | undefined;
|
package/components/menu.js
CHANGED
|
@@ -39,14 +39,12 @@ export function showFloatingToolbar(around, toolbar, props = {}) {
|
|
|
39
39
|
toolbar_component.show(around, toolbar, props);
|
|
40
40
|
}
|
|
41
41
|
else if (toolbar_component) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
toolbar_component.show(around, toolbar, props);
|
|
49
|
-
//}
|
|
42
|
+
if (toolbar_component.isVisible() && toolbar_component.isSameToolbar(toolbar)) {
|
|
43
|
+
toolbar_component.hide();
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
toolbar_component.show(around, toolbar, props);
|
|
47
|
+
}
|
|
50
48
|
}
|
|
51
49
|
else
|
|
52
50
|
console.error('what now?');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>import { getContext } from "svelte";
|
|
1
|
+
<script>import { getContext, tick } from "svelte";
|
|
2
2
|
import Icon from "../icon.svelte";
|
|
3
3
|
import { contextItemsStore, auto_hide_sidebar, contextToolbarOperations } from "../../stores";
|
|
4
4
|
import { FaBars, FaEllipsisH } from "svelte-icons/fa";
|
package/index.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export { default as KanbanComboProperty } from './components/kanban/kanban.combo
|
|
|
55
55
|
export { default as KanbanTagsProperty } from './components/kanban/kanban.tags.svelte';
|
|
56
56
|
export { default as KanbanCallbacks } from './components/kanban/kanban.callbacks.svelte';
|
|
57
57
|
export { KanbanColumnTop, KanbanColumnBottom } from './components/kanban/Kanban';
|
|
58
|
-
export { selectItem, activateItem, clearActiveItem, isActive, isSelected, getActive, editable, startEditing, saveCurrentEditable, selectable, handleSelect, isDeviceSmallerThan, resizeImage, refreshToolbarOperations, isOnScreenKeyboardVisible, randomString, } from './utils';
|
|
58
|
+
export { selectItem, activateItem, clearActiveItem, isActive, isSelected, getActive, editable, startEditing, saveCurrentEditable, selectable, handleSelect, isDeviceSmallerThan, resizeImage, refreshToolbarOperations, isOnScreenKeyboardVisible, randomString, UI, } from './utils';
|
|
59
59
|
export { mainContentPageReloader, reloadMainContentPage, reloadWholeApp, alerts, addAlert, onErrorShowAlert, main_sidebar_visible_store } from './stores.js';
|
|
60
60
|
export { data_tick_store, // tmp
|
|
61
61
|
hasSelectedItem, hasDataItem, setNavigatorTitle } from "./stores";
|
package/index.js
CHANGED
|
@@ -61,7 +61,7 @@ export { default as KanbanComboProperty } from './components/kanban/kanban.combo
|
|
|
61
61
|
export { default as KanbanTagsProperty } from './components/kanban/kanban.tags.svelte';
|
|
62
62
|
export { default as KanbanCallbacks } from './components/kanban/kanban.callbacks.svelte';
|
|
63
63
|
export { KanbanColumnTop, KanbanColumnBottom } from './components/kanban/Kanban';
|
|
64
|
-
export { selectItem, activateItem, clearActiveItem, isActive, isSelected, getActive, editable, startEditing, saveCurrentEditable, selectable, handleSelect, isDeviceSmallerThan, resizeImage, refreshToolbarOperations, isOnScreenKeyboardVisible, randomString, } from './utils';
|
|
64
|
+
export { selectItem, activateItem, clearActiveItem, isActive, isSelected, getActive, editable, startEditing, saveCurrentEditable, selectable, handleSelect, isDeviceSmallerThan, resizeImage, refreshToolbarOperations, isOnScreenKeyboardVisible, randomString, UI, } from './utils';
|
|
65
65
|
export { mainContentPageReloader, reloadMainContentPage, reloadWholeApp, alerts, addAlert, onErrorShowAlert, main_sidebar_visible_store } from './stores.js';
|
|
66
66
|
export { data_tick_store, // tmp
|
|
67
67
|
hasSelectedItem, hasDataItem, setNavigatorTitle } from "./stores";
|
package/modal.svelte
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<script>import { afterUpdate, onMount, tick } from "svelte";
|
|
2
2
|
import Icon from "./components/icon.svelte";
|
|
3
|
+
import { toolsActionsOperations } from "./stores.js";
|
|
4
|
+
import { isDeviceSmallerThan } from "./utils";
|
|
5
|
+
import { FaTimes } from "svelte-icons/fa";
|
|
3
6
|
export let title = "";
|
|
4
7
|
export let open = false;
|
|
5
8
|
export let content = "";
|
|
@@ -16,9 +19,30 @@ export let onCancelCallback = void 0;
|
|
|
16
19
|
export function show(on_close_callback = void 0) {
|
|
17
20
|
open = true;
|
|
18
21
|
close_callback = on_close_callback;
|
|
22
|
+
if (isDeviceSmallerThan("sm")) {
|
|
23
|
+
$toolsActionsOperations = {
|
|
24
|
+
opver: 1,
|
|
25
|
+
operations: [
|
|
26
|
+
{
|
|
27
|
+
caption: "Modal",
|
|
28
|
+
operations: [
|
|
29
|
+
{
|
|
30
|
+
icon: FaTimes,
|
|
31
|
+
action: (f) => {
|
|
32
|
+
on_cancel(void 0);
|
|
33
|
+
},
|
|
34
|
+
fab: "M00",
|
|
35
|
+
tbr: "A"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
19
42
|
}
|
|
20
43
|
export function hide() {
|
|
21
44
|
open = false;
|
|
45
|
+
$toolsActionsOperations = [];
|
|
22
46
|
}
|
|
23
47
|
let root;
|
|
24
48
|
afterUpdate(
|
|
@@ -40,7 +64,7 @@ function on_ok(event) {
|
|
|
40
64
|
close_callback("OK");
|
|
41
65
|
}
|
|
42
66
|
function on_cancel(event) {
|
|
43
|
-
|
|
67
|
+
hide();
|
|
44
68
|
if (onCancelCallback)
|
|
45
69
|
onCancelCallback();
|
|
46
70
|
if (close_callback)
|
package/package.json
CHANGED
package/stores.js
CHANGED
|
@@ -121,7 +121,9 @@ export function restore_defults()
|
|
|
121
121
|
|
|
122
122
|
export function toggle_sidebar(index)
|
|
123
123
|
{
|
|
124
|
-
|
|
124
|
+
const prevVisile = get(main_sidebar_visible_store);
|
|
125
|
+
if(prevVisile != '*')
|
|
126
|
+
previously_visible_sidebar = prevVisile;
|
|
125
127
|
|
|
126
128
|
//console.log('toggle_sidebar', previously_visible_sidebar, '=>', index)
|
|
127
129
|
|
|
@@ -133,6 +135,7 @@ export function toggle_sidebar(index)
|
|
|
133
135
|
|
|
134
136
|
export function auto_hide_sidebar()
|
|
135
137
|
{
|
|
138
|
+
|
|
136
139
|
//console.log('auto_hide_sidebar')
|
|
137
140
|
//console.log("sw: " + window.innerWidth, SCREEN_SIZES.lg)
|
|
138
141
|
if(window.innerWidth < SCREEN_SIZES.lg)
|
|
@@ -141,14 +144,21 @@ export function auto_hide_sidebar()
|
|
|
141
144
|
|
|
142
145
|
export function hide_sidebar()
|
|
143
146
|
{
|
|
144
|
-
|
|
147
|
+
|
|
148
|
+
const prevVisile = get(main_sidebar_visible_store);
|
|
149
|
+
if(prevVisile != '*')
|
|
150
|
+
previously_visible_sidebar = prevVisile;
|
|
151
|
+
|
|
145
152
|
main_sidebar_visible_store.set('*')
|
|
146
153
|
//console.log("auto_hide_sidebar:" + get(main_sidebar_visible_store))
|
|
147
154
|
}
|
|
148
155
|
|
|
149
156
|
export function show_sidebar(index)
|
|
150
157
|
{
|
|
151
|
-
|
|
158
|
+
const prevVisile = get(main_sidebar_visible_store);
|
|
159
|
+
if(prevVisile != '*')
|
|
160
|
+
previously_visible_sidebar = prevVisile;
|
|
161
|
+
|
|
152
162
|
main_sidebar_visible_store.set(index)
|
|
153
163
|
}
|
|
154
164
|
|
package/updates.js
CHANGED
package/utils.d.ts
CHANGED
package/utils.js
CHANGED
|
@@ -350,6 +350,7 @@ export function editable(node, params)
|
|
|
350
350
|
|
|
351
351
|
return {
|
|
352
352
|
destroy() {
|
|
353
|
+
|
|
353
354
|
node.removeEventListener("edit", edit_listener)
|
|
354
355
|
node.classList.remove("editable")
|
|
355
356
|
node.contentEditable = "false"
|
|
@@ -650,7 +651,8 @@ export function isOnScreenKeyboardVisible()
|
|
|
650
651
|
|
|
651
652
|
export const UI = {
|
|
652
653
|
operations: null,
|
|
653
|
-
fab: null
|
|
654
|
+
fab: null,
|
|
655
|
+
navigator: null
|
|
654
656
|
}
|
|
655
657
|
|
|
656
658
|
export const NAVIGATION_PAGE_PATH = '/'
|