@angular-wave/angular.ts 0.9.6 → 0.9.7

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.
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @returns {ng.Directive}
3
+ */
4
+ export function ngElDirective(): ng.Directive;
@@ -1,21 +1,18 @@
1
1
  /**
2
2
  *
3
- * @param {import("../../core/parse/interface.ts").ParseService} $parse
4
- * @param {import('../../services/exception/exception-handler.js').ErrorHandler} $exceptionHandler
3
+ * @param {ng.ParseService} $parse
4
+ * @param {ng.ExceptionHandlerService} $exceptionHandler
5
5
  * @param {string} directiveName
6
6
  * @param {string} eventName
7
- * @returns {import("../../interface.ts").Directive}
7
+ * @returns {ng.Directive}
8
8
  */
9
9
  export function createEventDirective(
10
- $parse: import("../../core/parse/interface.ts").ParseService,
11
- $exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
10
+ $parse: ng.ParseService,
11
+ $exceptionHandler: ng.ExceptionHandlerService,
12
12
  directiveName: string,
13
13
  eventName: string,
14
- ): import("../../interface.ts").Directive;
14
+ ): ng.Directive;
15
15
  /**
16
- * @type {Record<string, import("../../interface.js").DirectiveFactory>}
16
+ * @type {Record<string, ng.DirectiveFactory>}
17
17
  */
18
- export const ngEventDirectives: Record<
19
- string,
20
- import("../../interface.js").DirectiveFactory
21
- >;
18
+ export const ngEventDirectives: Record<string, ng.DirectiveFactory>;
@@ -104,9 +104,7 @@ export const patternDirective: (
104
104
  */
105
105
  export const maxlengthDirective: (
106
106
  | string
107
- | ((
108
- $parse: import("../../core/parse/interface.ts").ParseService,
109
- ) => import("../../interface.ts").Directive)
107
+ | (($parse: ng.ParseService) => ng.Directive)
110
108
  )[];
111
109
  /**
112
110
  *
@@ -1,4 +1,4 @@
1
- /* Version: 0.9.6 - October 23, 2025 19:46:24 */
1
+ /* Version: 0.9.7 - October 26, 2025 04:17:19 */
2
2
  const VALID_CLASS = "ng-valid";
3
3
  const INVALID_CLASS = "ng-invalid";
4
4
  const PRISTINE_CLASS = "ng-pristine";
@@ -4010,7 +4010,7 @@ function SceProvider() {
4010
4010
  */
4011
4011
 
4012
4012
  /**
4013
- * @type {Record<string, import("../../interface.js").DirectiveFactory>}
4013
+ * @type {Record<string, ng.DirectiveFactory>}
4014
4014
  */
4015
4015
  const ngEventDirectives = {};
4016
4016
 
@@ -4023,7 +4023,7 @@ const ngEventDirectives = {};
4023
4023
  "$exceptionHandler",
4024
4024
  /**
4025
4025
  * @param {import("../../core/parse/interface.ts").ParseService} $parse
4026
- * @param {import('../../services/exception/exception-handler.js').ErrorHandler} $exceptionHandler
4026
+ * @param {ng.ExceptionHandlerService} $exceptionHandler
4027
4027
  * @returns
4028
4028
  */
4029
4029
  ($parse, $exceptionHandler) => {
@@ -4039,11 +4039,11 @@ const ngEventDirectives = {};
4039
4039
 
4040
4040
  /**
4041
4041
  *
4042
- * @param {import("../../core/parse/interface.ts").ParseService} $parse
4043
- * @param {import('../../services/exception/exception-handler.js').ErrorHandler} $exceptionHandler
4042
+ * @param {ng.ParseService} $parse
4043
+ * @param {ng.ExceptionHandlerService} $exceptionHandler
4044
4044
  * @param {string} directiveName
4045
4045
  * @param {string} eventName
4046
- * @returns {import("../../interface.ts").Directive}
4046
+ * @returns {ng.Directive}
4047
4047
  */
4048
4048
  function createEventDirective(
4049
4049
  $parse,
@@ -13343,17 +13343,17 @@ const patternDirective = [
13343
13343
  const maxlengthDirective = [
13344
13344
  $injectTokens.$parse,
13345
13345
  /**
13346
- * @param {import("../../core/parse/interface.ts").ParseService} $parse
13347
- * @returns {import("../../interface.ts").Directive}
13346
+ * @param {ng.ParseService} $parse
13347
+ * @returns {ng.Directive}
13348
13348
  */
13349
13349
  ($parse) => ({
13350
13350
  restrict: "A",
13351
13351
  require: "?ngModel",
13352
13352
  link:
13353
13353
  /**
13354
- * @param {import("../../core/scope/scope.js").Scope} scope
13355
- * @param {*} _elm
13356
- * @param {import("../../core/compile/attributes.js").Attributes} attr
13354
+ * @param {ng.Scope} scope
13355
+ * @param {Element} _elm
13356
+ * @param {ng.Attributes} attr
13357
13357
  * @param {import("../../interface.ts").NgModelController} ctrl
13358
13358
  * @returns
13359
13359
  */
@@ -35469,6 +35469,37 @@ function ngInjectDirective($log, $injector) {
35469
35469
  };
35470
35470
  }
35471
35471
 
35472
+ /**
35473
+ * @returns {ng.Directive}
35474
+ */
35475
+ function ngElDirective() {
35476
+ return {
35477
+ restrict: "A",
35478
+ link(scope, element, attrs) {
35479
+ const expr = attrs["ngEl"];
35480
+ const key = !expr ? element.id : expr;
35481
+
35482
+ scope.$target[key] = element;
35483
+ const parent = element.parentNode;
35484
+ if (!parent) return;
35485
+
35486
+ const observer = new MutationObserver((mutations) => {
35487
+ for (const mutation of mutations) {
35488
+ Array.from(mutation.removedNodes).forEach((removedNode) => {
35489
+ if (removedNode === element) {
35490
+ //
35491
+ delete scope.$target[key];
35492
+ observer.disconnect();
35493
+ }
35494
+ });
35495
+ }
35496
+ });
35497
+
35498
+ observer.observe(parent, { childList: true });
35499
+ },
35500
+ };
35501
+ }
35502
+
35472
35503
  /**
35473
35504
  * Initializes core `ng` module.
35474
35505
  * @param {import('./angular.js').Angular} angular
@@ -35508,6 +35539,7 @@ function registerNgModule(angular) {
35508
35539
  ngController: ngControllerDirective,
35509
35540
  ngDelete: ngDeleteDirective,
35510
35541
  ngDisabled: ngDisabledAriaDirective,
35542
+ ngEl: ngElDirective,
35511
35543
  ngForm: ngFormDirective,
35512
35544
  ngGet: ngGetDirective,
35513
35545
  ngHide: ngHideDirective,
@@ -35641,7 +35673,7 @@ class Angular {
35641
35673
  /**
35642
35674
  * @type {string} `version` from `package.json`
35643
35675
  */
35644
- this.version = "0.9.6"; //inserted via rollup plugin
35676
+ this.version = "0.9.7"; //inserted via rollup plugin
35645
35677
 
35646
35678
  /** @type {!Array<string|any>} */
35647
35679
  this.bootsrappedModules = [];
@@ -1,4 +1,4 @@
1
- /* Version: 0.9.6 - October 23, 2025 19:46:22 */
1
+ /* Version: 0.9.7 - October 26, 2025 04:17:18 */
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) :
@@ -4016,7 +4016,7 @@
4016
4016
  */
4017
4017
 
4018
4018
  /**
4019
- * @type {Record<string, import("../../interface.js").DirectiveFactory>}
4019
+ * @type {Record<string, ng.DirectiveFactory>}
4020
4020
  */
4021
4021
  const ngEventDirectives = {};
4022
4022
 
@@ -4029,7 +4029,7 @@
4029
4029
  "$exceptionHandler",
4030
4030
  /**
4031
4031
  * @param {import("../../core/parse/interface.ts").ParseService} $parse
4032
- * @param {import('../../services/exception/exception-handler.js').ErrorHandler} $exceptionHandler
4032
+ * @param {ng.ExceptionHandlerService} $exceptionHandler
4033
4033
  * @returns
4034
4034
  */
4035
4035
  ($parse, $exceptionHandler) => {
@@ -4045,11 +4045,11 @@
4045
4045
 
4046
4046
  /**
4047
4047
  *
4048
- * @param {import("../../core/parse/interface.ts").ParseService} $parse
4049
- * @param {import('../../services/exception/exception-handler.js').ErrorHandler} $exceptionHandler
4048
+ * @param {ng.ParseService} $parse
4049
+ * @param {ng.ExceptionHandlerService} $exceptionHandler
4050
4050
  * @param {string} directiveName
4051
4051
  * @param {string} eventName
4052
- * @returns {import("../../interface.ts").Directive}
4052
+ * @returns {ng.Directive}
4053
4053
  */
4054
4054
  function createEventDirective(
4055
4055
  $parse,
@@ -13349,17 +13349,17 @@
13349
13349
  const maxlengthDirective = [
13350
13350
  $injectTokens.$parse,
13351
13351
  /**
13352
- * @param {import("../../core/parse/interface.ts").ParseService} $parse
13353
- * @returns {import("../../interface.ts").Directive}
13352
+ * @param {ng.ParseService} $parse
13353
+ * @returns {ng.Directive}
13354
13354
  */
13355
13355
  ($parse) => ({
13356
13356
  restrict: "A",
13357
13357
  require: "?ngModel",
13358
13358
  link:
13359
13359
  /**
13360
- * @param {import("../../core/scope/scope.js").Scope} scope
13361
- * @param {*} _elm
13362
- * @param {import("../../core/compile/attributes.js").Attributes} attr
13360
+ * @param {ng.Scope} scope
13361
+ * @param {Element} _elm
13362
+ * @param {ng.Attributes} attr
13363
13363
  * @param {import("../../interface.ts").NgModelController} ctrl
13364
13364
  * @returns
13365
13365
  */
@@ -35475,6 +35475,37 @@
35475
35475
  };
35476
35476
  }
35477
35477
 
35478
+ /**
35479
+ * @returns {ng.Directive}
35480
+ */
35481
+ function ngElDirective() {
35482
+ return {
35483
+ restrict: "A",
35484
+ link(scope, element, attrs) {
35485
+ const expr = attrs["ngEl"];
35486
+ const key = !expr ? element.id : expr;
35487
+
35488
+ scope.$target[key] = element;
35489
+ const parent = element.parentNode;
35490
+ if (!parent) return;
35491
+
35492
+ const observer = new MutationObserver((mutations) => {
35493
+ for (const mutation of mutations) {
35494
+ Array.from(mutation.removedNodes).forEach((removedNode) => {
35495
+ if (removedNode === element) {
35496
+ //
35497
+ delete scope.$target[key];
35498
+ observer.disconnect();
35499
+ }
35500
+ });
35501
+ }
35502
+ });
35503
+
35504
+ observer.observe(parent, { childList: true });
35505
+ },
35506
+ };
35507
+ }
35508
+
35478
35509
  /**
35479
35510
  * Initializes core `ng` module.
35480
35511
  * @param {import('./angular.js').Angular} angular
@@ -35514,6 +35545,7 @@
35514
35545
  ngController: ngControllerDirective,
35515
35546
  ngDelete: ngDeleteDirective,
35516
35547
  ngDisabled: ngDisabledAriaDirective,
35548
+ ngEl: ngElDirective,
35517
35549
  ngForm: ngFormDirective,
35518
35550
  ngGet: ngGetDirective,
35519
35551
  ngHide: ngHideDirective,
@@ -35647,7 +35679,7 @@
35647
35679
  /**
35648
35680
  * @type {string} `version` from `package.json`
35649
35681
  */
35650
- this.version = "0.9.6"; //inserted via rollup plugin
35682
+ this.version = "0.9.7"; //inserted via rollup plugin
35651
35683
 
35652
35684
  /** @type {!Array<string|any>} */
35653
35685
  this.bootsrappedModules = [];