@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.
Files changed (258) hide show
  1. package/components/Fab.25.svelte +473 -0
  2. package/components/Fab.25.svelte.d.ts +18 -0
  3. package/components/Fab.svelte +51 -170
  4. package/components/Floating_container.25.svelte +178 -0
  5. package/components/Floating_container.25.svelte.d.ts +23 -0
  6. package/components/Floating_container.svelte +18 -6
  7. package/components/Grid.menu.svelte +15 -16
  8. package/components/Grid.menu.svelte.d.ts +2 -2
  9. package/components/breadcrumb.svelte +27 -27
  10. package/components/checkbox.svelte +1 -1
  11. package/components/combo/combo.svelte +60 -79
  12. package/components/combo/combo.svelte.d.ts +1 -0
  13. package/components/contextmenu-25.svelte +518 -0
  14. package/components/contextmenu-25.svelte.d.ts +26 -0
  15. package/components/contextmenu.svelte +179 -65
  16. package/components/contextmenu.svelte.d.ts +2 -2
  17. package/components/date.svelte +42 -21
  18. package/components/date.svelte.d.ts +1 -0
  19. package/components/delayed.spinner.svelte +2 -1
  20. package/components/document/editor.svelte +21 -31
  21. package/components/document/editor.svelte.d.ts +0 -2
  22. package/components/document/internal/palette.row.svelte +10 -8
  23. package/components/document/internal/palette.svelte +7 -8
  24. package/components/document/rich.edit.svelte +10 -10
  25. package/components/edit.field.svelte +1 -1
  26. package/components/input.text.svelte.d.ts +2 -2
  27. package/components/inputbox.ltop.svelte +1 -1
  28. package/components/inputbox.ltop.svelte.d.ts +12 -12
  29. package/components/kanban/internal/kanban.card.svelte +27 -47
  30. package/components/kanban/internal/kanban.column.svelte +44 -24
  31. package/components/kanban/internal/kanban.inserter.svelte +11 -14
  32. package/components/kanban/internal/kanban.move.menu.svelte +12 -12
  33. package/components/kanban/internal/kanban.props.svelte +24 -9
  34. package/components/kanban/kanban.svelte +24 -77
  35. package/components/kanban/kanban.svelte.d.ts +2 -0
  36. package/components/kanban copy.zip +0 -0
  37. package/components/list/List.d.ts +1 -0
  38. package/components/list/List.js +1 -0
  39. package/components/list/internal/list.element copy.svelte +530 -0
  40. package/components/list/internal/list.element copy.svelte.d.ts +35 -0
  41. package/components/list/internal/list.element.svelte +311 -279
  42. package/components/list/internal/list.element.svelte.d.ts +5 -7
  43. package/components/list/internal/list.inserter.svelte +38 -6
  44. package/components/list/internal/note.txt +5 -0
  45. package/components/list/list.svelte +32 -11
  46. package/components/list/list.svelte.d.ts +5 -3
  47. package/components/list/list.title.svelte +2 -0
  48. package/components/list/list.title.svelte.d.ts +1 -0
  49. package/components/menu.d.ts +1 -1
  50. package/components/menu.js +3 -3
  51. package/components/paginator.svelte +79 -9
  52. package/components/prose.editable.p.svelte.d.ts +2 -2
  53. package/components/prose.editable.span.svelte.d.ts +2 -2
  54. package/components/r.edit.svelte +9 -0
  55. package/components/r.edit.svelte.d.ts +23 -0
  56. package/components/r.editable.svelte +75 -0
  57. package/components/r.editable.svelte.d.ts +31 -0
  58. package/components/r.figcaption.svelte +5 -0
  59. package/components/r.figcaption.svelte.d.ts +27 -0
  60. package/components/r.figure.svelte +25 -0
  61. package/components/r.figure.svelte.d.ts +29 -0
  62. package/components/r.icon.svelte +229 -0
  63. package/components/r.icon.svelte.d.ts +33 -0
  64. package/components/radio.svelte +1 -1
  65. package/components/ricons/arrow-up.svelte +11 -0
  66. package/components/ricons/arrow-up.svelte.d.ts +27 -0
  67. package/components/ricons/barcode.svelte +14 -0
  68. package/components/ricons/barcode.svelte.d.ts +27 -0
  69. package/components/ricons/bold.svelte +10 -0
  70. package/components/ricons/bold.svelte.d.ts +27 -0
  71. package/components/ricons/calendar.svelte +13 -0
  72. package/components/ricons/calendar.svelte.d.ts +27 -0
  73. package/components/ricons/calendars.svelte +16 -0
  74. package/components/ricons/calendars.svelte.d.ts +27 -0
  75. package/components/ricons/cat.svelte +14 -0
  76. package/components/ricons/cat.svelte.d.ts +27 -0
  77. package/components/ricons/check-check.svelte +12 -0
  78. package/components/ricons/check-check.svelte.d.ts +27 -0
  79. package/components/ricons/check.svelte +18 -0
  80. package/components/ricons/check.svelte.d.ts +27 -0
  81. package/components/ricons/chess-rook.svelte +17 -0
  82. package/components/ricons/chess-rook.svelte.d.ts +27 -0
  83. package/components/ricons/chevron-down.svelte +11 -0
  84. package/components/ricons/chevron-down.svelte.d.ts +27 -0
  85. package/components/ricons/chevron-left.svelte +11 -0
  86. package/components/ricons/chevron-left.svelte.d.ts +27 -0
  87. package/components/ricons/chevron-right.svelte +11 -0
  88. package/components/ricons/chevron-right.svelte.d.ts +27 -0
  89. package/components/ricons/chevron-up.svelte +11 -0
  90. package/components/ricons/chevron-up.svelte.d.ts +27 -0
  91. package/components/ricons/chevrons-down.svelte +12 -0
  92. package/components/ricons/chevrons-down.svelte.d.ts +27 -0
  93. package/components/ricons/chevrons-left-right.svelte +12 -0
  94. package/components/ricons/chevrons-left-right.svelte.d.ts +27 -0
  95. package/components/ricons/chevrons-left.svelte +12 -0
  96. package/components/ricons/chevrons-left.svelte.d.ts +27 -0
  97. package/components/ricons/chevrons-right.svelte +12 -0
  98. package/components/ricons/chevrons-right.svelte.d.ts +27 -0
  99. package/components/ricons/chevrons-up-down.svelte +12 -0
  100. package/components/ricons/chevrons-up-down.svelte.d.ts +27 -0
  101. package/components/ricons/chevrons-up.svelte +12 -0
  102. package/components/ricons/chevrons-up.svelte.d.ts +27 -0
  103. package/components/ricons/circle-check.svelte +28 -0
  104. package/components/ricons/circle-check.svelte.d.ts +23 -0
  105. package/components/ricons/circle-dashed.svelte +19 -0
  106. package/components/ricons/circle-dashed.svelte.d.ts +27 -0
  107. package/components/ricons/circle-dot-dashed.svelte +20 -0
  108. package/components/ricons/circle-dot-dashed.svelte.d.ts +27 -0
  109. package/components/ricons/circle.svelte +30 -0
  110. package/components/ricons/circle.svelte.d.ts +23 -0
  111. package/components/ricons/clipboard-list.svelte +17 -0
  112. package/components/ricons/clipboard-list.svelte.d.ts +27 -0
  113. package/components/ricons/clipboard-minus.svelte +9 -0
  114. package/components/ricons/clipboard-minus.svelte.d.ts +23 -0
  115. package/components/ricons/clipboard-pen-line.svelte +18 -0
  116. package/components/ricons/clipboard-pen-line.svelte.d.ts +27 -0
  117. package/components/ricons/code-xml.svelte +12 -0
  118. package/components/ricons/code-xml.svelte.d.ts +27 -0
  119. package/components/ricons/download.svelte +13 -0
  120. package/components/ricons/download.svelte.d.ts +27 -0
  121. package/components/ricons/ellipsis-vertical.svelte +14 -0
  122. package/components/ricons/ellipsis-vertical.svelte.d.ts +27 -0
  123. package/components/ricons/file-archive.svelte +18 -0
  124. package/components/ricons/file-archive.svelte.d.ts +27 -0
  125. package/components/ricons/file-text.svelte +17 -0
  126. package/components/ricons/file-text.svelte.d.ts +27 -0
  127. package/components/ricons/folder.svelte +12 -0
  128. package/components/ricons/folder.svelte.d.ts +27 -0
  129. package/components/ricons/heading-1.svelte +13 -0
  130. package/components/ricons/heading-1.svelte.d.ts +27 -0
  131. package/components/ricons/heading-2.svelte +13 -0
  132. package/components/ricons/heading-2.svelte.d.ts +27 -0
  133. package/components/ricons/heading-3.svelte +14 -0
  134. package/components/ricons/heading-3.svelte.d.ts +27 -0
  135. package/components/ricons/heading-4.svelte +14 -0
  136. package/components/ricons/heading-4.svelte.d.ts +27 -0
  137. package/components/ricons/heading-5.svelte +14 -0
  138. package/components/ricons/heading-5.svelte.d.ts +27 -0
  139. package/components/ricons/image.svelte +12 -0
  140. package/components/ricons/image.svelte.d.ts +27 -0
  141. package/components/ricons/italic.svelte +12 -0
  142. package/components/ricons/italic.svelte.d.ts +27 -0
  143. package/components/ricons/languages.svelte +15 -0
  144. package/components/ricons/languages.svelte.d.ts +27 -0
  145. package/components/ricons/list-checks.svelte +15 -0
  146. package/components/ricons/list-checks.svelte.d.ts +27 -0
  147. package/components/ricons/list-minus.svelte +14 -0
  148. package/components/ricons/list-minus.svelte.d.ts +27 -0
  149. package/components/ricons/list-ordered.svelte +16 -0
  150. package/components/ricons/list-ordered.svelte.d.ts +27 -0
  151. package/components/ricons/list-plus.svelte +14 -0
  152. package/components/ricons/list-plus.svelte.d.ts +27 -0
  153. package/components/ricons/list.svelte +15 -0
  154. package/components/ricons/list.svelte.d.ts +27 -0
  155. package/components/ricons/loader-circle.svelte +19 -0
  156. package/components/ricons/loader-circle.svelte.d.ts +27 -0
  157. package/components/ricons/log-in.svelte +12 -0
  158. package/components/ricons/log-in.svelte.d.ts +27 -0
  159. package/components/ricons/log-out.svelte +12 -0
  160. package/components/ricons/log-out.svelte.d.ts +27 -0
  161. package/components/ricons/message-square.svelte +12 -0
  162. package/components/ricons/message-square.svelte.d.ts +27 -0
  163. package/components/ricons/messages-square.svelte +15 -0
  164. package/components/ricons/messages-square.svelte.d.ts +27 -0
  165. package/components/ricons/minus.svelte +10 -0
  166. package/components/ricons/minus.svelte.d.ts +27 -0
  167. package/components/ricons/notebook-tabs.svelte +19 -0
  168. package/components/ricons/notebook-tabs.svelte.d.ts +27 -0
  169. package/components/ricons/notebook.svelte +16 -0
  170. package/components/ricons/notebook.svelte.d.ts +27 -0
  171. package/components/ricons/package.svelte +22 -0
  172. package/components/ricons/package.svelte.d.ts +27 -0
  173. package/components/ricons/paperclip.svelte +12 -0
  174. package/components/ricons/paperclip.svelte.d.ts +27 -0
  175. package/components/ricons/pencil.svelte +12 -0
  176. package/components/ricons/pencil.svelte.d.ts +27 -0
  177. package/components/ricons/pilcrow.svelte +12 -0
  178. package/components/ricons/pilcrow.svelte.d.ts +27 -0
  179. package/components/ricons/save.svelte +12 -0
  180. package/components/ricons/save.svelte.d.ts +27 -0
  181. package/components/ricons/square-check-big.svelte +13 -0
  182. package/components/ricons/square-check-big.svelte.d.ts +27 -0
  183. package/components/ricons/square-pen.svelte +14 -0
  184. package/components/ricons/square-pen.svelte.d.ts +27 -0
  185. package/components/ricons/square.svelte +10 -0
  186. package/components/ricons/square.svelte.d.ts +27 -0
  187. package/components/ricons/strikethrough.svelte +13 -0
  188. package/components/ricons/strikethrough.svelte.d.ts +27 -0
  189. package/components/ricons/sun-moon.svelte +15 -0
  190. package/components/ricons/sun-moon.svelte.d.ts +27 -0
  191. package/components/ricons/table.svelte +13 -0
  192. package/components/ricons/table.svelte.d.ts +27 -0
  193. package/components/ricons/tag.svelte +12 -0
  194. package/components/ricons/tag.svelte.d.ts +27 -0
  195. package/components/ricons/text-quote.svelte +14 -0
  196. package/components/ricons/text-quote.svelte.d.ts +27 -0
  197. package/components/ricons/turtle.svelte +13 -0
  198. package/components/ricons/turtle.svelte.d.ts +27 -0
  199. package/components/ricons/underline.svelte +11 -0
  200. package/components/ricons/underline.svelte.d.ts +27 -0
  201. package/components/ricons/upload.svelte +13 -0
  202. package/components/ricons/upload.svelte.d.ts +27 -0
  203. package/components/ricons/user.svelte +12 -0
  204. package/components/ricons/user.svelte.d.ts +27 -0
  205. package/components/ricons/users.svelte +14 -0
  206. package/components/ricons/users.svelte.d.ts +27 -0
  207. package/components/ricons/x.svelte +11 -0
  208. package/components/ricons/x.svelte.d.ts +27 -0
  209. package/components/sidebar/sidebar.brand.svelte +14 -13
  210. package/components/sidebar/sidebar.brand.svelte.d.ts +2 -2
  211. package/components/sidebar/sidebar.group.svelte +52 -30
  212. package/components/sidebar/sidebar.item.svelte +35 -141
  213. package/components/sidebar/sidebar.item.svelte.d.ts +2 -5
  214. package/components/sidebar/sidebar.list.svelte +8 -8
  215. package/components/sidebar/sidebar.svelte +19 -2
  216. package/components/simple.table.svelte.d.ts +4 -4
  217. package/components/table/_template.table.svelte.d.ts +4 -4
  218. package/components/tags.svelte +10 -3
  219. package/components/tags.svelte.d.ts +1 -0
  220. package/components/textarea.ltop.svelte.d.ts +2 -2
  221. package/components/tile.title.svelte.d.ts +2 -2
  222. package/desk.svelte +139 -144
  223. package/dialog.svelte +17 -7
  224. package/form.box.svelte.d.ts +4 -4
  225. package/horizontal.nav.tabs.svelte +197 -23
  226. package/horizontal.nav.tabs.svelte.d.ts +2 -2
  227. package/horizontal.toolbar.svelte +25 -18
  228. package/horizontal.toolbar.svelte.d.ts +2 -2
  229. package/index.d.ts +10 -3
  230. package/index.js +10 -3
  231. package/operations.svelte +51 -22
  232. package/package.json +89 -1
  233. package/page.row.svelte.d.ts +2 -2
  234. package/page.svelte +17 -7
  235. package/page.svelte.d.ts +10 -10
  236. package/paper.header.svelte +4 -0
  237. package/paper.header.svelte.d.ts +27 -0
  238. package/paper.nav.svelte +8 -0
  239. package/paper.nav.svelte.d.ts +27 -0
  240. package/paper.svelte +22 -6
  241. package/paper.svelte.d.ts +2 -0
  242. package/paper.table.svelte +27 -0
  243. package/paper.table.svelte.d.ts +27 -0
  244. package/paper.top.margin.svelte +5 -0
  245. package/paper.top.margin.svelte.d.ts +27 -0
  246. package/stores.d.ts +1 -1
  247. package/tenant.create.svelte +93 -0
  248. package/tenant.create.svelte.d.ts +29 -0
  249. package/tenant.members.svelte +116 -93
  250. package/tile.svelte.d.ts +4 -4
  251. package/tiles.row.svelte.d.ts +2 -2
  252. package/tiles.vertical.row.svelte.d.ts +2 -2
  253. package/updates.d.ts +4 -0
  254. package/updates.js +56 -14
  255. package/utils.d.ts +16 -4
  256. package/utils.js +214 -99
  257. package/vertical.toolbar.svelte +62 -47
  258. package/vertical.toolbar.svelte.d.ts +2 -2
@@ -1,5 +1,6 @@
1
1
  <script>import { afterUpdate, tick } from "svelte";
2
2
  import Icon from "./icon.svelte";
3
+ import Ricon from "./r.icon.svelte";
3
4
  import { contextItemsStore, pushToolsActionsOperations, popToolsActionsOperations, fabHiddenDueToPopup } from "../stores";
4
5
  import { isDeviceSmallerThan, isOnScreenKeyboardVisible } from "../utils";
5
6
  import {
@@ -30,6 +31,7 @@ let around_rect;
30
31
  let around_preference = 0;
31
32
  let css_position = "display: none";
32
33
  let closeButtonPos = "";
34
+ let onHide = void 0;
33
35
  $:
34
36
  display = visible ? "block" : "none";
35
37
  function calculatePosition(x2, y2, visible2, fresh) {
@@ -52,7 +54,7 @@ function calculatePosition(x2, y2, visible2, fresh) {
52
54
  }
53
55
  let maxHeight;
54
56
  if (myRect) {
55
- maxHeight = screenRect.height / 2 - margin;
57
+ maxHeight = screenRect.height - margin;
56
58
  if (myRect.height < maxHeight)
57
59
  maxHeight = myRect.height;
58
60
  const width = screenRect.width - 2 * margin;
@@ -60,7 +62,7 @@ function calculatePosition(x2, y2, visible2, fresh) {
60
62
  y2 = screenRect.bottom - maxHeight - margin;
61
63
  result = `left: ${x2}px; bottom: ${margin}px; width: ${width}px; max-height: ${maxHeight}px; display: block`;
62
64
  } else {
63
- maxHeight = screenRect.height / 2 - margin;
65
+ maxHeight = screenRect.height - margin;
64
66
  const width = screenRect.width - 2 * margin;
65
67
  x2 = margin;
66
68
  y2 = screenRect.bottom - maxHeight - margin;
@@ -167,7 +169,8 @@ function intersects(lpRect1, lpRect2) {
167
169
  return left <= right && top <= bottom;
168
170
  }
169
171
  let preventScrollRestorer = null;
170
- export async function show(around, _operations, preference = 0) {
172
+ export async function show(around, _operations, preference = 0, onHideCallback = void 0) {
173
+ onHide = onHideCallback;
171
174
  if (around instanceof DOMRect) {
172
175
  switch (preference) {
173
176
  case SHOW_MENU_BELOW:
@@ -230,6 +233,8 @@ export function hide() {
230
233
  preventScrollRestorer();
231
234
  preventScrollRestorer = null;
232
235
  }
236
+ if (onHide)
237
+ onHide();
233
238
  }
234
239
  export function getRenderedRect() {
235
240
  if (menu_root)
@@ -414,43 +419,82 @@ function isOperationDisabled(operation) {
414
419
 
415
420
 
416
421
  <div id="__hd_svelte_contextmenu"
417
- class=" bg-white dark:bg-stone-800
418
- text-stone-800 dark:text-stone-400 rounded-lg border
419
- border-stone-200 dark:border-stone-700 shadow-md
420
- z-40 fixed min-w-60 max-h-screen overflow-y-auto overscroll-contain"
422
+ class="
423
+ bg-stone-100 dark:bg-stone-800 rounded-lg shadow-md shadow-stone-500
424
+ dark:shadow-black z-40 fixed
425
+ sm:shadow-xl sm:shadow-slate-700/10
426
+ sm:dark:shadow-black/80
427
+ sm:outline sm:outline-1 sm:outline-stone-500
428
+ z-40 fixed min-w-60 max-h-screen "
429
+
421
430
  style={css_position}
422
431
  visible={visible}
423
432
  bind:this={menu_root}>
433
+ <div class="
434
+ paper w-full sm:w-[24rem]
435
+ prose prose-base prose-zinc dark:prose-invert prose-a:no-underline
436
+ sm:max-w-3xl
437
+
438
+ m-0 pt-3 pb-5 px-2
439
+ sm:rounded
440
+ sm:bg-stone-100 sm:dark:bg-stone-900
441
+ flex flex-col
442
+ ">
424
443
 
444
+ <!-------------------------------------------------------------------->
445
+ <!-- POPUP HEADER ---------------------------------------------------->
446
+ <!-------------------------------------------------------------------->
425
447
  {#if closeButtonPos}
426
- <button class=" fixed w-6 h-6 flex items-center justify-center
427
- focus:outline-none font-medium text-sm text-center"
428
- style={closeButtonPos}
429
- 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 -->
430
- <Icon component={FaTimes} s="md"/>
431
- </button>
448
+ <h3 class = "flex-none">
449
+ <div class="px-2 w-full flex flex-row justify-between">
450
+
451
+ <div class="grow ">
452
+ <span class="px-2 text-left"></span>
453
+ </div>
454
+ <div class="py-1.5 flex flex-row justify-between">
455
+ <button class="ml-4 w-6
456
+ hover:bg-stone-200 hover:dark:bg-stone-700
457
+ hover:outline hover:outline-8
458
+ hover:outline-stone-200 hover:dark:outline-stone-700"
459
+ on:click={hide}>
460
+ <Ricon icon = 'x' />
461
+ </button>
462
+ </div>
463
+ </div>
464
+ </h3>
432
465
  {/if}
433
466
 
434
- {#each operations as operation, index}
435
- {@const is_separator = operation.separator}
436
- {#if is_separator}
437
- {#if index>0 && index < operations.length-1}
438
- <hr class="my-1 mx-4 border-1 border-stone-300 dark:border-stone-700">
439
- {/if}
440
- {:else}
441
- {@const mobile = isDeviceSmallerThan("sm")}
442
- {@const icon_placeholder_without_desc = mobile ? 12 : 10}
443
- {@const icon_placeholder_with_desc = mobile ? 14 : 12}
444
- {@const icon_placeholder_size = operation.description ? icon_placeholder_with_desc : icon_placeholder_without_desc}
445
- {@const menu_item_id = menu_items_id_prefix + index}
446
- {@const isTop = index==0}
447
- {@const isBottom = index == operations.length-1}
448
- {@const isFocused = index == focused_index}
449
- {@const clipFocusedBorder = isFocused ? (isTop ? 'rounded-t-lg' : (isBottom ? 'rounded-b-lg' : '')) : ''}
450
- {@const active = calculateBackground(isFocused || isOperationActivated(operation), false)}
451
- {@const has_submenu = operation.menu !== undefined && operation.menu.length > 0}
452
467
 
453
- <button class="block w-full pr-4 text-left flex flex-row cursor-context-menu {active} focus:outline-none items-center"
468
+ <!-------------------------------------------------------------------->
469
+ <!-- POPUP CONTENT---------------------------------------------------->
470
+ <!-------------------------------------------------------------------->
471
+ <div class="px-2 grow max-h-[45dvh] sm:max-h-[75dvh] overflow-y-auto overscroll-contain">
472
+
473
+
474
+
475
+ {#each operations as operation, index}
476
+
477
+ {@const is_separator = operation.separator}
478
+ {#if is_separator}
479
+ {#if index>0 && index < operations.length-1}
480
+ <!--hr class="my-1 mx-4 border-1 border-stone-300 dark:border-stone-700"-->
481
+ <hr class="my-4">
482
+ {/if}
483
+ {:else}
484
+
485
+ {@const mobile = isDeviceSmallerThan("sm")}
486
+ {@const icon_placeholder_without_desc = mobile ? 12 : 10}
487
+ {@const icon_placeholder_with_desc = mobile ? 14 : 12}
488
+ {@const icon_placeholder_size = operation.description ? icon_placeholder_with_desc : icon_placeholder_without_desc}
489
+ {@const menu_item_id = menu_items_id_prefix + index}
490
+ {@const isTop = index==0}
491
+ {@const isBottom = index == operations.length-1}
492
+ {@const isFocused = index == focused_index}
493
+ {@const clipFocusedBorder = isFocused ? (isTop ? 'rounded-t-lg' : (isBottom ? 'rounded-b-lg' : '')) : ''}
494
+ {@const active = calculateBackground(isFocused || isOperationActivated(operation), false)}
495
+ {@const has_submenu = operation.menu !== undefined && operation.menu.length > 0}
496
+ <!--div-->
497
+ <div class="pl-4 cursor-pointer {active}"
454
498
  id={menu_item_id}
455
499
  bind:this={menu_items[index]}
456
500
  on:click|stopPropagation={(e) => { execute_action(e, operation, index) } }
@@ -460,45 +504,115 @@ function isOperationDisabled(operation) {
460
504
  disabled={isOperationDisabled(operation)}
461
505
  class:opacity-60={isOperationDisabled(operation)}>
462
506
 
463
- <div class="flex justify-center space-x-10 px-4 py-2 ml-12 sm:ml-0" >
464
- {#if operation.icon}
465
- {@const cc = mobile ? 7 : 6}
466
- {@const icon_size = icon_placeholder_size - cc}
467
- <Icon s="md" component={operation.icon}/>
468
- {:else if operation.img}
469
- {@const cc = mobile ? 7 : 6}
470
- {@const icon_size = icon_placeholder_size - cc}
471
- <div class="w-4 h-4">
472
- <img src={operation.img} alt=""/>
507
+
508
+
509
+ <h4 class = "font-normal my-0 py-2"> <!-- test -->
510
+ <div class=" w-full flex flex-row justify-between">
511
+ {#if operation.mricon}
512
+ <div class="py-1 mr-1 w-4"><Ricon icon = {operation.mricon} s/></div>
513
+ {:else if operation.icon}
514
+ <div class="py-1 mr-1 w-4 text-orange-500"><Icon s="md" component={operation.icon}/></div>
515
+ {:else}
516
+ <div class="py-1 mr-1 w-4"></div>
517
+ {/if}
518
+ <div class="grow">
519
+ <span class="px-2 text-left">{operation.caption}
520
+ </span>
473
521
  </div>
474
- {:else}
475
- {@const cc = mobile ? 7 : 6}
476
- {@const icon_size = icon_placeholder_size - cc}
477
- <div class="w-4 h-4"></div>
478
- {/if}
479
- </div>
480
- <div class="">
481
- <p class=""> {operation.caption}</p>
482
- {#if operation.description}
483
- <p class="truncate inline-block text-xs">
484
- {operation.description}
485
- </p>
486
- {/if}
487
- </div>
488
- {#if has_submenu}
489
- <p class="ms-auto pr-1 text-sm font-mono text-stone-500">&rarr;</p>
490
- <svelte:self bind:this={submenus[index]} menu_items_id_prefix={`${menu_item_id}_`} owner_menu_item={menu_items[index]}/>
491
- {/if}
492
- </button>
522
+
523
+ {#if has_submenu}
524
+ <div class="py-1 mr-1 w-4"><Ricon icon = 'chevron-right' xs/></div>
525
+ <svelte:self bind:this={submenus[index]} menu_items_id_prefix={`${menu_item_id}_`} owner_menu_item={menu_items[index]}/>
526
+ {/if}
527
+
528
+ </div>
529
+ </h4>
530
+
531
+
532
+
533
+ <!-- comming soon - top info --
534
+ <figcaption>
535
+ <div class="grid gap-4 grid-cols-3 grid-rows-1">
536
+ <span>OCT-254</span>
537
+ <span class="text-center"></span>
538
+ <span class="text-right">15 listopad 25</span>
539
+ </div>
540
+ </figcaption>
541
+ -------------------------------->
542
+ <!--@el------------------------->
543
+ <!-- comming soon - middle info --
544
+ <figcaption>
545
+ <div class="grid gap-4 grid-cols-3 grid-rows-1">
546
+ <span>Andrzej</span>
547
+ <span class="text-center"></span>
548
+ <span class="text-right">Specyfikacje</span>
549
+ </div>
550
+ </figcaption>
551
+
552
+
553
+ {#if summary && item[summary]}
554
+ <figcaption>
555
+ {item[summary]}
556
+ </figcaption>
493
557
  {/if}
494
- {/each}
495
- </div>
558
+ -------------------------------->
559
+ </div>
560
+ <!--/div-->
561
+ {#if false}
562
+ <button class="block w-full pr-4 text-left flex flex-row cursor-context-menu {active} focus:outline-none items-center"
563
+ id={menu_item_id}
564
+ bind:this={menu_items[index]}
565
+ on:click|stopPropagation={(e) => { execute_action(e, operation, index) } }
566
+ on:mouseenter = {(e) => {on_mouse_move(index)}}
567
+ on:keydown|stopPropagation={(e) => on_keydown(e, operation, index)}
568
+ on:mousedown={mousedown}
569
+ disabled={isOperationDisabled(operation)}
570
+ class:opacity-60={isOperationDisabled(operation)}>
571
+
572
+ <div class="flex justify-center space-x-10 px-4 py-2 ml-12 sm:ml-0" >
573
+ {#if operation.icon}
574
+ {@const cc = mobile ? 7 : 6}
575
+ {@const icon_size = icon_placeholder_size - cc}
576
+ <Icon s="md" component={operation.icon}/>
577
+ {:else if operation.img}
578
+ {@const cc = mobile ? 7 : 6}
579
+ {@const icon_size = icon_placeholder_size - cc}
580
+ <div class="w-4 h-4">
581
+ <img src={operation.img} alt=""/>
582
+ </div>
583
+ {:else}
584
+ {@const cc = mobile ? 7 : 6}
585
+ {@const icon_size = icon_placeholder_size - cc}
586
+ <div class="w-4 h-4"></div>
587
+ {/if}
588
+ </div>
589
+ <div class="">
590
+ <p class=""> {operation.caption}</p>
591
+ {#if operation.description}
592
+ <p class="truncate inline-block text-xs">
593
+ {operation.description}
594
+ </p>
595
+ {/if}
596
+ </div>
597
+ {#if has_submenu}
598
+ <p class="ms-auto pr-1 text-sm font-mono text-stone-500">&rarr;</p>
599
+ <svelte:self bind:this={submenus[index]} menu_items_id_prefix={`${menu_item_id}_`} owner_menu_item={menu_items[index]}/>
600
+ {/if}
601
+ </button>
602
+ {/if}
603
+ {/if}
604
+ {/each}
605
+ </div>
606
+ <!--/div-->
607
+
608
+ </div>
609
+ </div>
496
610
 
497
611
  <!-- use usePreventScroll instead -->
498
612
  <!--style>
499
- :global(#__hd_svelte_layout_root:has(#__hd_svelte_contextmenu[visible="true"]))
613
+ :global(#__hd_svelte_layout_root:has(#__hd_svelte_contextmenu[visible="true"]))
500
614
  {
501
615
  overflow: hidden;
502
616
  position: fixed;
503
617
  }
504
- </style-->
618
+ </style-->
@@ -4,7 +4,7 @@ declare const __propDef: {
4
4
  widthPx?: number | undefined;
5
5
  menu_items_id_prefix?: string | undefined;
6
6
  owner_menu_item?: HTMLElement | undefined;
7
- show?: ((around: DOMRect | DOMPoint, _operations: any, preference?: number) => Promise<void>) | undefined;
7
+ show?: ((around: DOMRect | DOMPoint, _operations: any, preference?: number, onHideCallback?: Function | undefined) => Promise<void>) | undefined;
8
8
  isVisible?: (() => boolean) | undefined;
9
9
  hide?: (() => void) | undefined;
10
10
  getRenderedRect?: (() => DOMRect | undefined) | undefined;
@@ -18,7 +18,7 @@ export type ContextmenuProps = typeof __propDef.props;
18
18
  export type ContextmenuEvents = typeof __propDef.events;
19
19
  export type ContextmenuSlots = typeof __propDef.slots;
20
20
  export default class Contextmenu extends SvelteComponentTyped<ContextmenuProps, ContextmenuEvents, ContextmenuSlots> {
21
- get show(): (around: DOMRect | DOMPoint, _operations: any, preference?: number) => Promise<void>;
21
+ get show(): (around: DOMRect | DOMPoint, _operations: any, preference?: number, onHideCallback?: Function | undefined) => Promise<void>;
22
22
  get isVisible(): () => boolean;
23
23
  get hide(): () => void;
24
24
  get getRenderedRect(): () => DOMRect | undefined;
@@ -2,6 +2,7 @@
2
2
  import { data_tick_store, contextItemsStore, contextTypesStore } from "../stores.js";
3
3
  import { informModification, pushChanges } from "../updates.js";
4
4
  import { parseWidthDirective, isDeviceSmallerThan } from "../utils.js";
5
+ import Ricon from "./r.icon.svelte";
5
6
  import FaChevronDown from "svelte-icons/fa/FaChevronDown.svelte";
6
7
  import { getFormattedStringDate, getNiceStringDate, getNiceStringDateTime } from "./date_utils.js";
7
8
  export let self = null;
@@ -15,9 +16,10 @@ export let changed = void 0;
15
16
  export let readOnly = false;
16
17
  export let s = "sm";
17
18
  export let c = "";
19
+ export let typo = false;
18
20
  export let compact = false;
19
21
  export let inContext = "sel";
20
- export let pushChangesImmediately = true;
22
+ export let pushChangesImmediately = false;
21
23
  let on_hide_callback = void 0;
22
24
  export function show(event, hide_callback) {
23
25
  if (event) {
@@ -92,7 +94,7 @@ let cs = parseWidthDirective(c);
92
94
  let style;
93
95
  let input_element = void 0;
94
96
  if (!is_compact) {
95
- style = `bg-stone-50 border border-stone-300 text-stone-900 text-sm rounded-lg
97
+ style = `bg-stone-50 border border-stone-300 text-stone-900 text-sm rounded-lg
96
98
  focus:ring-primary-600 focus:border-primary-600 block w-full ${input_pb} ${input_pt} px-2.5 dark:bg-stone-700
97
99
  dark:border-stone-600 dark:placeholder-stone-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500`;
98
100
  } else {
@@ -147,6 +149,7 @@ async function on_changed() {
147
149
  value = null;
148
150
  else
149
151
  value = new Date(rValue);
152
+ console.log("rValue", rValue, "value", value);
150
153
  if (onSelect) {
151
154
  await onSelect(value);
152
155
  } else if (item != null) {
@@ -170,11 +173,37 @@ function blur(e) {
170
173
  }
171
174
  </script>
172
175
 
173
- {#if is_compact}
176
+ {#if typo}
177
+ <div class="inline-block relative flex flex-row items-center">
178
+ <span class="mr-1">{pretty_value}</span>
179
+ <Ricon icon = "chevron-down" size="xs"/>
180
+
181
+ {#if can_be_activated}
182
+ {#if type == "datetime-local"}
183
+ <input type="datetime-local"
184
+ class="datepicker-input"
185
+ tabindex="-1"
186
+ on:change={on_changed}
187
+ bind:value={rValue}
188
+ bind:this={input_element}>
189
+ {:else}
190
+ <input type="date"
191
+ class="datepicker-input"
192
+ tabindex="-1"
193
+ on:change={on_changed}
194
+ bind:value={rValue}
195
+ bind:this={input_element}
196
+ on:blur={blur}>
197
+ {/if}
198
+ {/if}
199
+
200
+
201
+ </div>
202
+
203
+
204
+ {:else if is_compact}
174
205
  <div class="inline-block {line_h}">
175
- <div class="dark:text-stone-300 {font_size} truncate
176
- pl-0 pr-0
177
- h-full " >
206
+ <div class="dark:text-stone-300 truncate" >
178
207
  <p >
179
208
  <span class="inline-block relative flex flex-row items-center">
180
209
  <span class="grow-1 pr-2.5 ">
@@ -182,6 +211,7 @@ function blur(e) {
182
211
  </span>
183
212
 
184
213
  {#if can_be_activated}
214
+ <!--strzalka w dol-->
185
215
  <div class="no-print ml-auto w-3 h-3 {chevron_mt} text-stone-700 dark:text-stone-300">
186
216
  <FaChevronDown/>
187
217
  </div>
@@ -189,14 +219,14 @@ function blur(e) {
189
219
 
190
220
  {#if can_be_activated}
191
221
  {#if type == "datetime-local"}
192
- <input type="datetime-local"
222
+ <input type="datetime-local"
193
223
  class="datepicker-input"
194
224
  tabindex="-1"
195
225
  on:change={on_changed}
196
226
  bind:value={rValue}
197
227
  bind:this={input_element}>
198
228
  {:else}
199
- <input type="date"
229
+ <input type="date"
200
230
  class="datepicker-input"
201
231
  tabindex="-1"
202
232
  on:change={on_changed}
@@ -211,20 +241,19 @@ function blur(e) {
211
241
 
212
242
  </div>
213
243
 
214
-
215
244
  </div>
216
245
 
217
246
  {:else}
218
247
  {#if type == "datetime-local"}
219
- <input class=" dark:text-white {cs} {style} {line_h} px-2.5 {user_class}"
220
- type="datetime-local"
248
+ <input class=" dark:text-white {cs} {style} {line_h} px-2.5 {user_class}"
249
+ type="datetime-local"
221
250
  on:change={on_changed}
222
251
  bind:value={rValue}
223
252
  bind:this={input_element}
224
253
  />
225
254
  {:else}
226
- <input class=" dark:text-white {cs} {style} {line_h} px-2.5 {user_class}"
227
- type="date"
255
+ <input class=" dark:text-white {cs} {style} {line_h} px-2.5 {user_class}"
256
+ type="date"
228
257
  on:change={on_changed}
229
258
  bind:value={rValue}
230
259
  bind:this={input_element}
@@ -232,15 +261,10 @@ function blur(e) {
232
261
  {/if}
233
262
  {/if}
234
263
 
235
-
236
-
237
-
238
-
239
264
  <style>
240
265
  input:focus {
241
266
  outline: 0px solid transparent;
242
267
  }
243
-
244
268
  .datepicker-input{
245
269
  position: absolute;
246
270
  left: 0;
@@ -251,7 +275,6 @@ function blur(e) {
251
275
  cursor: pointer;
252
276
  box-sizing: border-box;
253
277
  }
254
-
255
278
  .datepicker-input::-webkit-calendar-picker-indicator {
256
279
  position: absolute;
257
280
  left: 0;
@@ -262,7 +285,6 @@ function blur(e) {
262
285
  padding: 0;
263
286
  cursor: pointer;
264
287
  }
265
-
266
288
  @media print
267
289
  {
268
290
  .no-print, .no-print *{
@@ -270,4 +292,3 @@ function blur(e) {
270
292
  }
271
293
  }
272
294
  </style>
273
-
@@ -13,6 +13,7 @@ declare const __propDef: {
13
13
  readOnly?: boolean | undefined;
14
14
  s?: string | undefined;
15
15
  c?: string | undefined;
16
+ typo?: boolean | undefined;
16
17
  compact?: boolean | undefined;
17
18
  inContext?: string | undefined;
18
19
  pushChangesImmediately?: boolean | undefined;
@@ -64,4 +64,5 @@ onMount(() => {
64
64
  d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
65
65
  fill="currentFill" />
66
66
  </svg>
67
- {/if}
67
+ {/if}
68
+