@humandialog/forms.svelte 1.6.1 → 1.6.2

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 @@ import { rList_definition, rList_property_type } from "../List";
18
18
  import { push, link } from "svelte-spa-router";
19
19
  import { FaExternalLinkAlt } from "svelte-icons/fa/";
20
20
  import Tags from "../../tags.svelte";
21
+ import { ext } from "../../../i18n";
21
22
  export let item;
22
23
  export let title = "";
23
24
  export let summary = "";
@@ -250,7 +251,7 @@ export function scrollToView() {
250
251
 
251
252
  <!-- svelte-ignore a11y-click-events-have-key-events -->
252
253
  {#if item}
253
- {@const element_title = item[title]}
254
+ {@const element_title = ext(item[title])}
254
255
 
255
256
  <section class="my-1 flex flex-row w-full text-stone-900 dark:text-stone-300 cursor-default rounded-md border border-transparent {selected_class} {focused_class} scroll-mt-[50px] sm:scroll-mt-[40px]"
256
257
  role="menu"
@@ -328,8 +329,9 @@ export function scrollToView() {
328
329
  </section>
329
330
 
330
331
  {#if summary && (item[summary] || placeholder=='Summary')}
332
+ {@const summaryText = ext(item[summary])}
331
333
  {@const element_id = `__hd_list_ctrl_${getItemKey(item)}_Summary`}
332
- {#key item[summary] }
334
+ {#key summaryText }
333
335
  {#if is_row_active}
334
336
  <p id={element_id}
335
337
  class=" text-sm
@@ -340,14 +342,14 @@ export function scrollToView() {
340
342
  onFinish: (d) => {placeholder='';},
341
343
  active: true
342
344
  }}>
343
- {item[summary]}
345
+ {summaryText}
344
346
  </p>
345
347
  {:else}
346
348
  <p id={element_id}
347
349
  class=" text-sm
348
350
  text-stone-600 dark:text-stone-400"
349
351
  on:click={(e) => on_active_row_clicked(e, 'bottom')}>
350
- {item[summary]}
352
+ {summaryText}
351
353
  </p>
352
354
  {/if}
353
355
  {/key}
package/i18n.js CHANGED
@@ -162,6 +162,9 @@ export function i18n(list)
162
162
 
163
163
  export function extractTranslated(str)
164
164
  {
165
+ if(!str)
166
+ return ""
167
+
165
168
  if(str.startsWith('_;'))
166
169
  {
167
170
  const body = str.replace(/^_;\s*/, ''); // cut prefix "_; "
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humandialog/forms.svelte",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Basic Svelte UI components for Object Reef applications",
5
5
  "devDependencies": {
6
6
  "@playwright/test": "^1.28.1",