|
1 | 1 | <!-- |
2 | 2 | @title MoonBase |
3 | | - @file MultiInput.svelte |
| 3 | + @file RowRenderer.svelte |
4 | 4 | @repo https://github.com/MoonModules/MoonLight, submit changes to this file as PRs |
5 | 5 | @Authors https://github.com/MoonModules/MoonLight/commits/main |
6 | 6 | @Copyright © 2025 Github MoonLight Commit Authors |
|
22 | 22 | import Delete from '~icons/tabler/trash'; |
23 | 23 | import { initCap } from '$lib/stores/moonbase_utilities'; |
24 | 24 |
|
25 | | - import EditObject from './EditObject.svelte'; |
| 25 | + import EditRowWidget from './EditRowWidget.svelte'; |
26 | 26 | import { modals } from 'svelte-modals'; |
27 | 27 | import Grip from '~icons/tabler/grip-vertical'; |
28 | | - import MultiInput from './MultiInput.svelte'; |
| 28 | + import FieldRenderer from './FieldRenderer.svelte'; |
29 | 29 | import { isNumber } from 'chart.js/helpers'; |
30 | 30 |
|
31 | 31 | let { property, data = $bindable(), definition, onChange, changeOnInput } = $props(); |
|
82 | 82 |
|
83 | 83 | function handleEdit(propertyName: string, itemToEdit: any) { |
84 | 84 | console.log('handleEdit', propertyName); |
85 | | - modals.open(EditObject as any, { |
| 85 | + modals.open(EditRowWidget as any, { |
86 | 86 | property, |
87 | 87 | localDefinition, |
88 | 88 | title: initCap(propertyName), |
|
178 | 178 |
|
179 | 179 | <!-- Search Filter --> |
180 | 180 | {#if findItemInDefinition?.filter != null} |
181 | | - <MultiInput |
| 181 | + <FieldRenderer |
182 | 182 | property={propertyFilter} |
183 | 183 | bind:value={data[property.name + '_filter']} |
184 | 184 | noPrompts={false} |
185 | 185 | onChange={(event) => { |
186 | 186 | onChange(event); |
187 | 187 | }} |
188 | | - ></MultiInput> |
| 188 | + ></FieldRenderer> |
189 | 189 | {#if data[property.name + '_filter']} |
190 | 190 | <div class="text-sm text-base-content/60 mt-1 ml-1"> |
191 | 191 | {filteredItems.length} of {data[property.name].length} items |
|
214 | 214 | return index < 3 || propertyN.show === true; |
215 | 215 | }) as propertyN} |
216 | 216 | {#if propertyN.type != 'array' && propertyN.type != 'controls' && propertyN.type != 'password'} |
217 | | - <MultiInput |
| 217 | + <FieldRenderer |
218 | 218 | property={propertyN} |
219 | 219 | bind:value={itemWrapper.item[propertyN.name]} |
220 | 220 | noPrompts={true} |
221 | 221 | onChange={(event) => { |
222 | 222 | onChange(event); |
223 | 223 | }} |
224 | | - ></MultiInput> |
| 224 | + ></FieldRenderer> |
225 | 225 | {/if} |
226 | 226 | {/each} |
227 | 227 | <!-- Show nr of controls --> |
|
0 commit comments