@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 { __awaiter } from 'tslib';
4
4
  import * as i0 from '@angular/core';
@@ -1444,6 +1444,11 @@ const addClass = (node, nv, sync) => {
1444
1444
  });
1445
1445
  };
1446
1446
  const switchClass = (node, toAdd = '', toRemove = '', sync) => {
1447
+ // After NG15 upgrade ng-invalid class is added even the field is valid, so we are removing the ng-invalid manually
1448
+ const isNgUntouchedValid = node.classList.contains('ng-untouched') && node.classList.contains('ng-valid');
1449
+ if (isNgUntouchedValid && toAdd.includes('ng-untouched') && toAdd.includes('ng-invalid')) {
1450
+ toAdd = toAdd.replace('ng-invalid', '');
1451
+ }
1447
1452
  removeClass(node, toRemove, sync);
1448
1453
  addClass(node, toAdd, sync);
1449
1454
  };
@@ -1749,6 +1754,7 @@ class ASTCompiler {
1749
1754
  return v;
1750
1755
  }
1751
1756
  processMethodCall() {
1757
+ var _a;
1752
1758
  const ast = this.cAst;
1753
1759
  const stmts = this.cStmts;
1754
1760
  const _args = [];
@@ -1757,8 +1763,7 @@ class ASTCompiler {
1757
1763
  }
1758
1764
  const fn = this.build(ast.receiver, stmts);
1759
1765
  const v = this.createVar();
1760
- const isImplicitReceiver = ast.receiver instanceof ImplicitReceiver;
1761
- const exp = stmts[stmts.length - 1];
1766
+ const isImplicitReceiver = ast.receiver instanceof ImplicitReceiver || (ast.receiver instanceof PropertyRead && ((_a = ast.receiver) === null || _a === void 0 ? void 0 : _a.receiver) instanceof ImplicitReceiver);
1762
1767
  const context = stmts[stmts.length - 1].split('&&')[0].split('=')[1];
1763
1768
  stmts.push(`${v}= ${fn}&&${fn}${isImplicitReceiver ? '.bind(_ctx)' : `.bind(${context})`}(${_args.join(',')})`);
1764
1769
  return v;
@@ -2415,7 +2420,8 @@ const isLargeTabletPortrait = (landScapeWidth, landScapeHeight) => {
2415
2420
  const width = landScapeHeight || '1024px';
2416
2421
  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;
2417
2422
  };
2418
- const isMobile = () => isAndroid() || isIos() || isAndroidTablet() || $('#wm-mobile-display:visible').length > 0;
2423
+ //export const isMobile = () => isAndroid() || isIos() || isAndroidTablet() || $('#wm-mobile-display:visible').length > 0;
2424
+ const isMobile = () => false;
2419
2425
  const isTablet = () => {
2420
2426
  const scope = document.querySelector('.app-page').widget;
2421
2427
  return scope && scope.viewParent.Viewport.isTabletType;