@humandialog/forms.svelte 1.1.3 → 1.1.5

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.
@@ -26,8 +26,13 @@ afterUpdate(() => {
26
26
  let container_rect = new DOMRect(m, 0, window.innerWidth - 2 * m, window.innerHeight);
27
27
  if (isDeviceSmallerThan("sm")) {
28
28
  const sel = window.getSelection();
29
+ console.log("sel", sel);
29
30
  if (sel && sel.rangeCount > 0 && sel.focusNode && sel.focusNode.nodeType == sel.focusNode.TEXT_NODE) {
30
- container_rect.height -= 300;
31
+ const el = sel.focusNode.parentElement;
32
+ if (el && (el.isContentEditable || el.contentEditable == "true" || el.tagName == "INPUT")) {
33
+ console.log("keyboard visible, move menu 300px up", el);
34
+ container_rect.height -= 300;
35
+ }
31
36
  }
32
37
  }
33
38
  let xShifted = false;
@@ -167,26 +167,42 @@ function activateRow(e) {
167
167
  on:keyup
168
168
  class=" border border-transparent rounded-lg
169
169
  text-lg sm:text-base font-normal
170
- text-stone-900 sm:hover:bg-stone-100
171
- dark:text-white sm:dark:hover:bg-stone-700 {user_class}"
170
+ text-stone-900 dark:text-white {user_class}"
171
+ class:sm:hover:bg-stone-100={!!href}
172
+ class:sm:dark:hover:bg-stone-700={!!href}
172
173
  class:bg-stone-200={isRowActive}
173
174
  class:dark:bg-stone-700={isRowActive}
174
175
  class:selected={selected(selectable, context_data)}>
175
176
  <div class="flex flex-row justify-between">
176
- <a href={href}
177
- on:click={on_link_clicked}
178
- class="flex-1 ml-2 mt-3 sm:mt-2 inline-flex items-center group"
179
- class:mb-3={!summary}
180
- class:sm:mb-2={!summary}
181
- >
182
- {#if icon}
183
- <Icon size={5} component={icon}/>
184
- {/if}
185
- <span class="ml-3 group-hover:underline"
186
- use:editable_if_needed={editable}>
187
- <slot/>
188
- </span>
189
- </a>
177
+ {#if href}
178
+ <a href={href}
179
+ on:click={on_link_clicked}
180
+ class="flex-1 ml-2 mt-3 sm:mt-2 inline-flex items-center group"
181
+ class:mb-3={!summary}
182
+ class:sm:mb-2={!summary}
183
+ >
184
+ {#if icon}
185
+ <Icon size={5} component={icon}/>
186
+ {/if}
187
+ <span class="ml-3 group-hover:underline"
188
+ use:editable_if_needed={editable}>
189
+ <slot/>
190
+ </span>
191
+ </a>
192
+ {:else}
193
+ <p class="flex-1 ml-2 mt-3 sm:mt-2 inline-flex items-center group cursor-default"
194
+ class:mb-3={!summary}
195
+ class:sm:mb-2={!summary}
196
+ use:selectable_if_needed={selectable}>
197
+ {#if icon}
198
+ <Icon size={5} component={icon}/>
199
+ {/if}
200
+ <span class="ml-3"
201
+ use:editable_if_needed={editable}>
202
+ <slot/>
203
+ </span>
204
+ </p>
205
+ {/if}
190
206
 
191
207
  {#if !isOnPage}
192
208
  <section class="flex-0 w-20 sm:w-12 h-10 flex-0 flex flex-row"
package/desk.svelte CHANGED
@@ -156,10 +156,18 @@
156
156
  }
157
157
 
158
158
  //$: screen.width = innerWidth;
159
+
160
+ $: switchBodyClass($dark_mode_store);
161
+ function switchBodyClass(...args)
162
+ {
163
+ document.body.className = $dark_mode_store;
164
+ }
165
+
159
166
  </script>
160
167
 
161
168
  <svelte:window bind:innerWidth bind:outerWidth bind:innerHeight bind:outerHeight />
162
169
 
170
+
163
171
  <!--AuthorizedView {autoRedirectToSignIn}-->
164
172
 
165
173
  {#key $wholeAppReloader}
@@ -290,6 +298,8 @@
290
298
  /* Track */
291
299
  /* Handle */
292
300
  /* Handle on hover */
301
+ --tw-bg-opacity: 1;
302
+ background-color: rgb(255 255 255/var(--tw-bg-opacity));
293
303
  }
294
304
  #__hd_svelte_layout_root ::-webkit-scrollbar {
295
305
  width: 10px;
@@ -309,6 +319,8 @@
309
319
  /* Track */
310
320
  /* Handle */
311
321
  /* Handle on hover */
322
+ --tw-bg-opacity: 1;
323
+ background-color: rgb(28 25 23/var(--tw-bg-opacity));
312
324
  }
313
325
  #__hd_svelte_layout_root.dark ::-webkit-scrollbar {
314
326
  width: 10px;
@@ -321,4 +333,15 @@
321
333
  }
322
334
  #__hd_svelte_layout_root.dark ::-webkit-scrollbar-thumb:hover {
323
335
  background: #57534e;
336
+ }
337
+
338
+ /* bg-white */
339
+ :global(body) {
340
+ --tw-bg-opacity: 1;
341
+ background-color: rgb(255 255 255/var(--tw-bg-opacity));
342
+ }
343
+
344
+ :global(body.dark) {
345
+ --tw-bg-opacity: 1;
346
+ background-color: rgb(28 25 23/var(--tw-bg-opacity));
324
347
  }</style>
@@ -53,7 +53,7 @@
53
53
  show_sign_in_out_icons = config.signin ? true : false;
54
54
  sign_in_href = $signInHRef;
55
55
  sign_out_href = $signOutHRef;
56
- user_is_in_multiple_groups = $session.tenants.length > 1
56
+ //user_is_in_multiple_groups = $session.tenants.length > 1
57
57
 
58
58
  tabs = Object.keys(appConfig.sidebar);
59
59
  if(tabs.length > 1)
package/index.d.ts CHANGED
@@ -53,7 +53,7 @@ export { default as KanbanTagsProperty } from './components/kanban/kanban.tags.s
53
53
  export { default as KanbanCallbacks } from './components/kanban/kanban.callbacks.svelte';
54
54
  export { KanbanColumnTop, KanbanColumnBottom } from './components/kanban/Kanban';
55
55
  export { selectItem, activateItem, clearActiveItem, isActive, isSelected, getActive, editable, startEditing, saveCurrentEditable, selectable, handleSelect, isDeviceSmallerThan } from './utils';
56
- export { mainContentPageReloader, reloadMainContentPage } from './stores.js';
56
+ export { mainContentPageReloader, reloadMainContentPage, reloadWholeApp } from './stores.js';
57
57
  export { data_tick_store, // tmp
58
58
  hasSelectedItem, hasDataItem, setNavigatorTitle } from "./stores";
59
59
  export { contextToolbarOperations, pageToolbarOperations, contextItemsStore, contextTypesStore } from './stores';
package/index.js CHANGED
@@ -59,7 +59,7 @@ export { default as KanbanTagsProperty } from './components/kanban/kanban.tags.s
59
59
  export { default as KanbanCallbacks } from './components/kanban/kanban.callbacks.svelte';
60
60
  export { KanbanColumnTop, KanbanColumnBottom } from './components/kanban/Kanban';
61
61
  export { selectItem, activateItem, clearActiveItem, isActive, isSelected, getActive, editable, startEditing, saveCurrentEditable, selectable, handleSelect, isDeviceSmallerThan } from './utils';
62
- export { mainContentPageReloader, reloadMainContentPage } from './stores.js';
62
+ export { mainContentPageReloader, reloadMainContentPage, reloadWholeApp } from './stores.js';
63
63
  export { data_tick_store, // tmp
64
64
  hasSelectedItem, hasDataItem, setNavigatorTitle } from "./stores";
65
65
  export { contextToolbarOperations, pageToolbarOperations, contextItemsStore, contextTypesStore } from './stores'; // tmp
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humandialog/forms.svelte",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Basic Svelte UI components for Object Reef applications",
5
5
  "devDependencies": {
6
6
  "@playwright/test": "^1.28.1",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "type": "module",
28
28
  "dependencies": {
29
- "@humandialog/auth.svelte": "^1.8.1",
29
+ "@humandialog/auth.svelte": "^1.8.2",
30
30
  "flowbite-svelte": "^0.44.4",
31
31
  "svelte-icons": "^2.1.0",
32
32
  "svelte-spa-router": "^4.0.1"
@@ -76,7 +76,7 @@
76
76
  }
77
77
  }
78
78
 
79
- show_groups_switch_menu = $session.tenants.length > 1
79
+ /*show_groups_switch_menu = $session.tenants.length > 1
80
80
 
81
81
  if($session.configuration.tenant)
82
82
  {
@@ -89,6 +89,7 @@
89
89
  }))
90
90
 
91
91
  }
92
+ */
92
93
 
93
94
  }
94
95