@angular-wave/angular.ts 0.9.8 → 0.9.9
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/@types/core/compile/compile.d.ts +2 -59
- package/@types/core/compile/inteface.d.ts +82 -0
- package/@types/directive/channel/channel.d.ts +3 -5
- package/@types/directive/cloak/cloak.d.ts +2 -2
- package/@types/directive/events/events.d.ts +18 -0
- package/@types/directive/include/include.d.ts +2 -2
- package/@types/directive/options/options.d.ts +2 -2
- package/@types/directive/transclude/transclude.d.ts +4 -4
- package/@types/directive/viewport/viewport.d.ts +4 -0
- package/@types/interface.d.ts +1 -0
- package/@types/namespace.d.ts +63 -40
- package/@types/router/template-factory.d.ts +1 -1
- package/README.md +2 -2
- package/dist/angular-ts.esm.js +159 -129
- package/dist/angular-ts.umd.js +159 -129
- package/dist/angular-ts.umd.min.js +1 -1
- package/dist/angular.css +1 -0
- package/package.json +4 -3
- package/css/angular.css +0 -16
package/dist/angular-ts.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Version: 0.9.
|
|
1
|
+
/* Version: 0.9.9 - October 28, 2025 22:08:29 */
|
|
2
2
|
const VALID_CLASS = "ng-valid";
|
|
3
3
|
const INVALID_CLASS = "ng-invalid";
|
|
4
4
|
const PRISTINE_CLASS = "ng-pristine";
|
|
@@ -4015,22 +4015,26 @@ function SceProvider() {
|
|
|
4015
4015
|
*/
|
|
4016
4016
|
const ngEventDirectives = {};
|
|
4017
4017
|
|
|
4018
|
-
"click copy cut dblclick focus blur keydown keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup paste submit touchstart touchend touchmove"
|
|
4018
|
+
"click copy cut dblclick focus blur keydown keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup paste submit touchstart touchend touchmove offline online"
|
|
4019
4019
|
.split(" ")
|
|
4020
4020
|
.forEach((eventName) => {
|
|
4021
4021
|
const directiveName = directiveNormalize(`ng-${eventName}`);
|
|
4022
4022
|
ngEventDirectives[directiveName] = [
|
|
4023
|
-
|
|
4024
|
-
|
|
4023
|
+
$injectTokens.$parse,
|
|
4024
|
+
$injectTokens.$exceptionHandler,
|
|
4025
|
+
$injectTokens.$window,
|
|
4026
|
+
|
|
4025
4027
|
/**
|
|
4026
4028
|
* @param {import("../../core/parse/interface.ts").ParseService} $parse
|
|
4027
4029
|
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
4030
|
+
* @param {ng.WindowService} $window
|
|
4028
4031
|
* @returns
|
|
4029
4032
|
*/
|
|
4030
|
-
($parse, $exceptionHandler) => {
|
|
4033
|
+
($parse, $exceptionHandler, $window) => {
|
|
4031
4034
|
return createEventDirective(
|
|
4032
4035
|
$parse,
|
|
4033
4036
|
$exceptionHandler,
|
|
4037
|
+
$window,
|
|
4034
4038
|
directiveName,
|
|
4035
4039
|
eventName,
|
|
4036
4040
|
);
|
|
@@ -4042,6 +4046,7 @@ const ngEventDirectives = {};
|
|
|
4042
4046
|
*
|
|
4043
4047
|
* @param {ng.ParseService} $parse
|
|
4044
4048
|
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
4049
|
+
* @param {ng.WindowService} $window
|
|
4045
4050
|
* @param {string} directiveName
|
|
4046
4051
|
* @param {string} eventName
|
|
4047
4052
|
* @returns {ng.Directive}
|
|
@@ -4049,6 +4054,7 @@ const ngEventDirectives = {};
|
|
|
4049
4054
|
function createEventDirective(
|
|
4050
4055
|
$parse,
|
|
4051
4056
|
$exceptionHandler,
|
|
4057
|
+
$window,
|
|
4052
4058
|
directiveName,
|
|
4053
4059
|
eventName,
|
|
4054
4060
|
) {
|
|
@@ -4056,14 +4062,58 @@ function createEventDirective(
|
|
|
4056
4062
|
restrict: "A",
|
|
4057
4063
|
compile(_element, attr) {
|
|
4058
4064
|
const fn = $parse(attr[directiveName]);
|
|
4059
|
-
return
|
|
4060
|
-
|
|
4065
|
+
return (scope, element) => {
|
|
4066
|
+
const handler = (event) => {
|
|
4061
4067
|
try {
|
|
4062
4068
|
fn(scope, { $event: event });
|
|
4063
4069
|
} catch (error) {
|
|
4064
4070
|
$exceptionHandler(error);
|
|
4065
4071
|
}
|
|
4066
|
-
}
|
|
4072
|
+
};
|
|
4073
|
+
element.addEventListener(eventName, handler);
|
|
4074
|
+
|
|
4075
|
+
scope.$on("$destroy", () =>
|
|
4076
|
+
element.removeEventListener(eventName, handler),
|
|
4077
|
+
);
|
|
4078
|
+
};
|
|
4079
|
+
},
|
|
4080
|
+
};
|
|
4081
|
+
}
|
|
4082
|
+
|
|
4083
|
+
/**
|
|
4084
|
+
*
|
|
4085
|
+
* @param {ng.ParseService} $parse
|
|
4086
|
+
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
4087
|
+
* @param {ng.WindowService} $window
|
|
4088
|
+
* @param {string} directiveName
|
|
4089
|
+
* @param {string} eventName
|
|
4090
|
+
* @returns {ng.Directive}
|
|
4091
|
+
*/
|
|
4092
|
+
function createWindowEventDirective(
|
|
4093
|
+
$parse,
|
|
4094
|
+
$exceptionHandler,
|
|
4095
|
+
$window,
|
|
4096
|
+
directiveName,
|
|
4097
|
+
eventName,
|
|
4098
|
+
) {
|
|
4099
|
+
return {
|
|
4100
|
+
restrict: "A",
|
|
4101
|
+
compile(_element, attr) {
|
|
4102
|
+
const fn = $parse(attr[directiveName]);
|
|
4103
|
+
return (scope) => {
|
|
4104
|
+
const handler = (event) => {
|
|
4105
|
+
try {
|
|
4106
|
+
fn(scope, { $event: event });
|
|
4107
|
+
} catch (error) {
|
|
4108
|
+
$exceptionHandler(error);
|
|
4109
|
+
}
|
|
4110
|
+
};
|
|
4111
|
+
|
|
4112
|
+
$window.addEventListener(eventName, handler);
|
|
4113
|
+
|
|
4114
|
+
scope.$on("$destroy", () =>
|
|
4115
|
+
$window.removeEventListener(eventName, handler),
|
|
4116
|
+
);
|
|
4067
4117
|
};
|
|
4068
4118
|
},
|
|
4069
4119
|
};
|
|
@@ -4432,91 +4482,6 @@ function ngObserveDirective(source, prop) {
|
|
|
4432
4482
|
};
|
|
4433
4483
|
}
|
|
4434
4484
|
|
|
4435
|
-
/**
|
|
4436
|
-
* A function passed as the fifth argument to a {@type PublicLinkFn} link function.
|
|
4437
|
-
* It behaves like a linking function, with the `scope` argument automatically created
|
|
4438
|
-
* as a new child of the transcluded parent scope.
|
|
4439
|
-
*
|
|
4440
|
-
* The function returns the DOM content to be injected (transcluded) into the directive.
|
|
4441
|
-
*
|
|
4442
|
-
* @callback TranscludeFn
|
|
4443
|
-
* @param {Element | Node | ChildNode | NodeList | Node[]} [clone] - The DOM node to be inserted into the transcluded directive.
|
|
4444
|
-
* @param {import("../scope/scope.js").Scope} [scope] - The new child scope created from the transcluded parent.
|
|
4445
|
-
* @returns void
|
|
4446
|
-
|
|
4447
|
-
/**
|
|
4448
|
-
* A specialized version of {@link TranscludeFn} with the scope argument already bound.
|
|
4449
|
-
* This function requires no parameters and returns the same result as {@link TranscludeFn}.
|
|
4450
|
-
*
|
|
4451
|
-
* @typedef {() => Element|Node} BoundTranscludeFn
|
|
4452
|
-
*/
|
|
4453
|
-
|
|
4454
|
-
/**
|
|
4455
|
-
* @typedef {Object} SimpleChange
|
|
4456
|
-
* @property {any} currentValue
|
|
4457
|
-
* @property {boolean} firstChange
|
|
4458
|
-
*/
|
|
4459
|
-
|
|
4460
|
-
/**
|
|
4461
|
-
* @description A function returned by the '$compile' service that links a compiled template to a scope.
|
|
4462
|
-
*
|
|
4463
|
-
* @callback PublicLinkFn
|
|
4464
|
-
* @param {import('../scope/scope.js').Scope} scope - Scope to link with element
|
|
4465
|
-
* @param {TranscludeFn} [cloneConnectFn]
|
|
4466
|
-
* @param {*} [options]
|
|
4467
|
-
* @return {Element|Node|ChildNode|Node[]} The nodes to be linked.
|
|
4468
|
-
*/
|
|
4469
|
-
|
|
4470
|
-
/**
|
|
4471
|
-
* @description Entry point for the '$compile' service.
|
|
4472
|
-
*
|
|
4473
|
-
* @callback CompileFn
|
|
4474
|
-
* @param {string|Element|Node|ChildNode|NodeList} compileNode - The node to be compiled.
|
|
4475
|
-
* @param {TranscludeFn} [transcludeFn] - An optional transclusion function to be used during compilation.
|
|
4476
|
-
* @param {number} [maxPriority] - An optional maximum priority for directives.
|
|
4477
|
-
* @param {string} [ignoreDirective] - An optional directive to ignore during compilation.
|
|
4478
|
-
* @param {*} [previousCompileContext] - An optional context from a previous compilation. TODO
|
|
4479
|
-
* @returns {PublicLinkFn} A public link function.
|
|
4480
|
-
*/
|
|
4481
|
-
|
|
4482
|
-
/**
|
|
4483
|
-
* @typedef {Object} LinkFnMapping
|
|
4484
|
-
* @property {number} index
|
|
4485
|
-
* @property {NodeLinkFnCtx} [nodeLinkFnCtx]
|
|
4486
|
-
* @property {CompositeLinkFn} [childLinkFn]
|
|
4487
|
-
*/
|
|
4488
|
-
|
|
4489
|
-
/**
|
|
4490
|
-
* @typedef {function(): CompositeLinkFn} CompileNodesFn
|
|
4491
|
-
*/
|
|
4492
|
-
|
|
4493
|
-
/**
|
|
4494
|
-
* @callback NodeLinkFn
|
|
4495
|
-
* @returns {Node|Element|NodeList}
|
|
4496
|
-
*/
|
|
4497
|
-
|
|
4498
|
-
/**
|
|
4499
|
-
* @typedef {Object} NodeLinkFnCtx
|
|
4500
|
-
* @property {NodeLinkFn} nodeLinkFn
|
|
4501
|
-
* @property {boolean} terminal
|
|
4502
|
-
* @property {TranscludeFn} transclude
|
|
4503
|
-
* @property {boolean} transcludeOnThisElement
|
|
4504
|
-
* @property {boolean} templateOnThisElement
|
|
4505
|
-
* @property {boolean} newScope
|
|
4506
|
-
*/
|
|
4507
|
-
|
|
4508
|
-
/**
|
|
4509
|
-
* @typedef {function(): NodeLinkFn} ApplyDirectivesToNodeFn
|
|
4510
|
-
*/
|
|
4511
|
-
|
|
4512
|
-
/**
|
|
4513
|
-
* @description Function that aggregates all linking fns for a compilation root (nodeList)
|
|
4514
|
-
* @callback CompositeLinkFn
|
|
4515
|
-
* @param {import('../scope/scope.js').Scope} scope - The scope to be linked to the template
|
|
4516
|
-
* @param {NodeRef} $linkNode - wrapper around a nodeList
|
|
4517
|
-
* @param {Function} [parentBoundTranscludeFn]
|
|
4518
|
-
*/
|
|
4519
|
-
|
|
4520
4485
|
const $compileMinErr = minErr("$compile");
|
|
4521
4486
|
const EXCLUDED_DIRECTIVES = ["ngIf", "ngRepeat"];
|
|
4522
4487
|
const ALL_OR_NOTHING_ATTRS = ["ngSrc", "ngSrcset", "src", "srcset"];
|
|
@@ -4540,7 +4505,6 @@ class CompileProvider {
|
|
|
4540
4505
|
const bindingCache = Object.create(null);
|
|
4541
4506
|
|
|
4542
4507
|
/**
|
|
4543
|
-
*
|
|
4544
4508
|
* @param {import("../scope/scope.js").Scope} scope
|
|
4545
4509
|
* @param {string} directiveName
|
|
4546
4510
|
* @param {boolean} isController
|
|
@@ -5053,12 +5017,11 @@ class CompileProvider {
|
|
|
5053
5017
|
? (x) => x
|
|
5054
5018
|
: (x) => x.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol);
|
|
5055
5019
|
|
|
5056
|
-
const NG_PREFIX_BINDING = /^ng(Attr|Prop|On|Observe)([A-Z].*)$/;
|
|
5020
|
+
const NG_PREFIX_BINDING = /^ng(Attr|Prop|On|Observe|Window)([A-Z].*)$/;
|
|
5057
5021
|
return compile;
|
|
5058
5022
|
|
|
5059
|
-
//= ===============================
|
|
5060
5023
|
/**
|
|
5061
|
-
* @type {
|
|
5024
|
+
* @type {ng.CompileService}
|
|
5062
5025
|
*/
|
|
5063
5026
|
function compile(
|
|
5064
5027
|
element,
|
|
@@ -5072,7 +5035,7 @@ class CompileProvider {
|
|
|
5072
5035
|
/**
|
|
5073
5036
|
* The composite link function is a composite of individual node linking functions.
|
|
5074
5037
|
* It will be invoke by the public link function below.
|
|
5075
|
-
* @type {CompositeLinkFn}
|
|
5038
|
+
* @type {ng.CompositeLinkFn}
|
|
5076
5039
|
*/
|
|
5077
5040
|
let compositeLinkFn = compileNodes(
|
|
5078
5041
|
nodeRef,
|
|
@@ -5085,7 +5048,7 @@ class CompileProvider {
|
|
|
5085
5048
|
let namespace = null;
|
|
5086
5049
|
return publicLinkFn;
|
|
5087
5050
|
|
|
5088
|
-
/** @type {PublicLinkFn} */
|
|
5051
|
+
/** @type {ng.PublicLinkFn} */
|
|
5089
5052
|
function publicLinkFn(scope, cloneConnectFn, options) {
|
|
5090
5053
|
if (!nodeRef) {
|
|
5091
5054
|
throw $compileMinErr(
|
|
@@ -5207,7 +5170,7 @@ class CompileProvider {
|
|
|
5207
5170
|
* @param {number=} [maxPriority] Max directive priority.
|
|
5208
5171
|
* @param {*} [ignoreDirective]
|
|
5209
5172
|
* @param {*} [previousCompileContext]
|
|
5210
|
-
* @returns {CompositeLinkFn} A composite linking function of all of the matched directives or null.
|
|
5173
|
+
* @returns {ng.CompositeLinkFn} A composite linking function of all of the matched directives or null.
|
|
5211
5174
|
*/
|
|
5212
5175
|
function compileNodes(
|
|
5213
5176
|
nodeRefList,
|
|
@@ -5220,7 +5183,7 @@ class CompileProvider {
|
|
|
5220
5183
|
* Aggregates for the composite linking function, where a node in a node list is mapped
|
|
5221
5184
|
* to a corresponding link function. For single elements, the node should be mapped to
|
|
5222
5185
|
* a single node link function.
|
|
5223
|
-
* @type {LinkFnMapping[]}
|
|
5186
|
+
* @type {ng.LinkFnMapping[]}
|
|
5224
5187
|
*/
|
|
5225
5188
|
const linkFnsList = []; // An array to hold node indices and their linkFns
|
|
5226
5189
|
let nodeLinkFnFound;
|
|
@@ -5240,7 +5203,7 @@ class CompileProvider {
|
|
|
5240
5203
|
ignoreDirective,
|
|
5241
5204
|
);
|
|
5242
5205
|
|
|
5243
|
-
/** @type {NodeLinkFnCtx} */
|
|
5206
|
+
/** @type {ng.NodeLinkFnCtx} */
|
|
5244
5207
|
let nodeLinkFnCtx;
|
|
5245
5208
|
|
|
5246
5209
|
if (directives.length) {
|
|
@@ -5387,10 +5350,10 @@ class CompileProvider {
|
|
|
5387
5350
|
|
|
5388
5351
|
/**
|
|
5389
5352
|
* Prebinds the transclusion function to a scope
|
|
5390
|
-
* @param {
|
|
5353
|
+
* @param {ng.Scope} scope
|
|
5391
5354
|
* @param {*} transcludeFn
|
|
5392
5355
|
* @param {*} previousBoundTranscludeFn
|
|
5393
|
-
* @returns {BoundTranscludeFn}
|
|
5356
|
+
* @returns {ng.BoundTranscludeFn}
|
|
5394
5357
|
*/
|
|
5395
5358
|
function createBoundTranscludeFn(
|
|
5396
5359
|
scope,
|
|
@@ -5448,7 +5411,7 @@ class CompileProvider {
|
|
|
5448
5411
|
*/
|
|
5449
5412
|
function collectDirectives(node, attrs, maxPriority, ignoreDirective) {
|
|
5450
5413
|
/**
|
|
5451
|
-
* @type {
|
|
5414
|
+
* @type {ng.Directive[]}
|
|
5452
5415
|
*/
|
|
5453
5416
|
const directives = [];
|
|
5454
5417
|
const { nodeType } = node;
|
|
@@ -5474,6 +5437,7 @@ class CompileProvider {
|
|
|
5474
5437
|
let isNgProp = false;
|
|
5475
5438
|
let isNgEvent = false;
|
|
5476
5439
|
let isNgObserve = false;
|
|
5440
|
+
let isWindow = false;
|
|
5477
5441
|
|
|
5478
5442
|
let attr = node.attributes[j];
|
|
5479
5443
|
let name = attr.name;
|
|
@@ -5487,6 +5451,7 @@ class CompileProvider {
|
|
|
5487
5451
|
isNgProp = ngPrefixMatch[1] === "Prop";
|
|
5488
5452
|
isNgEvent = ngPrefixMatch[1] === "On";
|
|
5489
5453
|
isNgObserve = ngPrefixMatch[1] === "Observe";
|
|
5454
|
+
isWindow = ngPrefixMatch[1] === "Window";
|
|
5490
5455
|
|
|
5491
5456
|
// Normalize the non-prefixed name
|
|
5492
5457
|
name = name
|
|
@@ -5496,17 +5461,28 @@ class CompileProvider {
|
|
|
5496
5461
|
.replace(/_(.)/g, (match, letter) => letter.toUpperCase());
|
|
5497
5462
|
}
|
|
5498
5463
|
|
|
5499
|
-
if (isNgProp || isNgEvent) {
|
|
5464
|
+
if (isNgProp || isNgEvent || isWindow) {
|
|
5500
5465
|
attrs[nName] = value;
|
|
5501
5466
|
attrsMap[nName] = attr.name;
|
|
5502
5467
|
|
|
5503
5468
|
if (isNgProp) {
|
|
5504
5469
|
addPropertyDirective(node, directives, nName, name);
|
|
5505
|
-
} else {
|
|
5470
|
+
} else if (isNgEvent) {
|
|
5506
5471
|
directives.push(
|
|
5507
5472
|
createEventDirective(
|
|
5508
5473
|
$parse,
|
|
5509
5474
|
$exceptionHandler,
|
|
5475
|
+
window,
|
|
5476
|
+
nName,
|
|
5477
|
+
name,
|
|
5478
|
+
),
|
|
5479
|
+
);
|
|
5480
|
+
} else {
|
|
5481
|
+
directives.push(
|
|
5482
|
+
createWindowEventDirective(
|
|
5483
|
+
$parse,
|
|
5484
|
+
$exceptionHandler,
|
|
5485
|
+
window,
|
|
5510
5486
|
nName,
|
|
5511
5487
|
name,
|
|
5512
5488
|
),
|
|
@@ -5569,7 +5545,7 @@ class CompileProvider {
|
|
|
5569
5545
|
* @param maxPriority
|
|
5570
5546
|
* @param ignoreDirective
|
|
5571
5547
|
* @param previousCompileContext
|
|
5572
|
-
* @returns {PublicLinkFn|TranscludeFn}
|
|
5548
|
+
* @returns {ng.PublicLinkFn|ng.TranscludeFn}
|
|
5573
5549
|
*/
|
|
5574
5550
|
function compilationGenerator(
|
|
5575
5551
|
eager,
|
|
@@ -5616,14 +5592,14 @@ class CompileProvider {
|
|
|
5616
5592
|
* this needs to be pre-sorted by priority order.
|
|
5617
5593
|
* @param {Node | Element} compileNode DOM node to apply the compile functions to
|
|
5618
5594
|
* @param {Attributes} templateAttrs The shared attribute function
|
|
5619
|
-
* @param {TranscludeFn} transcludeFn
|
|
5595
|
+
* @param {ng.TranscludeFn} transcludeFn
|
|
5620
5596
|
* @param {Object=} originalReplaceDirective An optional directive that will be ignored when
|
|
5621
5597
|
* compiling the transclusion.
|
|
5622
5598
|
* @param {Array.<Function>} [preLinkFns]
|
|
5623
5599
|
* @param {Array.<Function>} [postLinkFns]
|
|
5624
5600
|
* @param {Object} [previousCompileContext] Context used for previous compilation of the current
|
|
5625
5601
|
* node
|
|
5626
|
-
* @returns {NodeLinkFnCtx} node link function
|
|
5602
|
+
* @returns {ng.NodeLinkFnCtx} node link function
|
|
5627
5603
|
*/
|
|
5628
5604
|
function applyDirectivesToNode(
|
|
5629
5605
|
directives,
|
|
@@ -5658,7 +5634,7 @@ class CompileProvider {
|
|
|
5658
5634
|
let directiveName;
|
|
5659
5635
|
let $template;
|
|
5660
5636
|
let replaceDirective = originalReplaceDirective;
|
|
5661
|
-
/** @type {TranscludeFn} */
|
|
5637
|
+
/** @type {ng.TranscludeFn} */
|
|
5662
5638
|
let childTranscludeFn = transcludeFn;
|
|
5663
5639
|
|
|
5664
5640
|
let didScanForMultipleTransclusion = false;
|
|
@@ -5667,7 +5643,7 @@ class CompileProvider {
|
|
|
5667
5643
|
|
|
5668
5644
|
/**
|
|
5669
5645
|
* Links all the directives of a single node.
|
|
5670
|
-
* @type {NodeLinkFn}
|
|
5646
|
+
* @type {ng.NodeLinkFn}
|
|
5671
5647
|
*/
|
|
5672
5648
|
// @ts-ignore
|
|
5673
5649
|
let nodeLinkFn = function (
|
|
@@ -6349,7 +6325,7 @@ class CompileProvider {
|
|
|
6349
6325
|
ii = directives.length;
|
|
6350
6326
|
} else if (directive.compile) {
|
|
6351
6327
|
try {
|
|
6352
|
-
/** @type {PublicLinkFn} */
|
|
6328
|
+
/** @type {ng.PublicLinkFn} */
|
|
6353
6329
|
const linkFn = directive.compile(
|
|
6354
6330
|
compileNodeRef.getAny(),
|
|
6355
6331
|
templateAttrs,
|
|
@@ -7365,7 +7341,7 @@ class CompileProvider {
|
|
|
7365
7341
|
}
|
|
7366
7342
|
|
|
7367
7343
|
/**
|
|
7368
|
-
* @type {SimpleChange}
|
|
7344
|
+
* @type {import("./inteface.ts").SimpleChange}
|
|
7369
7345
|
*/
|
|
7370
7346
|
initialChanges[scopeName] = {
|
|
7371
7347
|
currentValue: destination[scopeName],
|
|
@@ -7518,7 +7494,7 @@ class CompileProvider {
|
|
|
7518
7494
|
parentGet = $parse(attrs[attrName]);
|
|
7519
7495
|
|
|
7520
7496
|
destination.$target[scopeName] = parentGet(scope.$target);
|
|
7521
|
-
/** @type {SimpleChange} */
|
|
7497
|
+
/** @type {import("./inteface.ts").SimpleChange} */
|
|
7522
7498
|
initialChanges[scopeName] = {
|
|
7523
7499
|
currentValue: destination.$target[scopeName],
|
|
7524
7500
|
firstChange: firstChange,
|
|
@@ -11486,7 +11462,7 @@ const ngClassOddDirective = classDirective("Odd", 0);
|
|
|
11486
11462
|
const ngClassEvenDirective = classDirective("Even", 1);
|
|
11487
11463
|
|
|
11488
11464
|
/**
|
|
11489
|
-
* @returns {
|
|
11465
|
+
* @returns {ng.Directive}
|
|
11490
11466
|
*/
|
|
11491
11467
|
function ngCloakDirective() {
|
|
11492
11468
|
return {
|
|
@@ -11777,7 +11753,7 @@ function ngIncludeDirective(
|
|
|
11777
11753
|
ngIncludeFillContentDirective.$inject = [$injectTokens.$compile];
|
|
11778
11754
|
|
|
11779
11755
|
/**
|
|
11780
|
-
* @param {
|
|
11756
|
+
* @param {ng.CompileService} $compile
|
|
11781
11757
|
* @returns {import("../../interface.ts").Directive}
|
|
11782
11758
|
*/
|
|
11783
11759
|
function ngIncludeFillContentDirective($compile) {
|
|
@@ -12408,7 +12384,7 @@ const NG_OPTIONS_REGEXP =
|
|
|
12408
12384
|
ngOptionsDirective.$inject = ["$compile", "$parse"];
|
|
12409
12385
|
/**
|
|
12410
12386
|
*
|
|
12411
|
-
* @param {
|
|
12387
|
+
* @param {ng.CompileService} $compile
|
|
12412
12388
|
* @param {import("../../core/parse/interface.ts").ParseService} $parse
|
|
12413
12389
|
* @returns {import("../../interface.ts").Directive}
|
|
12414
12390
|
*/
|
|
@@ -12935,8 +12911,8 @@ const ngTranscludeMinErr = minErr("ngTransclude");
|
|
|
12935
12911
|
|
|
12936
12912
|
ngTranscludeDirective.$inject = ["$compile"];
|
|
12937
12913
|
/**
|
|
12938
|
-
* @param {
|
|
12939
|
-
* @returns {
|
|
12914
|
+
* @param {ng.CompileService} $compile
|
|
12915
|
+
* @returns {ng.Directive}
|
|
12940
12916
|
*/
|
|
12941
12917
|
function ngTranscludeDirective($compile) {
|
|
12942
12918
|
return {
|
|
@@ -12947,9 +12923,9 @@ function ngTranscludeDirective($compile) {
|
|
|
12947
12923
|
|
|
12948
12924
|
/**
|
|
12949
12925
|
*
|
|
12950
|
-
* @param {
|
|
12926
|
+
* @param {ng.Scope} $scope
|
|
12951
12927
|
* @param {Element} $element
|
|
12952
|
-
* @param {
|
|
12928
|
+
* @param {ng.Attributes} $attrs
|
|
12953
12929
|
* @param {*} _controller
|
|
12954
12930
|
* @param {*} $transclude
|
|
12955
12931
|
*/
|
|
@@ -35018,8 +34994,8 @@ function registerControllerCallbacks(
|
|
|
35018
34994
|
|
|
35019
34995
|
ngChannelDirective.$inject = [$injectTokens.$eventBus];
|
|
35020
34996
|
/**
|
|
35021
|
-
* @param {
|
|
35022
|
-
* @returns {
|
|
34997
|
+
* @param {ng.PubSubService} $eventBus
|
|
34998
|
+
* @returns {ng.Directive}
|
|
35023
34999
|
*/
|
|
35024
35000
|
function ngChannelDirective($eventBus) {
|
|
35025
35001
|
return {
|
|
@@ -35253,7 +35229,7 @@ function createHttpDirective(method, attrName) {
|
|
|
35253
35229
|
* @param {ng.LogService} $log
|
|
35254
35230
|
* @param {ng.ParseService} $parse
|
|
35255
35231
|
* @param {ng.StateService} $state
|
|
35256
|
-
* @param {
|
|
35232
|
+
* @param {ng.SseService} $sse
|
|
35257
35233
|
* @returns {ng.Directive}
|
|
35258
35234
|
*/
|
|
35259
35235
|
return function ($http, $compile, $log, $parse, $state, $sse) {
|
|
@@ -35640,6 +35616,59 @@ class SseProvider {
|
|
|
35640
35616
|
}
|
|
35641
35617
|
}
|
|
35642
35618
|
|
|
35619
|
+
/**
|
|
35620
|
+
* @returns {ng.Directive}
|
|
35621
|
+
*/
|
|
35622
|
+
function ngViewportDirective() {
|
|
35623
|
+
return {
|
|
35624
|
+
restrict: "A",
|
|
35625
|
+
link(scope, element, attrs) {
|
|
35626
|
+
const enterExpr = attrs["onEnter"];
|
|
35627
|
+
const leaveExpr = attrs["onLeave"];
|
|
35628
|
+
|
|
35629
|
+
const observer = new IntersectionObserver(
|
|
35630
|
+
(entries) => {
|
|
35631
|
+
entries.forEach((entry) => {
|
|
35632
|
+
if (entry.isIntersecting) {
|
|
35633
|
+
if (enterExpr) scope.$eval(enterExpr);
|
|
35634
|
+
} else {
|
|
35635
|
+
if (leaveExpr) scope.$eval(leaveExpr);
|
|
35636
|
+
}
|
|
35637
|
+
});
|
|
35638
|
+
},
|
|
35639
|
+
{
|
|
35640
|
+
root: null, // viewport
|
|
35641
|
+
threshold: 0.1, // consider "in view" if 10% visible
|
|
35642
|
+
},
|
|
35643
|
+
);
|
|
35644
|
+
|
|
35645
|
+
observer.observe(element);
|
|
35646
|
+
|
|
35647
|
+
// Clean up when the element is removed from DOM
|
|
35648
|
+
const parent = element.parentNode;
|
|
35649
|
+
let mutationObserver;
|
|
35650
|
+
if (parent) {
|
|
35651
|
+
mutationObserver = new MutationObserver((mutations) => {
|
|
35652
|
+
for (const mutation of mutations) {
|
|
35653
|
+
Array.from(mutation.removedNodes).forEach((removedNode) => {
|
|
35654
|
+
if (removedNode === element) {
|
|
35655
|
+
observer.disconnect();
|
|
35656
|
+
mutationObserver.disconnect();
|
|
35657
|
+
}
|
|
35658
|
+
});
|
|
35659
|
+
}
|
|
35660
|
+
});
|
|
35661
|
+
mutationObserver.observe(parent, { childList: true });
|
|
35662
|
+
}
|
|
35663
|
+
|
|
35664
|
+
scope.$on("$destroy", () => {
|
|
35665
|
+
observer.disconnect();
|
|
35666
|
+
if (mutationObserver) mutationObserver.disconnect();
|
|
35667
|
+
});
|
|
35668
|
+
},
|
|
35669
|
+
};
|
|
35670
|
+
}
|
|
35671
|
+
|
|
35643
35672
|
/**
|
|
35644
35673
|
* Initializes core `ng` module.
|
|
35645
35674
|
* @param {import('./angular.js').Angular} angular
|
|
@@ -35717,6 +35746,7 @@ function registerNgModule(angular) {
|
|
|
35717
35746
|
maxlength: maxlengthDirective,
|
|
35718
35747
|
ngValue: ngValueDirective,
|
|
35719
35748
|
ngModelOptions: ngModelOptionsDirective,
|
|
35749
|
+
ngViewport: ngViewportDirective,
|
|
35720
35750
|
})
|
|
35721
35751
|
.directive({
|
|
35722
35752
|
input: hiddenInputBrowserCacheDirective,
|
|
@@ -35815,7 +35845,7 @@ class Angular {
|
|
|
35815
35845
|
/**
|
|
35816
35846
|
* @type {string} `version` from `package.json`
|
|
35817
35847
|
*/
|
|
35818
|
-
this.version = "0.9.
|
|
35848
|
+
this.version = "0.9.9"; //inserted via rollup plugin
|
|
35819
35849
|
|
|
35820
35850
|
/** @type {!Array<string|any>} */
|
|
35821
35851
|
this.bootsrappedModules = [];
|
|
@@ -35908,10 +35938,10 @@ class Angular {
|
|
|
35908
35938
|
$injectTokens.$compile,
|
|
35909
35939
|
$injectTokens.$injector,
|
|
35910
35940
|
/**
|
|
35911
|
-
* @param {
|
|
35941
|
+
* @param {ng.Scope} scope
|
|
35912
35942
|
* @param {Element} el
|
|
35913
|
-
* @param {
|
|
35914
|
-
* @param {
|
|
35943
|
+
* @param {ng.CompileService} compile
|
|
35944
|
+
* @param {ng.InjectorService} $injector
|
|
35915
35945
|
*/
|
|
35916
35946
|
(scope, el, compile, $injector) => {
|
|
35917
35947
|
// ng-route deps
|