sd-render 1.1.2 → 1.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sd-render",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "author": {
5
5
  "name": "initcraft",
6
6
  "email": "iencoded@gmail.com"
@@ -9525,7 +9525,7 @@ const Mp = /* @__PURE__ */ B(Bu, [["render", Tp], ["__scopeId", "data-v-ff1dc326
9525
9525
  function Ta(e) {
9526
9526
  return e.includes("admin") || e.includes("super");
9527
9527
  }
9528
- const Pp = Xo(() => import("./sd-render-_hq6G7JE.js").then((e) => e.S)), Vp = L({
9528
+ const Pp = Xo(() => import("./sd-render-9ysg9JHS.js").then((e) => e.S)), Vp = L({
9529
9529
  name: "SdCrudForm",
9530
9530
  components: {
9531
9531
  SdFormRenderAsync: Pp
@@ -12170,7 +12170,7 @@ const pm = /* @__PURE__ */ B(sm, [["render", um]]), mm = L({
12170
12170
  if (l) {
12171
12171
  this.formData = { ...l, ...this.formData };
12172
12172
  let o = {};
12173
- this.beforeSave && (o = this.beforeSave(this.formData), this.formData = { ...this.formData, ...o }), this.formData.xclonex = e[this.keyId], this.formData.dataid = this.formData[this.keyId], delete this.formData.xrstatx, this.formData.xversionx = this.sdformModel.form_version;
12173
+ this.beforeSave && (o = this.beforeSave(this.formData), this.formData = { ...this.formData, ...o }), this.formData.xclonex = e[this.keyId], this.formData.dataid = this.formData[this.keyId], this.formData.xrstatx = 0, this.formData.xversionx = this.sdformModel.form_version;
12174
12174
  const i = await dt(this.sdformModel.dataid, this.formData[this.keyId], this.formData, 1, this.useUserState), d = i.data;
12175
12175
  d ? (d[this.rowKey] = this.formData[this.keyId], this.afterSave(d, !1)) : N.warning(i.message);
12176
12176
  } else
@@ -12590,7 +12590,7 @@ function wm(e, t, a, l, o, i) {
12590
12590
  }, null, 8, ["modelValue", "dynamic-name", "data-provider", "user-state", "cancel-callback"])
12591
12591
  ], 64);
12592
12592
  }
12593
- const Fm = /* @__PURE__ */ B(mm, [["render", wm], ["__scopeId", "data-v-9d5b4393"]]), _m = L({
12593
+ const Fm = /* @__PURE__ */ B(mm, [["render", wm], ["__scopeId", "data-v-827e71f9"]]), _m = L({
12594
12594
  name: "SdCrudPopupForm",
12595
12595
  components: {},
12596
12596
  emits: ["update:modelValue", "change"],
@@ -13731,22 +13731,24 @@ const Ra = /* @__PURE__ */ B(Mm, [["render", Nm]]), Em = L({
13731
13731
  this.formData = D(this.selectInput.itemSelected), this.readonlySelect = !1, this.backdropSelect = !1, this.showPopupFlag = !0, this.getDataId();
13732
13732
  },
13733
13733
  handleClone() {
13734
- this.disable = !0, this.formData = D(this.selectInput.itemSelected), this.readonlySelect = !1, this.backdropSelect = !1, this.showPopupFlag = !1, this.dataId = "", delete this.formData._id, this.formData[this.cloneEnableLabelField] = this.formData[this.cloneEnableLabelField] + " clone", be.confirm("Are you sure you want to clone this item?", "Confirmation", {
13734
+ this.disable = !0, this.formData = D(this.selectInput.itemSelected), this.readonlySelect = !1, this.backdropSelect = !1, this.showPopupFlag = !1, this.dataId = "";
13735
+ const e = this.formData._id;
13736
+ delete this.formData._id, this.formData[this.cloneEnableLabelField] = this.formData[this.cloneEnableLabelField] + " clone", be.confirm("Are you sure you want to clone this item?", "Confirmation", {
13735
13737
  confirmButtonText: "OK",
13736
13738
  cancelButtonText: "Cancel",
13737
13739
  type: "warning"
13738
13740
  }).then(async () => {
13739
13741
  if (this.sdformModel.dataid) {
13740
- const e = await wa(this.sdformModel.dataid, this.useUserState);
13741
- if (e) {
13742
- this.formData = { ...e, ...this.formData }, this.formData.xversionx = this.sdformModel.form_version;
13743
- const t = await dt(this.sdformModel.dataid, this.formData._id, this.formData, 1, this.useUserState), a = t.data;
13744
- a ? (a.dataid = this.formData._id, this.handleAferSaveForm(a, !1)) : N.warning(t.message);
13742
+ const t = await wa(this.sdformModel.dataid, this.useUserState);
13743
+ if (t) {
13744
+ this.formData = { ...t, ...this.formData }, this.formData.xversionx = this.sdformModel.form_version, this.formData.xclonex = e, this.formData.dataid = this.formData._id, this.formData.xrstatx = 0;
13745
+ const a = await dt(this.sdformModel.dataid, this.formData._id, this.formData, 1, this.useUserState), l = a.data;
13746
+ l ? (l.dataid = this.formData._id, this.handleAferSaveForm(l, !1)) : N.warning(a.message);
13745
13747
  } else
13746
13748
  N.warning("Unable to create empty data");
13747
13749
  }
13748
- }).catch((e) => {
13749
- console.log(e);
13750
+ }).catch((t) => {
13751
+ console.log(t);
13750
13752
  });
13751
13753
  },
13752
13754
  handleOpenFormView() {
@@ -14134,21 +14136,23 @@ const yg = /* @__PURE__ */ B(Em, [["render", Bm]]), jm = L({
14134
14136
  this.disableAction = !0, this.formData = D(this.selectInput.itemSelected), this.readonlySelect = !1, this.backdropSelect = !1, this.showPopupFlag = !0, this.getDataId(), this.handlePopUpForm();
14135
14137
  },
14136
14138
  handleClone() {
14137
- this.disableAction = !0, this.formData = D(this.selectInput.itemSelected), this.readonlySelect = !1, this.backdropSelect = !1, this.showPopupFlag = !1, this.dataId = "", delete this.formData._id, this.formData[this.cloneEnableLabelField] = this.formData[this.cloneEnableLabelField] + " clone", be.confirm("Are you sure you want to clone this item?", "Confirmation", {
14139
+ this.disableAction = !0, this.formData = D(this.selectInput.itemSelected), this.readonlySelect = !1, this.backdropSelect = !1, this.showPopupFlag = !1, this.dataId = "";
14140
+ const e = this.formData._id;
14141
+ delete this.formData._id, this.formData[this.cloneEnableLabelField] = this.formData[this.cloneEnableLabelField] + " clone", be.confirm("Are you sure you want to clone this item?", "Confirmation", {
14138
14142
  confirmButtonText: "OK",
14139
14143
  cancelButtonText: "Cancel",
14140
14144
  type: "warning"
14141
14145
  }).then(async () => {
14142
14146
  if (this.sdformModel.dataid) {
14143
- const e = await wa(this.sdformModel.dataid, this.useUserState);
14144
- if (e) {
14145
- this.formData = { ...e, ...this.formData }, this.formData.xversionx = this.sdformModel.form_version;
14146
- const t = await dt(this.sdformModel.dataid, this.formData._id, this.formData, 1, this.useUserState), a = t.data;
14147
- a ? (a.dataid = this.formData._id, this.handleAferSaveForm(a, !1)) : (this.disableAction = !1, N.warning(t.message));
14147
+ const t = await wa(this.sdformModel.dataid, this.useUserState);
14148
+ if (t) {
14149
+ this.formData = { ...t, ...this.formData }, this.formData.xversionx = this.sdformModel.form_version, this.formData.xclonex = e, this.formData.dataid = this.formData._id, this.formData.xrstatx = 0;
14150
+ const a = await dt(this.sdformModel.dataid, this.formData._id, this.formData, 1, this.useUserState), l = a.data;
14151
+ l ? (l.dataid = this.formData._id, this.handleAferSaveForm(l, !1)) : (this.disableAction = !1, N.warning(a.message));
14148
14152
  } else
14149
14153
  this.disableAction = !1, N.warning("Unable to create empty data");
14150
14154
  }
14151
- }).catch((e) => {
14155
+ }).catch((t) => {
14152
14156
  this.disableAction = !1;
14153
14157
  });
14154
14158
  },