* Turns a string into the JSON definition of a label field. If the string * becomes an empty string when trimmed, this returns null. * * @param str String to turn into the JSON definition of a label field. * @returns The JSON definition or null.
(str: string)
| 2202 | * @returns The JSON definition or null. |
| 2203 | */ |
| 2204 | private stringToFieldJson(str: string): {text: string; type: string} | null { |
| 2205 | str = str.trim(); |
| 2206 | if (str) { |
| 2207 | return { |
| 2208 | 'type': 'field_label', |
| 2209 | 'text': str, |
| 2210 | }; |
| 2211 | } |
| 2212 | return null; |
| 2213 | } |
| 2214 | |
| 2215 | /** |
| 2216 | * Move a named input to a different location on this block. |
no outgoing calls
no test coverage detected