@cyprnet/node-red-contrib-uibuilder-formgen 0.4.11 → 0.4.13

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.
@@ -148,7 +148,7 @@
148
148
  <h1>PortalSmith FormGen - Offline User Guide</h1>
149
149
  <p class="subtitle">Everything you need to install, configure, generate portals, use the schema builder, and customize formgen (offline HTML).</p>
150
150
  <div class="subtitle">
151
- <span class="pill">Node-RED contrib: <code>node-red-contrib-uibuilder-formgen</code></span>
151
+ <span class="pill">Node-RED contrib: <code>@cyprnet/node-red-contrib-uibuilder-formgen</code></span>
152
152
  <span class="pill">Works with: <code>uibuilder</code> + Vue 2 portals</span>
153
153
  </div>
154
154
  </div>
@@ -252,7 +252,7 @@
252
252
  <h3>Install the node</h3>
253
253
  <ol>
254
254
  <li>In Node-RED: Menu → Manage palette → Install</li>
255
- <li>Install <code>node-red-contrib-uibuilder-formgen</code> (or install from a <code>.tgz</code> file)</li>
255
+ <li>Install <code>@cyprnet/node-red-contrib-uibuilder-formgen</code> (or install from a <code>.tgz</code> file)</li>
256
256
  <li><strong>Restart Node-RED</strong></li>
257
257
  </ol>
258
258
 
@@ -351,7 +351,7 @@
351
351
 
352
352
  <div class="note ok">
353
353
  <strong>Where to get the Schema Builder files:</strong>
354
- After installing <code>node-red-contrib-uibuilder-formgen</code>, copy these files from the package:
354
+ After installing <code>@cyprnet/node-red-contrib-uibuilder-formgen</code>, copy these files from the package:
355
355
  <ul>
356
356
  <li><code>examples/formgen-builder/src/index.html</code></li>
357
357
  <li><code>examples/formgen-builder/src/index.js</code></li>
@@ -367,7 +367,7 @@
367
367
  <section id="schemas">
368
368
  <h2>Schema examples library (industry templates)</h2>
369
369
  <p>Example schemas are included with the node package under:</p>
370
- <pre>node-red-contrib-uibuilder-formgen/examples/schemas/</pre>
370
+ <pre>@cyprnet/node-red-contrib-uibuilder-formgen/examples/schemas/</pre>
371
371
 
372
372
  <h3>Industry folders</h3>
373
373
  <ul>
@@ -463,7 +463,7 @@ module.exports = function(RED) {
463
463
 
464
464
  // Write runtime metadata
465
465
  const runtimeData = {
466
- generatorVersion: "0.4.9",
466
+ generatorVersion: "0.4.12",
467
467
  timestamp: new Date().toISOString(),
468
468
  instanceName: instanceName,
469
469
  storageMode: storageMode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyprnet/node-red-contrib-uibuilder-formgen",
3
- "version": "0.4.11",
3
+ "version": "0.4.13",
4
4
  "description": "PortalSmith: Generate schema-driven uibuilder form portals from JSON",
5
5
  "keywords": [
6
6
  "node-red",
@@ -333,8 +333,8 @@
333
333
  <option
334
334
  v-for="(opt, optIdx) in (field.options || [])"
335
335
  :key="field.id + '-opt-' + optIdx"
336
- :value="opt.value"
337
- >{{opt.text}}</option>
336
+ :value="(typeof opt === 'string') ? opt : opt.value"
337
+ >{{ (typeof opt === 'string') ? opt : (opt.text || opt.label || opt.name || opt.value) }}</option>
338
338
  </select>
339
339
 
340
340
  <!-- Checkbox -->
@@ -361,11 +361,11 @@
361
361
  class="custom-control-input"
362
362
  :id="field.id + '-radio-' + optIdx"
363
363
  :name="field.id"
364
- :value="opt.value"
364
+ :value="(typeof opt === 'string') ? opt : opt.value"
365
365
  v-model="formData[field.id]"
366
366
  @change="validateField(field)"
367
367
  >
368
- <label class="custom-control-label" :for="field.id + '-radio-' + optIdx">{{opt.text}}</label>
368
+ <label class="custom-control-label" :for="field.id + '-radio-' + optIdx">{{ (typeof opt === 'string') ? opt : (opt.text || opt.label || opt.name || opt.value) }}</label>
369
369
  </div>
370
370
  </div>
371
371