@angular-wave/angular.ts 0.8.3 → 0.8.4

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 (85) hide show
  1. package/@types/services/sce/sce.d.ts +0 -8
  2. package/dist/angular-ts.esm.js +29 -24
  3. package/dist/angular-ts.umd.js +29 -24
  4. package/dist/angular-ts.umd.min.js +1 -1
  5. package/docs/layouts/shortcodes/version.html +1 -1
  6. package/docs/static/typedoc/assets/style.css +9 -2
  7. package/package.json +1 -1
  8. package/src/animations/animations.test.js +1 -1
  9. package/src/binding.test.js +1 -1
  10. package/src/core/compile/compile.spec.js +2 -2
  11. package/src/core/compile/compile.test.js +1 -1
  12. package/src/core/controller/controller.test.js +1 -1
  13. package/src/core/core.test.js +1 -1
  14. package/src/core/di/injector.test.js +1 -1
  15. package/src/core/di/ng-module.test.js +1 -1
  16. package/src/core/filter/filter.test.js +1 -1
  17. package/src/core/interpolate/interpolate.test.js +1 -1
  18. package/src/core/parse/ast/ast.test.js +1 -1
  19. package/src/core/parse/interpreter.js +23 -8
  20. package/src/core/parse/lexer/lexer.test.js +1 -1
  21. package/src/core/parse/parse.test.js +1 -1
  22. package/src/core/parse/parser/parser.test.js +1 -1
  23. package/src/core/sanitize/sanitize-uri.test.js +1 -1
  24. package/src/core/scope/scope.js +3 -9
  25. package/src/core/scope/scope.spec.js +2 -2
  26. package/src/core/scope/scope.test.js +12 -0
  27. package/src/directive/aria/aria.test.js +1 -1
  28. package/src/directive/attrs/attrs.test.js +1 -1
  29. package/src/directive/attrs/boolean.test.js +1 -1
  30. package/src/directive/attrs/element-style.test.js +1 -1
  31. package/src/directive/attrs/src.test.js +1 -1
  32. package/src/directive/bind/bind.test.js +1 -1
  33. package/src/directive/channel/channel.test.js +1 -1
  34. package/src/directive/class/class-test.html +23 -0
  35. package/src/directive/class/class.test.js +1 -1
  36. package/src/directive/cloak/cloak.test.js +1 -1
  37. package/src/directive/controller/controller.test.js +1 -1
  38. package/src/directive/events/events.test.js +1 -1
  39. package/src/directive/form/form.test.js +1 -1
  40. package/src/directive/http/http.test.js +1 -1
  41. package/src/directive/if/if.test.js +1 -1
  42. package/src/directive/include/include.test.js +1 -1
  43. package/src/directive/init/init.test.js +1 -1
  44. package/src/directive/input/input.test.js +1 -1
  45. package/src/directive/messages/messages.spec.js +6 -5
  46. package/src/directive/messages/messages.test.js +2 -2
  47. package/src/directive/model/model.test.js +1 -1
  48. package/src/directive/model-options/model-option.test.js +1 -1
  49. package/src/directive/non-bindable/non-bindable.test.js +1 -1
  50. package/src/directive/observe/observe.test.js +1 -1
  51. package/src/directive/on/on.test.js +1 -1
  52. package/src/directive/options/options.test.js +1 -1
  53. package/src/directive/ref/href.test.js +2 -2
  54. package/src/directive/repeat/repeat.spec.js +61 -61
  55. package/src/directive/repeat/repeat.test.js +2 -2
  56. package/src/directive/script/script.test.js +1 -1
  57. package/src/directive/select/select.test.js +1 -1
  58. package/src/directive/setter/setter.test.js +1 -1
  59. package/src/directive/show-hide/show-hide.test.js +1 -1
  60. package/src/directive/style/style.test.js +1 -1
  61. package/src/directive/switch/switch.test.js +1 -1
  62. package/src/directive/validators/validators.test.js +1 -1
  63. package/src/filters/filters.test.js +1 -1
  64. package/src/router/directives/state-directives.test.js +1 -1
  65. package/src/router/directives/view-directive.spec.js +9 -6
  66. package/src/router/directives/view-directive.test.js +1 -1
  67. package/src/router/glob/glob.test.js +1 -1
  68. package/src/router/router.test.js +1 -1
  69. package/src/router/state/state.test.js +1 -1
  70. package/src/router/template-factory.spec.js +1 -4
  71. package/src/router/template-factory.test.js +1 -1
  72. package/src/router/url/url.test.js +1 -1
  73. package/src/router/view/view.test.js +1 -1
  74. package/src/services/http/http.test.js +1 -1
  75. package/src/services/http-backend/http-backend.test.js +1 -1
  76. package/src/services/location/location.test.js +1 -1
  77. package/src/services/log/log.test.js +1 -1
  78. package/src/services/pubsub/pubsub.test.js +1 -1
  79. package/src/services/sce/sce.js +7 -6
  80. package/src/services/sce/sce.test.js +1 -1
  81. package/src/services/template-cache/template-cache.test.js +1 -1
  82. package/src/shared/shared.test.js +1 -1
  83. package/src/shared/url-utils/url-utils.test.js +1 -1
  84. package/src/src.test.js +1 -1
  85. package/src/loader.md +0 -0
@@ -177,14 +177,6 @@ export namespace SCE_CONTEXTS {
177
177
  * of issues, like for instance attacker-controlled `ng-includes`.
178
178
  */
179
179
  export class SceDelegateProvider {
180
- SCE_CONTEXTS: {
181
- HTML: string;
182
- CSS: string;
183
- MEDIA_URL: string;
184
- URL: string;
185
- RESOURCE_URL: string;
186
- JS: string;
187
- };
188
180
  /**
189
181
  *
190
182
  * @param {Array=} trustedResourceUrlList When provided, replaces the trustedResourceUrlList with
@@ -1,4 +1,4 @@
1
- /* Version: 0.8.3 - August 22, 2025 14:53:17 */
1
+ /* Version: 0.8.4 - September 5, 2025 23:28:30 */
2
2
  const VALID_CLASS = "ng-valid";
3
3
  const INVALID_CLASS = "ng-invalid";
4
4
  const PRISTINE_CLASS = "ng-pristine";
@@ -3396,8 +3396,6 @@ function adjustMatcher(matcher) {
3396
3396
  */
3397
3397
  class SceDelegateProvider {
3398
3398
  constructor() {
3399
- this.SCE_CONTEXTS = SCE_CONTEXTS;
3400
-
3401
3399
  // Resource URLs can also be trusted by policy.
3402
3400
  let trustedResourceUrlList = ["self"];
3403
3401
  let bannedResourceUrlList = [];
@@ -3696,11 +3694,14 @@ class SceDelegateProvider {
3696
3694
  if (isResourceUrlAllowedByPolicy(maybeTrusted)) {
3697
3695
  return maybeTrusted;
3698
3696
  }
3699
- throw $sceMinErr(
3700
- "insecurl",
3701
- "Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",
3702
- maybeTrusted.toString(),
3697
+ $exceptionHandler(
3698
+ $sceMinErr(
3699
+ "insecurl",
3700
+ "Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",
3701
+ maybeTrusted.toString(),
3702
+ ),
3703
3703
  );
3704
+ return;
3704
3705
  } else if (type === SCE_CONTEXTS.HTML) {
3705
3706
  // htmlSanitizer throws its own error when no sanitizer is available.
3706
3707
  return htmlSanitizer();
@@ -15452,7 +15453,7 @@ class ASTInterpreter {
15452
15453
  ? (scope, locals, assign) => {
15453
15454
  const values = [];
15454
15455
  for (let i = 0; i < args.length; ++i) {
15455
- const res = args[i](scope, locals, assign);
15456
+ const res = args[i](scope.$target, locals, assign);
15456
15457
  values.push(res);
15457
15458
  }
15458
15459
  const value = () => {
@@ -15463,7 +15464,11 @@ class ASTInterpreter {
15463
15464
  : value;
15464
15465
  }
15465
15466
  : (scope, locals, assign) => {
15466
- const rhs = right(scope, locals, assign);
15467
+ const rhs = right(
15468
+ scope.$target ? scope.$target : scope,
15469
+ locals,
15470
+ assign,
15471
+ );
15467
15472
  let value;
15468
15473
  if (rhs.value != null && isFunction(rhs.value)) {
15469
15474
  const values = [];
@@ -15481,7 +15486,11 @@ class ASTInterpreter {
15481
15486
  return (scope, locals, assign) => {
15482
15487
  const lhs = left(scope, locals, assign);
15483
15488
  const rhs = right(scope, locals, assign);
15484
- lhs.context[lhs.name] = rhs;
15489
+ // lhs.context[lhs.name] = rhs;
15490
+ const ctx = isProxy(lhs.context)
15491
+ ? lhs.context
15492
+ : (lhs.context.$proxy ?? lhs.context);
15493
+ ctx[lhs.name] = rhs;
15485
15494
  return context ? { value: rhs } : rhs;
15486
15495
  };
15487
15496
  case ASTType.ArrayExpression:
@@ -15534,8 +15543,10 @@ class ASTInterpreter {
15534
15543
  case ASTType.ThisExpression:
15535
15544
  return (scope) => (context ? { value: scope } : scope);
15536
15545
  case ASTType.LocalsExpression:
15546
+ // @ts-ignore
15537
15547
  return (scope, locals) => (context ? { value: locals } : locals);
15538
15548
  case ASTType.NGValueParameter:
15549
+ // @ts-ignore
15539
15550
  return (scope, locals, assign) =>
15540
15551
  context ? { value: assign } : assign;
15541
15552
  }
@@ -15806,9 +15817,9 @@ class ASTInterpreter {
15806
15817
  */
15807
15818
  "ternary?:"(test, alternate, consequent, context) {
15808
15819
  return (scope, locals, assign) => {
15809
- const arg = test(scope, locals, assign)
15810
- ? alternate(scope, locals, assign)
15811
- : consequent(scope, locals, assign);
15820
+ const arg = test(scope.$target, locals, assign)
15821
+ ? alternate(scope.$target, locals, assign)
15822
+ : consequent(scope.$target, locals, assign);
15812
15823
  return context ? { value: arg } : arg;
15813
15824
  };
15814
15825
  }
@@ -15839,7 +15850,7 @@ class ASTInterpreter {
15839
15850
  }
15840
15851
  let value = undefined;
15841
15852
  if (base) {
15842
- value = base[name];
15853
+ value = base["$target"] ? base["$target"][name] : base[name];
15843
15854
  }
15844
15855
  if (context) {
15845
15856
  return { context: base, name, value };
@@ -20840,12 +20851,6 @@ class Scope {
20840
20851
 
20841
20852
  // 14
20842
20853
  case ASTType.ObjectExpression: {
20843
- // get.decoratedNode.body[0].expression.expression.forEach(x => {
20844
- // x.toWatch[0].name
20845
- // });
20846
-
20847
- // key = get.decoratedNode.body[0].expression.properties[0].key.name;
20848
- // listener.property.push(key);
20849
20854
  get.decoratedNode.body[0].expression.properties.forEach((prop) => {
20850
20855
  if (prop.key.isPure === false) {
20851
20856
  keySet.push(prop.key.name);
@@ -20855,7 +20860,8 @@ class Scope {
20855
20860
  keySet.push(prop.value.name);
20856
20861
  listener.property.push(key);
20857
20862
  } else {
20858
- key = get.decoratedNode.body[0].expression.properties[0].key.name;
20863
+ key =
20864
+ get.decoratedNode.body[0].expression.toWatch[0].property.name;
20859
20865
  listener.property.push(key);
20860
20866
  }
20861
20867
  }
@@ -21006,8 +21012,7 @@ class Scope {
21006
21012
 
21007
21013
  $eval(expr, locals) {
21008
21014
  const fn = $parse(expr);
21009
- const res = fn(this.$target, locals);
21010
-
21015
+ const res = fn(this, locals);
21011
21016
  if (isUndefined(res) || res === null) {
21012
21017
  return res;
21013
21018
  }
@@ -35815,7 +35820,7 @@ class Angular {
35815
35820
  /**
35816
35821
  * @type {string} `version` from `package.json`
35817
35822
  */
35818
- this.version = "0.8.3"; //inserted via rollup plugin
35823
+ this.version = "0.8.4"; //inserted via rollup plugin
35819
35824
 
35820
35825
  /** @type {!Array<string|any>} */
35821
35826
  this.bootsrappedModules = [];
@@ -1,4 +1,4 @@
1
- /* Version: 0.8.3 - August 22, 2025 14:53:15 */
1
+ /* Version: 0.8.4 - September 5, 2025 23:28:29 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -3402,8 +3402,6 @@
3402
3402
  */
3403
3403
  class SceDelegateProvider {
3404
3404
  constructor() {
3405
- this.SCE_CONTEXTS = SCE_CONTEXTS;
3406
-
3407
3405
  // Resource URLs can also be trusted by policy.
3408
3406
  let trustedResourceUrlList = ["self"];
3409
3407
  let bannedResourceUrlList = [];
@@ -3702,11 +3700,14 @@
3702
3700
  if (isResourceUrlAllowedByPolicy(maybeTrusted)) {
3703
3701
  return maybeTrusted;
3704
3702
  }
3705
- throw $sceMinErr(
3706
- "insecurl",
3707
- "Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",
3708
- maybeTrusted.toString(),
3703
+ $exceptionHandler(
3704
+ $sceMinErr(
3705
+ "insecurl",
3706
+ "Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",
3707
+ maybeTrusted.toString(),
3708
+ ),
3709
3709
  );
3710
+ return;
3710
3711
  } else if (type === SCE_CONTEXTS.HTML) {
3711
3712
  // htmlSanitizer throws its own error when no sanitizer is available.
3712
3713
  return htmlSanitizer();
@@ -15458,7 +15459,7 @@
15458
15459
  ? (scope, locals, assign) => {
15459
15460
  const values = [];
15460
15461
  for (let i = 0; i < args.length; ++i) {
15461
- const res = args[i](scope, locals, assign);
15462
+ const res = args[i](scope.$target, locals, assign);
15462
15463
  values.push(res);
15463
15464
  }
15464
15465
  const value = () => {
@@ -15469,7 +15470,11 @@
15469
15470
  : value;
15470
15471
  }
15471
15472
  : (scope, locals, assign) => {
15472
- const rhs = right(scope, locals, assign);
15473
+ const rhs = right(
15474
+ scope.$target ? scope.$target : scope,
15475
+ locals,
15476
+ assign,
15477
+ );
15473
15478
  let value;
15474
15479
  if (rhs.value != null && isFunction(rhs.value)) {
15475
15480
  const values = [];
@@ -15487,7 +15492,11 @@
15487
15492
  return (scope, locals, assign) => {
15488
15493
  const lhs = left(scope, locals, assign);
15489
15494
  const rhs = right(scope, locals, assign);
15490
- lhs.context[lhs.name] = rhs;
15495
+ // lhs.context[lhs.name] = rhs;
15496
+ const ctx = isProxy(lhs.context)
15497
+ ? lhs.context
15498
+ : (lhs.context.$proxy ?? lhs.context);
15499
+ ctx[lhs.name] = rhs;
15491
15500
  return context ? { value: rhs } : rhs;
15492
15501
  };
15493
15502
  case ASTType.ArrayExpression:
@@ -15540,8 +15549,10 @@
15540
15549
  case ASTType.ThisExpression:
15541
15550
  return (scope) => (context ? { value: scope } : scope);
15542
15551
  case ASTType.LocalsExpression:
15552
+ // @ts-ignore
15543
15553
  return (scope, locals) => (context ? { value: locals } : locals);
15544
15554
  case ASTType.NGValueParameter:
15555
+ // @ts-ignore
15545
15556
  return (scope, locals, assign) =>
15546
15557
  context ? { value: assign } : assign;
15547
15558
  }
@@ -15812,9 +15823,9 @@
15812
15823
  */
15813
15824
  "ternary?:"(test, alternate, consequent, context) {
15814
15825
  return (scope, locals, assign) => {
15815
- const arg = test(scope, locals, assign)
15816
- ? alternate(scope, locals, assign)
15817
- : consequent(scope, locals, assign);
15826
+ const arg = test(scope.$target, locals, assign)
15827
+ ? alternate(scope.$target, locals, assign)
15828
+ : consequent(scope.$target, locals, assign);
15818
15829
  return context ? { value: arg } : arg;
15819
15830
  };
15820
15831
  }
@@ -15845,7 +15856,7 @@
15845
15856
  }
15846
15857
  let value = undefined;
15847
15858
  if (base) {
15848
- value = base[name];
15859
+ value = base["$target"] ? base["$target"][name] : base[name];
15849
15860
  }
15850
15861
  if (context) {
15851
15862
  return { context: base, name, value };
@@ -20846,12 +20857,6 @@
20846
20857
 
20847
20858
  // 14
20848
20859
  case ASTType.ObjectExpression: {
20849
- // get.decoratedNode.body[0].expression.expression.forEach(x => {
20850
- // x.toWatch[0].name
20851
- // });
20852
-
20853
- // key = get.decoratedNode.body[0].expression.properties[0].key.name;
20854
- // listener.property.push(key);
20855
20860
  get.decoratedNode.body[0].expression.properties.forEach((prop) => {
20856
20861
  if (prop.key.isPure === false) {
20857
20862
  keySet.push(prop.key.name);
@@ -20861,7 +20866,8 @@
20861
20866
  keySet.push(prop.value.name);
20862
20867
  listener.property.push(key);
20863
20868
  } else {
20864
- key = get.decoratedNode.body[0].expression.properties[0].key.name;
20869
+ key =
20870
+ get.decoratedNode.body[0].expression.toWatch[0].property.name;
20865
20871
  listener.property.push(key);
20866
20872
  }
20867
20873
  }
@@ -21012,8 +21018,7 @@
21012
21018
 
21013
21019
  $eval(expr, locals) {
21014
21020
  const fn = $parse(expr);
21015
- const res = fn(this.$target, locals);
21016
-
21021
+ const res = fn(this, locals);
21017
21022
  if (isUndefined(res) || res === null) {
21018
21023
  return res;
21019
21024
  }
@@ -35821,7 +35826,7 @@
35821
35826
  /**
35822
35827
  * @type {string} `version` from `package.json`
35823
35828
  */
35824
- this.version = "0.8.3"; //inserted via rollup plugin
35829
+ this.version = "0.8.4"; //inserted via rollup plugin
35825
35830
 
35826
35831
  /** @type {!Array<string|any>} */
35827
35832
  this.bootsrappedModules = [];