@angular-wave/angular.ts 0.17.0 → 0.18.0
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/animations/animate-css.d.ts +1 -1
- package/@types/animations/animate-js-driver.d.ts +10 -2
- package/@types/animations/animate.d.ts +1 -1
- package/@types/animations/animation.d.ts +1 -2
- package/@types/animations/interface.d.ts +8 -3
- package/@types/animations/queue/animate-queue.d.ts +1 -1
- package/@types/animations/shared.d.ts +1 -1
- package/@types/core/compile/attributes.d.ts +4 -4
- package/@types/core/compile/compile.d.ts +3 -3
- package/@types/core/interpolate/interpolate.d.ts +1 -1
- package/@types/directive/aria/aria.d.ts +1 -1
- package/@types/directive/messages/messages.d.ts +13 -13
- package/@types/interface.d.ts +0 -1
- package/@types/namespace.d.ts +7 -13
- package/@types/router/directives/view-directive.d.ts +2 -2
- package/@types/router/state/state-object.d.ts +2 -2
- package/@types/services/anchor-scroll/anchor-scroll.d.ts +1 -1
- package/@types/services/anchor-scroll/interface.d.ts +5 -8
- package/@types/services/http/http.d.ts +1 -1
- package/@types/services/location/location.d.ts +1 -1
- package/@types/services/sce/interface.d.ts +2 -2
- package/@types/services/sce/sce.d.ts +2 -2
- package/dist/angular-ts.esm.js +250 -288
- package/dist/angular-ts.umd.js +250 -288
- package/dist/angular-ts.umd.min.js +1 -1
- package/dist/angular-ts.umd.min.js.gz +0 -0
- package/dist/angular-ts.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/@types/router/scroll/interface.d.ts +0 -3
- package/@types/router/scroll/view-scroll.d.ts +0 -8
package/dist/angular-ts.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Version: 0.
|
|
1
|
+
/* Version: 0.18.0 - January 11, 2026 16:26:12 */
|
|
2
2
|
const VALID_CLASS = "ng-valid";
|
|
3
3
|
const INVALID_CLASS = "ng-invalid";
|
|
4
4
|
const PRISTINE_CLASS = "ng-pristine";
|
|
@@ -1467,7 +1467,6 @@ const $injectTokens = {
|
|
|
1467
1467
|
_interpolate: "$interpolate",
|
|
1468
1468
|
_location: "$location",
|
|
1469
1469
|
_log: "$log",
|
|
1470
|
-
_viewScroll: "$viewScroll",
|
|
1471
1470
|
_parse: "$parse",
|
|
1472
1471
|
_rest: "$rest",
|
|
1473
1472
|
_rootScope: "$rootScope",
|
|
@@ -2646,18 +2645,6 @@ function validateIsString(arg, name) {
|
|
|
2646
2645
|
return validate(isString, arg, name);
|
|
2647
2646
|
}
|
|
2648
2647
|
|
|
2649
|
-
/**
|
|
2650
|
-
* @template T
|
|
2651
|
-
* @param {unknown} arg - The value to validate.
|
|
2652
|
-
* @param {new (...args: any[]) => T} type - The constructor to check against.
|
|
2653
|
-
* @param {string} name - Parameter name (included in error message).
|
|
2654
|
-
* @returns {T} The validated instance.
|
|
2655
|
-
* @throws {TypeError} If the value is not an instance of the specified type.
|
|
2656
|
-
*/
|
|
2657
|
-
function validateInstanceOf(arg, type, name) {
|
|
2658
|
-
return validate((v) => v instanceof type, arg, name);
|
|
2659
|
-
}
|
|
2660
|
-
|
|
2661
2648
|
const $injectorMinErr$1 = minErr($injectTokens._injector);
|
|
2662
2649
|
|
|
2663
2650
|
const providerSuffix = "Provider";
|
|
@@ -3539,7 +3526,7 @@ function HttpProvider() {
|
|
|
3539
3526
|
/**
|
|
3540
3527
|
*
|
|
3541
3528
|
* @param {ng.InjectorService} $injector
|
|
3542
|
-
* @param {ng.
|
|
3529
|
+
* @param {ng.SceService} $sce
|
|
3543
3530
|
* @param {ng.CookieService} $cookie
|
|
3544
3531
|
* @returns
|
|
3545
3532
|
*/
|
|
@@ -6390,8 +6377,8 @@ function SceProvider() {
|
|
|
6390
6377
|
/**
|
|
6391
6378
|
*
|
|
6392
6379
|
* @param {ng.ParseService} $parse
|
|
6393
|
-
* @param {ng.
|
|
6394
|
-
* @return {ng.
|
|
6380
|
+
* @param {ng.SceDelegateService} $sceDelegate
|
|
6381
|
+
* @return {ng.SceService}
|
|
6395
6382
|
*/
|
|
6396
6383
|
($parse, $sceDelegate) => {
|
|
6397
6384
|
const sce = shallowCopy(SCE_CONTEXTS);
|
|
@@ -6647,7 +6634,7 @@ function SceProvider() {
|
|
|
6647
6634
|
};
|
|
6648
6635
|
});
|
|
6649
6636
|
|
|
6650
|
-
return /** @type {ng.
|
|
6637
|
+
return /** @type {ng.SceService} */ (sce);
|
|
6651
6638
|
},
|
|
6652
6639
|
];
|
|
6653
6640
|
}
|
|
@@ -6799,7 +6786,7 @@ class Attributes {
|
|
|
6799
6786
|
*
|
|
6800
6787
|
* @param {ng.AnimateService} $animate
|
|
6801
6788
|
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
6802
|
-
* @param {ng.
|
|
6789
|
+
* @param {ng.SceService} $sce
|
|
6803
6790
|
* @param {import("../../shared/noderef.js").NodeRef} [nodeRef]
|
|
6804
6791
|
* @param {Object & Record<string, any>} [attributesToCopy]
|
|
6805
6792
|
*/
|
|
@@ -6810,7 +6797,7 @@ class Attributes {
|
|
|
6810
6797
|
/** @type {ng.ExceptionHandlerService} */
|
|
6811
6798
|
this._exceptionHandler = $exceptionHandler;
|
|
6812
6799
|
|
|
6813
|
-
/** @type {ng.
|
|
6800
|
+
/** @type {ng.SceService} */
|
|
6814
6801
|
this._sce = $sce;
|
|
6815
6802
|
/**
|
|
6816
6803
|
* A map of DOM element attribute names to the normalized name. This is needed
|
|
@@ -7053,7 +7040,7 @@ class Attributes {
|
|
|
7053
7040
|
listeners.push(fn);
|
|
7054
7041
|
|
|
7055
7042
|
if (
|
|
7056
|
-
!listeners
|
|
7043
|
+
!listeners._inter &&
|
|
7057
7044
|
hasOwn(this, key) &&
|
|
7058
7045
|
!isUndefined(/** @type {Record<string, any>} */ (this)[key])
|
|
7059
7046
|
) {
|
|
@@ -7246,9 +7233,9 @@ class CompileProvider {
|
|
|
7246
7233
|
|
|
7247
7234
|
/**
|
|
7248
7235
|
* @param {import('../../interface.ts').Provider} $provide
|
|
7249
|
-
* @param {import('../sanitize/sanitize-uri.js').SanitizeUriProvider}
|
|
7236
|
+
* @param {import('../sanitize/sanitize-uri.js').SanitizeUriProvider} $sanitizeUriProvider
|
|
7250
7237
|
*/
|
|
7251
|
-
constructor($provide,
|
|
7238
|
+
constructor($provide, $sanitizeUriProvider) {
|
|
7252
7239
|
const hasDirectives = {};
|
|
7253
7240
|
|
|
7254
7241
|
const bindingCache = Object.create(null);
|
|
@@ -7589,12 +7576,12 @@ class CompileProvider {
|
|
|
7589
7576
|
*/
|
|
7590
7577
|
this.aHrefSanitizationTrustedUrlList = function (regexp) {
|
|
7591
7578
|
if (isDefined(regexp)) {
|
|
7592
|
-
|
|
7579
|
+
$sanitizeUriProvider.aHrefSanitizationTrustedUrlList(regexp);
|
|
7593
7580
|
|
|
7594
7581
|
return undefined;
|
|
7595
7582
|
}
|
|
7596
7583
|
|
|
7597
|
-
return
|
|
7584
|
+
return $sanitizeUriProvider.aHrefSanitizationTrustedUrlList();
|
|
7598
7585
|
};
|
|
7599
7586
|
|
|
7600
7587
|
/**
|
|
@@ -7614,12 +7601,12 @@ class CompileProvider {
|
|
|
7614
7601
|
*/
|
|
7615
7602
|
this.imgSrcSanitizationTrustedUrlList = function (regexp) {
|
|
7616
7603
|
if (isDefined(regexp)) {
|
|
7617
|
-
|
|
7604
|
+
$sanitizeUriProvider.imgSrcSanitizationTrustedUrlList(regexp);
|
|
7618
7605
|
|
|
7619
7606
|
return undefined;
|
|
7620
7607
|
}
|
|
7621
7608
|
|
|
7622
|
-
return
|
|
7609
|
+
return $sanitizeUriProvider.imgSrcSanitizationTrustedUrlList();
|
|
7623
7610
|
};
|
|
7624
7611
|
|
|
7625
7612
|
/**
|
|
@@ -7763,7 +7750,7 @@ class CompileProvider {
|
|
|
7763
7750
|
* @param {ng.TemplateRequestService} $templateRequest
|
|
7764
7751
|
* @param {ng.ParseService} $parse
|
|
7765
7752
|
* @param {*} $controller
|
|
7766
|
-
* @param {ng.
|
|
7753
|
+
* @param {ng.SceService} $sce
|
|
7767
7754
|
* @param {ng.AnimateService} $animate
|
|
7768
7755
|
* @returns
|
|
7769
7756
|
*/
|
|
@@ -9059,7 +9046,7 @@ class CompileProvider {
|
|
|
9059
9046
|
undefined,
|
|
9060
9047
|
{
|
|
9061
9048
|
needsNewScope:
|
|
9062
|
-
directive
|
|
9049
|
+
directive._isolateScope || directive._newScope,
|
|
9063
9050
|
},
|
|
9064
9051
|
);
|
|
9065
9052
|
/** @type {import("./interface.ts").TranscludeFn} */ (
|
|
@@ -9253,7 +9240,7 @@ class CompileProvider {
|
|
|
9253
9240
|
|
|
9254
9241
|
if (
|
|
9255
9242
|
_newIsolateScopeDirective === directive ||
|
|
9256
|
-
directive
|
|
9243
|
+
directive._isolateScope
|
|
9257
9244
|
) {
|
|
9258
9245
|
pre = cloneAndAnnotateFn(pre, { isolateScope: true });
|
|
9259
9246
|
}
|
|
@@ -9266,7 +9253,7 @@ class CompileProvider {
|
|
|
9266
9253
|
|
|
9267
9254
|
if (
|
|
9268
9255
|
_newIsolateScopeDirective === directive ||
|
|
9269
|
-
directive
|
|
9256
|
+
directive._isolateScope
|
|
9270
9257
|
) {
|
|
9271
9258
|
post = cloneAndAnnotateFn(post, { isolateScope: true });
|
|
9272
9259
|
}
|
|
@@ -9395,7 +9382,7 @@ class CompileProvider {
|
|
|
9395
9382
|
const locals = {
|
|
9396
9383
|
$scope:
|
|
9397
9384
|
directive === _newIsolateScopeDirective ||
|
|
9398
|
-
directive
|
|
9385
|
+
directive._isolateScope
|
|
9399
9386
|
? isolateScope
|
|
9400
9387
|
: scope,
|
|
9401
9388
|
$element: $element.node,
|
|
@@ -9443,8 +9430,8 @@ class CompileProvider {
|
|
|
9443
9430
|
function markDirectiveScope(directives, isolateScope, newScope) {
|
|
9444
9431
|
for (let j = 0, jj = directives.length; j < jj; j++) {
|
|
9445
9432
|
directives[j] = inherit$1(directives[j], {
|
|
9446
|
-
|
|
9447
|
-
|
|
9433
|
+
_isolateScope: isolateScope,
|
|
9434
|
+
_newScope: newScope,
|
|
9448
9435
|
});
|
|
9449
9436
|
}
|
|
9450
9437
|
}
|
|
@@ -10135,7 +10122,7 @@ class CompileProvider {
|
|
|
10135
10122
|
// directive's linking fn during linking phase
|
|
10136
10123
|
attr[name] = interpolateFn(scope);
|
|
10137
10124
|
|
|
10138
|
-
(_observers[name] || (_observers[name] = []))
|
|
10125
|
+
(_observers[name] || (_observers[name] = []))._inter = true;
|
|
10139
10126
|
interpolateFn.expressions.forEach((x) => {
|
|
10140
10127
|
const targetScope =
|
|
10141
10128
|
(attr._observers && attr._observers[name]._scope) ||
|
|
@@ -14626,7 +14613,7 @@ function ngIncludeDirective(
|
|
|
14626
14613
|
isDefined(autoScrollExp) &&
|
|
14627
14614
|
(!autoScrollExp || scope.$eval(autoScrollExp))
|
|
14628
14615
|
) {
|
|
14629
|
-
|
|
14616
|
+
$anchorScroll();
|
|
14630
14617
|
}
|
|
14631
14618
|
}
|
|
14632
14619
|
|
|
@@ -16141,7 +16128,7 @@ entries(ALIASED_ATTR).forEach(([ngAttr]) => {
|
|
|
16141
16128
|
ngAttributeAliasDirectives[normalized] = [
|
|
16142
16129
|
$injectTokens._sce,
|
|
16143
16130
|
/**
|
|
16144
|
-
* @param {ng.
|
|
16131
|
+
* @param {ng.SceService} $sce
|
|
16145
16132
|
* @returns {ng.Directive}
|
|
16146
16133
|
*/
|
|
16147
16134
|
function ($sce) {
|
|
@@ -16536,43 +16523,41 @@ class AnchorScrollProvider {
|
|
|
16536
16523
|
*
|
|
16537
16524
|
* @param {ng.LocationService} $location
|
|
16538
16525
|
* @param {ng.Scope} $rootScope
|
|
16539
|
-
* @returns
|
|
16526
|
+
* @returns {ng.AnchorScrollService}
|
|
16540
16527
|
*/
|
|
16541
16528
|
($location, $rootScope) => {
|
|
16542
16529
|
// Helper function to get first anchor from a NodeList
|
|
16543
16530
|
// (using `Array#some()` instead of `angular#forEach()` since it's more performant
|
|
16544
16531
|
// and working in all supported browsers.)
|
|
16532
|
+
/**
|
|
16533
|
+
* @param {NodeListOf<HTMLElement>} list
|
|
16534
|
+
* @returns {HTMLAnchorElement | undefined}
|
|
16535
|
+
*/
|
|
16545
16536
|
function getFirstAnchor(list) {
|
|
16546
|
-
let
|
|
16537
|
+
for (let i = 0; i < list.length; i++) {
|
|
16538
|
+
const el = list[i];
|
|
16547
16539
|
|
|
16548
|
-
|
|
16549
|
-
|
|
16550
|
-
result = element;
|
|
16551
|
-
|
|
16552
|
-
return true;
|
|
16540
|
+
if (getNodeName(el) === "a") {
|
|
16541
|
+
return /** @type {HTMLAnchorElement} */ (el);
|
|
16553
16542
|
}
|
|
16543
|
+
}
|
|
16554
16544
|
|
|
16555
|
-
|
|
16556
|
-
});
|
|
16557
|
-
|
|
16558
|
-
return result;
|
|
16545
|
+
return undefined;
|
|
16559
16546
|
}
|
|
16560
16547
|
|
|
16561
16548
|
function getYOffset() {
|
|
16562
16549
|
// Figure out a better way to configure this other than bolting on a property onto a function
|
|
16563
|
-
let offset =
|
|
16550
|
+
let offset = scroll.yOffset;
|
|
16564
16551
|
|
|
16565
16552
|
if (isFunction(offset)) {
|
|
16566
16553
|
offset = /** @type {Function} */ (offset)();
|
|
16567
16554
|
} else if (offset instanceof Element) {
|
|
16568
|
-
const
|
|
16569
|
-
|
|
16570
|
-
const style = window.getComputedStyle(elem);
|
|
16555
|
+
const style = window.getComputedStyle(offset);
|
|
16571
16556
|
|
|
16572
16557
|
if (style.position !== "fixed") {
|
|
16573
16558
|
offset = 0;
|
|
16574
16559
|
} else {
|
|
16575
|
-
offset =
|
|
16560
|
+
offset = offset.getBoundingClientRect().bottom;
|
|
16576
16561
|
}
|
|
16577
16562
|
} else if (!isNumber(offset)) {
|
|
16578
16563
|
offset = 0;
|
|
@@ -16581,29 +16566,24 @@ class AnchorScrollProvider {
|
|
|
16581
16566
|
return offset;
|
|
16582
16567
|
}
|
|
16583
16568
|
|
|
16569
|
+
/**
|
|
16570
|
+
* @param {HTMLElement} [elem]
|
|
16571
|
+
*/
|
|
16584
16572
|
function scrollTo(elem) {
|
|
16585
16573
|
if (elem) {
|
|
16574
|
+
const rect = elem.getBoundingClientRect();
|
|
16575
|
+
|
|
16586
16576
|
elem.scrollIntoView();
|
|
16587
16577
|
|
|
16588
|
-
const offset = getYOffset();
|
|
16578
|
+
const offset = /** @type {number} */ (getYOffset());
|
|
16589
16579
|
|
|
16590
16580
|
if (offset) {
|
|
16591
|
-
// `offset` is
|
|
16592
|
-
// This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the
|
|
16593
|
-
// top of the viewport.
|
|
16594
|
-
//
|
|
16595
|
-
// IF the number of pixels from the top of `elem` to the end of the page's content is less
|
|
16596
|
-
// than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some
|
|
16597
|
-
// way down the page.
|
|
16581
|
+
// `offset` is how many pixels we want the element to appear below the top of the viewport.
|
|
16598
16582
|
//
|
|
16599
|
-
//
|
|
16600
|
-
//
|
|
16601
|
-
//
|
|
16602
|
-
|
|
16603
|
-
// desired position.
|
|
16604
|
-
const elemTop = elem.getBoundingClientRect().top;
|
|
16605
|
-
|
|
16606
|
-
window.scrollBy(0, elemTop - /** @type {number} */ (offset));
|
|
16583
|
+
// `scrollIntoView()` does not always align the element at the top (e.g. near the bottom
|
|
16584
|
+
// of the page). Therefore, we measure the element’s actual position after scrolling and
|
|
16585
|
+
// only adjust by the difference needed to reach the desired offset.
|
|
16586
|
+
window.scrollBy(0, rect.top - offset);
|
|
16607
16587
|
}
|
|
16608
16588
|
} else {
|
|
16609
16589
|
window.scrollTo(0, 0);
|
|
@@ -16611,7 +16591,7 @@ class AnchorScrollProvider {
|
|
|
16611
16591
|
}
|
|
16612
16592
|
|
|
16613
16593
|
/** @type {ng.AnchorScrollService} */
|
|
16614
|
-
const scroll =
|
|
16594
|
+
const scroll = (hash) => {
|
|
16615
16595
|
// Allow numeric hashes
|
|
16616
16596
|
hash = isString(hash)
|
|
16617
16597
|
? hash
|
|
@@ -16622,7 +16602,7 @@ class AnchorScrollProvider {
|
|
|
16622
16602
|
|
|
16623
16603
|
// empty hash, scroll to the top of the page
|
|
16624
16604
|
if (!hash) {
|
|
16625
|
-
scrollTo(
|
|
16605
|
+
scrollTo();
|
|
16626
16606
|
}
|
|
16627
16607
|
// element with given id
|
|
16628
16608
|
else if ((elm = document.getElementById(hash))) scrollTo(elm);
|
|
@@ -16630,28 +16610,37 @@ class AnchorScrollProvider {
|
|
|
16630
16610
|
else if ((elm = getFirstAnchor(document.getElementsByName(hash))))
|
|
16631
16611
|
scrollTo(elm);
|
|
16632
16612
|
// no element and hash === 'top', scroll to the top of the page
|
|
16633
|
-
else if (hash === "top") scrollTo(
|
|
16613
|
+
else if (hash === "top") scrollTo();
|
|
16634
16614
|
};
|
|
16635
16615
|
|
|
16636
16616
|
// does not scroll when user clicks on anchor link that is currently on
|
|
16637
16617
|
// (no url change, no $location.getHash() change), browser native does scroll
|
|
16638
16618
|
if (this.autoScrollingEnabled) {
|
|
16639
|
-
$rootScope.$
|
|
16640
|
-
|
|
16641
|
-
|
|
16642
|
-
|
|
16643
|
-
|
|
16644
|
-
|
|
16645
|
-
|
|
16646
|
-
|
|
16647
|
-
|
|
16648
|
-
|
|
16649
|
-
|
|
16650
|
-
|
|
16651
|
-
|
|
16652
|
-
|
|
16653
|
-
|
|
16654
|
-
|
|
16619
|
+
$rootScope.$on(
|
|
16620
|
+
"$locationChangeSuccess",
|
|
16621
|
+
/** @param {ng.ScopeEvent} _e @param {string} newVal @param {string} oldVal */ (
|
|
16622
|
+
_e,
|
|
16623
|
+
newVal,
|
|
16624
|
+
oldVal,
|
|
16625
|
+
) => {
|
|
16626
|
+
const newUrl = urlResolve(newVal);
|
|
16627
|
+
|
|
16628
|
+
const ordUrl = urlResolve(oldVal);
|
|
16629
|
+
|
|
16630
|
+
if (newUrl.hash === ordUrl.hash && newUrl.hash === "") return;
|
|
16631
|
+
|
|
16632
|
+
const action = () => scroll(newUrl.hash);
|
|
16633
|
+
|
|
16634
|
+
if (document.readyState === "complete") {
|
|
16635
|
+
// Force the action to be run async for consistent behavior
|
|
16636
|
+
// from the action's point of view
|
|
16637
|
+
// i.e. it will definitely not be in a $apply
|
|
16638
|
+
queueMicrotask(() => action());
|
|
16639
|
+
} else {
|
|
16640
|
+
window.addEventListener("load", () => action());
|
|
16641
|
+
}
|
|
16642
|
+
},
|
|
16643
|
+
);
|
|
16655
16644
|
}
|
|
16656
16645
|
|
|
16657
16646
|
return scroll;
|
|
@@ -16735,7 +16724,7 @@ function applyAnimationClassesFactory() {
|
|
|
16735
16724
|
function prepareAnimationOptions(options) {
|
|
16736
16725
|
const animateOptions = options || /** @type {ng.AnimationOptions} */ ({});
|
|
16737
16726
|
|
|
16738
|
-
if (!animateOptions
|
|
16727
|
+
if (!animateOptions._prepared) {
|
|
16739
16728
|
let domOperation =
|
|
16740
16729
|
animateOptions.domOperation ||
|
|
16741
16730
|
(() => {
|
|
@@ -16749,7 +16738,7 @@ function prepareAnimationOptions(options) {
|
|
|
16749
16738
|
/* empty */
|
|
16750
16739
|
};
|
|
16751
16740
|
};
|
|
16752
|
-
animateOptions
|
|
16741
|
+
animateOptions._prepared = true;
|
|
16753
16742
|
}
|
|
16754
16743
|
|
|
16755
16744
|
return animateOptions;
|
|
@@ -16929,7 +16918,7 @@ function clearGeneratedClasses(element, options) {
|
|
|
16929
16918
|
* @param {boolean} applyBlock
|
|
16930
16919
|
* @returns {string[]}
|
|
16931
16920
|
*/
|
|
16932
|
-
function
|
|
16921
|
+
function _blockKeyframeAnimations(node, applyBlock) {
|
|
16933
16922
|
const value = applyBlock ? "paused" : "";
|
|
16934
16923
|
|
|
16935
16924
|
const key = `animationPlayState`;
|
|
@@ -16981,7 +16970,7 @@ function AnimateProvider($provide) {
|
|
|
16981
16970
|
|
|
16982
16971
|
let customFilter = null;
|
|
16983
16972
|
|
|
16984
|
-
this
|
|
16973
|
+
this._registeredAnimations = Object.create(null);
|
|
16985
16974
|
|
|
16986
16975
|
/**
|
|
16987
16976
|
* Registers a new injectable animation factory function. The factory function produces the
|
|
@@ -17029,7 +17018,7 @@ function AnimateProvider($provide) {
|
|
|
17029
17018
|
|
|
17030
17019
|
const key = `${name}-animation`;
|
|
17031
17020
|
|
|
17032
|
-
provider
|
|
17021
|
+
provider._registeredAnimations[name.substring(1)] = key;
|
|
17033
17022
|
$provide.factory(key, factory);
|
|
17034
17023
|
};
|
|
17035
17024
|
|
|
@@ -17266,7 +17255,7 @@ function AnimateProvider($provide) {
|
|
|
17266
17255
|
* Note that this does not cancel the underlying operation, e.g. the setting of classes or
|
|
17267
17256
|
* adding the element to the DOM.
|
|
17268
17257
|
*
|
|
17269
|
-
* @param {
|
|
17258
|
+
* @param {ng.AnimateRunner} runner An animation runner returned by an $animate function.
|
|
17270
17259
|
*/
|
|
17271
17260
|
cancel(runner) {
|
|
17272
17261
|
if (runner.cancel) {
|
|
@@ -17284,7 +17273,7 @@ function AnimateProvider($provide) {
|
|
|
17284
17273
|
* @param {Element} parent - the parent element which will append the element as a child (so long as the after element is not present)
|
|
17285
17274
|
* @param {ChildNode | null | undefined} [after] - after the sibling element after which the element will be appended
|
|
17286
17275
|
* @param {import("./interface.ts").AnimationOptions} [options] - an optional collection of options/styles that will be applied to the element.
|
|
17287
|
-
* @returns {
|
|
17276
|
+
* @returns {ng.AnimateRunner} the animation runner
|
|
17288
17277
|
*/
|
|
17289
17278
|
enter(element, parent, after, options) {
|
|
17290
17279
|
parent = parent || after.parentElement;
|
|
@@ -17315,7 +17304,7 @@ function AnimateProvider($provide) {
|
|
|
17315
17304
|
* @param {Element} parent - the parent element which will append the element as a child (so long as the after element is not present)
|
|
17316
17305
|
* @param {Element} after - after the sibling element after which the element will be appended
|
|
17317
17306
|
* @param {import("./interface.ts").AnimationOptions} [options] - an optional collection of options/styles that will be applied to the element.
|
|
17318
|
-
* @returns {
|
|
17307
|
+
* @returns {ng.AnimateRunner} the animation runner
|
|
17319
17308
|
*/
|
|
17320
17309
|
move(element, parent, after, options) {
|
|
17321
17310
|
parent = parent || after.parentElement;
|
|
@@ -17343,7 +17332,7 @@ function AnimateProvider($provide) {
|
|
|
17343
17332
|
*
|
|
17344
17333
|
* @param {Element} element the element which will be removed from the DOM
|
|
17345
17334
|
* @param {import("./interface.ts").AnimationOptions} [options] an optional collection of options/styles that will be applied to the element.
|
|
17346
|
-
* @returns {
|
|
17335
|
+
* @returns {ng.AnimateRunner} the animation runner
|
|
17347
17336
|
*/
|
|
17348
17337
|
leave(element, options) {
|
|
17349
17338
|
return $$animateQueue.push(
|
|
@@ -17367,7 +17356,7 @@ function AnimateProvider($provide) {
|
|
|
17367
17356
|
* @param {Element} element the element which the CSS classes will be applied to
|
|
17368
17357
|
* @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)
|
|
17369
17358
|
* @param {import("./interface.ts").AnimationOptions} [options] an optional collection of options/styles that will be applied to the element.
|
|
17370
|
-
* @return {
|
|
17359
|
+
* @return {ng.AnimateRunner}} animationRunner the animation runner
|
|
17371
17360
|
*/
|
|
17372
17361
|
addClass(element, className, options) {
|
|
17373
17362
|
options = prepareAnimateOptions(options);
|
|
@@ -17387,7 +17376,7 @@ function AnimateProvider($provide) {
|
|
|
17387
17376
|
* @param {Element} element the element which the CSS classes will be applied to
|
|
17388
17377
|
* @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)
|
|
17389
17378
|
* @param {import("./interface.ts").AnimationOptions} [options] an optional collection of options/styles that will be applied to the element. *
|
|
17390
|
-
* @return {
|
|
17379
|
+
* @return {ng.AnimateRunner} animationRunner the animation runner
|
|
17391
17380
|
*/
|
|
17392
17381
|
removeClass(element, className, options) {
|
|
17393
17382
|
options = prepareAnimateOptions(options);
|
|
@@ -17409,7 +17398,7 @@ function AnimateProvider($provide) {
|
|
|
17409
17398
|
* @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)
|
|
17410
17399
|
* @param {object=} options an optional collection of options/styles that will be applied to the element.
|
|
17411
17400
|
*
|
|
17412
|
-
* @return {
|
|
17401
|
+
* @return {ng.AnimateRunner} the animation runner
|
|
17413
17402
|
*/
|
|
17414
17403
|
setClass(element, add, remove, options) {
|
|
17415
17404
|
options = prepareAnimateOptions(options);
|
|
@@ -17438,7 +17427,7 @@ function AnimateProvider($provide) {
|
|
|
17438
17427
|
* }
|
|
17439
17428
|
* });
|
|
17440
17429
|
* ```
|
|
17441
|
-
* @return {
|
|
17430
|
+
* @return {ng.AnimateRunner} the animation runner
|
|
17442
17431
|
*/
|
|
17443
17432
|
animate(element, from, to, className, options) {
|
|
17444
17433
|
options = prepareAnimateOptions(options);
|
|
@@ -18345,7 +18334,7 @@ class InterpolateProvider {
|
|
|
18345
18334
|
/**
|
|
18346
18335
|
*
|
|
18347
18336
|
* @param {ng.ParseService} $parse
|
|
18348
|
-
* @param {ng.
|
|
18337
|
+
* @param {ng.SceService} $sce
|
|
18349
18338
|
* @returns {ng.InterpolateService}
|
|
18350
18339
|
*/
|
|
18351
18340
|
($parse, $sce) => {
|
|
@@ -18948,9 +18937,9 @@ class Location {
|
|
|
18948
18937
|
);
|
|
18949
18938
|
}
|
|
18950
18939
|
// The user might modify `stateObject` after invoking `$location.setState(stateObject)`
|
|
18951
|
-
// but we're changing the
|
|
18940
|
+
// but we're changing the _statereference to $browser.state() during the $digest
|
|
18952
18941
|
// so the modification window is narrow.
|
|
18953
|
-
this
|
|
18942
|
+
this._state = isUndefined(state) ? null : state;
|
|
18954
18943
|
urlUpdatedByLocation = true;
|
|
18955
18944
|
|
|
18956
18945
|
return this;
|
|
@@ -18961,7 +18950,7 @@ class Location {
|
|
|
18961
18950
|
* @returns {any}
|
|
18962
18951
|
*/
|
|
18963
18952
|
getState() {
|
|
18964
|
-
return this
|
|
18953
|
+
return this._state;
|
|
18965
18954
|
}
|
|
18966
18955
|
|
|
18967
18956
|
/**
|
|
@@ -19286,14 +19275,14 @@ class LocationProvider {
|
|
|
19286
19275
|
|
|
19287
19276
|
$location.parseLinkUrl(initialUrl, initialUrl);
|
|
19288
19277
|
|
|
19289
|
-
$location
|
|
19278
|
+
$location._state = this.state();
|
|
19290
19279
|
|
|
19291
19280
|
const IGNORE_URI_REGEXP = /^\s*(javascript|mailto):/i;
|
|
19292
19281
|
|
|
19293
19282
|
const setBrowserUrlWithFallback = (url, state) => {
|
|
19294
19283
|
const oldUrl = $location.getUrl();
|
|
19295
19284
|
|
|
19296
|
-
const oldState = $location
|
|
19285
|
+
const oldState = $location._state;
|
|
19297
19286
|
|
|
19298
19287
|
try {
|
|
19299
19288
|
this.setUrl(url, state);
|
|
@@ -19301,11 +19290,11 @@ class LocationProvider {
|
|
|
19301
19290
|
// Make sure $location.getState() returns referentially identical (not just deeply equal)
|
|
19302
19291
|
// state object; this makes possible quick checking if the state changed in the digest
|
|
19303
19292
|
// loop. Checking deep equality would be too expensive.
|
|
19304
|
-
$location
|
|
19293
|
+
$location._state = this.state();
|
|
19305
19294
|
} catch (err) {
|
|
19306
19295
|
// Restore old values if pushState fails
|
|
19307
19296
|
$location.setUrl(/** @type {string} */ (oldUrl));
|
|
19308
|
-
$location
|
|
19297
|
+
$location._state = oldState;
|
|
19309
19298
|
$exceptionHandler(err);
|
|
19310
19299
|
}
|
|
19311
19300
|
};
|
|
@@ -19401,10 +19390,10 @@ class LocationProvider {
|
|
|
19401
19390
|
queueMicrotask(() => {
|
|
19402
19391
|
const oldUrl = $location.absUrl;
|
|
19403
19392
|
|
|
19404
|
-
const oldState = $location
|
|
19393
|
+
const oldState = $location._state;
|
|
19405
19394
|
|
|
19406
19395
|
$location.parse(newUrl);
|
|
19407
|
-
$location
|
|
19396
|
+
$location._state = newState;
|
|
19408
19397
|
|
|
19409
19398
|
const { defaultPrevented } = $rootScope.$broadcast(
|
|
19410
19399
|
"$locationChangeStart",
|
|
@@ -19420,7 +19409,7 @@ class LocationProvider {
|
|
|
19420
19409
|
|
|
19421
19410
|
if (defaultPrevented) {
|
|
19422
19411
|
$location.parse(oldUrl);
|
|
19423
|
-
$location
|
|
19412
|
+
$location._state = oldState;
|
|
19424
19413
|
setBrowserUrlWithFallback(oldUrl, oldState);
|
|
19425
19414
|
} else {
|
|
19426
19415
|
initializing = false;
|
|
@@ -19442,7 +19431,7 @@ class LocationProvider {
|
|
|
19442
19431
|
|
|
19443
19432
|
const urlOrStateChanged =
|
|
19444
19433
|
!urlsEqual(oldUrl, newUrl) ||
|
|
19445
|
-
($location.html5 && oldState !== $location
|
|
19434
|
+
($location.html5 && oldState !== $location._state);
|
|
19446
19435
|
|
|
19447
19436
|
if (initializing || urlOrStateChanged) {
|
|
19448
19437
|
initializing = false;
|
|
@@ -19454,7 +19443,7 @@ class LocationProvider {
|
|
|
19454
19443
|
"$locationChangeStart",
|
|
19455
19444
|
$location.absUrl,
|
|
19456
19445
|
oldUrl,
|
|
19457
|
-
$location
|
|
19446
|
+
$location._state,
|
|
19458
19447
|
oldState,
|
|
19459
19448
|
);
|
|
19460
19449
|
|
|
@@ -19464,12 +19453,12 @@ class LocationProvider {
|
|
|
19464
19453
|
|
|
19465
19454
|
if (defaultPrevented) {
|
|
19466
19455
|
$location.parse(oldUrl);
|
|
19467
|
-
$location
|
|
19456
|
+
$location._state = oldState;
|
|
19468
19457
|
} else {
|
|
19469
19458
|
if (urlOrStateChanged) {
|
|
19470
19459
|
setBrowserUrlWithFallback(
|
|
19471
19460
|
newUrl,
|
|
19472
|
-
oldState === $location
|
|
19461
|
+
oldState === $location._state ? null : $location._state,
|
|
19473
19462
|
);
|
|
19474
19463
|
}
|
|
19475
19464
|
afterLocationChange(oldUrl, oldState);
|
|
@@ -19494,7 +19483,7 @@ class LocationProvider {
|
|
|
19494
19483
|
"$locationChangeSuccess",
|
|
19495
19484
|
$location.absUrl,
|
|
19496
19485
|
oldUrl,
|
|
19497
|
-
$location
|
|
19486
|
+
$location._state,
|
|
19498
19487
|
oldState,
|
|
19499
19488
|
);
|
|
19500
19489
|
}
|
|
@@ -23871,37 +23860,37 @@ class NgMessageCtrl {
|
|
|
23871
23860
|
* @param {ng.AnimateService} $animate
|
|
23872
23861
|
*/
|
|
23873
23862
|
constructor($element, $scope, $attrs, $animate) {
|
|
23874
|
-
this
|
|
23875
|
-
this
|
|
23876
|
-
this
|
|
23877
|
-
this
|
|
23878
|
-
|
|
23879
|
-
this.
|
|
23880
|
-
this.
|
|
23881
|
-
this.
|
|
23882
|
-
this.
|
|
23883
|
-
this.
|
|
23884
|
-
|
|
23885
|
-
this.
|
|
23886
|
-
this.
|
|
23887
|
-
|
|
23888
|
-
this.$
|
|
23889
|
-
this
|
|
23890
|
-
this.
|
|
23863
|
+
this._element = $element;
|
|
23864
|
+
this._scope = $scope;
|
|
23865
|
+
this._attrs = $attrs;
|
|
23866
|
+
this._animate = $animate;
|
|
23867
|
+
|
|
23868
|
+
this._latestKey = 0;
|
|
23869
|
+
this._nextAttachId = 0;
|
|
23870
|
+
this._messages = {};
|
|
23871
|
+
this._renderLater = false;
|
|
23872
|
+
this._cachedCollection = null;
|
|
23873
|
+
|
|
23874
|
+
this._head = undefined;
|
|
23875
|
+
this._default = undefined;
|
|
23876
|
+
|
|
23877
|
+
this._scope.$watch(
|
|
23878
|
+
this._attrs.ngMessages || this._attrs.for,
|
|
23879
|
+
this._render.bind(this),
|
|
23891
23880
|
);
|
|
23892
23881
|
}
|
|
23893
23882
|
|
|
23894
|
-
|
|
23895
|
-
return this.
|
|
23883
|
+
_getAttachId() {
|
|
23884
|
+
return this._nextAttachId++;
|
|
23896
23885
|
}
|
|
23897
23886
|
|
|
23898
|
-
|
|
23899
|
-
this.
|
|
23900
|
-
this.
|
|
23887
|
+
_render(collection = {}) {
|
|
23888
|
+
this._renderLater = false;
|
|
23889
|
+
this._cachedCollection = collection;
|
|
23901
23890
|
|
|
23902
23891
|
const multiple =
|
|
23903
|
-
isAttrTruthy(this
|
|
23904
|
-
isAttrTruthy(this
|
|
23892
|
+
isAttrTruthy(this._scope, this._attrs.ngMessagesMultiple) ||
|
|
23893
|
+
isAttrTruthy(this._scope, this._attrs.multiple);
|
|
23905
23894
|
|
|
23906
23895
|
const unmatchedMessages = [];
|
|
23907
23896
|
|
|
@@ -23909,7 +23898,7 @@ class NgMessageCtrl {
|
|
|
23909
23898
|
|
|
23910
23899
|
let truthyKeys = 0;
|
|
23911
23900
|
|
|
23912
|
-
let messageItem = this.
|
|
23901
|
+
let messageItem = this._head;
|
|
23913
23902
|
|
|
23914
23903
|
let messageFound = false;
|
|
23915
23904
|
|
|
@@ -23952,27 +23941,27 @@ class NgMessageCtrl {
|
|
|
23952
23941
|
|
|
23953
23942
|
const messageMatched = unmatchedMessages.length !== totalMessages;
|
|
23954
23943
|
|
|
23955
|
-
const attachDefault = this.
|
|
23944
|
+
const attachDefault = this._default && !messageMatched && truthyKeys > 0;
|
|
23956
23945
|
|
|
23957
23946
|
if (attachDefault) {
|
|
23958
|
-
this.
|
|
23959
|
-
} else if (this.
|
|
23960
|
-
this.
|
|
23947
|
+
this._default.attach();
|
|
23948
|
+
} else if (this._default) {
|
|
23949
|
+
this._default.detach();
|
|
23961
23950
|
}
|
|
23962
23951
|
|
|
23963
23952
|
if (messageMatched || attachDefault) {
|
|
23964
|
-
this
|
|
23953
|
+
this._animate.setClass(this._element, ACTIVE_CLASS, INACTIVE_CLASS);
|
|
23965
23954
|
} else {
|
|
23966
|
-
this
|
|
23955
|
+
this._animate.setClass(this._element, INACTIVE_CLASS, ACTIVE_CLASS);
|
|
23967
23956
|
}
|
|
23968
23957
|
}
|
|
23969
23958
|
|
|
23970
23959
|
reRender() {
|
|
23971
|
-
if (!this.
|
|
23972
|
-
this.
|
|
23960
|
+
if (!this._renderLater) {
|
|
23961
|
+
this._renderLater = true;
|
|
23973
23962
|
Promise.resolve().then(() => {
|
|
23974
|
-
if (this.
|
|
23975
|
-
this.
|
|
23963
|
+
if (this._renderLater && this._cachedCollection) {
|
|
23964
|
+
this._render(this._cachedCollection);
|
|
23976
23965
|
}
|
|
23977
23966
|
});
|
|
23978
23967
|
}
|
|
@@ -23980,16 +23969,16 @@ class NgMessageCtrl {
|
|
|
23980
23969
|
|
|
23981
23970
|
register(comment, messageCtrl, isDefault) {
|
|
23982
23971
|
if (isDefault) {
|
|
23983
|
-
this.
|
|
23972
|
+
this._default = messageCtrl;
|
|
23984
23973
|
} else {
|
|
23985
|
-
const nextKey = this.
|
|
23974
|
+
const nextKey = this._latestKey.toString();
|
|
23986
23975
|
|
|
23987
|
-
this.
|
|
23976
|
+
this._messages[nextKey] = {
|
|
23988
23977
|
message: messageCtrl,
|
|
23989
23978
|
};
|
|
23990
|
-
this.insertMessageNode(this
|
|
23979
|
+
this.insertMessageNode(this._element, comment, nextKey);
|
|
23991
23980
|
comment._ngMessageNode = nextKey;
|
|
23992
|
-
this.
|
|
23981
|
+
this._latestKey++;
|
|
23993
23982
|
}
|
|
23994
23983
|
|
|
23995
23984
|
this.reRender();
|
|
@@ -23997,13 +23986,13 @@ class NgMessageCtrl {
|
|
|
23997
23986
|
|
|
23998
23987
|
deregister(comment, isDefault) {
|
|
23999
23988
|
if (isDefault) {
|
|
24000
|
-
delete this.
|
|
23989
|
+
delete this._default;
|
|
24001
23990
|
} else {
|
|
24002
23991
|
const key = comment._ngMessageNode;
|
|
24003
23992
|
|
|
24004
23993
|
delete comment._ngMessageNode;
|
|
24005
|
-
this.removeMessageNode(this
|
|
24006
|
-
delete this.
|
|
23994
|
+
this.removeMessageNode(this._element, comment, key);
|
|
23995
|
+
delete this._messages[key];
|
|
24007
23996
|
}
|
|
24008
23997
|
this.reRender();
|
|
24009
23998
|
}
|
|
@@ -24017,7 +24006,7 @@ class NgMessageCtrl {
|
|
|
24017
24006
|
const prevKey = prevNode._ngMessageNode;
|
|
24018
24007
|
|
|
24019
24008
|
if (prevKey && prevKey.length) {
|
|
24020
|
-
return this.
|
|
24009
|
+
return this._messages[prevKey];
|
|
24021
24010
|
}
|
|
24022
24011
|
|
|
24023
24012
|
if (prevNode.childNodes.length && parentLookup.indexOf(prevNode) === -1) {
|
|
@@ -24035,10 +24024,10 @@ class NgMessageCtrl {
|
|
|
24035
24024
|
}
|
|
24036
24025
|
|
|
24037
24026
|
insertMessageNode(parent, comment, key) {
|
|
24038
|
-
const messageNode = this.
|
|
24027
|
+
const messageNode = this._messages[key];
|
|
24039
24028
|
|
|
24040
|
-
if (!this.
|
|
24041
|
-
this.
|
|
24029
|
+
if (!this._head) {
|
|
24030
|
+
this._head = messageNode;
|
|
24042
24031
|
} else {
|
|
24043
24032
|
const match = this.findPreviousMessage(parent, comment);
|
|
24044
24033
|
|
|
@@ -24046,14 +24035,14 @@ class NgMessageCtrl {
|
|
|
24046
24035
|
messageNode.next = match.next;
|
|
24047
24036
|
match.next = messageNode;
|
|
24048
24037
|
} else {
|
|
24049
|
-
messageNode.next = this.
|
|
24050
|
-
this.
|
|
24038
|
+
messageNode.next = this._head;
|
|
24039
|
+
this._head = messageNode;
|
|
24051
24040
|
}
|
|
24052
24041
|
}
|
|
24053
24042
|
}
|
|
24054
24043
|
|
|
24055
24044
|
removeMessageNode(parent, comment, key) {
|
|
24056
|
-
const messageNode = this.
|
|
24045
|
+
const messageNode = this._messages[key];
|
|
24057
24046
|
|
|
24058
24047
|
if (!messageNode) return;
|
|
24059
24048
|
|
|
@@ -24062,7 +24051,7 @@ class NgMessageCtrl {
|
|
|
24062
24051
|
if (match) {
|
|
24063
24052
|
match.next = messageNode.next;
|
|
24064
24053
|
} else {
|
|
24065
|
-
this.
|
|
24054
|
+
this._head = messageNode.next;
|
|
24066
24055
|
}
|
|
24067
24056
|
}
|
|
24068
24057
|
}
|
|
@@ -24193,8 +24182,8 @@ function ngMessageDirectiveFactory(isDefault) {
|
|
|
24193
24182
|
|
|
24194
24183
|
// Each time we attach this node to a message we get a new id that we can match
|
|
24195
24184
|
// when we are destroying the node later.
|
|
24196
|
-
const
|
|
24197
|
-
ngMessagesCtrl.
|
|
24185
|
+
const attachId = (currentElement._attachId =
|
|
24186
|
+
ngMessagesCtrl._getAttachId());
|
|
24198
24187
|
|
|
24199
24188
|
// in the event that the element or a parent element is destroyed
|
|
24200
24189
|
// by another structural directive then it's time
|
|
@@ -24204,7 +24193,7 @@ function ngMessageDirectiveFactory(isDefault) {
|
|
|
24204
24193
|
// So this handler only handles cases where something else removed the message element.
|
|
24205
24194
|
if (
|
|
24206
24195
|
currentElement &&
|
|
24207
|
-
currentElement
|
|
24196
|
+
currentElement._attachId === attachId
|
|
24208
24197
|
) {
|
|
24209
24198
|
ngMessagesCtrl.deregister(commentNode, isDefault);
|
|
24210
24199
|
messageCtrl.detach();
|
|
@@ -24328,14 +24317,14 @@ function AriaProvider() {
|
|
|
24328
24317
|
config(key) {
|
|
24329
24318
|
return config[key];
|
|
24330
24319
|
},
|
|
24331
|
-
|
|
24320
|
+
_watchExpr: watchExpr,
|
|
24332
24321
|
};
|
|
24333
24322
|
};
|
|
24334
24323
|
}
|
|
24335
24324
|
|
|
24336
24325
|
ngDisabledAriaDirective.$inject = [$injectTokens._aria];
|
|
24337
24326
|
function ngDisabledAriaDirective($aria) {
|
|
24338
|
-
return $aria
|
|
24327
|
+
return $aria._watchExpr(
|
|
24339
24328
|
"ngDisabled",
|
|
24340
24329
|
"aria-disabled",
|
|
24341
24330
|
nativeAriaNodeNames,
|
|
@@ -24345,7 +24334,7 @@ function ngDisabledAriaDirective($aria) {
|
|
|
24345
24334
|
|
|
24346
24335
|
ngShowAriaDirective.$inject = [$injectTokens._aria];
|
|
24347
24336
|
function ngShowAriaDirective($aria) {
|
|
24348
|
-
return $aria
|
|
24337
|
+
return $aria._watchExpr("ngShow", "aria-hidden", [], true);
|
|
24349
24338
|
}
|
|
24350
24339
|
|
|
24351
24340
|
/**
|
|
@@ -24431,7 +24420,7 @@ function ngClickAriaDirective($aria, $parse) {
|
|
|
24431
24420
|
|
|
24432
24421
|
ngRequiredAriaDirective.$inject = [$injectTokens._aria];
|
|
24433
24422
|
function ngRequiredAriaDirective($aria) {
|
|
24434
|
-
return $aria
|
|
24423
|
+
return $aria._watchExpr(
|
|
24435
24424
|
"ngRequired",
|
|
24436
24425
|
"aria-required",
|
|
24437
24426
|
nativeAriaNodeNames,
|
|
@@ -24441,7 +24430,7 @@ function ngRequiredAriaDirective($aria) {
|
|
|
24441
24430
|
|
|
24442
24431
|
ngCheckedAriaDirective.$inject = [$injectTokens._aria];
|
|
24443
24432
|
function ngCheckedAriaDirective($aria) {
|
|
24444
|
-
return $aria
|
|
24433
|
+
return $aria._watchExpr(
|
|
24445
24434
|
"ngChecked",
|
|
24446
24435
|
"aria-checked",
|
|
24447
24436
|
nativeAriaNodeNames,
|
|
@@ -24451,7 +24440,7 @@ function ngCheckedAriaDirective($aria) {
|
|
|
24451
24440
|
|
|
24452
24441
|
ngValueAriaDirective.$inject = [$injectTokens._aria];
|
|
24453
24442
|
function ngValueAriaDirective($aria) {
|
|
24454
|
-
return $aria
|
|
24443
|
+
return $aria._watchExpr(
|
|
24455
24444
|
"ngValue",
|
|
24456
24445
|
"aria-checked",
|
|
24457
24446
|
nativeAriaNodeNames,
|
|
@@ -24461,12 +24450,12 @@ function ngValueAriaDirective($aria) {
|
|
|
24461
24450
|
|
|
24462
24451
|
ngHideAriaDirective.$inject = [$injectTokens._aria];
|
|
24463
24452
|
function ngHideAriaDirective($aria) {
|
|
24464
|
-
return $aria
|
|
24453
|
+
return $aria._watchExpr("ngHide", "aria-hidden", [], false);
|
|
24465
24454
|
}
|
|
24466
24455
|
|
|
24467
24456
|
ngReadonlyAriaDirective.$inject = [$injectTokens._aria];
|
|
24468
24457
|
function ngReadonlyAriaDirective($aria) {
|
|
24469
|
-
return $aria
|
|
24458
|
+
return $aria._watchExpr(
|
|
24470
24459
|
"ngReadonly",
|
|
24471
24460
|
"aria-readonly",
|
|
24472
24461
|
nativeAriaNodeNames,
|
|
@@ -25420,10 +25409,10 @@ function AnimateCssProvider() {
|
|
|
25420
25409
|
let options =
|
|
25421
25410
|
initialOptions ||
|
|
25422
25411
|
/** @type {ng.AnimationOptions}}*/ ({
|
|
25423
|
-
|
|
25412
|
+
_skipPreparationClasses: false,
|
|
25424
25413
|
});
|
|
25425
25414
|
|
|
25426
|
-
if (!options
|
|
25415
|
+
if (!options._prepared) {
|
|
25427
25416
|
options = prepareAnimationOptions(structuredClone(options));
|
|
25428
25417
|
}
|
|
25429
25418
|
|
|
@@ -25560,7 +25549,7 @@ function AnimateCssProvider() {
|
|
|
25560
25549
|
);
|
|
25561
25550
|
}
|
|
25562
25551
|
|
|
25563
|
-
if (!options
|
|
25552
|
+
if (!options._skipPreparationClasses) {
|
|
25564
25553
|
element.classList.add(
|
|
25565
25554
|
...preparationClasses.split(" ").filter((x) => x !== ""),
|
|
25566
25555
|
);
|
|
@@ -25610,7 +25599,7 @@ function AnimateCssProvider() {
|
|
|
25610
25599
|
// that if there is no transition defined then nothing will happen and this will also allow
|
|
25611
25600
|
// other transitions to be stacked on top of each other without any chopping them out.
|
|
25612
25601
|
if (isFirst) {
|
|
25613
|
-
|
|
25602
|
+
_blockTransitions(node, SAFE_FAST_FORWARD_DURATION_VALUE);
|
|
25614
25603
|
}
|
|
25615
25604
|
|
|
25616
25605
|
let timings = computeTimings(node, cacheKey, !isStructural);
|
|
@@ -25623,29 +25612,30 @@ function AnimateCssProvider() {
|
|
|
25623
25612
|
|
|
25624
25613
|
const flags = {};
|
|
25625
25614
|
|
|
25626
|
-
flags.
|
|
25627
|
-
flags.
|
|
25628
|
-
flags.
|
|
25629
|
-
flags.
|
|
25630
|
-
flags.
|
|
25615
|
+
flags._hasTransitions = timings.transitionDuration > 0;
|
|
25616
|
+
flags._hasAnimations = timings.animationDuration > 0;
|
|
25617
|
+
flags._hasTransitionAll =
|
|
25618
|
+
flags._hasTransitions && timings.transitionProperty === "all";
|
|
25619
|
+
flags._applyTransitionDuration =
|
|
25631
25620
|
hasToStyles &&
|
|
25632
|
-
((flags.
|
|
25633
|
-
(flags.
|
|
25634
|
-
flags.
|
|
25635
|
-
|
|
25621
|
+
((flags._hasTransitions && !flags._hasTransitionAll) ||
|
|
25622
|
+
(flags._hasAnimations && !flags._hasTransitions));
|
|
25623
|
+
flags._applyAnimationDuration =
|
|
25624
|
+
options.duration && flags._hasAnimations;
|
|
25625
|
+
flags._applyTransitionDelay =
|
|
25636
25626
|
truthyTimingValue(options.delay) &&
|
|
25637
|
-
(flags.
|
|
25638
|
-
flags.
|
|
25639
|
-
truthyTimingValue(options.delay) && flags.
|
|
25640
|
-
flags.
|
|
25627
|
+
(flags._applyTransitionDuration || flags._hasTransitions);
|
|
25628
|
+
flags._applyAnimationDelay =
|
|
25629
|
+
truthyTimingValue(options.delay) && flags._hasAnimations;
|
|
25630
|
+
flags._recalculateTimingStyles = addRemoveClassName.length > 0;
|
|
25641
25631
|
|
|
25642
|
-
if (flags.
|
|
25632
|
+
if (flags._applyTransitionDuration || flags._applyAnimationDuration) {
|
|
25643
25633
|
maxDuration = options.duration
|
|
25644
25634
|
? parseFloat(/** @type {string} */ (options.duration))
|
|
25645
25635
|
: maxDuration;
|
|
25646
25636
|
|
|
25647
|
-
if (flags.
|
|
25648
|
-
flags.
|
|
25637
|
+
if (flags._applyTransitionDuration) {
|
|
25638
|
+
flags._hasTransitions = true;
|
|
25649
25639
|
timings.transitionDuration = maxDuration;
|
|
25650
25640
|
applyOnlyDuration = node.style.transitionProperty.length > 0;
|
|
25651
25641
|
temporaryStyles.push(
|
|
@@ -25653,14 +25643,14 @@ function AnimateCssProvider() {
|
|
|
25653
25643
|
);
|
|
25654
25644
|
}
|
|
25655
25645
|
|
|
25656
|
-
if (flags.
|
|
25657
|
-
flags.
|
|
25646
|
+
if (flags._applyAnimationDuration) {
|
|
25647
|
+
flags._hasAnimations = true;
|
|
25658
25648
|
timings.animationDuration = maxDuration;
|
|
25659
25649
|
temporaryStyles.push(getCssKeyframeDurationStyle(maxDuration));
|
|
25660
25650
|
}
|
|
25661
25651
|
}
|
|
25662
25652
|
|
|
25663
|
-
if (maxDuration === 0 && !flags.
|
|
25653
|
+
if (maxDuration === 0 && !flags._recalculateTimingStyles) {
|
|
25664
25654
|
return closeAndReturnNoopAnimator();
|
|
25665
25655
|
}
|
|
25666
25656
|
|
|
@@ -25673,11 +25663,11 @@ function AnimateCssProvider() {
|
|
|
25673
25663
|
maxDelay = Math.max(delayStyle, 0);
|
|
25674
25664
|
}
|
|
25675
25665
|
|
|
25676
|
-
if (flags.
|
|
25666
|
+
if (flags._applyTransitionDelay) {
|
|
25677
25667
|
temporaryStyles.push(getCssDelayStyle(delayStyle));
|
|
25678
25668
|
}
|
|
25679
25669
|
|
|
25680
|
-
if (flags.
|
|
25670
|
+
if (flags._applyAnimationDelay) {
|
|
25681
25671
|
temporaryStyles.push(getCssDelayStyle(delayStyle, true));
|
|
25682
25672
|
}
|
|
25683
25673
|
}
|
|
@@ -25689,15 +25679,15 @@ function AnimateCssProvider() {
|
|
|
25689
25679
|
isNullOrUndefined(options.duration) &&
|
|
25690
25680
|
timings.transitionDuration > 0
|
|
25691
25681
|
) {
|
|
25692
|
-
flags.
|
|
25693
|
-
flags.
|
|
25682
|
+
flags._recalculateTimingStyles =
|
|
25683
|
+
flags._recalculateTimingStyles || isFirst;
|
|
25694
25684
|
}
|
|
25695
25685
|
|
|
25696
25686
|
maxDelayTime = maxDelay * ONE_SECOND;
|
|
25697
25687
|
maxDurationTime = maxDuration * ONE_SECOND;
|
|
25698
25688
|
|
|
25699
|
-
flags.
|
|
25700
|
-
flags.
|
|
25689
|
+
flags._blockTransition = timings.transitionDuration > 0;
|
|
25690
|
+
flags._blockKeyframeAnimation =
|
|
25701
25691
|
timings.animationDuration > 0 &&
|
|
25702
25692
|
stagger.animationDelay > 0 &&
|
|
25703
25693
|
stagger.animationDuration === 0;
|
|
@@ -25713,15 +25703,15 @@ function AnimateCssProvider() {
|
|
|
25713
25703
|
applyAnimationFromStyles(element, options);
|
|
25714
25704
|
}
|
|
25715
25705
|
|
|
25716
|
-
if (flags.
|
|
25706
|
+
if (flags._blockTransition || flags._blockKeyframeAnimation) {
|
|
25717
25707
|
applyBlocking(maxDuration);
|
|
25718
25708
|
} else if (!options.skipBlocking) {
|
|
25719
|
-
|
|
25709
|
+
_blockTransitions(node, false);
|
|
25720
25710
|
}
|
|
25721
25711
|
|
|
25722
25712
|
// TODO(matsko): for 1.5 change this code to have an animator object for better debugging
|
|
25723
25713
|
return {
|
|
25724
|
-
|
|
25714
|
+
_willAnimate: true,
|
|
25725
25715
|
end: endFn,
|
|
25726
25716
|
start() {
|
|
25727
25717
|
if (animationClosed) return undefined;
|
|
@@ -25761,7 +25751,7 @@ function AnimateCssProvider() {
|
|
|
25761
25751
|
animationClosed = true;
|
|
25762
25752
|
animationPaused = false;
|
|
25763
25753
|
|
|
25764
|
-
if (preparationClasses && !options
|
|
25754
|
+
if (preparationClasses && !options._skipPreparationClasses) {
|
|
25765
25755
|
element.classList.remove(...preparationClasses.split(" "));
|
|
25766
25756
|
}
|
|
25767
25757
|
activeClasses = pendClasses(preparationClasses, ACTIVE_CLASS_SUFFIX);
|
|
@@ -25770,8 +25760,8 @@ function AnimateCssProvider() {
|
|
|
25770
25760
|
element.classList.remove(...activeClasses.split(" "));
|
|
25771
25761
|
}
|
|
25772
25762
|
|
|
25773
|
-
|
|
25774
|
-
|
|
25763
|
+
_blockKeyframeAnimations(node, false);
|
|
25764
|
+
_blockTransitions(node, false);
|
|
25775
25765
|
|
|
25776
25766
|
temporaryStyles.forEach((entry) => {
|
|
25777
25767
|
// There is only one way to remove inline style properties entirely from elements.
|
|
@@ -25824,12 +25814,12 @@ function AnimateCssProvider() {
|
|
|
25824
25814
|
}
|
|
25825
25815
|
|
|
25826
25816
|
function applyBlocking(duration) {
|
|
25827
|
-
if (flags.
|
|
25828
|
-
|
|
25817
|
+
if (flags._blockTransition) {
|
|
25818
|
+
_blockTransitions(node, duration);
|
|
25829
25819
|
}
|
|
25830
25820
|
|
|
25831
|
-
if (flags.
|
|
25832
|
-
|
|
25821
|
+
if (flags._blockKeyframeAnimation) {
|
|
25822
|
+
_blockKeyframeAnimations(node, !!duration);
|
|
25833
25823
|
}
|
|
25834
25824
|
}
|
|
25835
25825
|
|
|
@@ -25846,7 +25836,7 @@ function AnimateCssProvider() {
|
|
|
25846
25836
|
close();
|
|
25847
25837
|
|
|
25848
25838
|
return {
|
|
25849
|
-
|
|
25839
|
+
_willAnimate: false,
|
|
25850
25840
|
start() {
|
|
25851
25841
|
return runner;
|
|
25852
25842
|
},
|
|
@@ -25910,7 +25900,7 @@ function AnimateCssProvider() {
|
|
|
25910
25900
|
animationPaused = !playAnimation;
|
|
25911
25901
|
|
|
25912
25902
|
if (timings.animationDuration) {
|
|
25913
|
-
const value =
|
|
25903
|
+
const value = _blockKeyframeAnimations(node, animationPaused);
|
|
25914
25904
|
|
|
25915
25905
|
if (animationPaused) {
|
|
25916
25906
|
temporaryStyles.push(value);
|
|
@@ -25974,7 +25964,7 @@ function AnimateCssProvider() {
|
|
|
25974
25964
|
...activeClasses.split(" ").filter((x) => x !== ""),
|
|
25975
25965
|
);
|
|
25976
25966
|
|
|
25977
|
-
if (flags.
|
|
25967
|
+
if (flags._recalculateTimingStyles) {
|
|
25978
25968
|
cacheKey = animateCache._cacheKey(
|
|
25979
25969
|
node,
|
|
25980
25970
|
method,
|
|
@@ -25994,11 +25984,11 @@ function AnimateCssProvider() {
|
|
|
25994
25984
|
return;
|
|
25995
25985
|
}
|
|
25996
25986
|
|
|
25997
|
-
flags.
|
|
25998
|
-
flags.
|
|
25987
|
+
flags._hasTransitions = timings.transitionDuration > 0;
|
|
25988
|
+
flags._hasAnimations = timings.animationDuration > 0;
|
|
25999
25989
|
}
|
|
26000
25990
|
|
|
26001
|
-
if (flags.
|
|
25991
|
+
if (flags._applyAnimationDelay) {
|
|
26002
25992
|
relativeDelay =
|
|
26003
25993
|
typeof options.delay !== "boolean" &&
|
|
26004
25994
|
truthyTimingValue(options.delay)
|
|
@@ -26020,13 +26010,13 @@ function AnimateCssProvider() {
|
|
|
26020
26010
|
|
|
26021
26011
|
const easeVal = options.easing;
|
|
26022
26012
|
|
|
26023
|
-
if (flags.
|
|
26013
|
+
if (flags._hasTransitions) {
|
|
26024
26014
|
easeProp = "transitionTimingFunction";
|
|
26025
26015
|
temporaryStyles.push([easeProp, easeVal]);
|
|
26026
26016
|
node.style[easeProp] = easeVal;
|
|
26027
26017
|
}
|
|
26028
26018
|
|
|
26029
|
-
if (flags.
|
|
26019
|
+
if (flags._hasAnimations) {
|
|
26030
26020
|
easeProp = "animationTimingFunction";
|
|
26031
26021
|
temporaryStyles.push([easeProp, easeVal]);
|
|
26032
26022
|
node.style[easeProp] = easeVal;
|
|
@@ -26112,7 +26102,7 @@ function AnimateCssProvider() {
|
|
|
26112
26102
|
];
|
|
26113
26103
|
}
|
|
26114
26104
|
|
|
26115
|
-
function
|
|
26105
|
+
function _blockTransitions(node, duration) {
|
|
26116
26106
|
// we use a negative delay value since it performs blocking
|
|
26117
26107
|
// yet it doesn't kill any existing transitions running on the
|
|
26118
26108
|
// same element which makes this safe for class-based animations
|
|
@@ -26266,7 +26256,7 @@ function AnimateQueueProvider($animateProvider) {
|
|
|
26266
26256
|
*
|
|
26267
26257
|
* @param {ng.RootScopeService} $rootScope
|
|
26268
26258
|
* @param {ng.InjectorService} $injector
|
|
26269
|
-
* @param {
|
|
26259
|
+
* @param {import("../interface.ts").AnimationService} $$animation
|
|
26270
26260
|
* @returns {import("../queue/interface.ts").AnimateQueueService}
|
|
26271
26261
|
*/
|
|
26272
26262
|
function ($rootScope, $injector, $$animation) {
|
|
@@ -26946,7 +26936,7 @@ function AnimateJsProvider($animateProvider) {
|
|
|
26946
26936
|
* @param {ng.InjectorService} $injector
|
|
26947
26937
|
* @returns {import("./interface.ts").AnimateJsFn}
|
|
26948
26938
|
*/
|
|
26949
|
-
|
|
26939
|
+
($injector) => {
|
|
26950
26940
|
const applyAnimationClasses = applyAnimationClassesFactory();
|
|
26951
26941
|
|
|
26952
26942
|
/**
|
|
@@ -27016,7 +27006,7 @@ function AnimateJsProvider($animateProvider) {
|
|
|
27016
27006
|
let runner;
|
|
27017
27007
|
|
|
27018
27008
|
return {
|
|
27019
|
-
|
|
27009
|
+
_willAnimate: true,
|
|
27020
27010
|
|
|
27021
27011
|
start() {
|
|
27022
27012
|
if (runner) return runner;
|
|
@@ -27064,7 +27054,7 @@ function AnimateJsProvider($animateProvider) {
|
|
|
27064
27054
|
const klass = classList[i];
|
|
27065
27055
|
|
|
27066
27056
|
const animationFactory =
|
|
27067
|
-
$animateProvider
|
|
27057
|
+
$animateProvider._registeredAnimations[klass];
|
|
27068
27058
|
|
|
27069
27059
|
if (animationFactory && !flagMap[klass]) {
|
|
27070
27060
|
matches.push($injector.get(animationFactory));
|
|
@@ -27187,7 +27177,7 @@ function AnimationProvider() {
|
|
|
27187
27177
|
*
|
|
27188
27178
|
* @param {ng.RootScopeService} $rootScope
|
|
27189
27179
|
* @param {ng.InjectorService} $injector
|
|
27190
|
-
* @
|
|
27180
|
+
* @return {import("./interface.ts").AnimationService}
|
|
27191
27181
|
*/
|
|
27192
27182
|
function ($rootScope, $injector) {
|
|
27193
27183
|
/**
|
|
@@ -27877,7 +27867,7 @@ function AnimateCssDriverProvider($$animationProvider) {
|
|
|
27877
27867
|
|
|
27878
27868
|
// read the comment within `prepareRegularAnimation` to understand
|
|
27879
27869
|
// why this check is necessary
|
|
27880
|
-
return animator
|
|
27870
|
+
return animator._willAnimate ? animator : null;
|
|
27881
27871
|
}
|
|
27882
27872
|
|
|
27883
27873
|
function getClassVal(element) {
|
|
@@ -27900,7 +27890,7 @@ function AnimateCssDriverProvider($$animationProvider) {
|
|
|
27900
27890
|
|
|
27901
27891
|
// read the comment within `prepareRegularAnimation` to understand
|
|
27902
27892
|
// why this check is necessary
|
|
27903
|
-
return animator
|
|
27893
|
+
return animator._willAnimate ? animator : null;
|
|
27904
27894
|
}
|
|
27905
27895
|
|
|
27906
27896
|
function end() {
|
|
@@ -27998,11 +27988,11 @@ function AnimateCssDriverProvider($$animationProvider) {
|
|
|
27998
27988
|
const animator = $animateCss(animationDetails.element, options);
|
|
27999
27989
|
|
|
28000
27990
|
// the driver lookup code inside of $$animation attempts to spawn a
|
|
28001
|
-
// driver one by one until a driver returns a
|
|
27991
|
+
// driver one by one until a driver returns a._willAnimate animator object.
|
|
28002
27992
|
// $animateCss will always return an object, however, it will pass in
|
|
28003
27993
|
// a flag as a hint as to whether an animation was detected or not
|
|
28004
27994
|
|
|
28005
|
-
return animator
|
|
27995
|
+
return animator._willAnimate ? animator : null;
|
|
28006
27996
|
}
|
|
28007
27997
|
},
|
|
28008
27998
|
];
|
|
@@ -28022,6 +28012,10 @@ function getUniqueValues(a, b) {
|
|
|
28022
28012
|
}
|
|
28023
28013
|
|
|
28024
28014
|
AnimateJsDriverProvider.$inject = provider([$injectTokens._animation]);
|
|
28015
|
+
|
|
28016
|
+
/**
|
|
28017
|
+
* @param {import("./animation.js").AnimationProvider} $$animationProvider
|
|
28018
|
+
*/
|
|
28025
28019
|
function AnimateJsDriverProvider($$animationProvider) {
|
|
28026
28020
|
$$animationProvider.drivers.push($injectTokens._animateJsDriver);
|
|
28027
28021
|
this.$get = [
|
|
@@ -33207,7 +33201,7 @@ function treeChangesCleanup(trans) {
|
|
|
33207
33201
|
*/
|
|
33208
33202
|
function makeEnterExitRetainHook(hookName) {
|
|
33209
33203
|
return (transition, state) => {
|
|
33210
|
-
const _state = state
|
|
33204
|
+
const _state = state._state();
|
|
33211
33205
|
|
|
33212
33206
|
const hookFn = _state[hookName];
|
|
33213
33207
|
|
|
@@ -33292,7 +33286,7 @@ const registerEagerResolvePath = (transitionService) =>
|
|
|
33292
33286
|
*/
|
|
33293
33287
|
const lazyResolveState = (trans, state) =>
|
|
33294
33288
|
new ResolveContext(trans.treeChanges().to)
|
|
33295
|
-
.subContext(state
|
|
33289
|
+
.subContext(state._state())
|
|
33296
33290
|
.resolvePath("LAZY", trans)
|
|
33297
33291
|
.then(() => {
|
|
33298
33292
|
/* empty */
|
|
@@ -33484,7 +33478,7 @@ function registerLazyLoadHook(
|
|
|
33484
33478
|
}
|
|
33485
33479
|
const promises = transition
|
|
33486
33480
|
.entering()
|
|
33487
|
-
.filter((state) => !!state
|
|
33481
|
+
.filter((state) => !!state._state().lazyLoad)
|
|
33488
33482
|
.map((state) => lazyLoadState(transition, state, stateRegistry));
|
|
33489
33483
|
|
|
33490
33484
|
return Promise.all(promises).then(retryTransition);
|
|
@@ -33500,7 +33494,7 @@ function registerLazyLoadHook(
|
|
|
33500
33494
|
* @returns A promise for the lazy load result
|
|
33501
33495
|
*/
|
|
33502
33496
|
function lazyLoadState(transition, state, stateRegistry) {
|
|
33503
|
-
const lazyLoadFn = state
|
|
33497
|
+
const lazyLoadFn = state._state().lazyLoad;
|
|
33504
33498
|
|
|
33505
33499
|
// Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked
|
|
33506
33500
|
let promise = lazyLoadFn._promise;
|
|
@@ -33508,7 +33502,7 @@ function lazyLoadState(transition, state, stateRegistry) {
|
|
|
33508
33502
|
if (!promise) {
|
|
33509
33503
|
const success = (result) => {
|
|
33510
33504
|
delete state.lazyLoad;
|
|
33511
|
-
delete state
|
|
33505
|
+
delete state._state().lazyLoad;
|
|
33512
33506
|
delete lazyLoadFn._promise;
|
|
33513
33507
|
|
|
33514
33508
|
return result;
|
|
@@ -34770,37 +34764,6 @@ class StateProvider {
|
|
|
34770
34764
|
}
|
|
34771
34765
|
}
|
|
34772
34766
|
|
|
34773
|
-
class ViewScrollProvider {
|
|
34774
|
-
constructor() {
|
|
34775
|
-
this.enabled = false;
|
|
34776
|
-
}
|
|
34777
|
-
|
|
34778
|
-
useAnchorScroll() {
|
|
34779
|
-
this.enabled = true;
|
|
34780
|
-
}
|
|
34781
|
-
|
|
34782
|
-
$get = [
|
|
34783
|
-
$injectTokens._anchorScroll,
|
|
34784
|
-
/**
|
|
34785
|
-
* @param {ng.AnchorScrollObject} $anchorScroll
|
|
34786
|
-
* @returns {ng.ViewScrollService}
|
|
34787
|
-
*/
|
|
34788
|
-
($anchorScroll) => {
|
|
34789
|
-
if (this.enabled) {
|
|
34790
|
-
return $anchorScroll;
|
|
34791
|
-
}
|
|
34792
|
-
|
|
34793
|
-
return (/** @type {Element} */ $element) => {
|
|
34794
|
-
validateInstanceOf($element, Element, "$element");
|
|
34795
|
-
|
|
34796
|
-
setTimeout(() => {
|
|
34797
|
-
$element.scrollIntoView(false);
|
|
34798
|
-
}, 0);
|
|
34799
|
-
};
|
|
34800
|
-
},
|
|
34801
|
-
];
|
|
34802
|
-
}
|
|
34803
|
-
|
|
34804
34767
|
/**
|
|
34805
34768
|
* @typedef BindingTuple
|
|
34806
34769
|
* @property {string} name
|
|
@@ -35740,7 +35703,7 @@ function encodeDashes(str) {
|
|
|
35740
35703
|
*
|
|
35741
35704
|
* Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].
|
|
35742
35705
|
*
|
|
35743
|
-
* A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration
|
|
35706
|
+
* A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration._state]]) which returns the corresponding [[StateObject]] object.
|
|
35744
35707
|
*
|
|
35745
35708
|
* This class prototypally inherits from the corresponding [[StateDeclaration]].
|
|
35746
35709
|
* Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].
|
|
@@ -35760,7 +35723,7 @@ class StateObject {
|
|
|
35760
35723
|
*/
|
|
35761
35724
|
constructor(config) {
|
|
35762
35725
|
Object.assign(this, config);
|
|
35763
|
-
this
|
|
35726
|
+
this._state = () => {
|
|
35764
35727
|
return this;
|
|
35765
35728
|
};
|
|
35766
35729
|
/**
|
|
@@ -35852,7 +35815,7 @@ class StateObject {
|
|
|
35852
35815
|
}
|
|
35853
35816
|
}
|
|
35854
35817
|
/** Predicate which returns true if the object is a [[StateDeclaration]] object */
|
|
35855
|
-
StateObject.isStateDeclaration = (obj) => isFunction(obj
|
|
35818
|
+
StateObject.isStateDeclaration = (obj) => isFunction(obj._state);
|
|
35856
35819
|
/** Predicate which returns true if the object is an internal [[StateObject]] object */
|
|
35857
35820
|
StateObject.isState = (obj) => isObject(obj._stateObjectCache);
|
|
35858
35821
|
|
|
@@ -35993,7 +35956,7 @@ class UrlRuleFactory {
|
|
|
35993
35956
|
*/
|
|
35994
35957
|
fromState(stateOrDecl, stateService, globals) {
|
|
35995
35958
|
const state = StateObject.isStateDeclaration(stateOrDecl)
|
|
35996
|
-
? stateOrDecl
|
|
35959
|
+
? stateOrDecl._state()
|
|
35997
35960
|
: stateOrDecl;
|
|
35998
35961
|
|
|
35999
35962
|
/**
|
|
@@ -36946,7 +36909,7 @@ function parseUrl(url) {
|
|
|
36946
36909
|
}
|
|
36947
36910
|
|
|
36948
36911
|
function selfBuilder(state) {
|
|
36949
|
-
state.self
|
|
36912
|
+
state.self._state = () => state;
|
|
36950
36913
|
|
|
36951
36914
|
return state.self;
|
|
36952
36915
|
}
|
|
@@ -37559,7 +37522,7 @@ class StateRegistryProvider {
|
|
|
37559
37522
|
function decoratedNg1Hook(trans, state) {
|
|
37560
37523
|
const resolveContext = new ResolveContext(trans.treeChanges(pathname));
|
|
37561
37524
|
|
|
37562
|
-
const subContext = resolveContext.subContext(state
|
|
37525
|
+
const subContext = resolveContext.subContext(state._state());
|
|
37563
37526
|
|
|
37564
37527
|
const locals = Object.assign(getLocals(subContext), {
|
|
37565
37528
|
$state$: state,
|
|
@@ -37659,7 +37622,7 @@ class StateRegistryProvider {
|
|
|
37659
37622
|
}
|
|
37660
37623
|
|
|
37661
37624
|
_deregisterTree(state) {
|
|
37662
|
-
const all = this.getAll().map((x) => x
|
|
37625
|
+
const all = this.getAll().map((x) => x._state());
|
|
37663
37626
|
|
|
37664
37627
|
const getChildren = (states) => {
|
|
37665
37628
|
const _children = all.filter((x) => states.indexOf(x.parent) !== -1);
|
|
@@ -37708,7 +37671,7 @@ class StateRegistryProvider {
|
|
|
37708
37671
|
const deregisteredStates = this._deregisterTree(
|
|
37709
37672
|
/** @type {import("./interface.ts").BuiltStateDeclaration} */ (
|
|
37710
37673
|
state
|
|
37711
|
-
)
|
|
37674
|
+
)._state(),
|
|
37712
37675
|
);
|
|
37713
37676
|
|
|
37714
37677
|
this.listeners.forEach((listener) =>
|
|
@@ -38254,7 +38217,7 @@ function $StateRefActiveDirective(
|
|
|
38254
38217
|
* The ng-view can be targeted in a View using the name ([[StateDeclaration.views]]).
|
|
38255
38218
|
*
|
|
38256
38219
|
* - `autoscroll`: an expression. When it evaluates to true, the `ng-view` will be scrolled into view when it is activated.
|
|
38257
|
-
* Uses [[$
|
|
38220
|
+
* Uses [[$anchorScroll]] to do the scrolling.
|
|
38258
38221
|
*
|
|
38259
38222
|
* - `onload`: Expression to evaluate whenever the view updates.
|
|
38260
38223
|
*
|
|
@@ -38372,18 +38335,18 @@ function $StateRefActiveDirective(
|
|
|
38372
38335
|
$ViewDirective.$inject = [
|
|
38373
38336
|
$injectTokens._view,
|
|
38374
38337
|
$injectTokens._animate,
|
|
38375
|
-
$injectTokens.
|
|
38338
|
+
$injectTokens._anchorScroll,
|
|
38376
38339
|
$injectTokens._interpolate,
|
|
38377
38340
|
];
|
|
38378
38341
|
|
|
38379
38342
|
/**
|
|
38380
38343
|
* @param {ng.ViewService} $view
|
|
38381
38344
|
* @param {ng.AnimateService} $animate
|
|
38382
|
-
* @param {ng.AnchorScrollService} $
|
|
38345
|
+
* @param {ng.AnchorScrollService} $anchorScroll
|
|
38383
38346
|
* @param {ng.InterpolateService} $interpolate
|
|
38384
38347
|
* @returns {ng.Directive}
|
|
38385
38348
|
*/
|
|
38386
|
-
function $ViewDirective($view, $animate, $
|
|
38349
|
+
function $ViewDirective($view, $animate, $anchorScroll, $interpolate) {
|
|
38387
38350
|
function getRenderer() {
|
|
38388
38351
|
return {
|
|
38389
38352
|
enter(element, target, cb) {
|
|
@@ -38537,7 +38500,7 @@ function $ViewDirective($view, $animate, $viewScroll, $interpolate) {
|
|
|
38537
38500
|
(isDefined(autoScrollExp) && !autoScrollExp) ||
|
|
38538
38501
|
(autoScrollExp && scope.$eval(autoScrollExp))
|
|
38539
38502
|
) {
|
|
38540
|
-
/** @type {ng.
|
|
38503
|
+
/** @type {ng.AnchorScrollService} */ ($anchorScroll)(clone);
|
|
38541
38504
|
}
|
|
38542
38505
|
});
|
|
38543
38506
|
cleanupLastView();
|
|
@@ -40466,7 +40429,6 @@ function registerNgModule(angular) {
|
|
|
40466
40429
|
$view: ViewService,
|
|
40467
40430
|
$transitions: TransitionProvider,
|
|
40468
40431
|
$state: StateProvider,
|
|
40469
|
-
$viewScroll: ViewScrollProvider,
|
|
40470
40432
|
$templateFactory: TemplateFactoryProvider,
|
|
40471
40433
|
$url: UrlService,
|
|
40472
40434
|
$stateRegistry: StateRegistryProvider,
|
|
@@ -40518,7 +40480,7 @@ class Angular extends EventTarget {
|
|
|
40518
40480
|
* @public
|
|
40519
40481
|
* @type {string} `version` from `package.json`
|
|
40520
40482
|
*/
|
|
40521
|
-
this.version = "0.
|
|
40483
|
+
this.version = "0.18.0"; //inserted via rollup plugin
|
|
40522
40484
|
|
|
40523
40485
|
/**
|
|
40524
40486
|
* Gets the controller instance for a given element, if exists. Defaults to "ngControllerController"
|
|
@@ -40756,7 +40718,7 @@ class Angular extends EventTarget {
|
|
|
40756
40718
|
stateRegistry
|
|
40757
40719
|
.getAll()
|
|
40758
40720
|
.map((x) => {
|
|
40759
|
-
return x
|
|
40721
|
+
return x._state().resolvables;
|
|
40760
40722
|
})
|
|
40761
40723
|
.reduce(unnestR, [])
|
|
40762
40724
|
.filter(
|