@wavemaker/app-ng-runtime 11.5.0-next.141087 → 11.5.0-next.141089

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.
@@ -1,4 +1,4 @@
1
- import { Attribute, ImplicitReceiver, LiteralPrimitive, LiteralArray, LiteralMap, PropertyRead, PropertyWrite, KeyedRead, PrefixNot, Binary, Conditional, Call, Chain, BindingPipe, Parser, Lexer } from '@angular/compiler';
1
+ import { Attribute, ImplicitReceiver, PropertyRead, LiteralPrimitive, LiteralArray, LiteralMap, PropertyWrite, KeyedRead, PrefixNot, Binary, Conditional, Call, Chain, BindingPipe, Parser, Lexer } from '@angular/compiler';
2
2
  import { Subject } from 'rxjs';
3
3
  import * as i0 from '@angular/core';
4
4
  import { Injectable, NgModule } from '@angular/core';
@@ -1443,6 +1443,11 @@ const addClass = (node, nv, sync) => {
1443
1443
  });
1444
1444
  };
1445
1445
  const switchClass = (node, toAdd = '', toRemove = '', sync) => {
1446
+ // After NG15 upgrade ng-invalid class is added even the field is valid, so we are removing the ng-invalid manually
1447
+ const isNgUntouchedValid = node.classList.contains('ng-untouched') && node.classList.contains('ng-valid');
1448
+ if (isNgUntouchedValid && toAdd.includes('ng-untouched') && toAdd.includes('ng-invalid')) {
1449
+ toAdd = toAdd.replace('ng-invalid', '');
1450
+ }
1446
1451
  removeClass(node, toRemove, sync);
1447
1452
  addClass(node, toAdd, sync);
1448
1453
  };
@@ -1756,8 +1761,7 @@ class ASTCompiler {
1756
1761
  }
1757
1762
  const fn = this.build(ast.receiver, stmts);
1758
1763
  const v = this.createVar();
1759
- const isImplicitReceiver = ast.receiver instanceof ImplicitReceiver;
1760
- const exp = stmts[stmts.length - 1];
1764
+ const isImplicitReceiver = ast.receiver instanceof ImplicitReceiver || (ast.receiver instanceof PropertyRead && ast.receiver?.receiver instanceof ImplicitReceiver);
1761
1765
  const context = stmts[stmts.length - 1].split('&&')[0].split('=')[1];
1762
1766
  stmts.push(`${v}= ${fn}&&${fn}${isImplicitReceiver ? '.bind(_ctx)' : `.bind(${context})`}(${_args.join(',')})`);
1763
1767
  return v;
@@ -2414,7 +2418,8 @@ const isLargeTabletPortrait = (landScapeWidth, landScapeHeight) => {
2414
2418
  const width = landScapeHeight || '1024px';
2415
2419
  return window.matchMedia("only screen and (min-device-width : " + width + ") and (max-device-width : " + width + ") and (min-device-height : " + height + ") and (max-device-height : " + height + ") and (min-width: " + width + ") and (max-width: " + width + ")").matches;
2416
2420
  };
2417
- const isMobile = () => isAndroid() || isIos() || isAndroidTablet() || $('#wm-mobile-display:visible').length > 0;
2421
+ //export const isMobile = () => isAndroid() || isIos() || isAndroidTablet() || $('#wm-mobile-display:visible').length > 0;
2422
+ const isMobile = () => false;
2418
2423
  const isTablet = () => {
2419
2424
  const scope = document.querySelector('.app-page').widget;
2420
2425
  return scope && scope.viewParent.Viewport.isTabletType;