File tree Expand file tree Collapse file tree 6 files changed +34
-11
lines changed
src/lib/components/common/jschema Expand file tree Collapse file tree 6 files changed +34
-11
lines changed Original file line number Diff line number Diff line change 11<script >
22 import { onMount } from ' svelte' ;
33 import PropertyDiscriminator from ' $lib/components/common/jschema/PropertyDiscriminator.svelte' ;
4+ import PropertyDescription from ' $lib/components/common/jschema/PropertyDescription.svelte' ;
45
56 export let schemaProperty = undefined ;
67 let nestedProperties = [];
2930
3031{#if schemaProperty }
3132 < div class = ' d-flex flex-column p-2' >
32- < div class = ' property-metadata d-flex flex-column w-100' >
33+ < div class = ' property-metadata d-flex flex-row w-100' >
3334 < span class = ' {schemaProperty.isRequired() ? "fw-bold" : ""}' > { schemaProperty .title || " " }< / span>
35+ < PropertyDescription description= {schemaProperty .description } / >
3436 < / div>
3537 < div class = ' array-items my-2' >
3638
Original file line number Diff line number Diff line change 11<script >
22 import { getContext } from ' svelte' ;
3+ import PropertyDescription from ' $lib/components/common/jschema/PropertyDescription.svelte' ;
34
45 const schemaManager = getContext (' schemaManager' );
56
1314
1415{#if schemaProperty }
1516 <div class =' d-flex align-items-center p-2' >
16- <div class =' property-metadata d-flex flex-column align-self-center w-50' >
17+ <div class =' property-metadata d-flex flex-row align-self-center w-50' >
1718 <span class ='' >{ schemaProperty .title || ' Boolean argument' }</span >
18- {#if schemaProperty .description }
19- {/if }
19+ <PropertyDescription description ={schemaProperty .description } />
2020 </div >
2121 <div class =' property-input ms-auto w-25' >
2222 <div class =' form-check' >
Original file line number Diff line number Diff line change 11<script >
22 import { getContext } from ' svelte' ;
3+ import PropertyDescription from ' $lib/components/common/jschema/PropertyDescription.svelte' ;
34
45 const schemaManager = getContext (' schemaManager' );
56
1617
1718{#if schemaProperty }
1819 <div class =' d-flex align-items-center p-2' >
19- <div class =' property-metadata d-flex flex-column align-self-center w-50' >
20+ <div class =' property-metadata d-flex flex-row align-self-center w-50' >
2021 <span
2122 class =' {schemaProperty .isRequired () ? " fw-bold" : " " }' >{ schemaProperty .title || ' Number argument' }</span >
22- {#if schemaProperty .description }
23- {/if }
23+ <PropertyDescription description ={schemaProperty .description } />
2424 </div >
2525 <div class =' property-input ms-auto w-25' >
2626 <input type ='number' bind:value ={schemaProperty .value } on:change ={handleValueChange } class =' form-control' >
Original file line number Diff line number Diff line change 11<script >
22 import { onMount } from ' svelte' ;
33 import PropertiesBlock from ' $lib/components/common/jschema/PropertiesBlock.svelte' ;
4+ import PropertyDescription from ' $lib/components/common/jschema/PropertyDescription.svelte' ;
45
56 export let objectSchema = undefined ;
67
3637{#if objectSchema }
3738
3839 <div class =' d-flex flex-column p-2' >
39- <div class =' property-metadata d-flex flex-column w-100' >
40+ <div class =' property-metadata d-flex flex-row w-100' >
4041 <span class =' {objectSchema .isRequired () ? " fw-bold" : " " }' >{ objectSchema .title }</span >
42+ <PropertyDescription description ={objectSchema .description } />
4143 </div >
4244 <div class =' object-properties my-2' >
4345 <div class ='accordion' id =' {accordionParentKey }' >
Original file line number Diff line number Diff line change 1+ <script >
2+ import { onMount } from ' svelte' ;
3+
4+ export let description = undefined ;
5+
6+ onMount (() => {
7+ const popoverTriggerList = document .querySelectorAll (' [data-bs-toggle="popover"]' );
8+ // eslint-disable-next-line no-undef
9+ popoverTriggerList .forEach (popoverEl => new bootstrap.Popover (popoverEl));
10+ });
11+
12+ </script >
13+
14+ <span class =' ms-2' >
15+ {#if description }
16+ <a tabindex =' 0' role =' button' data-bs-trigger =' focus' class =' bi bi-info-circle' data-bs-toggle =' popover'
17+ data-bs-title ='Argument description' data-bs-content ={description }></a >
18+ {/if }
19+ </span >
Original file line number Diff line number Diff line change 11<script >
22 import { getContext } from ' svelte' ;
3+ import PropertyDescription from ' $lib/components/common/jschema/PropertyDescription.svelte' ;
34
45 const schemaManager = getContext (' schemaManager' );
56
1314
1415{#if schemaProperty }
1516 <div class =' d-flex align-items-center p-2' >
16- <div class =' property-metadata d-flex flex-column align-self-center w-50' >
17+ <div class =' property-metadata d-flex flex-row align-self-center w-50' >
1718 <span
1819 class =' {schemaProperty .isRequired () ? " fw-bold" : " " }' >{ schemaProperty .title || ' String argument' }</span >
19- {#if schemaProperty .description }
20- {/if }
20+ <PropertyDescription description ={schemaProperty .description } />
2121 </div >
2222 <div class =' property-input ms-auto w-50' >
2323 <input type ='text' bind:value ={schemaProperty .value } on:change ={handleValueChange } class =' form-control' >
You can’t perform that action at this time.
0 commit comments