@processmaker/screen-builder 3.5.0 → 3.5.1

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.
@@ -46889,7 +46889,11 @@ const yp = L_.exports, yg = [
46889
46889
  watch: {
46890
46890
  value: {
46891
46891
  handler(t) {
46892
- t && yg.forEach((e) => this[e] = t[e]);
46892
+ if (!t) {
46893
+ this.collectionId = null;
46894
+ return;
46895
+ }
46896
+ yg.forEach((e) => this[e] = t[e]);
46893
46897
  },
46894
46898
  immediate: !0
46895
46899
  },
@@ -47021,7 +47025,8 @@ const V_ = typeof window > "u" ? global : window, Xc = [
47021
47025
  flagDraft: {},
47022
47026
  taskDraft: {},
47023
47027
  enableDraft: !0,
47024
- defaultColumnsRecordId: 1
47028
+ defaultColumnsRecordId: 1,
47029
+ defaultCollectionMode: "Edit"
47025
47030
  };
47026
47031
  },
47027
47032
  computed: {
@@ -47071,14 +47076,17 @@ const V_ = typeof window > "u" ? global : window, Xc = [
47071
47076
  }
47072
47077
  },
47073
47078
  mounted() {
47074
- if (this.$root.$on("taskdraft-input", (t) => {
47075
- this.taskDraft = t;
47079
+ var t;
47080
+ if (this.$root.$on("taskdraft-input", (e) => {
47081
+ this.taskDraft = e;
47076
47082
  }), this.collection && this.record) {
47077
- const t = this.isMustache(this.record) ? this.defaultColumnsRecordId : this.record;
47078
- this.isMustache(this.record) && (this.hasMustache = !0), this.loadRecordCollection(
47083
+ const e = this.isMustache(this.record) ? this.defaultColumnsRecordId : this.record;
47084
+ this.isMustache(this.record) && (this.hasMustache = !0);
47085
+ const r = ((t = this.collectionmode) == null ? void 0 : t.modeId) ?? this.defaultCollectionMode;
47086
+ this.loadRecordCollection(
47079
47087
  this.collection.collectionId,
47080
- t,
47081
- this.collectionmode.modeId
47088
+ e,
47089
+ r
47082
47090
  );
47083
47091
  }
47084
47092
  },
@@ -47587,18 +47595,35 @@ const n$ = a$.exports, s$ = {
47587
47595
  data() {
47588
47596
  return {
47589
47597
  mode: "",
47590
- submitCollectionCheck: null
47598
+ submitCollectionCheck: null,
47599
+ defaultMode: "Edit"
47591
47600
  };
47592
47601
  },
47593
47602
  computed: {
47594
47603
  showCollectionCheck() {
47595
- return this.mode === "Edit";
47604
+ return this.mode === this.defaultMode;
47605
+ }
47606
+ },
47607
+ watch: {
47608
+ value: {
47609
+ handler(t) {
47610
+ this.updateModeAndCollectionCheck(t);
47611
+ },
47612
+ deep: !0
47596
47613
  }
47597
47614
  },
47598
47615
  mounted() {
47599
- this.mode = this.value.modeId || "Edit", this.submitCollectionCheck = this.value.submitCollectionCheck !== void 0 ? this.value.submitCollectionCheck : !0;
47616
+ this.updateModeAndCollectionCheck(this.value);
47600
47617
  },
47601
47618
  methods: {
47619
+ /**
47620
+ * Update the mode and collection check value
47621
+ *
47622
+ * @param {Object} value
47623
+ */
47624
+ updateModeAndCollectionCheck(t) {
47625
+ this.mode = t.modeId || this.defaultMode, this.submitCollectionCheck = t.submitCollectionCheck ?? !0;
47626
+ },
47602
47627
  saveFields() {
47603
47628
  this.$emit("input", {
47604
47629
  modeId: this.mode,