@ni/spright-components 6.0.2 → 6.0.3

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.
@@ -11489,6 +11489,9 @@
11489
11489
  validate() {
11490
11490
  super.validate(this.control);
11491
11491
  }
11492
+ limitPrecision(value) {
11493
+ return parseFloat(value.toPrecision(15));
11494
+ }
11492
11495
  /**
11493
11496
  * Sets the internal value to a valid number between the min and max properties
11494
11497
  * @param value - user input
@@ -11496,16 +11499,17 @@
11496
11499
  * @internal
11497
11500
  */
11498
11501
  getValidValue(value) {
11499
- var _a, _b;
11500
- let validValue = parseFloat(parseFloat(value).toPrecision(15));
11502
+ let validValue = this.limitPrecision(parseFloat(value));
11501
11503
  if (isNaN(validValue)) {
11502
- validValue = "";
11504
+ return "";
11503
11505
  }
11504
- else {
11505
- validValue = Math.min(validValue, (_a = this.max) !== null && _a !== void 0 ? _a : validValue);
11506
- validValue = Math.max(validValue, (_b = this.min) !== null && _b !== void 0 ? _b : validValue).toString();
11506
+ if (this.max !== undefined) {
11507
+ validValue = Math.min(validValue, this.limitPrecision(this.max));
11507
11508
  }
11508
- return validValue;
11509
+ if (this.min !== undefined) {
11510
+ validValue = Math.max(validValue, this.limitPrecision(this.min));
11511
+ }
11512
+ return validValue.toString();
11509
11513
  }
11510
11514
  /**
11511
11515
  * Increments the value using the step value
@@ -28015,9 +28019,11 @@ so this becomes the fallback color for the slot */ ''}
28015
28019
  function insertInto(content, dist, insert, parent) {
28016
28020
  let { index, offset } = content.findIndex(dist), child = content.maybeChild(index);
28017
28021
  if (offset == dist || child.isText) {
28022
+ if (parent && !parent.canReplace(index, index, insert))
28023
+ return null;
28018
28024
  return content.cut(0, dist).append(insert).append(content.cut(dist));
28019
28025
  }
28020
- let inner = insertInto(child.content, dist - offset - 1, insert);
28026
+ let inner = insertInto(child.content, dist - offset - 1, insert, child);
28021
28027
  return inner && content.replaceChild(index, child.copy(inner));
28022
28028
  }
28023
28029
  function replace$1($from, $to, slice) {