@signalplus/params-about 0.1.37 → 0.1.41

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 +25 -123
  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: 2022-04-18
4
- * Version: 0.1.37
3
+ * Generated: 2022-04-19
4
+ * Version: 0.1.41
5
5
  * License: MIT
6
6
  * Author: 2631541504@qq.com
7
7
  */
@@ -253,115 +253,6 @@ function _slicedToArray(arr, i) {
253
253
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
254
254
  }
255
255
 
256
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
257
-
258
- function createCommonjsModule(fn, module) {
259
- return module = { exports: {} }, fn(module, module.exports), module.exports;
260
- }
261
-
262
- var utc = createCommonjsModule(function (module, exports) {
263
- !function (t, i) {
264
- module.exports = i() ;
265
- }(commonjsGlobal, function () {
266
-
267
- var t = "minute",
268
- i = /[+-]\d\d(?::?\d\d)?/g,
269
- e = /([+-]|\d\d)/g;
270
- return function (s, f, n) {
271
- var u = f.prototype;
272
- n.utc = function (t) {
273
- var i = {
274
- date: t,
275
- utc: !0,
276
- args: arguments
277
- };
278
- return new f(i);
279
- }, u.utc = function (i) {
280
- var e = n(this.toDate(), {
281
- locale: this.$L,
282
- utc: !0
283
- });
284
- return i ? e.add(this.utcOffset(), t) : e;
285
- }, u.local = function () {
286
- return n(this.toDate(), {
287
- locale: this.$L,
288
- utc: !1
289
- });
290
- };
291
- var o = u.parse;
292
-
293
- u.parse = function (t) {
294
- t.utc && (this.$u = !0), this.$utils().u(t.$offset) || (this.$offset = t.$offset), o.call(this, t);
295
- };
296
-
297
- var r = u.init;
298
-
299
- u.init = function () {
300
- if (this.$u) {
301
- var t = this.$d;
302
- this.$y = t.getUTCFullYear(), this.$M = t.getUTCMonth(), this.$D = t.getUTCDate(), this.$W = t.getUTCDay(), this.$H = t.getUTCHours(), this.$m = t.getUTCMinutes(), this.$s = t.getUTCSeconds(), this.$ms = t.getUTCMilliseconds();
303
- } else r.call(this);
304
- };
305
-
306
- var a = u.utcOffset;
307
-
308
- u.utcOffset = function (s, f) {
309
- var n = this.$utils().u;
310
- if (n(s)) return this.$u ? 0 : n(this.$offset) ? a.call(this) : this.$offset;
311
- if ("string" == typeof s && (s = function (t) {
312
- void 0 === t && (t = "");
313
- var s = t.match(i);
314
- if (!s) return null;
315
- var f = ("" + s[0]).match(e) || ["-", 0, 0],
316
- n = f[0],
317
- u = 60 * +f[1] + +f[2];
318
- return 0 === u ? 0 : "+" === n ? u : -u;
319
- }(s), null === s)) return this;
320
- var u = Math.abs(s) <= 16 ? 60 * s : s,
321
- o = this;
322
- if (f) return o.$offset = u, o.$u = 0 === s, o;
323
-
324
- if (0 !== s) {
325
- var r = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
326
- (o = this.local().add(u + r, t)).$offset = u, o.$x.$localOffset = r;
327
- } else o = this.utc();
328
-
329
- return o;
330
- };
331
-
332
- var h = u.format;
333
- u.format = function (t) {
334
- var i = t || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
335
- return h.call(this, i);
336
- }, u.valueOf = function () {
337
- var t = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || new Date().getTimezoneOffset());
338
- return this.$d.valueOf() - 6e4 * t;
339
- }, u.isUTC = function () {
340
- return !!this.$u;
341
- }, u.toISOString = function () {
342
- return this.toDate().toISOString();
343
- }, u.toString = function () {
344
- return this.toDate().toUTCString();
345
- };
346
- var l = u.toDate;
347
-
348
- u.toDate = function (t) {
349
- return "s" === t && this.$offset ? n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : l.call(this);
350
- };
351
-
352
- var c = u.diff;
353
-
354
- u.diff = function (t, i, e) {
355
- if (t && this.$u === t.$u) return c.call(this, t, i, e);
356
- var s = this.local(),
357
- f = n(t).local();
358
- return c.call(s, f, i, e);
359
- };
360
- };
361
- });
362
- });
363
-
364
- dayjs.extend(utc);
365
256
  function formatNum(val) {
366
257
  var num = parseFloat(val);
367
258
  return isNaN(num) ? undefined : num;
@@ -427,7 +318,8 @@ function keyValidator(val, allKeys) {
427
318
  function isExpired(val) {
428
319
  if (!val) return false;
429
320
  var now = dayjs();
430
- var expireTime = dayjs.utc("".concat(val, " 8:00"), 'DDMMMYY 8:00');
321
+ var expiry = dayjs("".concat(val), 'DDMMMYY');
322
+ var expireTime = dayjs("".concat(expiry.format('YYYY-MM-DD'), "T08:00Z"));
431
323
  return now >= expireTime;
432
324
  }
433
325
  function validatorCvt(validator, form) {
@@ -649,7 +541,8 @@ var Num = /*#__PURE__*/function (_PureComponent) {
649
541
  placeholder: this.props.placeholder || 'Value',
650
542
  value: this.state.tempValue || '',
651
543
  onChange: this.onChange,
652
- onBlur: this.onBlur
544
+ onBlur: this.onBlur,
545
+ autoComplete: "off"
653
546
  }), this.props.isPercentage && /*#__PURE__*/React.createElement("span", {
654
547
  className: "param-number-suffix"
655
548
  }, "%"));
@@ -829,7 +722,8 @@ var TextArray = /*#__PURE__*/function (_PureComponent) {
829
722
  placeholder: "Phone",
830
723
  value: it,
831
724
  onChange: _this2.onChange.bind(null, i),
832
- onBlur: _this2.props.onBlur
725
+ onBlur: _this2.props.onBlur,
726
+ autoComplete: "off"
833
727
  }), /*#__PURE__*/React.createElement("div", {
834
728
  className: "param-arr-ops"
835
729
  }, /*#__PURE__*/React.createElement(PlusOutlined, {
@@ -1065,9 +959,9 @@ var ExpiriesLimit = /*#__PURE__*/function (_PureComponent) {
1065
959
  key: i
1066
960
  }, it.expiry, /*#__PURE__*/React.createElement("span", {
1067
961
  className: "param-expiries-limit-val-sep"
1068
- }, "/"), it.minAumPercentage && it.maxAumPercentage ? "(".concat(NumCvt.show(it.minAumPercentage, true), "%, ").concat(NumCvt.show(it.maxAumPercentage, true), "%)") : '-', /*#__PURE__*/React.createElement("span", {
962
+ }, "/"), !isNullLike(it.minAumPercentage) && !isNullLike(it.maxAumPercentage) ? "(".concat(NumCvt.show(it.minAumPercentage, true), "%, ").concat(NumCvt.show(it.maxAumPercentage, true), "%)") : '-', /*#__PURE__*/React.createElement("span", {
1069
963
  className: "param-expiries-limit-val-sep"
1070
- }, "/"), it.minAbs && it.maxAbs ? "(".concat(it.minAbs, ", ").concat(it.maxAbs, ")") : '-');
964
+ }, "/"), !isNullLike(it.minAbs) && !isNullLike(it.maxAbs) ? "(".concat(it.minAbs, ", ").concat(it.maxAbs, ")") : '-');
1071
965
  }) : '-' : /*#__PURE__*/React.createElement("div", {
1072
966
  className: "param-expiries-limit-inputs"
1073
967
  }, /*#__PURE__*/React.createElement("div", {
@@ -1193,7 +1087,8 @@ var Text = /*#__PURE__*/function (_PureComponent) {
1193
1087
  placeholder: this.props.placeholder || 'Text',
1194
1088
  value: this.props.value || '',
1195
1089
  onChange: this.onChange,
1196
- onBlur: this.onBlur
1090
+ onBlur: this.onBlur,
1091
+ autoComplete: "off"
1197
1092
  }));
1198
1093
  }
1199
1094
  }], [{
@@ -1275,10 +1170,10 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
1275
1170
  return "The ".concat(i + 1, "th item: at least one parameter must be specified between AUM and ABS");
1276
1171
  }
1277
1172
 
1278
- if (val.minAbs > val.maxAbs) // return { [i]: { minAbs: 'Min ABS should smaller than Max ABS' } }
1173
+ if (val.minAbs >= val.maxAbs) // return { [i]: { minAbs: 'Min ABS should smaller than Max ABS' } }
1279
1174
  return "The ".concat(i + 1, "th item: Min ABS should smaller than Max ABS");
1280
1175
 
1281
- if (val.minAumPercentage > val.maxAumPercentage) {
1176
+ if (val.minAumPercentage >= val.maxAumPercentage) {
1282
1177
  // return {
1283
1178
  // [i]: { minAumPercentage: 'Min AUM should smaller than Max AUM' },
1284
1179
  // }
@@ -1496,7 +1391,9 @@ var ParamForm = /*#__PURE__*/function (_PureComponent) {
1496
1391
  Comp: function Comp(props) {
1497
1392
  return /*#__PURE__*/React.createElement(Input, Object.assign({
1498
1393
  placeholder: '请输入'
1499
- }, props));
1394
+ }, props, {
1395
+ autoComplete: "off"
1396
+ }));
1500
1397
  },
1501
1398
  required: true,
1502
1399
  validator: validatorCvt(function (val) {
@@ -1508,7 +1405,9 @@ var ParamForm = /*#__PURE__*/function (_PureComponent) {
1508
1405
  Comp: function Comp(props) {
1509
1406
  return /*#__PURE__*/React.createElement(Input, Object.assign({
1510
1407
  placeholder: '请输入'
1511
- }, props));
1408
+ }, props, {
1409
+ autoComplete: "off"
1410
+ }));
1512
1411
  }
1513
1412
  }, {
1514
1413
  label: '参数类型',
@@ -1550,7 +1449,9 @@ var ParamForm = /*#__PURE__*/function (_PureComponent) {
1550
1449
  Comp: function Comp(props) {
1551
1450
  return /*#__PURE__*/React.createElement(Input.TextArea, Object.assign({
1552
1451
  placeholder: '请输入'
1553
- }, props));
1452
+ }, props, {
1453
+ autoComplete: "off"
1454
+ }));
1554
1455
  }
1555
1456
  }];
1556
1457
  }
@@ -2025,7 +1926,8 @@ var ParamGroupEditor = /*#__PURE__*/function (_PureComponent) {
2025
1926
  name: 'name',
2026
1927
  Comp: function Comp(props) {
2027
1928
  return /*#__PURE__*/React.createElement(Input, Object.assign({}, props, {
2028
- placeholder: '请输入'
1929
+ placeholder: '请输入',
1930
+ autoComplete: "off"
2029
1931
  }));
2030
1932
  },
2031
1933
  validator: validatorCvt(function (val) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalplus/params-about",
3
- "version": "0.1.37",
3
+ "version": "0.1.41",
4
4
  "description": "A description for the module",
5
5
  "main": "./lib/umd/index.js",
6
6
  "module": "./lib/es/index.js",