@cyprnet/node-red-contrib-uibuilder-formgen 0.5.27 → 0.5.29
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.
- package/CHANGELOG.md +8 -0
- package/examples/formgen-builder/src/index.html +20 -0
- package/examples/formgen-builder/src/index.js +28 -0
- package/examples/formgen-builder-uib2/src/index.html +20 -0
- package/examples/formgen-builder-uib2/src/index.js +28 -0
- package/nodes/uibuilder-formgen-v3.js +1 -1
- package/nodes/uibuilder-formgen.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -43,6 +43,14 @@ All notable changes to this package will be documented in this file.
|
|
|
43
43
|
|
|
44
44
|
- Results view: added column sorting (click header), search across all columns, and export of filtered results to JSON/CSV (Table/JSON views).
|
|
45
45
|
|
|
46
|
+
## 0.5.28
|
|
47
|
+
|
|
48
|
+
- Schema Builder: added move up/down controls to reorder fields within a section so generated portals keep your desired field order.
|
|
49
|
+
|
|
50
|
+
## 0.5.29
|
|
51
|
+
|
|
52
|
+
- Schema Builder: make field move controls always visible by using text arrows (↑/↓) instead of relying on Font Awesome icon rendering.
|
|
53
|
+
|
|
46
54
|
## 0.5.21
|
|
47
55
|
|
|
48
56
|
- Legacy uibuilder 2.x: fixed vendor library paths (<code>../vendor/...</code>) in the uib2 portal template and uib2 Schema Builder so uibuilder comms work and <code>lookup:get</code> messages emit correctly.
|
|
@@ -222,6 +222,26 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
</div>
|
|
224
224
|
<div>
|
|
225
|
+
<b-button
|
|
226
|
+
variant="outline-secondary"
|
|
227
|
+
size="sm"
|
|
228
|
+
class="mr-2"
|
|
229
|
+
@click="moveFieldUp(sectionIdx, fieldIdx)"
|
|
230
|
+
:disabled="fieldIdx === 0"
|
|
231
|
+
title="Move up"
|
|
232
|
+
>
|
|
233
|
+
<span aria-hidden="true">↑</span>
|
|
234
|
+
</b-button>
|
|
235
|
+
<b-button
|
|
236
|
+
variant="outline-secondary"
|
|
237
|
+
size="sm"
|
|
238
|
+
class="mr-2"
|
|
239
|
+
@click="moveFieldDown(sectionIdx, fieldIdx)"
|
|
240
|
+
:disabled="fieldIdx === (section.fields.length - 1)"
|
|
241
|
+
title="Move down"
|
|
242
|
+
>
|
|
243
|
+
<span aria-hidden="true">↓</span>
|
|
244
|
+
</b-button>
|
|
225
245
|
<b-button variant="outline-primary" size="sm" @click="editField(sectionIdx, fieldIdx)" class="mr-2">
|
|
226
246
|
<i class="fa fa-edit"></i>
|
|
227
247
|
</b-button>
|
|
@@ -859,6 +859,34 @@
|
|
|
859
859
|
this.showAlertMessage('Section deleted', 'success');
|
|
860
860
|
}
|
|
861
861
|
},
|
|
862
|
+
|
|
863
|
+
moveFieldUp(sectionIdx, fieldIdx) {
|
|
864
|
+
try {
|
|
865
|
+
const s = this.schema.sections[sectionIdx];
|
|
866
|
+
if (!s || !Array.isArray(s.fields)) return;
|
|
867
|
+
const i = Number(fieldIdx);
|
|
868
|
+
if (!Number.isFinite(i) || i <= 0 || i >= s.fields.length) return;
|
|
869
|
+
const [item] = s.fields.splice(i, 1);
|
|
870
|
+
s.fields.splice(i - 1, 0, item);
|
|
871
|
+
this.$forceUpdate();
|
|
872
|
+
} catch (e) {
|
|
873
|
+
console.error('Move field up error:', e);
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
|
|
877
|
+
moveFieldDown(sectionIdx, fieldIdx) {
|
|
878
|
+
try {
|
|
879
|
+
const s = this.schema.sections[sectionIdx];
|
|
880
|
+
if (!s || !Array.isArray(s.fields)) return;
|
|
881
|
+
const i = Number(fieldIdx);
|
|
882
|
+
if (!Number.isFinite(i) || i < 0 || i >= (s.fields.length - 1)) return;
|
|
883
|
+
const [item] = s.fields.splice(i, 1);
|
|
884
|
+
s.fields.splice(i + 1, 0, item);
|
|
885
|
+
this.$forceUpdate();
|
|
886
|
+
} catch (e) {
|
|
887
|
+
console.error('Move field down error:', e);
|
|
888
|
+
}
|
|
889
|
+
},
|
|
862
890
|
|
|
863
891
|
// Field management
|
|
864
892
|
addField(sectionIdx) {
|
|
@@ -221,6 +221,26 @@
|
|
|
221
221
|
</div>
|
|
222
222
|
</div>
|
|
223
223
|
<div>
|
|
224
|
+
<b-button
|
|
225
|
+
variant="outline-secondary"
|
|
226
|
+
size="sm"
|
|
227
|
+
class="mr-2"
|
|
228
|
+
@click="moveFieldUp(sectionIdx, fieldIdx)"
|
|
229
|
+
:disabled="fieldIdx === 0"
|
|
230
|
+
title="Move up"
|
|
231
|
+
>
|
|
232
|
+
<span aria-hidden="true">↑</span>
|
|
233
|
+
</b-button>
|
|
234
|
+
<b-button
|
|
235
|
+
variant="outline-secondary"
|
|
236
|
+
size="sm"
|
|
237
|
+
class="mr-2"
|
|
238
|
+
@click="moveFieldDown(sectionIdx, fieldIdx)"
|
|
239
|
+
:disabled="fieldIdx === (section.fields.length - 1)"
|
|
240
|
+
title="Move down"
|
|
241
|
+
>
|
|
242
|
+
<span aria-hidden="true">↓</span>
|
|
243
|
+
</b-button>
|
|
224
244
|
<b-button variant="outline-primary" size="sm" @click="editField(sectionIdx, fieldIdx)" class="mr-2">
|
|
225
245
|
<i class="fa fa-edit"></i>
|
|
226
246
|
</b-button>
|
|
@@ -859,6 +859,34 @@
|
|
|
859
859
|
this.showAlertMessage('Section deleted', 'success');
|
|
860
860
|
}
|
|
861
861
|
},
|
|
862
|
+
|
|
863
|
+
moveFieldUp(sectionIdx, fieldIdx) {
|
|
864
|
+
try {
|
|
865
|
+
const s = this.schema.sections[sectionIdx];
|
|
866
|
+
if (!s || !Array.isArray(s.fields)) return;
|
|
867
|
+
const i = Number(fieldIdx);
|
|
868
|
+
if (!Number.isFinite(i) || i <= 0 || i >= s.fields.length) return;
|
|
869
|
+
const [item] = s.fields.splice(i, 1);
|
|
870
|
+
s.fields.splice(i - 1, 0, item);
|
|
871
|
+
this.$forceUpdate();
|
|
872
|
+
} catch (e) {
|
|
873
|
+
console.error('Move field up error:', e);
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
|
|
877
|
+
moveFieldDown(sectionIdx, fieldIdx) {
|
|
878
|
+
try {
|
|
879
|
+
const s = this.schema.sections[sectionIdx];
|
|
880
|
+
if (!s || !Array.isArray(s.fields)) return;
|
|
881
|
+
const i = Number(fieldIdx);
|
|
882
|
+
if (!Number.isFinite(i) || i < 0 || i >= (s.fields.length - 1)) return;
|
|
883
|
+
const [item] = s.fields.splice(i, 1);
|
|
884
|
+
s.fields.splice(i + 1, 0, item);
|
|
885
|
+
this.$forceUpdate();
|
|
886
|
+
} catch (e) {
|
|
887
|
+
console.error('Move field down error:', e);
|
|
888
|
+
}
|
|
889
|
+
},
|
|
862
890
|
|
|
863
891
|
// Field management
|
|
864
892
|
addField(sectionIdx) {
|
|
@@ -528,7 +528,7 @@ module.exports = function(RED) {
|
|
|
528
528
|
"src/form.schema.json": { sha256: await sha256FileHex(targetSchema) },
|
|
529
529
|
};
|
|
530
530
|
const runtimeData = {
|
|
531
|
-
generatorVersion: "0.5.
|
|
531
|
+
generatorVersion: "0.5.29",
|
|
532
532
|
generatorNode: "uibuilder-formgen-v3",
|
|
533
533
|
timestamp: new Date().toISOString(),
|
|
534
534
|
instanceName: instanceName,
|
|
@@ -560,7 +560,7 @@ module.exports = function(RED) {
|
|
|
560
560
|
"src/form.schema.json": { sha256: await sha256FileHex(targetSchema) },
|
|
561
561
|
};
|
|
562
562
|
const runtimeData = {
|
|
563
|
-
generatorVersion: "0.5.
|
|
563
|
+
generatorVersion: "0.5.29",
|
|
564
564
|
timestamp: new Date().toISOString(),
|
|
565
565
|
instanceName: instanceName,
|
|
566
566
|
storageMode: storageMode,
|