@vixoniccom/modules 2.25.0-dev.21 → 2.25.0-dev.24

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,72 +2,93 @@
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.21](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.20...v2.25.0-dev.21) (2026-06-22)
6
-
7
- ## [2.25.0-dev.20](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.20) (2026-06-22)
5
+ ## [2.25.0-dev.24](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.24) (2026-07-01)
8
6
 
9
7
 
10
8
  ### Features
11
9
 
12
- * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
10
+ * **inputs:** add FootballService to ServiceType union ([#32](https://github.com/Vixonic/store-modules/issues/32)) ([04a7320](https://github.com/Vixonic/store-modules/commit/04a732039c5ac106281aeb1d35fb84373ab740e5))
13
11
 
14
- ## [2.25.0-dev.19](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.19) (2026-06-22)
15
12
 
13
+ ### Bug Fixes
16
14
 
17
- ### Features
15
+ * durationFormula ([#31](https://github.com/Vixonic/store-modules/issues/31)) ([2ae0d30](https://github.com/Vixonic/store-modules/commit/2ae0d306dcc8d910390d8b7405c62826a1fe2df6))
18
16
 
19
- * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
17
+ ## [2.25.0-dev.23](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.22...v2.25.0-dev.23) (2026-06-23)
20
18
 
21
- ## [2.25.0-dev.18](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.18) (2026-06-22)
19
+ ## [2.25.0-dev.22](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.22) (2026-06-23)
22
20
 
23
21
 
24
22
  ### Features
25
23
 
26
- * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
24
+ * **inputs:** add FootballService to ServiceType union ([#32](https://github.com/Vixonic/store-modules/issues/32)) ([04a7320](https://github.com/Vixonic/store-modules/commit/04a732039c5ac106281aeb1d35fb84373ab740e5))
25
+ * **inputs:** add MenuAppService to ServiceType union ([ffe284b](https://github.com/Vixonic/store-modules/commit/ffe284b457885a0bcb483cbb435aefe3dc7b4aab))
27
26
 
28
- ## [2.25.0-dev.17](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.17) (2026-06-22)
29
27
 
28
+ ### Bug Fixes
30
29
 
31
- ### Features
30
+ * durationFormula ([#31](https://github.com/Vixonic/store-modules/issues/31)) ([2ae0d30](https://github.com/Vixonic/store-modules/commit/2ae0d306dcc8d910390d8b7405c62826a1fe2df6))
32
31
 
33
- * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
32
+ ## [2.25.0-dev.20](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.20) (2026-05-20)
33
+
34
+
35
+ ### Bug Fixes
36
+
37
+ * durationFormula ([4e677f9](https://github.com/Vixonic/store-modules/commit/4e677f9e81ee4d23cc5e09ba42b373c340b15a57))
34
38
 
35
- ## [2.25.0-dev.16](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.16) (2026-06-22)
39
+ ## [2.25.0-dev.19](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.19) (2026-05-20)
36
40
 
37
41
 
38
42
  ### Features
39
43
 
40
44
  * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
41
45
 
42
- ## [2.25.0-dev.15](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.15) (2026-06-22)
46
+
47
+
48
+ ### Bug Fixes
49
+
50
+ * Corrección contador de caracteres y lógica de validación campos requeridos. ([#30](https://github.com/Vixonic/store-modules/issues/30)) ([34df45d](https://github.com/Vixonic/store-modules/commit/34df45d9b1b00ab963c65d5c35ee55de45337d47))
51
+
52
+ ## [2.25.0-dev.18](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.17...v2.25.0-dev.18) (2026-05-11)
53
+
54
+
55
+ ### Bug Fixes
56
+
57
+ * improve input validation to handle visibility and whitespace in text inputs ([f9f2e26](https://github.com/Vixonic/store-modules/commit/f9f2e26ae23858ebc0fe7ba0c2d50c496396a683))
58
+
59
+ ## [2.25.0-dev.17](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.16...v2.25.0-dev.17) (2026-05-11)
60
+
61
+ ## [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)
62
+
63
+ ## [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)
43
64
 
44
65
 
45
66
  ### Features
46
67
 
47
68
  * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
48
69
 
49
- ## [2.25.0-dev.14](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.14) (2026-06-22)
70
+ ## [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)
50
71
 
51
72
 
52
73
  ### Features
53
74
 
54
75
  * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
55
76
 
56
- ## [2.25.0-dev.13](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.13) (2026-06-22)
77
+ ## [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)
57
78
 
58
79
 
59
80
  ### Features
60
81
 
61
82
  * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
62
83
 
63
- ## [2.25.0-dev.12](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.12) (2026-06-22)
84
+ ## [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)
64
85
 
65
86
 
66
87
  ### Features
67
88
 
68
89
  * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
69
90
 
70
- ## [2.25.0-dev.11](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.3...v2.25.0-dev.11) (2026-06-22)
91
+ ## [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)
71
92
 
72
93
 
73
94
  ### Features
@@ -236,9 +257,8 @@ All notable changes to this project will be documented in this file. See [standa
236
257
  ### Bug Fixes
237
258
 
238
259
  * new script for dev version prerelease ([e4b0452](https://github.com/Vixonic/store-modules/commit/e4b0452a8ff5e29faf9b39066c4cec0388e523c7))
239
- =======
260
+
240
261
  ### [2.20.1-dev.0](https://github.com/Vixonic/store-modules/compare/v2.20.0...v2.20.1-dev.0) (2025-05-28)
241
- >>>>>>> d82d9db (chore(release): 2.20.1-dev.0)
242
262
 
243
263
  ## [2.20.0](https://bitbucket.org/vixonic_dev/modules/compare/v2.20.0-dev.2...v2.20.0) (2025-02-17)
244
264
 
@@ -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;
@@ -81,15 +89,13 @@ var Configuration = /** @class */ (function () {
81
89
  var regexp = new RegExp('{{(.*?)}}', 'ig');
82
90
  jsEval = jsEval.replace(regexp, function (_match, field) {
83
91
  var val = _values[field.trim()];
84
- return (typeof val === 'number' && Number.isFinite(val)) ? String(val) : '0';
92
+ if (typeof val === 'number' && Number.isFinite(val))
93
+ return String(val);
94
+ if (val !== null && val !== undefined)
95
+ return JSON.stringify(val);
96
+ return 'undefined';
85
97
  });
86
- // Only allow digits, arithmetic operators, spaces, parentheses and decimal points
87
- if (!/^[.\d\s+\-*/%()]+$/.test(jsEval)) {
88
- console.warn('Computed time error: Invalid characters in time expression:', jsEval);
89
- return undefined;
90
- }
91
- // Input is validated above against an arithmetic-only allowlist before reaching this call. // NOSONAR
92
- var time = new Function("return (".concat(jsEval, ");"))(); // NOSONAR
98
+ var time = new Function('_values', "return (".concat(jsEval, ");"))(_values); // NOSONAR
93
99
  if (typeof time === 'number') {
94
100
  // validate number
95
101
  if (isNaN(time) || time < 4 || time >= 86400) {
@@ -1,6 +1,6 @@
1
1
  import { Input, IInput } from '../base';
2
2
  import { ValueError } from '../errors';
3
- export type ServiceType = 'RSSService' | 'InstagramMediaService' | 'LinkedInCompanyMediaService' | 'FacebookPageService' | 'WeatherService' | 'VixonicStoriesService' | 'TwitterService' | 'TimezoneService' | 'NewTimezoneService' | 'ColabraService' | 'RexmasBirthdayService' | 'RexmasAnniversarieService' | 'RexmasNewEmployeesService' | 'TikTokService' | 'BukBirthdayService' | 'BukAnniversariesService' | 'BukNewEmployeesService' | 'AgendaAppService' | 'AnniversaryAppService' | 'BirthdayAppService' | 'NewEmployeesAppService' | 'CurrencyAppService' | 'SheetsReaderService' | 'TalanaAnniversariesService' | 'TalanaBirthdayService' | 'TalanaNewEmployeesService' | 'YoutubeService' | 'LocalAppSheetsService' | 'MetalAppService' | 'FootballService';
3
+ export type ServiceType = 'RSSService' | 'InstagramMediaService' | 'LinkedInCompanyMediaService' | 'FacebookPageService' | 'WeatherService' | 'VixonicStoriesService' | 'TwitterService' | 'TimezoneService' | 'NewTimezoneService' | 'ColabraService' | 'RexmasBirthdayService' | 'RexmasAnniversarieService' | 'RexmasNewEmployeesService' | 'TikTokService' | 'BukBirthdayService' | 'BukAnniversariesService' | 'BukNewEmployeesService' | 'AgendaAppService' | 'AnniversaryAppService' | 'BirthdayAppService' | 'NewEmployeesAppService' | 'CurrencyAppService' | 'SheetsReaderService' | 'TalanaAnniversariesService' | 'TalanaBirthdayService' | 'TalanaNewEmployeesService' | 'YoutubeService' | 'LocalAppSheetsService' | 'MetalAppService' | 'FootballService' | 'MenuAppService' | 'GoogleCalendarService' | 'OutlookCalendarService';
4
4
  export interface IServiceInput extends IInput {
5
5
  serviceType: ServiceType;
6
6
  required?: boolean;
@@ -49,11 +49,11 @@ var TextArea = /** @class */ (function (_super) {
49
49
  }
50
50
  if (this.range) {
51
51
  if (this.html) {
52
- var auxValue = (value === null || value === void 0 ? void 0 : value.replace(/<[^>]*>/g, '').trim()) || '';
53
- length = (auxValue === null || auxValue === void 0 ? void 0 : auxValue.length) || 0;
52
+ var auxValue = ((value === null || value === void 0 ? void 0 : value.replace(/<[^>]{0,10000}>/g, '')) || '').replace(/ /g, '');
53
+ length = auxValue.length;
54
54
  }
55
55
  else {
56
- length = (value === null || value === void 0 ? void 0 : value.length) || 0;
56
+ length = value ? value.replace(/ /g, '').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.length || 0;
55
+ var length = value ? value.replace(/ /g, '').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.21",
3
+ "version": "2.25.0-dev.24",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",