form-custom-test 3.0.136 → 3.0.137
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/dist/designer.es.js +66 -3
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +101 -101
- package/dist/render.es.js +66 -3
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +63 -63
- package/package.json +1 -1
package/dist/designer.es.js
CHANGED
|
@@ -27637,6 +27637,69 @@ const _sfc_main$2S = {
|
|
|
27637
27637
|
getStaticTextRefs() {
|
|
27638
27638
|
return Object.values(this.widgetRefList).filter((ref2) => ref2 && ref2.field && ref2.field.type === "static-text");
|
|
27639
27639
|
},
|
|
27640
|
+
updateFieldLabel(fieldName, newLabel) {
|
|
27641
|
+
if (!fieldName)
|
|
27642
|
+
return false;
|
|
27643
|
+
const labelText = newLabel == null ? "" : String(newLabel);
|
|
27644
|
+
const seen = new Set();
|
|
27645
|
+
const refsToUpdate = [];
|
|
27646
|
+
const pushRef = (r) => {
|
|
27647
|
+
if (!r || !r.field || !r.field.options || seen.has(r))
|
|
27648
|
+
return;
|
|
27649
|
+
if (r.field.options.name !== fieldName)
|
|
27650
|
+
return;
|
|
27651
|
+
seen.add(r);
|
|
27652
|
+
refsToUpdate.push(r);
|
|
27653
|
+
};
|
|
27654
|
+
Object.keys(this.widgetRefList).forEach((k) => {
|
|
27655
|
+
if (k === "v_form_ref")
|
|
27656
|
+
return;
|
|
27657
|
+
if (k === fieldName || k.startsWith(fieldName + "@row")) {
|
|
27658
|
+
pushRef(this.widgetRefList[k]);
|
|
27659
|
+
}
|
|
27660
|
+
});
|
|
27661
|
+
if (refsToUpdate.length > 0) {
|
|
27662
|
+
refsToUpdate.forEach((r) => {
|
|
27663
|
+
r.field.options.label = labelText;
|
|
27664
|
+
});
|
|
27665
|
+
this.$forceUpdate();
|
|
27666
|
+
return true;
|
|
27667
|
+
}
|
|
27668
|
+
const formJson = this.getFormJson();
|
|
27669
|
+
let updated = false;
|
|
27670
|
+
const walk = (list) => {
|
|
27671
|
+
if (!Array.isArray(list) || updated)
|
|
27672
|
+
return;
|
|
27673
|
+
list.forEach((w) => {
|
|
27674
|
+
if (updated || !w)
|
|
27675
|
+
return;
|
|
27676
|
+
if (w.options && w.options.name === fieldName) {
|
|
27677
|
+
w.options.label = labelText;
|
|
27678
|
+
updated = true;
|
|
27679
|
+
return;
|
|
27680
|
+
}
|
|
27681
|
+
if (Array.isArray(w.widgetList))
|
|
27682
|
+
walk(w.widgetList);
|
|
27683
|
+
if (Array.isArray(w.cols)) {
|
|
27684
|
+
w.cols.forEach((c) => walk(c && c.widgetList));
|
|
27685
|
+
}
|
|
27686
|
+
if (Array.isArray(w.rows)) {
|
|
27687
|
+
w.rows.forEach((r) => Array.isArray(r && r.cols) && r.cols.forEach((c) => walk(c && c.widgetList)));
|
|
27688
|
+
}
|
|
27689
|
+
if (Array.isArray(w.tabs)) {
|
|
27690
|
+
w.tabs.forEach((t) => walk(t && t.widgetList));
|
|
27691
|
+
}
|
|
27692
|
+
});
|
|
27693
|
+
};
|
|
27694
|
+
walk(formJson && formJson.widgetList);
|
|
27695
|
+
if (!updated)
|
|
27696
|
+
return false;
|
|
27697
|
+
this.setFormJson(formJson);
|
|
27698
|
+
return true;
|
|
27699
|
+
},
|
|
27700
|
+
setFieldLabel(fieldName, newLabel) {
|
|
27701
|
+
return this.updateFieldLabel(fieldName, newLabel);
|
|
27702
|
+
},
|
|
27640
27703
|
clearFormDataModel() {
|
|
27641
27704
|
for (let pkey in this.formDataModel) {
|
|
27642
27705
|
delete this.formDataModel[pkey];
|
|
@@ -27983,7 +28046,7 @@ function _sfc_render$2S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27983
28046
|
_: 3
|
|
27984
28047
|
}, 8, ["label-position", "size", "class", "label-width", "model"]);
|
|
27985
28048
|
}
|
|
27986
|
-
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2S, [["render", _sfc_render$2S], ["__scopeId", "data-v-
|
|
28049
|
+
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2S, [["render", _sfc_render$2S], ["__scopeId", "data-v-4626d18a"]]);
|
|
27987
28050
|
var ace$2 = { exports: {} };
|
|
27988
28051
|
(function(module, exports) {
|
|
27989
28052
|
(function() {
|
|
@@ -68549,13 +68612,13 @@ function registerIcon(app) {
|
|
|
68549
68612
|
if (typeof window !== "undefined") {
|
|
68550
68613
|
let loadSvg = function() {
|
|
68551
68614
|
var body = document.body;
|
|
68552
|
-
var svgDom = document.getElementById("
|
|
68615
|
+
var svgDom = document.getElementById("__svg__icons__dom__1778740533767__");
|
|
68553
68616
|
if (!svgDom) {
|
|
68554
68617
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
68555
68618
|
svgDom.style.position = "absolute";
|
|
68556
68619
|
svgDom.style.width = "0";
|
|
68557
68620
|
svgDom.style.height = "0";
|
|
68558
|
-
svgDom.id = "
|
|
68621
|
+
svgDom.id = "__svg__icons__dom__1778740533767__";
|
|
68559
68622
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
68560
68623
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
68561
68624
|
}
|