@svgrid/enterprise 3.1.44 → 3.1.46

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 (52) hide show
  1. package/dist/cdn/svgrid-enterprise.svelte-external.js +1 -1
  2. package/dist/designer/assets/{index-CltOvNJn.js → index-BBI_8Aky.js} +214 -214
  3. package/dist/designer/index.html +1 -1
  4. package/dist/fields/BaseTableView.svelte +3 -2
  5. package/dist/fields/BaseTabs.svelte +26 -6
  6. package/dist/fields/FieldEditor.svelte +1 -1
  7. package/dist/fields/FieldEditor.svelte.d.ts +3 -0
  8. package/dist/fields/FieldsHeaderEnd.svelte +1 -1
  9. package/dist/fields/FormulaInput.svelte +122 -0
  10. package/dist/fields/FormulaInput.svelte.d.ts +10 -0
  11. package/dist/fields/FormulaInputHarness.svelte +5 -0
  12. package/dist/fields/FormulaInputHarness.svelte.d.ts +11 -0
  13. package/dist/fields/NumberEditor.svelte +1 -1
  14. package/dist/fields/PasteFields.svelte +33 -0
  15. package/dist/fields/PasteFields.svelte.d.ts +6 -0
  16. package/dist/fields/PropertyInput.svelte +4 -8
  17. package/dist/fields/SvBase.svelte +1 -1
  18. package/dist/fields/SvBase.svelte.d.ts +7 -0
  19. package/dist/fields/SvBaseViewBar.svelte +2 -2
  20. package/dist/fields/barcode-scan.d.ts +15 -4
  21. package/dist/fields/barcode-scan.js +1 -1
  22. package/dist/fields/base-import.js +2 -2
  23. package/dist/fields/celebrate.d.ts +29 -0
  24. package/dist/fields/celebrate.js +1 -0
  25. package/dist/fields/cell-colors.svelte.d.ts +17 -0
  26. package/dist/fields/cell-colors.svelte.js +1 -0
  27. package/dist/fields/editor-request.svelte.d.ts +7 -0
  28. package/dist/fields/excel-habits.svelte.d.ts +98 -0
  29. package/dist/fields/excel-habits.svelte.js +1 -0
  30. package/dist/fields/formula-docs.d.ts +24 -0
  31. package/dist/fields/formula-docs.js +1 -0
  32. package/dist/fields/index.d.ts +2 -0
  33. package/dist/fields/index.js +1 -1
  34. package/dist/fields/messages/fields.d.ts +28 -0
  35. package/dist/fields/messages/fields.js +1 -1
  36. package/dist/fields/messages/record.d.ts +1 -0
  37. package/dist/fields/messages/record.js +1 -1
  38. package/dist/fields/messages/shell.d.ts +24 -0
  39. package/dist/fields/messages/shell.js +1 -1
  40. package/dist/fields/messages/viewbar.d.ts +9 -0
  41. package/dist/fields/messages/viewbar.js +1 -1
  42. package/dist/fields/messages.svelte.d.ts +62 -0
  43. package/dist/fields/view-model.d.ts +3 -0
  44. package/dist/fields/view-model.js +1 -1
  45. package/dist/fields/viewbar/ColorPanel.svelte +54 -2
  46. package/dist/fields/viewbar/ColorPanel.svelte.d.ts +3 -0
  47. package/dist/node/studio.js +1 -1
  48. package/dist/version.d.ts +2 -2
  49. package/dist/version.js +1 -1
  50. package/dist/wc/sv-base-element.js +101 -96
  51. package/dist/wc/sv-sheet-element.js +43 -43
  52. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import OptionsEditor from"./OptionsEditor.svelte";import{FORMULA_FUNCTIONS,columnResolver,formulaError}from"./formula";import{aiPromptError}from"./ai-prompt";import{getFieldUsers}from"./sources.svelte";import{bm}from"./messages.svelte";let{def,value,fieldType,ctx,onChange}=$props();const id=$derived(`sv-fed-${def.key}`);const choices=$derived(def.kind==="choice"?typeof def.choices==="function"?def.choices(ctx):def.choices:[]);const names=$derived(ctx.columns.map(c=>String(c.header??c.field??"")).filter(Boolean));const formulaMessage=$derived(!String(value??"").trim()?null:def.kind==="formula"?formulaError(String(value),columnResolver(ctx.columns,ctx.self)):def.kind==="prompt"?aiPromptError(String(value),ctx.columns,ctx.self):null);const areaPlaceholder=$derived(def.kind==="prompt"?def.placeholder??"":bm("fields.formulaPlaceholder"));const selectOptions=$derived((ctx.props.options??[]).map(o=>String(o.value)).filter(Boolean));let formulaEl=$state(null);let showFunctions=$state(false);const inputValue=e=>e.currentTarget.value;const checkedOf=e=>e.currentTarget.checked;const numberOf=e=>{const raw=inputValue(e);return raw===""?void 0:Number(raw)};function insertField(name){const token=`{${name}}`;const el=formulaEl;const text=String(value??"");if(!el)return onChange(text+token);const at=el.selectionStart??text.length;onChange(text.slice(0,at)+token+text.slice(el.selectionEnd??at));queueMicrotask(()=>{el.focus();el.setSelectionRange(at+token.length,at+token.length)})}const toggleIn=(list,v)=>{const arr=Array.isArray(list)?list:[];return arr.includes(v)?arr.filter(x=>x!==v):[...arr,v]};
2
+ import OptionsEditor from"./OptionsEditor.svelte";import{columnResolver,formulaError}from"./formula";import FormulaInput from"./FormulaInput.svelte";import{aiPromptError}from"./ai-prompt";import{getFieldUsers}from"./sources.svelte";import{bm}from"./messages.svelte";let{def,value,fieldType,ctx,onChange}=$props();const id=$derived(`sv-fed-${def.key}`);const choices=$derived(def.kind==="choice"?typeof def.choices==="function"?def.choices(ctx):def.choices:[]);const names=$derived(ctx.columns.map(c=>String(c.header??c.field??"")).filter(Boolean));const formulaMessage=$derived(!String(value??"").trim()?null:def.kind==="formula"?formulaError(String(value),columnResolver(ctx.columns,ctx.self)):def.kind==="prompt"?aiPromptError(String(value),ctx.columns,ctx.self):null);const areaPlaceholder=$derived(def.kind==="prompt"?def.placeholder??"":bm("fields.formulaPlaceholder"));const selectOptions=$derived((ctx.props.options??[]).map(o=>String(o.value)).filter(Boolean));let formulaEl=$state(null);const inputValue=e=>e.currentTarget.value;const checkedOf=e=>e.currentTarget.checked;const numberOf=e=>{const raw=inputValue(e);return raw===""?void 0:Number(raw)};function insertField(name){const token=`{${name}}`;const el=formulaEl;const text=String(value??"");if(!el)return onChange(text+token);const at=el.selectionStart??text.length;onChange(text.slice(0,at)+token+text.slice(el.selectionEnd??at));queueMicrotask(()=>{el.focus();el.setSelectionRange(at+token.length,at+token.length)})}const toggleIn=(list,v)=>{const arr=Array.isArray(list)?list:[];return arr.includes(v)?arr.filter(x=>x!==v):[...arr,v]};
3
3
  </script>
4
4
 
5
5
  {#if def.kind === 'checkbox'}
@@ -70,7 +70,9 @@ import OptionsEditor from"./OptionsEditor.svelte";import{FORMULA_FUNCTIONS,colum
70
70
  {:else}
71
71
  <input {id} class="sv-pi-input" placeholder={bm('fields.empty')} value={String(value ?? '')} oninput={(e) => onChange(inputValue(e) || undefined)} />
72
72
  {/if}
73
- {:else if def.kind === 'formula' || def.kind === 'prompt'}
73
+ {:else if def.kind === 'formula'}
74
+ <FormulaInput {id} {value} {ctx} {onChange} />
75
+ {:else if def.kind === 'prompt'}
74
76
  <textarea
75
77
  {id}
76
78
  bind:this={formulaEl}
@@ -87,12 +89,6 @@ import OptionsEditor from"./OptionsEditor.svelte";import{FORMULA_FUNCTIONS,colum
87
89
  <div class="sv-pi-fields" aria-label={bm('fields.insertField')}>
88
90
  {#each names as n (n)}<button type="button" onclick={() => insertField(n)}>{n}</button>{/each}
89
91
  </div>
90
- {#if def.kind === 'formula'}
91
- <button type="button" class="sv-pi-more" aria-expanded={showFunctions} onclick={() => (showFunctions = !showFunctions)}>
92
- {showFunctions ? bm('fields.hideFunctions') : bm('fields.functions')}
93
- </button>
94
- {#if showFunctions}<p class="sv-pi-functions">{FORMULA_FUNCTIONS.join(', ')}</p>{/if}
95
- {/if}
96
92
  {:else if def.kind === 'columns'}
97
93
  <div {id} class="sv-pi-chips">
98
94
  {#each ctx.columns as c (String(c.id ?? c.field))}