comand-component-library 4.2.61 → 4.2.63

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.
@@ -4638,7 +4638,8 @@ const Re = /* @__PURE__ */ P(Pr, [["render", Er]]), Hr = {
4638
4638
  show: !1,
4639
4639
  validationStatus: "",
4640
4640
  message: ""
4641
- }
4641
+ },
4642
+ formElementsWithError: []
4642
4643
  };
4643
4644
  },
4644
4645
  props: {
@@ -4765,6 +4766,9 @@ const Re = /* @__PURE__ */ P(Pr, [["render", Er]]), Hr = {
4765
4766
  }
4766
4767
  },
4767
4768
  methods: {
4769
+ formElementHasError(e, t) {
4770
+ e === "error" && !this.formElementsWithError.includes(t) ? this.formElementsWithError.push(t) : e === "success" && this.formElementsWithError.includes(t) && (this.formElementsWithError = this.formElementsWithError.filter((n) => n !== t)), this.$emit("validation-status-change", this.formElementsWithError.length ? "error" : "success");
4771
+ },
4768
4772
  createHtmlId: Vi,
4769
4773
  showMessage(e, t) {
4770
4774
  this.systemMessage.show = !0, this.systemMessage.validationStatus = e, this.systemMessage.message = t;
@@ -4847,8 +4851,9 @@ function Qr(e, t, n, s, i, l) {
4847
4851
  autocomplete: f.autocomplete,
4848
4852
  minlength: f.minlength,
4849
4853
  maxlength: f.maxlength,
4850
- nativeButton: f.nativeButton
4851
- }, null, 8, ["element", "type", "name", "class", "id", "modelValue", "onUpdate:modelValue", "inputValue", "fieldIconClass", "selectOptions", "labelText", "placeholder", "required", "disabled", "autocomplete", "minlength", "maxlength", "nativeButton"])) : f.component === "CmdInputGroup" ? (a(), v(c, {
4854
+ nativeButton: f.nativeButton,
4855
+ onValidationStatusChange: (g) => l.formElementHasError(g, f.name)
4856
+ }, null, 8, ["element", "type", "name", "class", "id", "modelValue", "onUpdate:modelValue", "inputValue", "fieldIconClass", "selectOptions", "labelText", "placeholder", "required", "disabled", "autocomplete", "minlength", "maxlength", "nativeButton", "onValidationStatusChange"])) : f.component === "CmdInputGroup" ? (a(), v(c, {
4852
4857
  key: 1,
4853
4858
  modelValue: i.formValues[f.name],
4854
4859
  "onUpdate:modelValue": (g) => i.formValues[f.name] = g,
@@ -11163,6 +11168,9 @@ const Xi = /* @__PURE__ */ P(Up, [["render", Gp]]), Kp = {
11163
11168
  }
11164
11169
  },
11165
11170
  computed: {
11171
+ pageHasError() {
11172
+ return this.pagesWithError.some((e) => e.page === this.currentPage);
11173
+ },
11166
11174
  errorSteps() {
11167
11175
  const e = [];
11168
11176
  return this.pagesWithError.find((t) => {
@@ -11240,7 +11248,7 @@ function Jp(e, t, n, s, i, l) {
11240
11248
  setPrevPage: l.setPrevPage,
11241
11249
  setNextPage: l.setNextPage,
11242
11250
  disabledPrevLink: i.currentPage === 1,
11243
- disabledNextLink: i.currentPage === l.numberOfPages
11251
+ disabledNextLink: i.currentPage === l.numberOfPages || l.pageHasError
11244
11252
  }, () => [
11245
11253
  n.cmdPagination.show ? (a(), v(c, L({
11246
11254
  key: 0,
@@ -21414,7 +21422,7 @@ const qx = /* @__PURE__ */ P(Ex, [["render", Hx]]), Rx = [
21414
21422
  text: "Zimbabwe",
21415
21423
  value: "zw"
21416
21424
  }
21417
- ], n1 = "comand-component-library", i1 = "4.2.61", l1 = "GPL-3.0-only", o1 = "CoManD-UI", a1 = "module", s1 = {
21425
+ ], n1 = "comand-component-library", i1 = "4.2.63", l1 = "GPL-3.0-only", o1 = "CoManD-UI", a1 = "module", s1 = {
21418
21426
  prepublishOnly: "npm run build-lib",
21419
21427
  dev: "vite",
21420
21428
  build: "vite build",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comand-component-library",
3
- "version": "4.2.61",
3
+ "version": "4.2.63",
4
4
  "license": "GPL-3.0-only",
5
5
  "author": "CoManD-UI",
6
6
  "private": false,
@@ -35,6 +35,7 @@
35
35
  :minlength="item.minlength"
36
36
  :maxlength="item.maxlength"
37
37
  :nativeButton="item.nativeButton"
38
+ @validation-status-change="formElementHasError($event, item.name)"
38
39
  />
39
40
  <CmdInputGroup
40
41
  v-else-if="item.component === 'CmdInputGroup'"
@@ -124,7 +125,8 @@ export default {
124
125
  show: false,
125
126
  validationStatus: "",
126
127
  message: ""
127
- }
128
+ },
129
+ formElementsWithError: []
128
130
  }
129
131
  },
130
132
  props: {
@@ -251,6 +253,14 @@ export default {
251
253
  }
252
254
  },
253
255
  methods: {
256
+ formElementHasError(event, itemName) {
257
+ if (event === "error" && !this.formElementsWithError.includes(itemName)) {
258
+ this.formElementsWithError.push(itemName)
259
+ } else if (event === "success" && this.formElementsWithError.includes(itemName)) {
260
+ this.formElementsWithError = this.formElementsWithError.filter((element) => element !== itemName)
261
+ }
262
+ this.$emit("validation-status-change", this.formElementsWithError.length ? "error" : "success")
263
+ },
254
264
  createHtmlId,
255
265
  showMessage(validationStatus, message) {
256
266
  this.systemMessage.show = true
@@ -28,7 +28,7 @@
28
28
  :setPrevPage="setPrevPage"
29
29
  :setNextPage="setNextPage"
30
30
  :disabledPrevLink="currentPage === 1"
31
- :disabledNextLink="currentPage === numberOfPages"
31
+ :disabledNextLink="currentPage === numberOfPages || pageHasError"
32
32
  >
33
33
  <CmdPagination
34
34
  v-if="cmdPagination.show"
@@ -133,6 +133,11 @@ export default {
133
133
  }
134
134
  },
135
135
  computed: {
136
+ pageHasError() {
137
+ return this.pagesWithError.some((item) => {
138
+ return item.page === this.currentPage
139
+ })
140
+ },
136
141
  errorSteps() {
137
142
  const steps = []
138
143
  this.pagesWithError.find((item) => {