Sorry, aber ich hatte eigentlich mehr die Fragestellung von @penguin im Fokus.
Und dafür könnte ich auch ein erstes Provisorium (Widget) liefern. Das Widget liefert bei der Eingabe des gesamten JSON-Strings eine Liste. Allerdings müsste man da noch etwas Hand anlegen um das ganze etwas "aufzuhübschen". Und natürlich müsste der String, dann auch noch aus dem Item gelesen werden.Das sollte aber dann nicht allzu schwer sein.
Yaml-Code:
Code: Alles auswählen
uid: z_test_anrufliste
tags:
- Anruferliste aus JSON-String
props:
parameters:
- description: Title of the card
label: Title
name: title
required: false
type: TEXT
- description: Background of the card e.g. linear-gradient(to top left,#B0E0E6 20%,#1E90FF 30%,#FFC0CB 60%) or green, etc, also hex and rgb
label: Background
name: background1
required: false
type: TEXT
- description: JSON-Array
label: JSON-String
name: datearray
required: false
type: TEXT
parameterGroups: []
timestamp: Nov 27, 2022, 4:29:34 PM
component: f7-card
config:
style:
background: '=(props.background1) ? props.background1 : "linear-gradient(to top left,#B0E0E6 20%,#1E90FF 30%,#FFC0CB 60%)"'
background-position: down
background-repeat: no-repeat
background-size: cover
border-radius: var(--f7-card-expandable-border-radius)
font-size: medium
height: auto
margin: 5px
noShadow: true
padding: 0px
title: =props.title
slots:
default:
- component: f7-card-content
slots:
default:
- component: f7-list
config:
mediaList: true
slots:
default:
- component: oh-repeater
config:
for: listitem
fragment: true
in: '=props.datearray.split("\},")'
slots:
default:
- component: oh-list-item
config:
title: =loop.listitem