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

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,65 +2,72 @@
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.20](https://github.com/Vixonic/store-modules/compare/v2.25.0-dev.19...v2.25.0-dev.20) (2026-05-20)
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
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)
7
8
 
8
- ### Bug Fixes
9
9
 
10
- * durationFormula ([4e677f9](https://github.com/Vixonic/store-modules/commit/4e677f9e81ee4d23cc5e09ba42b373c340b15a57))
10
+ ### Features
11
+
12
+ * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
11
13
 
12
- ## [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)
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)
13
15
 
14
16
 
15
17
  ### Features
16
18
 
17
19
  * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
18
20
 
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
22
 
20
- ### Bug Fixes
21
23
 
22
- * 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))
24
+ ### Features
23
25
 
24
- ## [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)
26
+ * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
25
27
 
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)
26
29
 
27
- ### Bug Fixes
28
30
 
29
- * improve input validation to handle visibility and whitespace in text inputs ([f9f2e26](https://github.com/Vixonic/store-modules/commit/f9f2e26ae23858ebc0fe7ba0c2d50c496396a683))
31
+ ### Features
32
+
33
+ * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
34
+
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)
30
36
 
31
- ## [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)
32
37
 
33
- ## [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)
38
+ ### Features
39
+
40
+ * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
34
41
 
35
- ## [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)
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)
36
43
 
37
44
 
38
45
  ### Features
39
46
 
40
47
  * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
41
48
 
42
- ## [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)
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)
43
50
 
44
51
 
45
52
  ### Features
46
53
 
47
54
  * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
48
55
 
49
- ## [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)
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)
50
57
 
51
58
 
52
59
  ### Features
53
60
 
54
61
  * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
55
62
 
56
- ## [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)
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)
57
64
 
58
65
 
59
66
  ### Features
60
67
 
61
68
  * VXD-898 add new service ([d6bd32b](https://github.com/Vixonic/store-modules/commit/d6bd32b7b326bc02f5248778d1d97063d9e4c2c8))
62
69
 
63
- ## [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)
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)
64
71
 
65
72
 
66
73
  ### Features
@@ -86,16 +86,7 @@ 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
- 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
- }
89
+ itemErrors_1[input.id] = input.validate(value[input.id], ctx);
99
90
  }
100
91
  });
101
92
  return itemErrors_1;
package/dist/lib/index.js CHANGED
@@ -37,16 +37,8 @@ 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 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
- }
40
+ var inputErrors = input.validate(state[input.id], state);
41
+ groupErrors_1[input.id] = inputErrors;
50
42
  }
51
43
  });
52
44
  errors[container.id] = groupErrors_1;
@@ -89,13 +81,15 @@ var Configuration = /** @class */ (function () {
89
81
  var regexp = new RegExp('{{(.*?)}}', 'ig');
90
82
  jsEval = jsEval.replace(regexp, function (_match, field) {
91
83
  var val = _values[field.trim()];
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';
84
+ return (typeof val === 'number' && Number.isFinite(val)) ? String(val) : '0';
97
85
  });
98
- var time = new Function('_values', "return (".concat(jsEval, ");"))(_values); // NOSONAR
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
99
93
  if (typeof time === 'number') {
100
94
  // validate number
101
95
  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';
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';
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(/<[^>]{0,10000}>/g, '')) || '').replace(/ /g, '');
53
- length = auxValue.length;
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;
54
54
  }
55
55
  else {
56
- length = value ? value.replace(/ /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(/ /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.20",
3
+ "version": "2.25.0-dev.21",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",