@angular/core 15.2.3 → 15.2.5

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/fesm2020/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.2.3
2
+ * @license Angular v15.2.5
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -8347,7 +8347,7 @@ class Version {
8347
8347
  /**
8348
8348
  * @publicApi
8349
8349
  */
8350
- const VERSION = new Version('15.2.3');
8350
+ const VERSION = new Version('15.2.5');
8351
8351
 
8352
8352
  // This default value is when checking the hierarchy for a token.
8353
8353
  //
@@ -8629,12 +8629,19 @@ function isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {
8629
8629
  ngDevMode &&
8630
8630
  assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');
8631
8631
  let i = 0;
8632
+ // Indicates whether we are processing value from the implicit
8633
+ // attribute section (i.e. before the first marker in the array).
8634
+ let isImplicitAttrsSection = true;
8632
8635
  while (i < attrs.length) {
8633
8636
  let item = attrs[i++];
8634
- if (isProjectionMode && item === 'class') {
8635
- item = attrs[i];
8636
- if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {
8637
- return true;
8637
+ if (typeof item === 'string' && isImplicitAttrsSection) {
8638
+ const value = attrs[i++];
8639
+ if (isProjectionMode && item === 'class') {
8640
+ // We found a `class` attribute in the implicit attribute section,
8641
+ // check if it matches the value of the `cssClassToMatch` argument.
8642
+ if (classIndexOf(value.toLowerCase(), cssClassToMatch, 0) !== -1) {
8643
+ return true;
8644
+ }
8638
8645
  }
8639
8646
  }
8640
8647
  else if (item === 1 /* AttributeMarker.Classes */) {
@@ -8646,6 +8653,11 @@ function isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {
8646
8653
  }
8647
8654
  return false;
8648
8655
  }
8656
+ else if (typeof item === 'number') {
8657
+ // We've came across a first marker, which indicates
8658
+ // that the implicit attribute section is over.
8659
+ isImplicitAttrsSection = false;
8660
+ }
8649
8661
  }
8650
8662
  return false;
8651
8663
  }
@@ -16062,8 +16074,11 @@ function isStylingValuePresent(value) {
16062
16074
  * @param suffix
16063
16075
  */
16064
16076
  function normalizeSuffix(value, suffix) {
16065
- if (value == null /** || value === undefined */) {
16077
+ if (value == null || value === '') {
16066
16078
  // do nothing
16079
+ // Do not add the suffix if the value is going to be empty.
16080
+ // As it produce invalid CSS, which the browsers will automatically omit but Domino will not.
16081
+ // Example: `"left": "px;"` instead of `"left": ""`.
16067
16082
  }
16068
16083
  else if (typeof suffix === 'string') {
16069
16084
  value = value + suffix;