@signalplus/params-about 1.0.26-alpha5 → 1.0.26-alpha6

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.
Files changed (2) hide show
  1. package/lib/es/index.js +44 -4
  2. package/package.json +1 -1
package/lib/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Bundle of @signalplus/params-about
3
- * Generated: 2025-10-28
4
- * Version: 1.0.26-alpha5
3
+ * Generated: 2025-10-31
4
+ * Version: 1.0.26-alpha6
5
5
  * License: MIT
6
6
  * Author: 2631541504@qq.com
7
7
  */
@@ -2921,6 +2921,10 @@ function emptyErrText(index, key) {
2921
2921
  return "The ".concat(index + 1).concat(index === 0 ? 'st' : index === 1 ? 'nd' : index === 2 ? 'rd' : 'th', " item: ").concat(key ? key + ' ' : '', "should not be empty");
2922
2922
  }
2923
2923
 
2924
+ function zeroErrText(index, key, type) {
2925
+ return "The ".concat(index + 1).concat(index === 0 ? 'st' : index === 1 ? 'nd' : index === 2 ? 'rd' : 'th', " item: ").concat(key ? key + ' ' : '', "should be ").concat(type === 'min' ? '<' : '>', " 0");
2926
+ }
2927
+
2924
2928
  var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig, ParamType.ParamGroup, {
2925
2929
  name: '参数组',
2926
2930
  Comp: function Comp() {
@@ -3246,8 +3250,8 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
3246
3250
  return emptyErrText(i, 'expiry');
3247
3251
  }
3248
3252
 
3249
- if (isEmpty(val.vegaTarget)) {
3250
- return emptyErrText(i, 'vegaTarget');
3253
+ if (isEmpty(val.vegaTarget) || !Number(val.vegaTarget)) {
3254
+ return emptyErrText(i, 'vegaTarget') + ' or 0';
3251
3255
  }
3252
3256
 
3253
3257
  var $$val = val.vegaRules || [];
@@ -3282,6 +3286,42 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
3282
3286
  if (isEmpty(vegaRule.askEdgeSpan.to)) {
3283
3287
  return emptyErrText(i, "ask edge range's to");
3284
3288
  }
3289
+
3290
+ if (Number(val.vegaTarget) > 0) {
3291
+ if (Number(vegaRule.bidEdgeSpan.from) <= 0) {
3292
+ return zeroErrText(i, "bid edge range's from", 'max');
3293
+ }
3294
+
3295
+ if (Number(vegaRule.bidEdgeSpan.to) <= 0) {
3296
+ return zeroErrText(i, "bid edge range's to", 'max');
3297
+ }
3298
+
3299
+ if (Number(vegaRule.askEdgeSpan.from) <= 0) {
3300
+ return zeroErrText(i, "ask edge range's from", 'max');
3301
+ }
3302
+
3303
+ if (Number(vegaRule.askEdgeSpan.to) <= 0) {
3304
+ return zeroErrText(i, "ask edge range's to", 'max');
3305
+ }
3306
+ }
3307
+
3308
+ if (Number(val.vegaTarget) < 0) {
3309
+ if (Number(vegaRule.bidEdgeSpan.from) >= 0) {
3310
+ return zeroErrText(i, "bid edge range's from", 'min');
3311
+ }
3312
+
3313
+ if (Number(vegaRule.bidEdgeSpan.to) >= 0) {
3314
+ return zeroErrText(i, "bid edge range's to", 'min');
3315
+ }
3316
+
3317
+ if (Number(vegaRule.askEdgeSpan.from) >= 0) {
3318
+ return zeroErrText(i, "ask edge range's from", 'min');
3319
+ }
3320
+
3321
+ if (Number(vegaRule.askEdgeSpan.to) >= 0) {
3322
+ return zeroErrText(i, "ask edge range's to", 'min');
3323
+ }
3324
+ }
3285
3325
  } // if (expiries.includes(val.expiry)) {
3286
3326
  // return `The ${i + 1} ${
3287
3327
  // i === 0 ? 'st' : i === 1 ? 'nd' : i === 2 ? 'rd' : 'th'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalplus/params-about",
3
- "version": "1.0.26-alpha5",
3
+ "version": "1.0.26-alpha6",
4
4
  "description": "A description for the module",
5
5
  "main": "./lib/umd/index.js",
6
6
  "module": "./lib/es/index.js",