@humandialog/forms.svelte 1.4.7 → 1.4.9

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.
@@ -18,6 +18,7 @@ let menu_items = [];
18
18
  let submenus = [];
19
19
  let around_rect;
20
20
  let css_position = "";
21
+ let closeButtonPos = "";
21
22
  $:
22
23
  display = visible ? "block" : "none";
23
24
  function calculatePosition(x2, y2, around, visible2, fresh) {
@@ -53,6 +54,7 @@ function calculatePosition(x2, y2, around, visible2, fresh) {
53
54
  y2 = screenRect.bottom - maxHeight - margin;
54
55
  result = `left: ${x2}px; top: ${y2}px; width: ${width}px; max-height: ${maxHeight}px; display: block`;
55
56
  }
57
+ closeButtonPos = `right: ${margin}px; top: calc(${y2}px - 1.75rem)`;
56
58
  } else {
57
59
  let myRect = null;
58
60
  if (!fresh) {
@@ -86,6 +88,7 @@ function calculatePosition(x2, y2, around, visible2, fresh) {
86
88
  y2 = screenRect.top;
87
89
  }
88
90
  result = `left:${x2}px; top:${y2}px; display: block; min-width: 15rem`;
91
+ closeButtonPos = "";
89
92
  }
90
93
  return result;
91
94
  }
@@ -108,7 +111,7 @@ export async function show(around, _operations) {
108
111
  hide_window_indicator = 0;
109
112
  window.addEventListener("click", on_before_window_click, true);
110
113
  }
111
- if (isDeviceSmallerThan("sm")) {
114
+ if (false) {
112
115
  pushToolsActionsOperations({
113
116
  opver: 1,
114
117
  operations: [
@@ -139,7 +142,7 @@ export function isVisible() {
139
142
  return visible;
140
143
  }
141
144
  export function hide() {
142
- if (visible)
145
+ if (false)
143
146
  popToolsActionsOperations();
144
147
  visible = false;
145
148
  css_position = calculatePosition(x, y, around_rect, false, false);
@@ -324,14 +327,27 @@ function calculateBackground(is_highlighted, active) {
324
327
  }
325
328
  </script>
326
329
 
330
+
327
331
  <div id="__hd_svelte_contextmenu"
328
332
  class=" bg-white dark:bg-stone-800
329
333
  text-stone-800 dark:text-stone-400 rounded-lg border
330
334
  border-stone-200 dark:border-stone-700 shadow-md
331
- z-30 fixed min-w-60 max-h-screen overflow-y-auto"
335
+ z-40 fixed min-w-60 max-h-screen overflow-y-auto"
332
336
  style={css_position}
333
337
  bind:this={menu_root}>
334
338
 
339
+ {#if closeButtonPos}
340
+ <button class=" fixed w-6 h-6 flex items-center justify-center
341
+ text-stone-500 bg-stone-200/70 hover:bg-stone-200
342
+ focus:outline-none font-medium rounded-full text-sm text-center
343
+ dark:text-stone-500 dark:bg-stone-700/80 dark:hover:bg-stone-700
344
+ focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800"
345
+ style={closeButtonPos}
346
+ on:click={ hide }>
347
+ <Icon component={FaTimes} s="md"/>
348
+ </button>
349
+ {/if}
350
+
335
351
  {#each operations as operation, index}
336
352
  {@const is_separator = operation.separator}
337
353
  {#if is_separator}
@@ -62,7 +62,8 @@ export let a = "";
62
62
  export let context = "";
63
63
  export let typename = "";
64
64
  export let compact = false;
65
- export let onChange = void 0;
65
+ export let onSingleChange = void 0;
66
+ export let onApplyChanges = void 0;
66
67
  export let onFocusCb = void 0;
67
68
  export let onBlurCb = void 0;
68
69
  export let onAddImage = void 0;
@@ -612,6 +613,10 @@ onMount(() => {
612
613
  if (wasContentChanged) {
613
614
  hasChangedValue = true;
614
615
  changedValue = editor2.getHTML();
616
+ if (onSingleChange)
617
+ onSingleChange(changedValue);
618
+ else
619
+ logChanges();
615
620
  handleImagesChanges(transaction);
616
621
  }
617
622
  refreshToolbarOperations();
@@ -671,32 +676,34 @@ function on_blur() {
671
676
  $data_tick_store = last_tick;
672
677
  }
673
678
  }
674
- export function save() {
679
+ export async function save() {
675
680
  if (saveData()) {
676
681
  last_tick = $data_tick_store + 1;
677
682
  $data_tick_store = last_tick;
678
- refreshToolbarOperations();
679
683
  }
680
684
  }
681
685
  function saveData() {
682
686
  if (!hasChangedValue)
683
687
  return false;
684
688
  hasChangedValue = false;
685
- if (onChange) {
686
- onChange(changedValue);
689
+ if (onApplyChanges) {
690
+ onApplyChanges(changedValue);
687
691
  return true;
688
692
  } else if (item && a) {
689
- item[a] = changedValue;
690
- if (typename)
691
- informModification(item, a, typename);
692
- else
693
- informModification(item, a);
693
+ logChanges();
694
694
  if (pushChangesImmediately)
695
- pushChanges();
695
+ pushChanges(refreshToolbarOperations);
696
696
  return true;
697
697
  }
698
698
  return false;
699
699
  }
700
+ function logChanges() {
701
+ item[a] = changedValue;
702
+ if (typename)
703
+ informModification(item, a, typename);
704
+ else
705
+ informModification(item, a);
706
+ }
700
707
  let palette = null;
701
708
  let is_command_palette_visible = false;
702
709
  function get_selection_bbox() {
@@ -717,7 +724,7 @@ function on_palette_mouse_click() {
717
724
  }
718
725
  function on_palette_shown() {
719
726
  is_command_palette_visible = true;
720
- if (isDeviceSmallerThan("sm")) {
727
+ if (false) {
721
728
  pushToolsActionsOperations({
722
729
  opver: 1,
723
730
  operations: [
@@ -740,8 +747,9 @@ function on_palette_shown() {
740
747
  }
741
748
  }
742
749
  function on_palette_hidden() {
743
- if (is_command_palette_visible)
750
+ if (false)
744
751
  popToolsActionsOperations();
752
+ editor?.commands.focus();
745
753
  is_command_palette_visible = false;
746
754
  }
747
755
  function show_command_palette(cursor_rect) {
@@ -9,7 +9,8 @@ declare const __propDef: {
9
9
  context?: string | undefined;
10
10
  typename?: string | undefined;
11
11
  compact?: boolean | undefined;
12
- onChange?: undefined;
12
+ onSingleChange?: Function | undefined;
13
+ onApplyChanges?: Function | undefined;
13
14
  onFocusCb?: undefined;
14
15
  onBlurCb?: undefined;
15
16
  onAddImage?: undefined;
@@ -42,7 +43,7 @@ declare const __propDef: {
42
43
  tbr: string;
43
44
  }) | undefined;
44
45
  scrollIntoView?: ((param: any) => void) | undefined;
45
- save?: (() => void) | undefined;
46
+ save?: (() => Promise<void>) | undefined;
46
47
  addTemporaryImage?: ((src: any) => void) | undefined;
47
48
  replaceTemporaryImage?: ((temporarySrc: any, dataPath: any) => void) | undefined;
48
49
  removeTemporaryImage?: ((temporarySrc: any) => void) | undefined;
@@ -115,7 +116,7 @@ export default class Editor extends SvelteComponentTyped<EditorProps, EditorEven
115
116
  tbr: string;
116
117
  };
117
118
  get scrollIntoView(): (param: any) => void;
118
- get save(): () => void;
119
+ get save(): () => Promise<void>;
119
120
  get addTemporaryImage(): (src: any) => void;
120
121
  get replaceTemporaryImage(): (temporarySrc: any, dataPath: any) => void;
121
122
  get removeTemporaryImage(): (temporarySrc: any) => void;
@@ -4,6 +4,7 @@ import Pallete_row from "./palette.row.svelte";
4
4
  import { createEventDispatcher } from "svelte";
5
5
  import Icon from "../../icon.svelte";
6
6
  import { isDeviceSmallerThan, UI } from "../../../utils.js";
7
+ import { FaTimes } from "svelte-icons/fa";
7
8
  export let commands;
8
9
  export let width_px = 400;
9
10
  export let max_height_px = 500;
@@ -27,7 +28,7 @@ export function showAsToolbox(rect) {
27
28
  toolboxX = margin;
28
29
  toolboxY = rect.bottom + margin;
29
30
  toolboxY += window.scrollY;
30
- css_style = `position: fixed; left:${toolboxX}px; top:${toolboxY}px;`;
31
+ css_style = `left:${toolboxX}px; top:${toolboxY}px;`;
31
32
  console.log("toolbox: ", css_style);
32
33
  dispatch("palette_shown");
33
34
  }
@@ -48,19 +49,26 @@ afterUpdate(
48
49
  }
49
50
  }
50
51
  );
52
+ let closeButtonPos = "";
51
53
  export function show(x, y, up = false) {
52
54
  isToolbox = false;
53
- css_style = `width: ${width_px}px; max-height:${max_height_px}px; position: fixed; left:${x}px; top:${y}px;`;
55
+ css_style = `width: ${width_px}px; max-height:${max_height_px}px; left:${x}px; top:${y}px;`;
54
56
  if (up)
55
57
  css_style += " transform: translate(0, -100%);";
56
58
  visible = true;
57
59
  dispatch("palette_shown");
60
+ closeButtonPos = "";
61
+ setTimeout(() => {
62
+ const rect = paletteElement.getBoundingClientRect();
63
+ closeButtonPos = `right: ${15}px; top: calc(${rect.y}px - 1.75rem)`;
64
+ }, 0);
65
+ console.trace();
58
66
  }
59
67
  export function show_fullscreen(_width_px, _height_px) {
60
68
  isToolbox = false;
61
69
  width_px = _width_px;
62
70
  max_height_px = _height_px;
63
- css_style = `position: fixed; left: 0px; top: 0px; width: ${_width_px}px; height: ${_height_px}px; z-index: 1055;`;
71
+ css_style = `left: 0px; top: 0px; width: ${_width_px}px; height: ${_height_px}px; z-index: 1055;`;
64
72
  visible = true;
65
73
  dispatch("palette_shown");
66
74
  }
@@ -231,7 +239,7 @@ function mousemove(e) {
231
239
  const touch = e.touches.item(0);
232
240
  const trackDelta = new DOMPoint(touch.clientX - beforeTrackingClient.x, touch.clientY - beforeTrackingClient.y);
233
241
  toolboxX = beforeTrackingPos.x + trackDelta.x;
234
- css_style = `position: fixed; left:${toolboxX}px; top:${toolboxY}px;`;
242
+ css_style = `left:${toolboxX}px; top:${toolboxY}px;`;
235
243
  e.stopPropagation();
236
244
  }
237
245
  }
@@ -250,8 +258,8 @@ function isRowActive(cmd) {
250
258
 
251
259
  {#if isToolbox}
252
260
  <menu 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
253
- z-30
254
- flex flex-row flex-nowrap"
261
+ z-40
262
+ flex flex-row flex-nowrap fixed"
255
263
  style={css_style}
256
264
  hidden={!visible}
257
265
  on:touchstart={mousedown}
@@ -287,37 +295,56 @@ function isRowActive(cmd) {
287
295
  {/if}
288
296
  </menu>
289
297
  {:else}
290
- <div 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 overflow-y-auto z-20"
291
- id="__hd_FormattingPalette"
292
- bind:this={paletteElement}
293
- hidden={!visible}
294
- style={css_style} >
295
-
296
- {#if filtered_commands && filtered_commands.length}
297
- {#each filtered_commands as cmd, idx (cmd.caption)}
298
- {#if cmd.separator}
299
- {#if idx>0 && idx<filtered_commands.length-1} <!-- not first or last place -->
300
- <hr class="mx-4 my-1 border-stone-300 dark:border-stone-700"/>
301
- {/if}
302
- {:else}
303
- {@const id = "cpi_" + idx}
304
- {@const active=isRowActive(cmd)}
305
- <Pallete_row {id}
306
- cmd={cmd}
307
- is_highlighted={cmd == current_command}
308
- on:click={ () => { execute_mouse_click(cmd.on_choice); }}
309
- on:mousemove={ () => { on_mouse_over(cmd); }}
310
- on:mousedown={buttonMousedown}
311
- bind:this={rows[idx]}
312
- {active}
313
- />
314
- {/if}
315
- {/each}
316
- {:else}
317
- <p class="text-sm text-stone-500">No results</p>
298
+ <!--div hidden={!visible}-->
299
+
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}
318
313
  {/if}
314
+
315
+ <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 overflow-y-auto z-40 fixed"
317
+ id="__hd_FormattingPalette"
318
+ bind:this={paletteElement}
319
+ style={css_style} >
319
320
 
320
- </div>
321
+ {#if filtered_commands && filtered_commands.length}
322
+ {#each filtered_commands as cmd, idx (cmd.caption)}
323
+ {#if cmd.separator}
324
+ {#if idx>0 && idx<filtered_commands.length-1} <!-- not first or last place -->
325
+ <hr class="mx-4 my-1 border-stone-300 dark:border-stone-700"/>
326
+ {/if}
327
+ {:else}
328
+ {@const id = "cpi_" + idx}
329
+ {@const active=isRowActive(cmd)}
330
+ <Pallete_row {id}
331
+ cmd={cmd}
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>
343
+ {/if}
344
+
345
+ </div>
346
+ <!---/div-->
347
+
321
348
 
322
349
  {/if}
323
350
 
@@ -0,0 +1,105 @@
1
+ <script>
2
+
3
+ export let pageNo
4
+ export let allPagesNo
5
+ export let onPage
6
+ export let visiblePagesNo = 4
7
+
8
+ let visiblePages = []
9
+ $: update()
10
+
11
+ export function updatePageNo(p)
12
+ {
13
+ pageNo = p
14
+ update()
15
+ }
16
+
17
+ export function updateAllPagesNo(allP)
18
+ {
19
+ allPagesNo = allP
20
+ update()
21
+ }
22
+
23
+ function update(...args)
24
+ {
25
+ const absStart = 0
26
+ const absEnd = allPagesNo-1
27
+
28
+ if(pageNo < absStart)
29
+ pageNo = absStart
30
+
31
+ if(pageNo > absEnd)
32
+ pageNo = absEnd
33
+
34
+ let visStart = pageNo - Math.floor(visiblePagesNo/2)
35
+ if(visStart < absStart)
36
+ visStart = absStart
37
+
38
+ let visEnd = visStart + visiblePagesNo - 1
39
+ if(visEnd > absEnd)
40
+ {
41
+ visEnd = absEnd
42
+ visStart = Math.max(absStart, visEnd - visiblePagesNo + 1)
43
+ }
44
+
45
+ visiblePages = []
46
+ for(let p=visStart; p<= visEnd; p++)
47
+ visiblePages.push(p)
48
+ }
49
+
50
+ function onPrevPage(e)
51
+ {
52
+ if(pageNo > 0)
53
+ onPage(pageNo-1)
54
+ }
55
+
56
+ function onNextPage(e)
57
+ {
58
+ if(pageNo <= allPagesNo-2)
59
+ onPage(pageNo+1)
60
+ }
61
+
62
+ </script>
63
+
64
+ <nav aria-label="Page navigation example" class="">
65
+ {#if visiblePages.length > 1}
66
+ <ul class="flex items-center -space-x-px h-8 text-sm">
67
+ <li>
68
+ <button on:click={onPrevPage}
69
+ class="flex items-center justify-center px-3 h-8 ms-0 leading-tight text-stone-500 bg-white border border-e-0 border-stone-300 rounded-s-lg hover:bg-stone-100 hover:text-stone-700 dark:bg-stone-800 dark:border-stone-700 dark:text-stone-400 dark:hover:bg-stone-700 dark:hover:text-white">
70
+ <span class="sr-only">Previous</span>
71
+ <svg class="w-2.5 h-2.5 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
72
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 1 1 5l4 4"/>
73
+ </svg>
74
+ </button>
75
+ </li>
76
+
77
+
78
+ {#each visiblePages as p (p)}
79
+ <li>
80
+ {#if p == pageNo}
81
+ <button disabled class="z-10 flex items-center justify-center px-3 h-8 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-stone-700 dark:bg-stone-700 dark:text-white">
82
+ {p+1}
83
+ </button>
84
+ {:else}
85
+ <button on:click={(e) => onPage(p)} class="flex items-center justify-center px-3 h-8 leading-tight text-stone-500 bg-white border border-stone-300 hover:bg-stone-100 hover:text-stone-700 dark:bg-stone-800 dark:border-stone-700 dark:text-stone-400 dark:hover:bg-stone-700 dark:hover:text-white">
86
+ {p+1}
87
+ </button>
88
+ {/if}
89
+ </li>
90
+
91
+ {/each}
92
+
93
+
94
+ <!--a href="#" aria-current="page" class="">3</a-->
95
+ <li>
96
+ <button on:click={onNextPage} class="flex items-center justify-center px-3 h-8 leading-tight text-stone-500 bg-white border border-stone-300 rounded-e-lg hover:bg-stone-100 hover:text-stone-700 dark:bg-stone-800 dark:border-stone-700 dark:text-stone-400 dark:hover:bg-stone-700 dark:hover:text-white">
97
+ <span class="sr-only">Next</span>
98
+ <svg class="w-2.5 h-2.5 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
99
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
100
+ </svg>
101
+ </button>
102
+ </li>
103
+ </ul>
104
+ {/if}
105
+ </nav>
@@ -0,0 +1,35 @@
1
+ /** @typedef {typeof __propDef.props} PaginatorProps */
2
+ /** @typedef {typeof __propDef.events} PaginatorEvents */
3
+ /** @typedef {typeof __propDef.slots} PaginatorSlots */
4
+ export default class Paginator extends SvelteComponentTyped<{
5
+ pageNo: any;
6
+ allPagesNo: any;
7
+ onPage: any;
8
+ visiblePagesNo?: number | undefined;
9
+ updatePageNo?: ((p: any) => void) | undefined;
10
+ updateAllPagesNo?: ((allP: any) => void) | undefined;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {}> {
14
+ get updatePageNo(): (p: any) => void;
15
+ get updateAllPagesNo(): (allP: any) => void;
16
+ }
17
+ export type PaginatorProps = typeof __propDef.props;
18
+ export type PaginatorEvents = typeof __propDef.events;
19
+ export type PaginatorSlots = typeof __propDef.slots;
20
+ import { SvelteComponentTyped } from "svelte";
21
+ declare const __propDef: {
22
+ props: {
23
+ pageNo: any;
24
+ allPagesNo: any;
25
+ onPage: any;
26
+ visiblePagesNo?: number | undefined;
27
+ updatePageNo?: ((p: any) => void) | undefined;
28
+ updateAllPagesNo?: ((allP: any) => void) | undefined;
29
+ };
30
+ events: {
31
+ [evt: string]: CustomEvent<any>;
32
+ };
33
+ slots: {};
34
+ };
35
+ export {};
@@ -64,6 +64,10 @@ export async function editSummary() {
64
64
  });
65
65
  }
66
66
  }
67
+ export function updateSummary(txt) {
68
+ console.log("updateSummary", txt);
69
+ summaryText = txt;
70
+ }
67
71
  let user_class = $$props.class ?? "";
68
72
  let root;
69
73
  function calculateIsRowActive(...args) {
@@ -289,7 +293,7 @@ function activateRow(e) {
289
293
  {/if}
290
294
  </div>
291
295
 
292
- {#if summaryText}
296
+ {#if summaryText || summaryPlaceholder}
293
297
  <p class="ml-14 mt-1
294
298
  text-stone-900 dark:text-stone-400
295
299
  cursor-default
@@ -11,6 +11,7 @@ declare const __propDef: {
11
11
  item?: object | undefined;
12
12
  summary?: string | object | undefined;
13
13
  editSummary?: (() => Promise<void>) | undefined;
14
+ updateSummary?: ((txt: any) => void) | undefined;
14
15
  };
15
16
  events: {
16
17
  click: MouseEvent;
@@ -28,5 +29,6 @@ export type SidebarEvents = typeof __propDef.events;
28
29
  export type SidebarSlots = typeof __propDef.slots;
29
30
  export default class Sidebar extends SvelteComponentTyped<SidebarProps, SidebarEvents, SidebarSlots> {
30
31
  get editSummary(): () => Promise<void>;
32
+ get updateSummary(): (txt: any) => void;
31
33
  }
32
34
  export {};
package/desk.svelte CHANGED
@@ -17,7 +17,7 @@
17
17
  set_dark_mode_default,
18
18
  sidebar_left_pos,
19
19
  wholeAppReloader,
20
- alerts, removeAlert } from './stores.js'
20
+ alerts, removeAlert, showFABAlways} from './stores.js'
21
21
 
22
22
  //import { AuthorizedView} from '@humandialog/auth.svelte'
23
23
  import { handleSelect, isDeviceSmallerThan, isOnNavigationPage, isOnScreenKeyboardVisible, removeAt, UI } from './utils'
@@ -130,17 +130,31 @@
130
130
 
131
131
  if(tools_visible)
132
132
  {
133
- tools_visibility = "hidden sm:block sm:fixed"
134
- //fab_base_visibility = "fixed sm:hidden"
135
- fab_visibility_mode = FAB_VISIBLE_ON_MOBILE
136
-
137
- content_top = 'top-[50px] sm:top-[40px]'
138
133
 
139
- if(bottom_bar_visible)
140
- content_height = `min-h-[calc(100vh-290px)] sm:h-[calc(100vh-280px)]`
141
- else
142
- content_height = `min-h-[calc(100vh-50px)] sm:h-[calc(100vh-40px)]`
143
-
134
+ const alwaysShowFAB = (!is_small) && $showFABAlways
135
+
136
+ if(alwaysShowFAB)
137
+ {
138
+ fab_visibility_mode = FAB_VISIBLE_ALWAYS
139
+ tools_visibility = "hidden"
140
+ content_top = 'top-[50px] sm:top-[0px]'
141
+
142
+ if(bottom_bar_visible)
143
+ content_height = `min-h-[calc(100vh-290px)] sm:h-[calc(100vh-240px)]`
144
+ else
145
+ content_height = `min-h-[calc(100vh-50px)] sm:h-[calc(100vh-0px)]`
146
+ }
147
+ else
148
+ {
149
+ fab_visibility_mode = FAB_VISIBLE_ON_MOBILE
150
+ tools_visibility = "hidden sm:block sm:fixed"
151
+ content_top = 'top-[50px] sm:top-[40px]'
152
+
153
+ if(bottom_bar_visible)
154
+ content_height = `min-h-[calc(100vh-290px)] sm:h-[calc(100vh-280px)]`
155
+ else
156
+ content_height = `min-h-[calc(100vh-50px)] sm:h-[calc(100vh-40px)]`
157
+ }
144
158
  }
145
159
  else
146
160
  {
@@ -414,11 +428,7 @@
414
428
  <Operations bind:this={operationsComponent} />
415
429
  </div>
416
430
 
417
- {#if is_fab_visible}
418
- <!--div class="{fab_visibility} left-3 {fab_bottom} mb-1 cursor-pointer z-10"-->
419
- <Fab bind:this={fabComponent}/>
420
- <!---/div-->
421
- {/if}
431
+
422
432
 
423
433
  <!--#######################################################-->
424
434
  <!--## CONTENT ##################-->
@@ -438,7 +448,11 @@
438
448
  </Configurable>
439
449
  </div>
440
450
 
441
-
451
+ {#if is_fab_visible}
452
+ <!--div class="{fab_visibility} left-3 {fab_bottom} mb-1 cursor-pointer z-10"-->
453
+ <Fab bind:this={fabComponent} />
454
+ <!---/div-->
455
+ {/if}
442
456
 
443
457
  <!--###########################################################-->
444
458
  <!--## BOTTOM SIDEBAR ###############################-->
@@ -480,7 +494,7 @@
480
494
  <!-- #########################################################-->
481
495
  <!-- ## MODAL DIALOG #########################################-->
482
496
  <!-- #########################################################-->
483
- <div id="__hd_svelte_modal_root" class="z-30">
497
+ <div id="__hd_svelte_modal_root" class="z-30 sm:z-40">
484
498
  <!-- after <Modal/> component is shown it's rettached to above div
485
499
  see: modal.svelte afterUpdate -->
486
500
  </div>
@@ -3,7 +3,7 @@
3
3
  //import GoPrimitiveDot from 'svelte-icons/go/GoPrimitiveDot.svelte'
4
4
  import {showMenu} from './components/menu'
5
5
  import {push, pop, location} from 'svelte-spa-router'
6
- import {contextItemsStore, context_info_store, contextToolbarOperations, data_tick_store} from './stores.js'
6
+ import {contextItemsStore, context_info_store, contextToolbarOperations, data_tick_store, leftHandedFAB} from './stores.js'
7
7
  //import Menu from './components/contextmenu.svelte'
8
8
 
9
9
  import {
@@ -238,6 +238,12 @@
238
238
  });
239
239
  }
240
240
 
241
+ options.push({
242
+ caption: 'Left-handed floating actions',
243
+ icon: $leftHandedFAB ? FaToggleOn : FaToggleOff,
244
+ action: (f) => { $leftHandedFAB = !$leftHandedFAB; }
245
+ })
246
+
241
247
  if(has_selection_details)
242
248
  {
243
249
  options.push( {
package/index.d.ts CHANGED
@@ -57,13 +57,16 @@ export { default as KanbanComboProperty } from './components/kanban/kanban.combo
57
57
  export { default as KanbanTagsProperty } from './components/kanban/kanban.tags.svelte';
58
58
  export { default as KanbanCallbacks } from './components/kanban/kanban.callbacks.svelte';
59
59
  export { KanbanColumnTop, KanbanColumnBottom } from './components/kanban/Kanban';
60
+ export { default as Paginator } from './components/paginator.svelte';
61
+ export { default as Breadcrumb } from './components/breadcrumb.svelte';
62
+ export { breadcrumbAdd, breadcrumbParse, breadcrumbStringify, breadcrumbClipName } from './components/breadcrumb_utils';
60
63
  export { selectItem, activateItem, clearActiveItem, isActive, isSelected, getActive, editable, startEditing, saveCurrentEditable, selectable, handleSelect, isDeviceSmallerThan, resizeImage, refreshToolbarOperations, isOnScreenKeyboardVisible, randomString, UI, } from './utils';
61
64
  export { getNiceStringDateTime, getFormattedStringDate, getNiceStringDate, dayName, monthName } from './components/date_utils';
62
- export { mainContentPageReloader, reloadMainContentPage, reloadWholeApp, alerts, addAlert, onErrorShowAlert, main_sidebar_visible_store, tagsReloader, reloadVisibleTags, dark_mode_store } from './stores.js';
65
+ export { mainContentPageReloader, reloadMainContentPage, reloadWholeApp, alerts, addAlert, onErrorShowAlert, main_sidebar_visible_store, tagsReloader, reloadVisibleTags, dark_mode_store, showFABAlways } from './stores.js';
63
66
  export { data_tick_store, // tmp
64
67
  hasSelectedItem, hasDataItem, setNavigatorTitle } from "./stores";
65
68
  export { contextToolbarOperations, pageToolbarOperations, contextItemsStore, contextTypesStore } from './stores';
66
- export { informModification, informModificationEx, informItem, pushChanges } from './updates';
69
+ export { informModification, informModificationEx, informItem, pushChanges, hasModifications } from './updates';
67
70
  export { default as IcH1 } from './components/document/internal/h1.icon.svelte';
68
71
  export { default as IcH2 } from './components/document/internal/h2.icon.svelte';
69
72
  export { default as IcH3 } from './components/document/internal/h3.icon.svelte';
package/index.js CHANGED
@@ -63,13 +63,16 @@ export { default as KanbanComboProperty } from './components/kanban/kanban.combo
63
63
  export { default as KanbanTagsProperty } from './components/kanban/kanban.tags.svelte';
64
64
  export { default as KanbanCallbacks } from './components/kanban/kanban.callbacks.svelte';
65
65
  export { KanbanColumnTop, KanbanColumnBottom } from './components/kanban/Kanban';
66
+ export { default as Paginator } from './components/paginator.svelte';
67
+ export { default as Breadcrumb } from './components/breadcrumb.svelte';
68
+ export { breadcrumbAdd, breadcrumbParse, breadcrumbStringify, breadcrumbClipName } from './components/breadcrumb_utils';
66
69
  export { selectItem, activateItem, clearActiveItem, isActive, isSelected, getActive, editable, startEditing, saveCurrentEditable, selectable, handleSelect, isDeviceSmallerThan, resizeImage, refreshToolbarOperations, isOnScreenKeyboardVisible, randomString, UI, } from './utils';
67
70
  export { getNiceStringDateTime, getFormattedStringDate, getNiceStringDate, dayName, monthName } from './components/date_utils';
68
- export { mainContentPageReloader, reloadMainContentPage, reloadWholeApp, alerts, addAlert, onErrorShowAlert, main_sidebar_visible_store, tagsReloader, reloadVisibleTags, dark_mode_store } from './stores.js';
71
+ export { mainContentPageReloader, reloadMainContentPage, reloadWholeApp, alerts, addAlert, onErrorShowAlert, main_sidebar_visible_store, tagsReloader, reloadVisibleTags, dark_mode_store, showFABAlways } from './stores.js';
69
72
  export { data_tick_store, // tmp
70
73
  hasSelectedItem, hasDataItem, setNavigatorTitle } from "./stores";
71
74
  export { contextToolbarOperations, pageToolbarOperations, contextItemsStore, contextTypesStore } from './stores'; // tmp
72
- export { informModification, informModificationEx, informItem, pushChanges } from './updates'; // tmp
75
+ export { informModification, informModificationEx, informItem, pushChanges, hasModifications } from './updates'; // tmp
73
76
  export { default as IcH1 } from './components/document/internal/h1.icon.svelte';
74
77
  export { default as IcH2 } from './components/document/internal/h2.icon.svelte';
75
78
  export { default as IcH3 } from './components/document/internal/h3.icon.svelte';