@vixoniccom/modules 2.25.0-dev.14 → 2.25.0-dev.16

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 CHANGED
@@ -2,13 +2,37 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ## [2.25.0-dev.14](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.13...v2.25.0-dev.14) (2026-04-21)
5
+ ## [2.25.0-dev.16](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.15...v2.25.0-dev.16) (2026-05-08)
6
6
 
7
- ## [2.25.0-dev.13](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.12...v2.25.0-dev.13) (2026-04-21)
7
+ ## [2.25.0-dev.15](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.15) (2026-05-08)
8
8
 
9
- ## [2.25.0-dev.12](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.11...v2.25.0-dev.12) (2026-04-21)
10
9
 
11
- ## [2.25.0-dev.11](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.11) (2026-04-21)
10
+ ### Features
11
+
12
+ * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
13
+
14
+ ## [2.25.0-dev.14](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.14) (2026-05-08)
15
+
16
+
17
+ ### Features
18
+
19
+ * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
20
+
21
+ ## [2.25.0-dev.13](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.13) (2026-05-08)
22
+
23
+
24
+ ### Features
25
+
26
+ * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
27
+
28
+ ## [2.25.0-dev.12](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.12) (2026-05-08)
29
+
30
+
31
+ ### Features
32
+
33
+ * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
34
+
35
+ ## [2.25.0-dev.11](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.11) (2026-05-08)
12
36
 
13
37
 
14
38
  ### Features
@@ -86,7 +86,16 @@ var List = /** @class */ (function (_super) {
86
86
  var itemErrors_1 = {};
87
87
  this.itemSchema.forEach(function (input) {
88
88
  if ((0, inputs_1.isInput)(input)) {
89
- itemErrors_1[input.id] = input.validate(value[input.id], ctx);
89
+ var castedInput = input;
90
+ var isVisible = castedInput.shouldShow(ctx);
91
+ if (isVisible) {
92
+ // Visible input always wins: store its errors (may overwrite a hidden one)
93
+ itemErrors_1[input.id] = castedInput.validate(value[input.id], ctx);
94
+ }
95
+ else if (!(input.id in itemErrors_1)) {
96
+ // Hidden input only initialises the key if no other input claimed it yet
97
+ itemErrors_1[input.id] = [];
98
+ }
90
99
  }
91
100
  });
92
101
  return itemErrors_1;
package/dist/lib/index.js CHANGED
@@ -37,8 +37,16 @@ var Configuration = /** @class */ (function () {
37
37
  // Validate each input in a group.
38
38
  container.items.forEach(function (input) {
39
39
  if ((0, inputs_1.isInput)(input)) {
40
- var inputErrors = input.validate(state[input.id], state);
41
- groupErrors_1[input.id] = inputErrors;
40
+ var castedInput = input;
41
+ var isVisible = castedInput.shouldShow(state);
42
+ if (isVisible) {
43
+ // Visible input always wins: store its errors (may overwrite a hidden one)
44
+ groupErrors_1[input.id] = castedInput.validate(state[input.id], state);
45
+ }
46
+ else if (!(input.id in groupErrors_1)) {
47
+ // Hidden input only initialises the key if no other input claimed it yet
48
+ groupErrors_1[input.id] = [];
49
+ }
42
50
  }
43
51
  });
44
52
  errors[container.id] = groupErrors_1;
@@ -50,10 +50,10 @@ var TextArea = /** @class */ (function (_super) {
50
50
  if (this.range) {
51
51
  if (this.html) {
52
52
  var auxValue = (value === null || value === void 0 ? void 0 : value.replace(/<[^>]*>/g, '').trim()) || '';
53
- length = auxValue.replace(/\s/g, '').length;
53
+ length = (auxValue === null || auxValue === void 0 ? void 0 : auxValue.length) || 0;
54
54
  }
55
55
  else {
56
- length = (value === null || value === void 0 ? void 0 : value.replace(/\s/g, '').length) || 0;
56
+ length = (value === null || value === void 0 ? void 0 : value.length) || 0;
57
57
  }
58
58
  errors = errors.concat(validation_1.Validator.min(length, this.range.min));
59
59
  errors = errors.concat(validation_1.Validator.max(length, this.range.max));
@@ -52,7 +52,7 @@ var TextInput = /** @class */ (function (_super) {
52
52
  errors = errors.concat({ type: 'pattern' });
53
53
  }
54
54
  if (this.range) {
55
- var length = value && value.replace(/\s/g, '').length || 0;
55
+ var length = value && value.length || 0;
56
56
  errors = errors.concat(validation_1.Validator.min(length, this.range.min));
57
57
  errors = errors.concat(validation_1.Validator.max(length, this.range.max));
58
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vixoniccom/modules",
3
- "version": "2.25.0-dev.14",
3
+ "version": "2.25.0-dev.16",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",