@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.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Version: 0.9.
|
|
1
|
+
/* Version: 0.9.9 - October 28, 2025 22:08:28 */
|
|
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) :
|
|
@@ -4021,22 +4021,26 @@
|
|
|
4021
4021
|
*/
|
|
4022
4022
|
const ngEventDirectives = {};
|
|
4023
4023
|
|
|
4024
|
-
"click copy cut dblclick focus blur keydown keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup paste submit touchstart touchend touchmove"
|
|
4024
|
+
"click copy cut dblclick focus blur keydown keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup paste submit touchstart touchend touchmove offline online"
|
|
4025
4025
|
.split(" ")
|
|
4026
4026
|
.forEach((eventName) => {
|
|
4027
4027
|
const directiveName = directiveNormalize(`ng-${eventName}`);
|
|
4028
4028
|
ngEventDirectives[directiveName] = [
|
|
4029
|
-
|
|
4030
|
-
|
|
4029
|
+
$injectTokens.$parse,
|
|
4030
|
+
$injectTokens.$exceptionHandler,
|
|
4031
|
+
$injectTokens.$window,
|
|
4032
|
+
|
|
4031
4033
|
/**
|
|
4032
4034
|
* @param {import("../../core/parse/interface.ts").ParseService} $parse
|
|
4033
4035
|
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
4036
|
+
* @param {ng.WindowService} $window
|
|
4034
4037
|
* @returns
|
|
4035
4038
|
*/
|
|
4036
|
-
($parse, $exceptionHandler) => {
|
|
4039
|
+
($parse, $exceptionHandler, $window) => {
|
|
4037
4040
|
return createEventDirective(
|
|
4038
4041
|
$parse,
|
|
4039
4042
|
$exceptionHandler,
|
|
4043
|
+
$window,
|
|
4040
4044
|
directiveName,
|
|
4041
4045
|
eventName,
|
|
4042
4046
|
);
|
|
@@ -4048,6 +4052,7 @@
|
|
|
4048
4052
|
*
|
|
4049
4053
|
* @param {ng.ParseService} $parse
|
|
4050
4054
|
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
4055
|
+
* @param {ng.WindowService} $window
|
|
4051
4056
|
* @param {string} directiveName
|
|
4052
4057
|
* @param {string} eventName
|
|
4053
4058
|
* @returns {ng.Directive}
|
|
@@ -4055,6 +4060,7 @@
|
|
|
4055
4060
|
function createEventDirective(
|
|
4056
4061
|
$parse,
|
|
4057
4062
|
$exceptionHandler,
|
|
4063
|
+
$window,
|
|
4058
4064
|
directiveName,
|
|
4059
4065
|
eventName,
|
|
4060
4066
|
) {
|
|
@@ -4062,14 +4068,58 @@
|
|
|
4062
4068
|
restrict: "A",
|
|
4063
4069
|
compile(_element, attr) {
|
|
4064
4070
|
const fn = $parse(attr[directiveName]);
|
|
4065
|
-
return
|
|
4066
|
-
|
|
4071
|
+
return (scope, element) => {
|
|
4072
|
+
const handler = (event) => {
|
|
4067
4073
|
try {
|
|
4068
4074
|
fn(scope, { $event: event });
|
|
4069
4075
|
} catch (error) {
|
|
4070
4076
|
$exceptionHandler(error);
|
|
4071
4077
|
}
|
|
4072
|
-
}
|
|
4078
|
+
};
|
|
4079
|
+
element.addEventListener(eventName, handler);
|
|
4080
|
+
|
|
4081
|
+
scope.$on("$destroy", () =>
|
|
4082
|
+
element.removeEventListener(eventName, handler),
|
|
4083
|
+
);
|
|
4084
|
+
};
|
|
4085
|
+
},
|
|
4086
|
+
};
|
|
4087
|
+
}
|
|
4088
|
+
|
|
4089
|
+
/**
|
|
4090
|
+
*
|
|
4091
|
+
* @param {ng.ParseService} $parse
|
|
4092
|
+
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
4093
|
+
* @param {ng.WindowService} $window
|
|
4094
|
+
* @param {string} directiveName
|
|
4095
|
+
* @param {string} eventName
|
|
4096
|
+
* @returns {ng.Directive}
|
|
4097
|
+
*/
|
|
4098
|
+
function createWindowEventDirective(
|
|
4099
|
+
$parse,
|
|
4100
|
+
$exceptionHandler,
|
|
4101
|
+
$window,
|
|
4102
|
+
directiveName,
|
|
4103
|
+
eventName,
|
|
4104
|
+
) {
|
|
4105
|
+
return {
|
|
4106
|
+
restrict: "A",
|
|
4107
|
+
compile(_element, attr) {
|
|
4108
|
+
const fn = $parse(attr[directiveName]);
|
|
4109
|
+
return (scope) => {
|
|
4110
|
+
const handler = (event) => {
|
|
4111
|
+
try {
|
|
4112
|
+
fn(scope, { $event: event });
|
|
4113
|
+
} catch (error) {
|
|
4114
|
+
$exceptionHandler(error);
|
|
4115
|
+
}
|
|
4116
|
+
};
|
|
4117
|
+
|
|
4118
|
+
$window.addEventListener(eventName, handler);
|
|
4119
|
+
|
|
4120
|
+
scope.$on("$destroy", () =>
|
|
4121
|
+
$window.removeEventListener(eventName, handler),
|
|
4122
|
+
);
|
|
4073
4123
|
};
|
|
4074
4124
|
},
|
|
4075
4125
|
};
|
|
@@ -4438,91 +4488,6 @@
|
|
|
4438
4488
|
};
|
|
4439
4489
|
}
|
|
4440
4490
|
|
|
4441
|
-
/**
|
|
4442
|
-
* A function passed as the fifth argument to a {@type PublicLinkFn} link function.
|
|
4443
|
-
* It behaves like a linking function, with the `scope` argument automatically created
|
|
4444
|
-
* as a new child of the transcluded parent scope.
|
|
4445
|
-
*
|
|
4446
|
-
* The function returns the DOM content to be injected (transcluded) into the directive.
|
|
4447
|
-
*
|
|
4448
|
-
* @callback TranscludeFn
|
|
4449
|
-
* @param {Element | Node | ChildNode | NodeList | Node[]} [clone] - The DOM node to be inserted into the transcluded directive.
|
|
4450
|
-
* @param {import("../scope/scope.js").Scope} [scope] - The new child scope created from the transcluded parent.
|
|
4451
|
-
* @returns void
|
|
4452
|
-
|
|
4453
|
-
/**
|
|
4454
|
-
* A specialized version of {@link TranscludeFn} with the scope argument already bound.
|
|
4455
|
-
* This function requires no parameters and returns the same result as {@link TranscludeFn}.
|
|
4456
|
-
*
|
|
4457
|
-
* @typedef {() => Element|Node} BoundTranscludeFn
|
|
4458
|
-
*/
|
|
4459
|
-
|
|
4460
|
-
/**
|
|
4461
|
-
* @typedef {Object} SimpleChange
|
|
4462
|
-
* @property {any} currentValue
|
|
4463
|
-
* @property {boolean} firstChange
|
|
4464
|
-
*/
|
|
4465
|
-
|
|
4466
|
-
/**
|
|
4467
|
-
* @description A function returned by the '$compile' service that links a compiled template to a scope.
|
|
4468
|
-
*
|
|
4469
|
-
* @callback PublicLinkFn
|
|
4470
|
-
* @param {import('../scope/scope.js').Scope} scope - Scope to link with element
|
|
4471
|
-
* @param {TranscludeFn} [cloneConnectFn]
|
|
4472
|
-
* @param {*} [options]
|
|
4473
|
-
* @return {Element|Node|ChildNode|Node[]} The nodes to be linked.
|
|
4474
|
-
*/
|
|
4475
|
-
|
|
4476
|
-
/**
|
|
4477
|
-
* @description Entry point for the '$compile' service.
|
|
4478
|
-
*
|
|
4479
|
-
* @callback CompileFn
|
|
4480
|
-
* @param {string|Element|Node|ChildNode|NodeList} compileNode - The node to be compiled.
|
|
4481
|
-
* @param {TranscludeFn} [transcludeFn] - An optional transclusion function to be used during compilation.
|
|
4482
|
-
* @param {number} [maxPriority] - An optional maximum priority for directives.
|
|
4483
|
-
* @param {string} [ignoreDirective] - An optional directive to ignore during compilation.
|
|
4484
|
-
* @param {*} [previousCompileContext] - An optional context from a previous compilation. TODO
|
|
4485
|
-
* @returns {PublicLinkFn} A public link function.
|
|
4486
|
-
*/
|
|
4487
|
-
|
|
4488
|
-
/**
|
|
4489
|
-
* @typedef {Object} LinkFnMapping
|
|
4490
|
-
* @property {number} index
|
|
4491
|
-
* @property {NodeLinkFnCtx} [nodeLinkFnCtx]
|
|
4492
|
-
* @property {CompositeLinkFn} [childLinkFn]
|
|
4493
|
-
*/
|
|
4494
|
-
|
|
4495
|
-
/**
|
|
4496
|
-
* @typedef {function(): CompositeLinkFn} CompileNodesFn
|
|
4497
|
-
*/
|
|
4498
|
-
|
|
4499
|
-
/**
|
|
4500
|
-
* @callback NodeLinkFn
|
|
4501
|
-
* @returns {Node|Element|NodeList}
|
|
4502
|
-
*/
|
|
4503
|
-
|
|
4504
|
-
/**
|
|
4505
|
-
* @typedef {Object} NodeLinkFnCtx
|
|
4506
|
-
* @property {NodeLinkFn} nodeLinkFn
|
|
4507
|
-
* @property {boolean} terminal
|
|
4508
|
-
* @property {TranscludeFn} transclude
|
|
4509
|
-
* @property {boolean} transcludeOnThisElement
|
|
4510
|
-
* @property {boolean} templateOnThisElement
|
|
4511
|
-
* @property {boolean} newScope
|
|
4512
|
-
*/
|
|
4513
|
-
|
|
4514
|
-
/**
|
|
4515
|
-
* @typedef {function(): NodeLinkFn} ApplyDirectivesToNodeFn
|
|
4516
|
-
*/
|
|
4517
|
-
|
|
4518
|
-
/**
|
|
4519
|
-
* @description Function that aggregates all linking fns for a compilation root (nodeList)
|
|
4520
|
-
* @callback CompositeLinkFn
|
|
4521
|
-
* @param {import('../scope/scope.js').Scope} scope - The scope to be linked to the template
|
|
4522
|
-
* @param {NodeRef} $linkNode - wrapper around a nodeList
|
|
4523
|
-
* @param {Function} [parentBoundTranscludeFn]
|
|
4524
|
-
*/
|
|
4525
|
-
|
|
4526
4491
|
const $compileMinErr = minErr("$compile");
|
|
4527
4492
|
const EXCLUDED_DIRECTIVES = ["ngIf", "ngRepeat"];
|
|
4528
4493
|
const ALL_OR_NOTHING_ATTRS = ["ngSrc", "ngSrcset", "src", "srcset"];
|
|
@@ -4546,7 +4511,6 @@
|
|
|
4546
4511
|
const bindingCache = Object.create(null);
|
|
4547
4512
|
|
|
4548
4513
|
/**
|
|
4549
|
-
*
|
|
4550
4514
|
* @param {import("../scope/scope.js").Scope} scope
|
|
4551
4515
|
* @param {string} directiveName
|
|
4552
4516
|
* @param {boolean} isController
|
|
@@ -5059,12 +5023,11 @@
|
|
|
5059
5023
|
? (x) => x
|
|
5060
5024
|
: (x) => x.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol);
|
|
5061
5025
|
|
|
5062
|
-
const NG_PREFIX_BINDING = /^ng(Attr|Prop|On|Observe)([A-Z].*)$/;
|
|
5026
|
+
const NG_PREFIX_BINDING = /^ng(Attr|Prop|On|Observe|Window)([A-Z].*)$/;
|
|
5063
5027
|
return compile;
|
|
5064
5028
|
|
|
5065
|
-
//= ===============================
|
|
5066
5029
|
/**
|
|
5067
|
-
* @type {
|
|
5030
|
+
* @type {ng.CompileService}
|
|
5068
5031
|
*/
|
|
5069
5032
|
function compile(
|
|
5070
5033
|
element,
|
|
@@ -5078,7 +5041,7 @@
|
|
|
5078
5041
|
/**
|
|
5079
5042
|
* The composite link function is a composite of individual node linking functions.
|
|
5080
5043
|
* It will be invoke by the public link function below.
|
|
5081
|
-
* @type {CompositeLinkFn}
|
|
5044
|
+
* @type {ng.CompositeLinkFn}
|
|
5082
5045
|
*/
|
|
5083
5046
|
let compositeLinkFn = compileNodes(
|
|
5084
5047
|
nodeRef,
|
|
@@ -5091,7 +5054,7 @@
|
|
|
5091
5054
|
let namespace = null;
|
|
5092
5055
|
return publicLinkFn;
|
|
5093
5056
|
|
|
5094
|
-
/** @type {PublicLinkFn} */
|
|
5057
|
+
/** @type {ng.PublicLinkFn} */
|
|
5095
5058
|
function publicLinkFn(scope, cloneConnectFn, options) {
|
|
5096
5059
|
if (!nodeRef) {
|
|
5097
5060
|
throw $compileMinErr(
|
|
@@ -5213,7 +5176,7 @@
|
|
|
5213
5176
|
* @param {number=} [maxPriority] Max directive priority.
|
|
5214
5177
|
* @param {*} [ignoreDirective]
|
|
5215
5178
|
* @param {*} [previousCompileContext]
|
|
5216
|
-
* @returns {CompositeLinkFn} A composite linking function of all of the matched directives or null.
|
|
5179
|
+
* @returns {ng.CompositeLinkFn} A composite linking function of all of the matched directives or null.
|
|
5217
5180
|
*/
|
|
5218
5181
|
function compileNodes(
|
|
5219
5182
|
nodeRefList,
|
|
@@ -5226,7 +5189,7 @@
|
|
|
5226
5189
|
* Aggregates for the composite linking function, where a node in a node list is mapped
|
|
5227
5190
|
* to a corresponding link function. For single elements, the node should be mapped to
|
|
5228
5191
|
* a single node link function.
|
|
5229
|
-
* @type {LinkFnMapping[]}
|
|
5192
|
+
* @type {ng.LinkFnMapping[]}
|
|
5230
5193
|
*/
|
|
5231
5194
|
const linkFnsList = []; // An array to hold node indices and their linkFns
|
|
5232
5195
|
let nodeLinkFnFound;
|
|
@@ -5246,7 +5209,7 @@
|
|
|
5246
5209
|
ignoreDirective,
|
|
5247
5210
|
);
|
|
5248
5211
|
|
|
5249
|
-
/** @type {NodeLinkFnCtx} */
|
|
5212
|
+
/** @type {ng.NodeLinkFnCtx} */
|
|
5250
5213
|
let nodeLinkFnCtx;
|
|
5251
5214
|
|
|
5252
5215
|
if (directives.length) {
|
|
@@ -5393,10 +5356,10 @@
|
|
|
5393
5356
|
|
|
5394
5357
|
/**
|
|
5395
5358
|
* Prebinds the transclusion function to a scope
|
|
5396
|
-
* @param {
|
|
5359
|
+
* @param {ng.Scope} scope
|
|
5397
5360
|
* @param {*} transcludeFn
|
|
5398
5361
|
* @param {*} previousBoundTranscludeFn
|
|
5399
|
-
* @returns {BoundTranscludeFn}
|
|
5362
|
+
* @returns {ng.BoundTranscludeFn}
|
|
5400
5363
|
*/
|
|
5401
5364
|
function createBoundTranscludeFn(
|
|
5402
5365
|
scope,
|
|
@@ -5454,7 +5417,7 @@
|
|
|
5454
5417
|
*/
|
|
5455
5418
|
function collectDirectives(node, attrs, maxPriority, ignoreDirective) {
|
|
5456
5419
|
/**
|
|
5457
|
-
* @type {
|
|
5420
|
+
* @type {ng.Directive[]}
|
|
5458
5421
|
*/
|
|
5459
5422
|
const directives = [];
|
|
5460
5423
|
const { nodeType } = node;
|
|
@@ -5480,6 +5443,7 @@
|
|
|
5480
5443
|
let isNgProp = false;
|
|
5481
5444
|
let isNgEvent = false;
|
|
5482
5445
|
let isNgObserve = false;
|
|
5446
|
+
let isWindow = false;
|
|
5483
5447
|
|
|
5484
5448
|
let attr = node.attributes[j];
|
|
5485
5449
|
let name = attr.name;
|
|
@@ -5493,6 +5457,7 @@
|
|
|
5493
5457
|
isNgProp = ngPrefixMatch[1] === "Prop";
|
|
5494
5458
|
isNgEvent = ngPrefixMatch[1] === "On";
|
|
5495
5459
|
isNgObserve = ngPrefixMatch[1] === "Observe";
|
|
5460
|
+
isWindow = ngPrefixMatch[1] === "Window";
|
|
5496
5461
|
|
|
5497
5462
|
// Normalize the non-prefixed name
|
|
5498
5463
|
name = name
|
|
@@ -5502,17 +5467,28 @@
|
|
|
5502
5467
|
.replace(/_(.)/g, (match, letter) => letter.toUpperCase());
|
|
5503
5468
|
}
|
|
5504
5469
|
|
|
5505
|
-
if (isNgProp || isNgEvent) {
|
|
5470
|
+
if (isNgProp || isNgEvent || isWindow) {
|
|
5506
5471
|
attrs[nName] = value;
|
|
5507
5472
|
attrsMap[nName] = attr.name;
|
|
5508
5473
|
|
|
5509
5474
|
if (isNgProp) {
|
|
5510
5475
|
addPropertyDirective(node, directives, nName, name);
|
|
5511
|
-
} else {
|
|
5476
|
+
} else if (isNgEvent) {
|
|
5512
5477
|
directives.push(
|
|
5513
5478
|
createEventDirective(
|
|
5514
5479
|
$parse,
|
|
5515
5480
|
$exceptionHandler,
|
|
5481
|
+
window,
|
|
5482
|
+
nName,
|
|
5483
|
+
name,
|
|
5484
|
+
),
|
|
5485
|
+
);
|
|
5486
|
+
} else {
|
|
5487
|
+
directives.push(
|
|
5488
|
+
createWindowEventDirective(
|
|
5489
|
+
$parse,
|
|
5490
|
+
$exceptionHandler,
|
|
5491
|
+
window,
|
|
5516
5492
|
nName,
|
|
5517
5493
|
name,
|
|
5518
5494
|
),
|
|
@@ -5575,7 +5551,7 @@
|
|
|
5575
5551
|
* @param maxPriority
|
|
5576
5552
|
* @param ignoreDirective
|
|
5577
5553
|
* @param previousCompileContext
|
|
5578
|
-
* @returns {PublicLinkFn|TranscludeFn}
|
|
5554
|
+
* @returns {ng.PublicLinkFn|ng.TranscludeFn}
|
|
5579
5555
|
*/
|
|
5580
5556
|
function compilationGenerator(
|
|
5581
5557
|
eager,
|
|
@@ -5622,14 +5598,14 @@
|
|
|
5622
5598
|
* this needs to be pre-sorted by priority order.
|
|
5623
5599
|
* @param {Node | Element} compileNode DOM node to apply the compile functions to
|
|
5624
5600
|
* @param {Attributes} templateAttrs The shared attribute function
|
|
5625
|
-
* @param {TranscludeFn} transcludeFn
|
|
5601
|
+
* @param {ng.TranscludeFn} transcludeFn
|
|
5626
5602
|
* @param {Object=} originalReplaceDirective An optional directive that will be ignored when
|
|
5627
5603
|
* compiling the transclusion.
|
|
5628
5604
|
* @param {Array.<Function>} [preLinkFns]
|
|
5629
5605
|
* @param {Array.<Function>} [postLinkFns]
|
|
5630
5606
|
* @param {Object} [previousCompileContext] Context used for previous compilation of the current
|
|
5631
5607
|
* node
|
|
5632
|
-
* @returns {NodeLinkFnCtx} node link function
|
|
5608
|
+
* @returns {ng.NodeLinkFnCtx} node link function
|
|
5633
5609
|
*/
|
|
5634
5610
|
function applyDirectivesToNode(
|
|
5635
5611
|
directives,
|
|
@@ -5664,7 +5640,7 @@
|
|
|
5664
5640
|
let directiveName;
|
|
5665
5641
|
let $template;
|
|
5666
5642
|
let replaceDirective = originalReplaceDirective;
|
|
5667
|
-
/** @type {TranscludeFn} */
|
|
5643
|
+
/** @type {ng.TranscludeFn} */
|
|
5668
5644
|
let childTranscludeFn = transcludeFn;
|
|
5669
5645
|
|
|
5670
5646
|
let didScanForMultipleTransclusion = false;
|
|
@@ -5673,7 +5649,7 @@
|
|
|
5673
5649
|
|
|
5674
5650
|
/**
|
|
5675
5651
|
* Links all the directives of a single node.
|
|
5676
|
-
* @type {NodeLinkFn}
|
|
5652
|
+
* @type {ng.NodeLinkFn}
|
|
5677
5653
|
*/
|
|
5678
5654
|
// @ts-ignore
|
|
5679
5655
|
let nodeLinkFn = function (
|
|
@@ -6355,7 +6331,7 @@
|
|
|
6355
6331
|
ii = directives.length;
|
|
6356
6332
|
} else if (directive.compile) {
|
|
6357
6333
|
try {
|
|
6358
|
-
/** @type {PublicLinkFn} */
|
|
6334
|
+
/** @type {ng.PublicLinkFn} */
|
|
6359
6335
|
const linkFn = directive.compile(
|
|
6360
6336
|
compileNodeRef.getAny(),
|
|
6361
6337
|
templateAttrs,
|
|
@@ -7371,7 +7347,7 @@
|
|
|
7371
7347
|
}
|
|
7372
7348
|
|
|
7373
7349
|
/**
|
|
7374
|
-
* @type {SimpleChange}
|
|
7350
|
+
* @type {import("./inteface.ts").SimpleChange}
|
|
7375
7351
|
*/
|
|
7376
7352
|
initialChanges[scopeName] = {
|
|
7377
7353
|
currentValue: destination[scopeName],
|
|
@@ -7524,7 +7500,7 @@
|
|
|
7524
7500
|
parentGet = $parse(attrs[attrName]);
|
|
7525
7501
|
|
|
7526
7502
|
destination.$target[scopeName] = parentGet(scope.$target);
|
|
7527
|
-
/** @type {SimpleChange} */
|
|
7503
|
+
/** @type {import("./inteface.ts").SimpleChange} */
|
|
7528
7504
|
initialChanges[scopeName] = {
|
|
7529
7505
|
currentValue: destination.$target[scopeName],
|
|
7530
7506
|
firstChange: firstChange,
|
|
@@ -11492,7 +11468,7 @@
|
|
|
11492
11468
|
const ngClassEvenDirective = classDirective("Even", 1);
|
|
11493
11469
|
|
|
11494
11470
|
/**
|
|
11495
|
-
* @returns {
|
|
11471
|
+
* @returns {ng.Directive}
|
|
11496
11472
|
*/
|
|
11497
11473
|
function ngCloakDirective() {
|
|
11498
11474
|
return {
|
|
@@ -11783,7 +11759,7 @@
|
|
|
11783
11759
|
ngIncludeFillContentDirective.$inject = [$injectTokens.$compile];
|
|
11784
11760
|
|
|
11785
11761
|
/**
|
|
11786
|
-
* @param {
|
|
11762
|
+
* @param {ng.CompileService} $compile
|
|
11787
11763
|
* @returns {import("../../interface.ts").Directive}
|
|
11788
11764
|
*/
|
|
11789
11765
|
function ngIncludeFillContentDirective($compile) {
|
|
@@ -12414,7 +12390,7 @@
|
|
|
12414
12390
|
ngOptionsDirective.$inject = ["$compile", "$parse"];
|
|
12415
12391
|
/**
|
|
12416
12392
|
*
|
|
12417
|
-
* @param {
|
|
12393
|
+
* @param {ng.CompileService} $compile
|
|
12418
12394
|
* @param {import("../../core/parse/interface.ts").ParseService} $parse
|
|
12419
12395
|
* @returns {import("../../interface.ts").Directive}
|
|
12420
12396
|
*/
|
|
@@ -12941,8 +12917,8 @@
|
|
|
12941
12917
|
|
|
12942
12918
|
ngTranscludeDirective.$inject = ["$compile"];
|
|
12943
12919
|
/**
|
|
12944
|
-
* @param {
|
|
12945
|
-
* @returns {
|
|
12920
|
+
* @param {ng.CompileService} $compile
|
|
12921
|
+
* @returns {ng.Directive}
|
|
12946
12922
|
*/
|
|
12947
12923
|
function ngTranscludeDirective($compile) {
|
|
12948
12924
|
return {
|
|
@@ -12953,9 +12929,9 @@
|
|
|
12953
12929
|
|
|
12954
12930
|
/**
|
|
12955
12931
|
*
|
|
12956
|
-
* @param {
|
|
12932
|
+
* @param {ng.Scope} $scope
|
|
12957
12933
|
* @param {Element} $element
|
|
12958
|
-
* @param {
|
|
12934
|
+
* @param {ng.Attributes} $attrs
|
|
12959
12935
|
* @param {*} _controller
|
|
12960
12936
|
* @param {*} $transclude
|
|
12961
12937
|
*/
|
|
@@ -35024,8 +35000,8 @@
|
|
|
35024
35000
|
|
|
35025
35001
|
ngChannelDirective.$inject = [$injectTokens.$eventBus];
|
|
35026
35002
|
/**
|
|
35027
|
-
* @param {
|
|
35028
|
-
* @returns {
|
|
35003
|
+
* @param {ng.PubSubService} $eventBus
|
|
35004
|
+
* @returns {ng.Directive}
|
|
35029
35005
|
*/
|
|
35030
35006
|
function ngChannelDirective($eventBus) {
|
|
35031
35007
|
return {
|
|
@@ -35259,7 +35235,7 @@
|
|
|
35259
35235
|
* @param {ng.LogService} $log
|
|
35260
35236
|
* @param {ng.ParseService} $parse
|
|
35261
35237
|
* @param {ng.StateService} $state
|
|
35262
|
-
* @param {
|
|
35238
|
+
* @param {ng.SseService} $sse
|
|
35263
35239
|
* @returns {ng.Directive}
|
|
35264
35240
|
*/
|
|
35265
35241
|
return function ($http, $compile, $log, $parse, $state, $sse) {
|
|
@@ -35646,6 +35622,59 @@
|
|
|
35646
35622
|
}
|
|
35647
35623
|
}
|
|
35648
35624
|
|
|
35625
|
+
/**
|
|
35626
|
+
* @returns {ng.Directive}
|
|
35627
|
+
*/
|
|
35628
|
+
function ngViewportDirective() {
|
|
35629
|
+
return {
|
|
35630
|
+
restrict: "A",
|
|
35631
|
+
link(scope, element, attrs) {
|
|
35632
|
+
const enterExpr = attrs["onEnter"];
|
|
35633
|
+
const leaveExpr = attrs["onLeave"];
|
|
35634
|
+
|
|
35635
|
+
const observer = new IntersectionObserver(
|
|
35636
|
+
(entries) => {
|
|
35637
|
+
entries.forEach((entry) => {
|
|
35638
|
+
if (entry.isIntersecting) {
|
|
35639
|
+
if (enterExpr) scope.$eval(enterExpr);
|
|
35640
|
+
} else {
|
|
35641
|
+
if (leaveExpr) scope.$eval(leaveExpr);
|
|
35642
|
+
}
|
|
35643
|
+
});
|
|
35644
|
+
},
|
|
35645
|
+
{
|
|
35646
|
+
root: null, // viewport
|
|
35647
|
+
threshold: 0.1, // consider "in view" if 10% visible
|
|
35648
|
+
},
|
|
35649
|
+
);
|
|
35650
|
+
|
|
35651
|
+
observer.observe(element);
|
|
35652
|
+
|
|
35653
|
+
// Clean up when the element is removed from DOM
|
|
35654
|
+
const parent = element.parentNode;
|
|
35655
|
+
let mutationObserver;
|
|
35656
|
+
if (parent) {
|
|
35657
|
+
mutationObserver = new MutationObserver((mutations) => {
|
|
35658
|
+
for (const mutation of mutations) {
|
|
35659
|
+
Array.from(mutation.removedNodes).forEach((removedNode) => {
|
|
35660
|
+
if (removedNode === element) {
|
|
35661
|
+
observer.disconnect();
|
|
35662
|
+
mutationObserver.disconnect();
|
|
35663
|
+
}
|
|
35664
|
+
});
|
|
35665
|
+
}
|
|
35666
|
+
});
|
|
35667
|
+
mutationObserver.observe(parent, { childList: true });
|
|
35668
|
+
}
|
|
35669
|
+
|
|
35670
|
+
scope.$on("$destroy", () => {
|
|
35671
|
+
observer.disconnect();
|
|
35672
|
+
if (mutationObserver) mutationObserver.disconnect();
|
|
35673
|
+
});
|
|
35674
|
+
},
|
|
35675
|
+
};
|
|
35676
|
+
}
|
|
35677
|
+
|
|
35649
35678
|
/**
|
|
35650
35679
|
* Initializes core `ng` module.
|
|
35651
35680
|
* @param {import('./angular.js').Angular} angular
|
|
@@ -35723,6 +35752,7 @@
|
|
|
35723
35752
|
maxlength: maxlengthDirective,
|
|
35724
35753
|
ngValue: ngValueDirective,
|
|
35725
35754
|
ngModelOptions: ngModelOptionsDirective,
|
|
35755
|
+
ngViewport: ngViewportDirective,
|
|
35726
35756
|
})
|
|
35727
35757
|
.directive({
|
|
35728
35758
|
input: hiddenInputBrowserCacheDirective,
|
|
@@ -35821,7 +35851,7 @@
|
|
|
35821
35851
|
/**
|
|
35822
35852
|
* @type {string} `version` from `package.json`
|
|
35823
35853
|
*/
|
|
35824
|
-
this.version = "0.9.
|
|
35854
|
+
this.version = "0.9.9"; //inserted via rollup plugin
|
|
35825
35855
|
|
|
35826
35856
|
/** @type {!Array<string|any>} */
|
|
35827
35857
|
this.bootsrappedModules = [];
|
|
@@ -35914,10 +35944,10 @@
|
|
|
35914
35944
|
$injectTokens.$compile,
|
|
35915
35945
|
$injectTokens.$injector,
|
|
35916
35946
|
/**
|
|
35917
|
-
* @param {
|
|
35947
|
+
* @param {ng.Scope} scope
|
|
35918
35948
|
* @param {Element} el
|
|
35919
|
-
* @param {
|
|
35920
|
-
* @param {
|
|
35949
|
+
* @param {ng.CompileService} compile
|
|
35950
|
+
* @param {ng.InjectorService} $injector
|
|
35921
35951
|
*/
|
|
35922
35952
|
(scope, el, compile, $injector) => {
|
|
35923
35953
|
// ng-route deps
|