@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.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Version: 0.
|
|
1
|
+
/* Version: 0.18.0 - January 11, 2026 16:30:11 */
|
|
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) :
|
|
@@ -1473,7 +1473,6 @@
|
|
|
1473
1473
|
_interpolate: "$interpolate",
|
|
1474
1474
|
_location: "$location",
|
|
1475
1475
|
_log: "$log",
|
|
1476
|
-
_viewScroll: "$viewScroll",
|
|
1477
1476
|
_parse: "$parse",
|
|
1478
1477
|
_rest: "$rest",
|
|
1479
1478
|
_rootScope: "$rootScope",
|
|
@@ -2652,18 +2651,6 @@
|
|
|
2652
2651
|
return validate(isString, arg, name);
|
|
2653
2652
|
}
|
|
2654
2653
|
|
|
2655
|
-
/**
|
|
2656
|
-
* @template T
|
|
2657
|
-
* @param {unknown} arg - The value to validate.
|
|
2658
|
-
* @param {new (...args: any[]) => T} type - The constructor to check against.
|
|
2659
|
-
* @param {string} name - Parameter name (included in error message).
|
|
2660
|
-
* @returns {T} The validated instance.
|
|
2661
|
-
* @throws {TypeError} If the value is not an instance of the specified type.
|
|
2662
|
-
*/
|
|
2663
|
-
function validateInstanceOf(arg, type, name) {
|
|
2664
|
-
return validate((v) => v instanceof type, arg, name);
|
|
2665
|
-
}
|
|
2666
|
-
|
|
2667
2654
|
const $injectorMinErr$1 = minErr($injectTokens._injector);
|
|
2668
2655
|
|
|
2669
2656
|
const providerSuffix = "Provider";
|
|
@@ -3545,7 +3532,7 @@
|
|
|
3545
3532
|
/**
|
|
3546
3533
|
*
|
|
3547
3534
|
* @param {ng.InjectorService} $injector
|
|
3548
|
-
* @param {ng.
|
|
3535
|
+
* @param {ng.SceService} $sce
|
|
3549
3536
|
* @param {ng.CookieService} $cookie
|
|
3550
3537
|
* @returns
|
|
3551
3538
|
*/
|
|
@@ -6396,8 +6383,8 @@
|
|
|
6396
6383
|
/**
|
|
6397
6384
|
*
|
|
6398
6385
|
* @param {ng.ParseService} $parse
|
|
6399
|
-
* @param {ng.
|
|
6400
|
-
* @return {ng.
|
|
6386
|
+
* @param {ng.SceDelegateService} $sceDelegate
|
|
6387
|
+
* @return {ng.SceService}
|
|
6401
6388
|
*/
|
|
6402
6389
|
($parse, $sceDelegate) => {
|
|
6403
6390
|
const sce = shallowCopy(SCE_CONTEXTS);
|
|
@@ -6653,7 +6640,7 @@
|
|
|
6653
6640
|
};
|
|
6654
6641
|
});
|
|
6655
6642
|
|
|
6656
|
-
return /** @type {ng.
|
|
6643
|
+
return /** @type {ng.SceService} */ (sce);
|
|
6657
6644
|
},
|
|
6658
6645
|
];
|
|
6659
6646
|
}
|
|
@@ -6805,7 +6792,7 @@
|
|
|
6805
6792
|
*
|
|
6806
6793
|
* @param {ng.AnimateService} $animate
|
|
6807
6794
|
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
6808
|
-
* @param {ng.
|
|
6795
|
+
* @param {ng.SceService} $sce
|
|
6809
6796
|
* @param {import("../../shared/noderef.js").NodeRef} [nodeRef]
|
|
6810
6797
|
* @param {Object & Record<string, any>} [attributesToCopy]
|
|
6811
6798
|
*/
|
|
@@ -6816,7 +6803,7 @@
|
|
|
6816
6803
|
/** @type {ng.ExceptionHandlerService} */
|
|
6817
6804
|
this._exceptionHandler = $exceptionHandler;
|
|
6818
6805
|
|
|
6819
|
-
/** @type {ng.
|
|
6806
|
+
/** @type {ng.SceService} */
|
|
6820
6807
|
this._sce = $sce;
|
|
6821
6808
|
/**
|
|
6822
6809
|
* A map of DOM element attribute names to the normalized name. This is needed
|
|
@@ -7059,7 +7046,7 @@
|
|
|
7059
7046
|
listeners.push(fn);
|
|
7060
7047
|
|
|
7061
7048
|
if (
|
|
7062
|
-
!listeners
|
|
7049
|
+
!listeners._inter &&
|
|
7063
7050
|
hasOwn(this, key) &&
|
|
7064
7051
|
!isUndefined(/** @type {Record<string, any>} */ (this)[key])
|
|
7065
7052
|
) {
|
|
@@ -7252,9 +7239,9 @@
|
|
|
7252
7239
|
|
|
7253
7240
|
/**
|
|
7254
7241
|
* @param {import('../../interface.ts').Provider} $provide
|
|
7255
|
-
* @param {import('../sanitize/sanitize-uri.js').SanitizeUriProvider}
|
|
7242
|
+
* @param {import('../sanitize/sanitize-uri.js').SanitizeUriProvider} $sanitizeUriProvider
|
|
7256
7243
|
*/
|
|
7257
|
-
constructor($provide,
|
|
7244
|
+
constructor($provide, $sanitizeUriProvider) {
|
|
7258
7245
|
const hasDirectives = {};
|
|
7259
7246
|
|
|
7260
7247
|
const bindingCache = Object.create(null);
|
|
@@ -7595,12 +7582,12 @@
|
|
|
7595
7582
|
*/
|
|
7596
7583
|
this.aHrefSanitizationTrustedUrlList = function (regexp) {
|
|
7597
7584
|
if (isDefined(regexp)) {
|
|
7598
|
-
|
|
7585
|
+
$sanitizeUriProvider.aHrefSanitizationTrustedUrlList(regexp);
|
|
7599
7586
|
|
|
7600
7587
|
return undefined;
|
|
7601
7588
|
}
|
|
7602
7589
|
|
|
7603
|
-
return
|
|
7590
|
+
return $sanitizeUriProvider.aHrefSanitizationTrustedUrlList();
|
|
7604
7591
|
};
|
|
7605
7592
|
|
|
7606
7593
|
/**
|
|
@@ -7620,12 +7607,12 @@
|
|
|
7620
7607
|
*/
|
|
7621
7608
|
this.imgSrcSanitizationTrustedUrlList = function (regexp) {
|
|
7622
7609
|
if (isDefined(regexp)) {
|
|
7623
|
-
|
|
7610
|
+
$sanitizeUriProvider.imgSrcSanitizationTrustedUrlList(regexp);
|
|
7624
7611
|
|
|
7625
7612
|
return undefined;
|
|
7626
7613
|
}
|
|
7627
7614
|
|
|
7628
|
-
return
|
|
7615
|
+
return $sanitizeUriProvider.imgSrcSanitizationTrustedUrlList();
|
|
7629
7616
|
};
|
|
7630
7617
|
|
|
7631
7618
|
/**
|
|
@@ -7769,7 +7756,7 @@
|
|
|
7769
7756
|
* @param {ng.TemplateRequestService} $templateRequest
|
|
7770
7757
|
* @param {ng.ParseService} $parse
|
|
7771
7758
|
* @param {*} $controller
|
|
7772
|
-
* @param {ng.
|
|
7759
|
+
* @param {ng.SceService} $sce
|
|
7773
7760
|
* @param {ng.AnimateService} $animate
|
|
7774
7761
|
* @returns
|
|
7775
7762
|
*/
|
|
@@ -9065,7 +9052,7 @@
|
|
|
9065
9052
|
undefined,
|
|
9066
9053
|
{
|
|
9067
9054
|
needsNewScope:
|
|
9068
|
-
directive
|
|
9055
|
+
directive._isolateScope || directive._newScope,
|
|
9069
9056
|
},
|
|
9070
9057
|
);
|
|
9071
9058
|
/** @type {import("./interface.ts").TranscludeFn} */ (
|
|
@@ -9259,7 +9246,7 @@
|
|
|
9259
9246
|
|
|
9260
9247
|
if (
|
|
9261
9248
|
_newIsolateScopeDirective === directive ||
|
|
9262
|
-
directive
|
|
9249
|
+
directive._isolateScope
|
|
9263
9250
|
) {
|
|
9264
9251
|
pre = cloneAndAnnotateFn(pre, { isolateScope: true });
|
|
9265
9252
|
}
|
|
@@ -9272,7 +9259,7 @@
|
|
|
9272
9259
|
|
|
9273
9260
|
if (
|
|
9274
9261
|
_newIsolateScopeDirective === directive ||
|
|
9275
|
-
directive
|
|
9262
|
+
directive._isolateScope
|
|
9276
9263
|
) {
|
|
9277
9264
|
post = cloneAndAnnotateFn(post, { isolateScope: true });
|
|
9278
9265
|
}
|
|
@@ -9401,7 +9388,7 @@
|
|
|
9401
9388
|
const locals = {
|
|
9402
9389
|
$scope:
|
|
9403
9390
|
directive === _newIsolateScopeDirective ||
|
|
9404
|
-
directive
|
|
9391
|
+
directive._isolateScope
|
|
9405
9392
|
? isolateScope
|
|
9406
9393
|
: scope,
|
|
9407
9394
|
$element: $element.node,
|
|
@@ -9449,8 +9436,8 @@
|
|
|
9449
9436
|
function markDirectiveScope(directives, isolateScope, newScope) {
|
|
9450
9437
|
for (let j = 0, jj = directives.length; j < jj; j++) {
|
|
9451
9438
|
directives[j] = inherit$1(directives[j], {
|
|
9452
|
-
|
|
9453
|
-
|
|
9439
|
+
_isolateScope: isolateScope,
|
|
9440
|
+
_newScope: newScope,
|
|
9454
9441
|
});
|
|
9455
9442
|
}
|
|
9456
9443
|
}
|
|
@@ -10141,7 +10128,7 @@
|
|
|
10141
10128
|
// directive's linking fn during linking phase
|
|
10142
10129
|
attr[name] = interpolateFn(scope);
|
|
10143
10130
|
|
|
10144
|
-
(_observers[name] || (_observers[name] = []))
|
|
10131
|
+
(_observers[name] || (_observers[name] = []))._inter = true;
|
|
10145
10132
|
interpolateFn.expressions.forEach((x) => {
|
|
10146
10133
|
const targetScope =
|
|
10147
10134
|
(attr._observers && attr._observers[name]._scope) ||
|
|
@@ -14632,7 +14619,7 @@
|
|
|
14632
14619
|
isDefined(autoScrollExp) &&
|
|
14633
14620
|
(!autoScrollExp || scope.$eval(autoScrollExp))
|
|
14634
14621
|
) {
|
|
14635
|
-
|
|
14622
|
+
$anchorScroll();
|
|
14636
14623
|
}
|
|
14637
14624
|
}
|
|
14638
14625
|
|
|
@@ -16147,7 +16134,7 @@
|
|
|
16147
16134
|
ngAttributeAliasDirectives[normalized] = [
|
|
16148
16135
|
$injectTokens._sce,
|
|
16149
16136
|
/**
|
|
16150
|
-
* @param {ng.
|
|
16137
|
+
* @param {ng.SceService} $sce
|
|
16151
16138
|
* @returns {ng.Directive}
|
|
16152
16139
|
*/
|
|
16153
16140
|
function ($sce) {
|
|
@@ -16542,43 +16529,41 @@
|
|
|
16542
16529
|
*
|
|
16543
16530
|
* @param {ng.LocationService} $location
|
|
16544
16531
|
* @param {ng.Scope} $rootScope
|
|
16545
|
-
* @returns
|
|
16532
|
+
* @returns {ng.AnchorScrollService}
|
|
16546
16533
|
*/
|
|
16547
16534
|
($location, $rootScope) => {
|
|
16548
16535
|
// Helper function to get first anchor from a NodeList
|
|
16549
16536
|
// (using `Array#some()` instead of `angular#forEach()` since it's more performant
|
|
16550
16537
|
// and working in all supported browsers.)
|
|
16538
|
+
/**
|
|
16539
|
+
* @param {NodeListOf<HTMLElement>} list
|
|
16540
|
+
* @returns {HTMLAnchorElement | undefined}
|
|
16541
|
+
*/
|
|
16551
16542
|
function getFirstAnchor(list) {
|
|
16552
|
-
let
|
|
16543
|
+
for (let i = 0; i < list.length; i++) {
|
|
16544
|
+
const el = list[i];
|
|
16553
16545
|
|
|
16554
|
-
|
|
16555
|
-
|
|
16556
|
-
result = element;
|
|
16557
|
-
|
|
16558
|
-
return true;
|
|
16546
|
+
if (getNodeName(el) === "a") {
|
|
16547
|
+
return /** @type {HTMLAnchorElement} */ (el);
|
|
16559
16548
|
}
|
|
16549
|
+
}
|
|
16560
16550
|
|
|
16561
|
-
|
|
16562
|
-
});
|
|
16563
|
-
|
|
16564
|
-
return result;
|
|
16551
|
+
return undefined;
|
|
16565
16552
|
}
|
|
16566
16553
|
|
|
16567
16554
|
function getYOffset() {
|
|
16568
16555
|
// Figure out a better way to configure this other than bolting on a property onto a function
|
|
16569
|
-
let offset =
|
|
16556
|
+
let offset = scroll.yOffset;
|
|
16570
16557
|
|
|
16571
16558
|
if (isFunction(offset)) {
|
|
16572
16559
|
offset = /** @type {Function} */ (offset)();
|
|
16573
16560
|
} else if (offset instanceof Element) {
|
|
16574
|
-
const
|
|
16575
|
-
|
|
16576
|
-
const style = window.getComputedStyle(elem);
|
|
16561
|
+
const style = window.getComputedStyle(offset);
|
|
16577
16562
|
|
|
16578
16563
|
if (style.position !== "fixed") {
|
|
16579
16564
|
offset = 0;
|
|
16580
16565
|
} else {
|
|
16581
|
-
offset =
|
|
16566
|
+
offset = offset.getBoundingClientRect().bottom;
|
|
16582
16567
|
}
|
|
16583
16568
|
} else if (!isNumber(offset)) {
|
|
16584
16569
|
offset = 0;
|
|
@@ -16587,29 +16572,24 @@
|
|
|
16587
16572
|
return offset;
|
|
16588
16573
|
}
|
|
16589
16574
|
|
|
16575
|
+
/**
|
|
16576
|
+
* @param {HTMLElement} [elem]
|
|
16577
|
+
*/
|
|
16590
16578
|
function scrollTo(elem) {
|
|
16591
16579
|
if (elem) {
|
|
16580
|
+
const rect = elem.getBoundingClientRect();
|
|
16581
|
+
|
|
16592
16582
|
elem.scrollIntoView();
|
|
16593
16583
|
|
|
16594
|
-
const offset = getYOffset();
|
|
16584
|
+
const offset = /** @type {number} */ (getYOffset());
|
|
16595
16585
|
|
|
16596
16586
|
if (offset) {
|
|
16597
|
-
// `offset` is
|
|
16598
|
-
// This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the
|
|
16599
|
-
// top of the viewport.
|
|
16600
|
-
//
|
|
16601
|
-
// IF the number of pixels from the top of `elem` to the end of the page's content is less
|
|
16602
|
-
// than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some
|
|
16603
|
-
// way down the page.
|
|
16587
|
+
// `offset` is how many pixels we want the element to appear below the top of the viewport.
|
|
16604
16588
|
//
|
|
16605
|
-
//
|
|
16606
|
-
//
|
|
16607
|
-
//
|
|
16608
|
-
|
|
16609
|
-
// desired position.
|
|
16610
|
-
const elemTop = elem.getBoundingClientRect().top;
|
|
16611
|
-
|
|
16612
|
-
window.scrollBy(0, elemTop - /** @type {number} */ (offset));
|
|
16589
|
+
// `scrollIntoView()` does not always align the element at the top (e.g. near the bottom
|
|
16590
|
+
// of the page). Therefore, we measure the element’s actual position after scrolling and
|
|
16591
|
+
// only adjust by the difference needed to reach the desired offset.
|
|
16592
|
+
window.scrollBy(0, rect.top - offset);
|
|
16613
16593
|
}
|
|
16614
16594
|
} else {
|
|
16615
16595
|
window.scrollTo(0, 0);
|
|
@@ -16617,7 +16597,7 @@
|
|
|
16617
16597
|
}
|
|
16618
16598
|
|
|
16619
16599
|
/** @type {ng.AnchorScrollService} */
|
|
16620
|
-
const scroll =
|
|
16600
|
+
const scroll = (hash) => {
|
|
16621
16601
|
// Allow numeric hashes
|
|
16622
16602
|
hash = isString(hash)
|
|
16623
16603
|
? hash
|
|
@@ -16628,7 +16608,7 @@
|
|
|
16628
16608
|
|
|
16629
16609
|
// empty hash, scroll to the top of the page
|
|
16630
16610
|
if (!hash) {
|
|
16631
|
-
scrollTo(
|
|
16611
|
+
scrollTo();
|
|
16632
16612
|
}
|
|
16633
16613
|
// element with given id
|
|
16634
16614
|
else if ((elm = document.getElementById(hash))) scrollTo(elm);
|
|
@@ -16636,28 +16616,37 @@
|
|
|
16636
16616
|
else if ((elm = getFirstAnchor(document.getElementsByName(hash))))
|
|
16637
16617
|
scrollTo(elm);
|
|
16638
16618
|
// no element and hash === 'top', scroll to the top of the page
|
|
16639
|
-
else if (hash === "top") scrollTo(
|
|
16619
|
+
else if (hash === "top") scrollTo();
|
|
16640
16620
|
};
|
|
16641
16621
|
|
|
16642
16622
|
// does not scroll when user clicks on anchor link that is currently on
|
|
16643
16623
|
// (no url change, no $location.getHash() change), browser native does scroll
|
|
16644
16624
|
if (this.autoScrollingEnabled) {
|
|
16645
|
-
$rootScope.$
|
|
16646
|
-
|
|
16647
|
-
|
|
16648
|
-
|
|
16649
|
-
|
|
16650
|
-
|
|
16651
|
-
|
|
16652
|
-
|
|
16653
|
-
|
|
16654
|
-
|
|
16655
|
-
|
|
16656
|
-
|
|
16657
|
-
|
|
16658
|
-
|
|
16659
|
-
|
|
16660
|
-
|
|
16625
|
+
$rootScope.$on(
|
|
16626
|
+
"$locationChangeSuccess",
|
|
16627
|
+
/** @param {ng.ScopeEvent} _e @param {string} newVal @param {string} oldVal */ (
|
|
16628
|
+
_e,
|
|
16629
|
+
newVal,
|
|
16630
|
+
oldVal,
|
|
16631
|
+
) => {
|
|
16632
|
+
const newUrl = urlResolve(newVal);
|
|
16633
|
+
|
|
16634
|
+
const ordUrl = urlResolve(oldVal);
|
|
16635
|
+
|
|
16636
|
+
if (newUrl.hash === ordUrl.hash && newUrl.hash === "") return;
|
|
16637
|
+
|
|
16638
|
+
const action = () => scroll(newUrl.hash);
|
|
16639
|
+
|
|
16640
|
+
if (document.readyState === "complete") {
|
|
16641
|
+
// Force the action to be run async for consistent behavior
|
|
16642
|
+
// from the action's point of view
|
|
16643
|
+
// i.e. it will definitely not be in a $apply
|
|
16644
|
+
queueMicrotask(() => action());
|
|
16645
|
+
} else {
|
|
16646
|
+
window.addEventListener("load", () => action());
|
|
16647
|
+
}
|
|
16648
|
+
},
|
|
16649
|
+
);
|
|
16661
16650
|
}
|
|
16662
16651
|
|
|
16663
16652
|
return scroll;
|
|
@@ -16741,7 +16730,7 @@
|
|
|
16741
16730
|
function prepareAnimationOptions(options) {
|
|
16742
16731
|
const animateOptions = options || /** @type {ng.AnimationOptions} */ ({});
|
|
16743
16732
|
|
|
16744
|
-
if (!animateOptions
|
|
16733
|
+
if (!animateOptions._prepared) {
|
|
16745
16734
|
let domOperation =
|
|
16746
16735
|
animateOptions.domOperation ||
|
|
16747
16736
|
(() => {
|
|
@@ -16755,7 +16744,7 @@
|
|
|
16755
16744
|
/* empty */
|
|
16756
16745
|
};
|
|
16757
16746
|
};
|
|
16758
|
-
animateOptions
|
|
16747
|
+
animateOptions._prepared = true;
|
|
16759
16748
|
}
|
|
16760
16749
|
|
|
16761
16750
|
return animateOptions;
|
|
@@ -16935,7 +16924,7 @@
|
|
|
16935
16924
|
* @param {boolean} applyBlock
|
|
16936
16925
|
* @returns {string[]}
|
|
16937
16926
|
*/
|
|
16938
|
-
function
|
|
16927
|
+
function _blockKeyframeAnimations(node, applyBlock) {
|
|
16939
16928
|
const value = applyBlock ? "paused" : "";
|
|
16940
16929
|
|
|
16941
16930
|
const key = `animationPlayState`;
|
|
@@ -16987,7 +16976,7 @@
|
|
|
16987
16976
|
|
|
16988
16977
|
let customFilter = null;
|
|
16989
16978
|
|
|
16990
|
-
this
|
|
16979
|
+
this._registeredAnimations = Object.create(null);
|
|
16991
16980
|
|
|
16992
16981
|
/**
|
|
16993
16982
|
* Registers a new injectable animation factory function. The factory function produces the
|
|
@@ -17035,7 +17024,7 @@
|
|
|
17035
17024
|
|
|
17036
17025
|
const key = `${name}-animation`;
|
|
17037
17026
|
|
|
17038
|
-
provider
|
|
17027
|
+
provider._registeredAnimations[name.substring(1)] = key;
|
|
17039
17028
|
$provide.factory(key, factory);
|
|
17040
17029
|
};
|
|
17041
17030
|
|
|
@@ -17272,7 +17261,7 @@
|
|
|
17272
17261
|
* Note that this does not cancel the underlying operation, e.g. the setting of classes or
|
|
17273
17262
|
* adding the element to the DOM.
|
|
17274
17263
|
*
|
|
17275
|
-
* @param {
|
|
17264
|
+
* @param {ng.AnimateRunner} runner An animation runner returned by an $animate function.
|
|
17276
17265
|
*/
|
|
17277
17266
|
cancel(runner) {
|
|
17278
17267
|
if (runner.cancel) {
|
|
@@ -17290,7 +17279,7 @@
|
|
|
17290
17279
|
* @param {Element} parent - the parent element which will append the element as a child (so long as the after element is not present)
|
|
17291
17280
|
* @param {ChildNode | null | undefined} [after] - after the sibling element after which the element will be appended
|
|
17292
17281
|
* @param {import("./interface.ts").AnimationOptions} [options] - an optional collection of options/styles that will be applied to the element.
|
|
17293
|
-
* @returns {
|
|
17282
|
+
* @returns {ng.AnimateRunner} the animation runner
|
|
17294
17283
|
*/
|
|
17295
17284
|
enter(element, parent, after, options) {
|
|
17296
17285
|
parent = parent || after.parentElement;
|
|
@@ -17321,7 +17310,7 @@
|
|
|
17321
17310
|
* @param {Element} parent - the parent element which will append the element as a child (so long as the after element is not present)
|
|
17322
17311
|
* @param {Element} after - after the sibling element after which the element will be appended
|
|
17323
17312
|
* @param {import("./interface.ts").AnimationOptions} [options] - an optional collection of options/styles that will be applied to the element.
|
|
17324
|
-
* @returns {
|
|
17313
|
+
* @returns {ng.AnimateRunner} the animation runner
|
|
17325
17314
|
*/
|
|
17326
17315
|
move(element, parent, after, options) {
|
|
17327
17316
|
parent = parent || after.parentElement;
|
|
@@ -17349,7 +17338,7 @@
|
|
|
17349
17338
|
*
|
|
17350
17339
|
* @param {Element} element the element which will be removed from the DOM
|
|
17351
17340
|
* @param {import("./interface.ts").AnimationOptions} [options] an optional collection of options/styles that will be applied to the element.
|
|
17352
|
-
* @returns {
|
|
17341
|
+
* @returns {ng.AnimateRunner} the animation runner
|
|
17353
17342
|
*/
|
|
17354
17343
|
leave(element, options) {
|
|
17355
17344
|
return $$animateQueue.push(
|
|
@@ -17373,7 +17362,7 @@
|
|
|
17373
17362
|
* @param {Element} element the element which the CSS classes will be applied to
|
|
17374
17363
|
* @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)
|
|
17375
17364
|
* @param {import("./interface.ts").AnimationOptions} [options] an optional collection of options/styles that will be applied to the element.
|
|
17376
|
-
* @return {
|
|
17365
|
+
* @return {ng.AnimateRunner}} animationRunner the animation runner
|
|
17377
17366
|
*/
|
|
17378
17367
|
addClass(element, className, options) {
|
|
17379
17368
|
options = prepareAnimateOptions(options);
|
|
@@ -17393,7 +17382,7 @@
|
|
|
17393
17382
|
* @param {Element} element the element which the CSS classes will be applied to
|
|
17394
17383
|
* @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)
|
|
17395
17384
|
* @param {import("./interface.ts").AnimationOptions} [options] an optional collection of options/styles that will be applied to the element. *
|
|
17396
|
-
* @return {
|
|
17385
|
+
* @return {ng.AnimateRunner} animationRunner the animation runner
|
|
17397
17386
|
*/
|
|
17398
17387
|
removeClass(element, className, options) {
|
|
17399
17388
|
options = prepareAnimateOptions(options);
|
|
@@ -17415,7 +17404,7 @@
|
|
|
17415
17404
|
* @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)
|
|
17416
17405
|
* @param {object=} options an optional collection of options/styles that will be applied to the element.
|
|
17417
17406
|
*
|
|
17418
|
-
* @return {
|
|
17407
|
+
* @return {ng.AnimateRunner} the animation runner
|
|
17419
17408
|
*/
|
|
17420
17409
|
setClass(element, add, remove, options) {
|
|
17421
17410
|
options = prepareAnimateOptions(options);
|
|
@@ -17444,7 +17433,7 @@
|
|
|
17444
17433
|
* }
|
|
17445
17434
|
* });
|
|
17446
17435
|
* ```
|
|
17447
|
-
* @return {
|
|
17436
|
+
* @return {ng.AnimateRunner} the animation runner
|
|
17448
17437
|
*/
|
|
17449
17438
|
animate(element, from, to, className, options) {
|
|
17450
17439
|
options = prepareAnimateOptions(options);
|
|
@@ -18351,7 +18340,7 @@
|
|
|
18351
18340
|
/**
|
|
18352
18341
|
*
|
|
18353
18342
|
* @param {ng.ParseService} $parse
|
|
18354
|
-
* @param {ng.
|
|
18343
|
+
* @param {ng.SceService} $sce
|
|
18355
18344
|
* @returns {ng.InterpolateService}
|
|
18356
18345
|
*/
|
|
18357
18346
|
($parse, $sce) => {
|
|
@@ -18954,9 +18943,9 @@
|
|
|
18954
18943
|
);
|
|
18955
18944
|
}
|
|
18956
18945
|
// The user might modify `stateObject` after invoking `$location.setState(stateObject)`
|
|
18957
|
-
// but we're changing the
|
|
18946
|
+
// but we're changing the _statereference to $browser.state() during the $digest
|
|
18958
18947
|
// so the modification window is narrow.
|
|
18959
|
-
this
|
|
18948
|
+
this._state = isUndefined(state) ? null : state;
|
|
18960
18949
|
urlUpdatedByLocation = true;
|
|
18961
18950
|
|
|
18962
18951
|
return this;
|
|
@@ -18967,7 +18956,7 @@
|
|
|
18967
18956
|
* @returns {any}
|
|
18968
18957
|
*/
|
|
18969
18958
|
getState() {
|
|
18970
|
-
return this
|
|
18959
|
+
return this._state;
|
|
18971
18960
|
}
|
|
18972
18961
|
|
|
18973
18962
|
/**
|
|
@@ -19292,14 +19281,14 @@
|
|
|
19292
19281
|
|
|
19293
19282
|
$location.parseLinkUrl(initialUrl, initialUrl);
|
|
19294
19283
|
|
|
19295
|
-
$location
|
|
19284
|
+
$location._state = this.state();
|
|
19296
19285
|
|
|
19297
19286
|
const IGNORE_URI_REGEXP = /^\s*(javascript|mailto):/i;
|
|
19298
19287
|
|
|
19299
19288
|
const setBrowserUrlWithFallback = (url, state) => {
|
|
19300
19289
|
const oldUrl = $location.getUrl();
|
|
19301
19290
|
|
|
19302
|
-
const oldState = $location
|
|
19291
|
+
const oldState = $location._state;
|
|
19303
19292
|
|
|
19304
19293
|
try {
|
|
19305
19294
|
this.setUrl(url, state);
|
|
@@ -19307,11 +19296,11 @@
|
|
|
19307
19296
|
// Make sure $location.getState() returns referentially identical (not just deeply equal)
|
|
19308
19297
|
// state object; this makes possible quick checking if the state changed in the digest
|
|
19309
19298
|
// loop. Checking deep equality would be too expensive.
|
|
19310
|
-
$location
|
|
19299
|
+
$location._state = this.state();
|
|
19311
19300
|
} catch (err) {
|
|
19312
19301
|
// Restore old values if pushState fails
|
|
19313
19302
|
$location.setUrl(/** @type {string} */ (oldUrl));
|
|
19314
|
-
$location
|
|
19303
|
+
$location._state = oldState;
|
|
19315
19304
|
$exceptionHandler(err);
|
|
19316
19305
|
}
|
|
19317
19306
|
};
|
|
@@ -19407,10 +19396,10 @@
|
|
|
19407
19396
|
queueMicrotask(() => {
|
|
19408
19397
|
const oldUrl = $location.absUrl;
|
|
19409
19398
|
|
|
19410
|
-
const oldState = $location
|
|
19399
|
+
const oldState = $location._state;
|
|
19411
19400
|
|
|
19412
19401
|
$location.parse(newUrl);
|
|
19413
|
-
$location
|
|
19402
|
+
$location._state = newState;
|
|
19414
19403
|
|
|
19415
19404
|
const { defaultPrevented } = $rootScope.$broadcast(
|
|
19416
19405
|
"$locationChangeStart",
|
|
@@ -19426,7 +19415,7 @@
|
|
|
19426
19415
|
|
|
19427
19416
|
if (defaultPrevented) {
|
|
19428
19417
|
$location.parse(oldUrl);
|
|
19429
|
-
$location
|
|
19418
|
+
$location._state = oldState;
|
|
19430
19419
|
setBrowserUrlWithFallback(oldUrl, oldState);
|
|
19431
19420
|
} else {
|
|
19432
19421
|
initializing = false;
|
|
@@ -19448,7 +19437,7 @@
|
|
|
19448
19437
|
|
|
19449
19438
|
const urlOrStateChanged =
|
|
19450
19439
|
!urlsEqual(oldUrl, newUrl) ||
|
|
19451
|
-
($location.html5 && oldState !== $location
|
|
19440
|
+
($location.html5 && oldState !== $location._state);
|
|
19452
19441
|
|
|
19453
19442
|
if (initializing || urlOrStateChanged) {
|
|
19454
19443
|
initializing = false;
|
|
@@ -19460,7 +19449,7 @@
|
|
|
19460
19449
|
"$locationChangeStart",
|
|
19461
19450
|
$location.absUrl,
|
|
19462
19451
|
oldUrl,
|
|
19463
|
-
$location
|
|
19452
|
+
$location._state,
|
|
19464
19453
|
oldState,
|
|
19465
19454
|
);
|
|
19466
19455
|
|
|
@@ -19470,12 +19459,12 @@
|
|
|
19470
19459
|
|
|
19471
19460
|
if (defaultPrevented) {
|
|
19472
19461
|
$location.parse(oldUrl);
|
|
19473
|
-
$location
|
|
19462
|
+
$location._state = oldState;
|
|
19474
19463
|
} else {
|
|
19475
19464
|
if (urlOrStateChanged) {
|
|
19476
19465
|
setBrowserUrlWithFallback(
|
|
19477
19466
|
newUrl,
|
|
19478
|
-
oldState === $location
|
|
19467
|
+
oldState === $location._state ? null : $location._state,
|
|
19479
19468
|
);
|
|
19480
19469
|
}
|
|
19481
19470
|
afterLocationChange(oldUrl, oldState);
|
|
@@ -19500,7 +19489,7 @@
|
|
|
19500
19489
|
"$locationChangeSuccess",
|
|
19501
19490
|
$location.absUrl,
|
|
19502
19491
|
oldUrl,
|
|
19503
|
-
$location
|
|
19492
|
+
$location._state,
|
|
19504
19493
|
oldState,
|
|
19505
19494
|
);
|
|
19506
19495
|
}
|
|
@@ -23877,37 +23866,37 @@
|
|
|
23877
23866
|
* @param {ng.AnimateService} $animate
|
|
23878
23867
|
*/
|
|
23879
23868
|
constructor($element, $scope, $attrs, $animate) {
|
|
23880
|
-
this
|
|
23881
|
-
this
|
|
23882
|
-
this
|
|
23883
|
-
this
|
|
23884
|
-
|
|
23885
|
-
this.
|
|
23886
|
-
this.
|
|
23887
|
-
this.
|
|
23888
|
-
this.
|
|
23889
|
-
this.
|
|
23890
|
-
|
|
23891
|
-
this.
|
|
23892
|
-
this.
|
|
23893
|
-
|
|
23894
|
-
this.$
|
|
23895
|
-
this
|
|
23896
|
-
this.
|
|
23869
|
+
this._element = $element;
|
|
23870
|
+
this._scope = $scope;
|
|
23871
|
+
this._attrs = $attrs;
|
|
23872
|
+
this._animate = $animate;
|
|
23873
|
+
|
|
23874
|
+
this._latestKey = 0;
|
|
23875
|
+
this._nextAttachId = 0;
|
|
23876
|
+
this._messages = {};
|
|
23877
|
+
this._renderLater = false;
|
|
23878
|
+
this._cachedCollection = null;
|
|
23879
|
+
|
|
23880
|
+
this._head = undefined;
|
|
23881
|
+
this._default = undefined;
|
|
23882
|
+
|
|
23883
|
+
this._scope.$watch(
|
|
23884
|
+
this._attrs.ngMessages || this._attrs.for,
|
|
23885
|
+
this._render.bind(this),
|
|
23897
23886
|
);
|
|
23898
23887
|
}
|
|
23899
23888
|
|
|
23900
|
-
|
|
23901
|
-
return this.
|
|
23889
|
+
_getAttachId() {
|
|
23890
|
+
return this._nextAttachId++;
|
|
23902
23891
|
}
|
|
23903
23892
|
|
|
23904
|
-
|
|
23905
|
-
this.
|
|
23906
|
-
this.
|
|
23893
|
+
_render(collection = {}) {
|
|
23894
|
+
this._renderLater = false;
|
|
23895
|
+
this._cachedCollection = collection;
|
|
23907
23896
|
|
|
23908
23897
|
const multiple =
|
|
23909
|
-
isAttrTruthy(this
|
|
23910
|
-
isAttrTruthy(this
|
|
23898
|
+
isAttrTruthy(this._scope, this._attrs.ngMessagesMultiple) ||
|
|
23899
|
+
isAttrTruthy(this._scope, this._attrs.multiple);
|
|
23911
23900
|
|
|
23912
23901
|
const unmatchedMessages = [];
|
|
23913
23902
|
|
|
@@ -23915,7 +23904,7 @@
|
|
|
23915
23904
|
|
|
23916
23905
|
let truthyKeys = 0;
|
|
23917
23906
|
|
|
23918
|
-
let messageItem = this.
|
|
23907
|
+
let messageItem = this._head;
|
|
23919
23908
|
|
|
23920
23909
|
let messageFound = false;
|
|
23921
23910
|
|
|
@@ -23958,27 +23947,27 @@
|
|
|
23958
23947
|
|
|
23959
23948
|
const messageMatched = unmatchedMessages.length !== totalMessages;
|
|
23960
23949
|
|
|
23961
|
-
const attachDefault = this.
|
|
23950
|
+
const attachDefault = this._default && !messageMatched && truthyKeys > 0;
|
|
23962
23951
|
|
|
23963
23952
|
if (attachDefault) {
|
|
23964
|
-
this.
|
|
23965
|
-
} else if (this.
|
|
23966
|
-
this.
|
|
23953
|
+
this._default.attach();
|
|
23954
|
+
} else if (this._default) {
|
|
23955
|
+
this._default.detach();
|
|
23967
23956
|
}
|
|
23968
23957
|
|
|
23969
23958
|
if (messageMatched || attachDefault) {
|
|
23970
|
-
this
|
|
23959
|
+
this._animate.setClass(this._element, ACTIVE_CLASS, INACTIVE_CLASS);
|
|
23971
23960
|
} else {
|
|
23972
|
-
this
|
|
23961
|
+
this._animate.setClass(this._element, INACTIVE_CLASS, ACTIVE_CLASS);
|
|
23973
23962
|
}
|
|
23974
23963
|
}
|
|
23975
23964
|
|
|
23976
23965
|
reRender() {
|
|
23977
|
-
if (!this.
|
|
23978
|
-
this.
|
|
23966
|
+
if (!this._renderLater) {
|
|
23967
|
+
this._renderLater = true;
|
|
23979
23968
|
Promise.resolve().then(() => {
|
|
23980
|
-
if (this.
|
|
23981
|
-
this.
|
|
23969
|
+
if (this._renderLater && this._cachedCollection) {
|
|
23970
|
+
this._render(this._cachedCollection);
|
|
23982
23971
|
}
|
|
23983
23972
|
});
|
|
23984
23973
|
}
|
|
@@ -23986,16 +23975,16 @@
|
|
|
23986
23975
|
|
|
23987
23976
|
register(comment, messageCtrl, isDefault) {
|
|
23988
23977
|
if (isDefault) {
|
|
23989
|
-
this.
|
|
23978
|
+
this._default = messageCtrl;
|
|
23990
23979
|
} else {
|
|
23991
|
-
const nextKey = this.
|
|
23980
|
+
const nextKey = this._latestKey.toString();
|
|
23992
23981
|
|
|
23993
|
-
this.
|
|
23982
|
+
this._messages[nextKey] = {
|
|
23994
23983
|
message: messageCtrl,
|
|
23995
23984
|
};
|
|
23996
|
-
this.insertMessageNode(this
|
|
23985
|
+
this.insertMessageNode(this._element, comment, nextKey);
|
|
23997
23986
|
comment._ngMessageNode = nextKey;
|
|
23998
|
-
this.
|
|
23987
|
+
this._latestKey++;
|
|
23999
23988
|
}
|
|
24000
23989
|
|
|
24001
23990
|
this.reRender();
|
|
@@ -24003,13 +23992,13 @@
|
|
|
24003
23992
|
|
|
24004
23993
|
deregister(comment, isDefault) {
|
|
24005
23994
|
if (isDefault) {
|
|
24006
|
-
delete this.
|
|
23995
|
+
delete this._default;
|
|
24007
23996
|
} else {
|
|
24008
23997
|
const key = comment._ngMessageNode;
|
|
24009
23998
|
|
|
24010
23999
|
delete comment._ngMessageNode;
|
|
24011
|
-
this.removeMessageNode(this
|
|
24012
|
-
delete this.
|
|
24000
|
+
this.removeMessageNode(this._element, comment, key);
|
|
24001
|
+
delete this._messages[key];
|
|
24013
24002
|
}
|
|
24014
24003
|
this.reRender();
|
|
24015
24004
|
}
|
|
@@ -24023,7 +24012,7 @@
|
|
|
24023
24012
|
const prevKey = prevNode._ngMessageNode;
|
|
24024
24013
|
|
|
24025
24014
|
if (prevKey && prevKey.length) {
|
|
24026
|
-
return this.
|
|
24015
|
+
return this._messages[prevKey];
|
|
24027
24016
|
}
|
|
24028
24017
|
|
|
24029
24018
|
if (prevNode.childNodes.length && parentLookup.indexOf(prevNode) === -1) {
|
|
@@ -24041,10 +24030,10 @@
|
|
|
24041
24030
|
}
|
|
24042
24031
|
|
|
24043
24032
|
insertMessageNode(parent, comment, key) {
|
|
24044
|
-
const messageNode = this.
|
|
24033
|
+
const messageNode = this._messages[key];
|
|
24045
24034
|
|
|
24046
|
-
if (!this.
|
|
24047
|
-
this.
|
|
24035
|
+
if (!this._head) {
|
|
24036
|
+
this._head = messageNode;
|
|
24048
24037
|
} else {
|
|
24049
24038
|
const match = this.findPreviousMessage(parent, comment);
|
|
24050
24039
|
|
|
@@ -24052,14 +24041,14 @@
|
|
|
24052
24041
|
messageNode.next = match.next;
|
|
24053
24042
|
match.next = messageNode;
|
|
24054
24043
|
} else {
|
|
24055
|
-
messageNode.next = this.
|
|
24056
|
-
this.
|
|
24044
|
+
messageNode.next = this._head;
|
|
24045
|
+
this._head = messageNode;
|
|
24057
24046
|
}
|
|
24058
24047
|
}
|
|
24059
24048
|
}
|
|
24060
24049
|
|
|
24061
24050
|
removeMessageNode(parent, comment, key) {
|
|
24062
|
-
const messageNode = this.
|
|
24051
|
+
const messageNode = this._messages[key];
|
|
24063
24052
|
|
|
24064
24053
|
if (!messageNode) return;
|
|
24065
24054
|
|
|
@@ -24068,7 +24057,7 @@
|
|
|
24068
24057
|
if (match) {
|
|
24069
24058
|
match.next = messageNode.next;
|
|
24070
24059
|
} else {
|
|
24071
|
-
this.
|
|
24060
|
+
this._head = messageNode.next;
|
|
24072
24061
|
}
|
|
24073
24062
|
}
|
|
24074
24063
|
}
|
|
@@ -24199,8 +24188,8 @@
|
|
|
24199
24188
|
|
|
24200
24189
|
// Each time we attach this node to a message we get a new id that we can match
|
|
24201
24190
|
// when we are destroying the node later.
|
|
24202
|
-
const
|
|
24203
|
-
ngMessagesCtrl.
|
|
24191
|
+
const attachId = (currentElement._attachId =
|
|
24192
|
+
ngMessagesCtrl._getAttachId());
|
|
24204
24193
|
|
|
24205
24194
|
// in the event that the element or a parent element is destroyed
|
|
24206
24195
|
// by another structural directive then it's time
|
|
@@ -24210,7 +24199,7 @@
|
|
|
24210
24199
|
// So this handler only handles cases where something else removed the message element.
|
|
24211
24200
|
if (
|
|
24212
24201
|
currentElement &&
|
|
24213
|
-
currentElement
|
|
24202
|
+
currentElement._attachId === attachId
|
|
24214
24203
|
) {
|
|
24215
24204
|
ngMessagesCtrl.deregister(commentNode, isDefault);
|
|
24216
24205
|
messageCtrl.detach();
|
|
@@ -24334,14 +24323,14 @@
|
|
|
24334
24323
|
config(key) {
|
|
24335
24324
|
return config[key];
|
|
24336
24325
|
},
|
|
24337
|
-
|
|
24326
|
+
_watchExpr: watchExpr,
|
|
24338
24327
|
};
|
|
24339
24328
|
};
|
|
24340
24329
|
}
|
|
24341
24330
|
|
|
24342
24331
|
ngDisabledAriaDirective.$inject = [$injectTokens._aria];
|
|
24343
24332
|
function ngDisabledAriaDirective($aria) {
|
|
24344
|
-
return $aria
|
|
24333
|
+
return $aria._watchExpr(
|
|
24345
24334
|
"ngDisabled",
|
|
24346
24335
|
"aria-disabled",
|
|
24347
24336
|
nativeAriaNodeNames,
|
|
@@ -24351,7 +24340,7 @@
|
|
|
24351
24340
|
|
|
24352
24341
|
ngShowAriaDirective.$inject = [$injectTokens._aria];
|
|
24353
24342
|
function ngShowAriaDirective($aria) {
|
|
24354
|
-
return $aria
|
|
24343
|
+
return $aria._watchExpr("ngShow", "aria-hidden", [], true);
|
|
24355
24344
|
}
|
|
24356
24345
|
|
|
24357
24346
|
/**
|
|
@@ -24437,7 +24426,7 @@
|
|
|
24437
24426
|
|
|
24438
24427
|
ngRequiredAriaDirective.$inject = [$injectTokens._aria];
|
|
24439
24428
|
function ngRequiredAriaDirective($aria) {
|
|
24440
|
-
return $aria
|
|
24429
|
+
return $aria._watchExpr(
|
|
24441
24430
|
"ngRequired",
|
|
24442
24431
|
"aria-required",
|
|
24443
24432
|
nativeAriaNodeNames,
|
|
@@ -24447,7 +24436,7 @@
|
|
|
24447
24436
|
|
|
24448
24437
|
ngCheckedAriaDirective.$inject = [$injectTokens._aria];
|
|
24449
24438
|
function ngCheckedAriaDirective($aria) {
|
|
24450
|
-
return $aria
|
|
24439
|
+
return $aria._watchExpr(
|
|
24451
24440
|
"ngChecked",
|
|
24452
24441
|
"aria-checked",
|
|
24453
24442
|
nativeAriaNodeNames,
|
|
@@ -24457,7 +24446,7 @@
|
|
|
24457
24446
|
|
|
24458
24447
|
ngValueAriaDirective.$inject = [$injectTokens._aria];
|
|
24459
24448
|
function ngValueAriaDirective($aria) {
|
|
24460
|
-
return $aria
|
|
24449
|
+
return $aria._watchExpr(
|
|
24461
24450
|
"ngValue",
|
|
24462
24451
|
"aria-checked",
|
|
24463
24452
|
nativeAriaNodeNames,
|
|
@@ -24467,12 +24456,12 @@
|
|
|
24467
24456
|
|
|
24468
24457
|
ngHideAriaDirective.$inject = [$injectTokens._aria];
|
|
24469
24458
|
function ngHideAriaDirective($aria) {
|
|
24470
|
-
return $aria
|
|
24459
|
+
return $aria._watchExpr("ngHide", "aria-hidden", [], false);
|
|
24471
24460
|
}
|
|
24472
24461
|
|
|
24473
24462
|
ngReadonlyAriaDirective.$inject = [$injectTokens._aria];
|
|
24474
24463
|
function ngReadonlyAriaDirective($aria) {
|
|
24475
|
-
return $aria
|
|
24464
|
+
return $aria._watchExpr(
|
|
24476
24465
|
"ngReadonly",
|
|
24477
24466
|
"aria-readonly",
|
|
24478
24467
|
nativeAriaNodeNames,
|
|
@@ -25426,10 +25415,10 @@
|
|
|
25426
25415
|
let options =
|
|
25427
25416
|
initialOptions ||
|
|
25428
25417
|
/** @type {ng.AnimationOptions}}*/ ({
|
|
25429
|
-
|
|
25418
|
+
_skipPreparationClasses: false,
|
|
25430
25419
|
});
|
|
25431
25420
|
|
|
25432
|
-
if (!options
|
|
25421
|
+
if (!options._prepared) {
|
|
25433
25422
|
options = prepareAnimationOptions(structuredClone(options));
|
|
25434
25423
|
}
|
|
25435
25424
|
|
|
@@ -25566,7 +25555,7 @@
|
|
|
25566
25555
|
);
|
|
25567
25556
|
}
|
|
25568
25557
|
|
|
25569
|
-
if (!options
|
|
25558
|
+
if (!options._skipPreparationClasses) {
|
|
25570
25559
|
element.classList.add(
|
|
25571
25560
|
...preparationClasses.split(" ").filter((x) => x !== ""),
|
|
25572
25561
|
);
|
|
@@ -25616,7 +25605,7 @@
|
|
|
25616
25605
|
// that if there is no transition defined then nothing will happen and this will also allow
|
|
25617
25606
|
// other transitions to be stacked on top of each other without any chopping them out.
|
|
25618
25607
|
if (isFirst) {
|
|
25619
|
-
|
|
25608
|
+
_blockTransitions(node, SAFE_FAST_FORWARD_DURATION_VALUE);
|
|
25620
25609
|
}
|
|
25621
25610
|
|
|
25622
25611
|
let timings = computeTimings(node, cacheKey, !isStructural);
|
|
@@ -25629,29 +25618,30 @@
|
|
|
25629
25618
|
|
|
25630
25619
|
const flags = {};
|
|
25631
25620
|
|
|
25632
|
-
flags.
|
|
25633
|
-
flags.
|
|
25634
|
-
flags.
|
|
25635
|
-
flags.
|
|
25636
|
-
flags.
|
|
25621
|
+
flags._hasTransitions = timings.transitionDuration > 0;
|
|
25622
|
+
flags._hasAnimations = timings.animationDuration > 0;
|
|
25623
|
+
flags._hasTransitionAll =
|
|
25624
|
+
flags._hasTransitions && timings.transitionProperty === "all";
|
|
25625
|
+
flags._applyTransitionDuration =
|
|
25637
25626
|
hasToStyles &&
|
|
25638
|
-
((flags.
|
|
25639
|
-
(flags.
|
|
25640
|
-
flags.
|
|
25641
|
-
|
|
25627
|
+
((flags._hasTransitions && !flags._hasTransitionAll) ||
|
|
25628
|
+
(flags._hasAnimations && !flags._hasTransitions));
|
|
25629
|
+
flags._applyAnimationDuration =
|
|
25630
|
+
options.duration && flags._hasAnimations;
|
|
25631
|
+
flags._applyTransitionDelay =
|
|
25642
25632
|
truthyTimingValue(options.delay) &&
|
|
25643
|
-
(flags.
|
|
25644
|
-
flags.
|
|
25645
|
-
truthyTimingValue(options.delay) && flags.
|
|
25646
|
-
flags.
|
|
25633
|
+
(flags._applyTransitionDuration || flags._hasTransitions);
|
|
25634
|
+
flags._applyAnimationDelay =
|
|
25635
|
+
truthyTimingValue(options.delay) && flags._hasAnimations;
|
|
25636
|
+
flags._recalculateTimingStyles = addRemoveClassName.length > 0;
|
|
25647
25637
|
|
|
25648
|
-
if (flags.
|
|
25638
|
+
if (flags._applyTransitionDuration || flags._applyAnimationDuration) {
|
|
25649
25639
|
maxDuration = options.duration
|
|
25650
25640
|
? parseFloat(/** @type {string} */ (options.duration))
|
|
25651
25641
|
: maxDuration;
|
|
25652
25642
|
|
|
25653
|
-
if (flags.
|
|
25654
|
-
flags.
|
|
25643
|
+
if (flags._applyTransitionDuration) {
|
|
25644
|
+
flags._hasTransitions = true;
|
|
25655
25645
|
timings.transitionDuration = maxDuration;
|
|
25656
25646
|
applyOnlyDuration = node.style.transitionProperty.length > 0;
|
|
25657
25647
|
temporaryStyles.push(
|
|
@@ -25659,14 +25649,14 @@
|
|
|
25659
25649
|
);
|
|
25660
25650
|
}
|
|
25661
25651
|
|
|
25662
|
-
if (flags.
|
|
25663
|
-
flags.
|
|
25652
|
+
if (flags._applyAnimationDuration) {
|
|
25653
|
+
flags._hasAnimations = true;
|
|
25664
25654
|
timings.animationDuration = maxDuration;
|
|
25665
25655
|
temporaryStyles.push(getCssKeyframeDurationStyle(maxDuration));
|
|
25666
25656
|
}
|
|
25667
25657
|
}
|
|
25668
25658
|
|
|
25669
|
-
if (maxDuration === 0 && !flags.
|
|
25659
|
+
if (maxDuration === 0 && !flags._recalculateTimingStyles) {
|
|
25670
25660
|
return closeAndReturnNoopAnimator();
|
|
25671
25661
|
}
|
|
25672
25662
|
|
|
@@ -25679,11 +25669,11 @@
|
|
|
25679
25669
|
maxDelay = Math.max(delayStyle, 0);
|
|
25680
25670
|
}
|
|
25681
25671
|
|
|
25682
|
-
if (flags.
|
|
25672
|
+
if (flags._applyTransitionDelay) {
|
|
25683
25673
|
temporaryStyles.push(getCssDelayStyle(delayStyle));
|
|
25684
25674
|
}
|
|
25685
25675
|
|
|
25686
|
-
if (flags.
|
|
25676
|
+
if (flags._applyAnimationDelay) {
|
|
25687
25677
|
temporaryStyles.push(getCssDelayStyle(delayStyle, true));
|
|
25688
25678
|
}
|
|
25689
25679
|
}
|
|
@@ -25695,15 +25685,15 @@
|
|
|
25695
25685
|
isNullOrUndefined(options.duration) &&
|
|
25696
25686
|
timings.transitionDuration > 0
|
|
25697
25687
|
) {
|
|
25698
|
-
flags.
|
|
25699
|
-
flags.
|
|
25688
|
+
flags._recalculateTimingStyles =
|
|
25689
|
+
flags._recalculateTimingStyles || isFirst;
|
|
25700
25690
|
}
|
|
25701
25691
|
|
|
25702
25692
|
maxDelayTime = maxDelay * ONE_SECOND;
|
|
25703
25693
|
maxDurationTime = maxDuration * ONE_SECOND;
|
|
25704
25694
|
|
|
25705
|
-
flags.
|
|
25706
|
-
flags.
|
|
25695
|
+
flags._blockTransition = timings.transitionDuration > 0;
|
|
25696
|
+
flags._blockKeyframeAnimation =
|
|
25707
25697
|
timings.animationDuration > 0 &&
|
|
25708
25698
|
stagger.animationDelay > 0 &&
|
|
25709
25699
|
stagger.animationDuration === 0;
|
|
@@ -25719,15 +25709,15 @@
|
|
|
25719
25709
|
applyAnimationFromStyles(element, options);
|
|
25720
25710
|
}
|
|
25721
25711
|
|
|
25722
|
-
if (flags.
|
|
25712
|
+
if (flags._blockTransition || flags._blockKeyframeAnimation) {
|
|
25723
25713
|
applyBlocking(maxDuration);
|
|
25724
25714
|
} else if (!options.skipBlocking) {
|
|
25725
|
-
|
|
25715
|
+
_blockTransitions(node, false);
|
|
25726
25716
|
}
|
|
25727
25717
|
|
|
25728
25718
|
// TODO(matsko): for 1.5 change this code to have an animator object for better debugging
|
|
25729
25719
|
return {
|
|
25730
|
-
|
|
25720
|
+
_willAnimate: true,
|
|
25731
25721
|
end: endFn,
|
|
25732
25722
|
start() {
|
|
25733
25723
|
if (animationClosed) return undefined;
|
|
@@ -25767,7 +25757,7 @@
|
|
|
25767
25757
|
animationClosed = true;
|
|
25768
25758
|
animationPaused = false;
|
|
25769
25759
|
|
|
25770
|
-
if (preparationClasses && !options
|
|
25760
|
+
if (preparationClasses && !options._skipPreparationClasses) {
|
|
25771
25761
|
element.classList.remove(...preparationClasses.split(" "));
|
|
25772
25762
|
}
|
|
25773
25763
|
activeClasses = pendClasses(preparationClasses, ACTIVE_CLASS_SUFFIX);
|
|
@@ -25776,8 +25766,8 @@
|
|
|
25776
25766
|
element.classList.remove(...activeClasses.split(" "));
|
|
25777
25767
|
}
|
|
25778
25768
|
|
|
25779
|
-
|
|
25780
|
-
|
|
25769
|
+
_blockKeyframeAnimations(node, false);
|
|
25770
|
+
_blockTransitions(node, false);
|
|
25781
25771
|
|
|
25782
25772
|
temporaryStyles.forEach((entry) => {
|
|
25783
25773
|
// There is only one way to remove inline style properties entirely from elements.
|
|
@@ -25830,12 +25820,12 @@
|
|
|
25830
25820
|
}
|
|
25831
25821
|
|
|
25832
25822
|
function applyBlocking(duration) {
|
|
25833
|
-
if (flags.
|
|
25834
|
-
|
|
25823
|
+
if (flags._blockTransition) {
|
|
25824
|
+
_blockTransitions(node, duration);
|
|
25835
25825
|
}
|
|
25836
25826
|
|
|
25837
|
-
if (flags.
|
|
25838
|
-
|
|
25827
|
+
if (flags._blockKeyframeAnimation) {
|
|
25828
|
+
_blockKeyframeAnimations(node, !!duration);
|
|
25839
25829
|
}
|
|
25840
25830
|
}
|
|
25841
25831
|
|
|
@@ -25852,7 +25842,7 @@
|
|
|
25852
25842
|
close();
|
|
25853
25843
|
|
|
25854
25844
|
return {
|
|
25855
|
-
|
|
25845
|
+
_willAnimate: false,
|
|
25856
25846
|
start() {
|
|
25857
25847
|
return runner;
|
|
25858
25848
|
},
|
|
@@ -25916,7 +25906,7 @@
|
|
|
25916
25906
|
animationPaused = !playAnimation;
|
|
25917
25907
|
|
|
25918
25908
|
if (timings.animationDuration) {
|
|
25919
|
-
const value =
|
|
25909
|
+
const value = _blockKeyframeAnimations(node, animationPaused);
|
|
25920
25910
|
|
|
25921
25911
|
if (animationPaused) {
|
|
25922
25912
|
temporaryStyles.push(value);
|
|
@@ -25980,7 +25970,7 @@
|
|
|
25980
25970
|
...activeClasses.split(" ").filter((x) => x !== ""),
|
|
25981
25971
|
);
|
|
25982
25972
|
|
|
25983
|
-
if (flags.
|
|
25973
|
+
if (flags._recalculateTimingStyles) {
|
|
25984
25974
|
cacheKey = animateCache._cacheKey(
|
|
25985
25975
|
node,
|
|
25986
25976
|
method,
|
|
@@ -26000,11 +25990,11 @@
|
|
|
26000
25990
|
return;
|
|
26001
25991
|
}
|
|
26002
25992
|
|
|
26003
|
-
flags.
|
|
26004
|
-
flags.
|
|
25993
|
+
flags._hasTransitions = timings.transitionDuration > 0;
|
|
25994
|
+
flags._hasAnimations = timings.animationDuration > 0;
|
|
26005
25995
|
}
|
|
26006
25996
|
|
|
26007
|
-
if (flags.
|
|
25997
|
+
if (flags._applyAnimationDelay) {
|
|
26008
25998
|
relativeDelay =
|
|
26009
25999
|
typeof options.delay !== "boolean" &&
|
|
26010
26000
|
truthyTimingValue(options.delay)
|
|
@@ -26026,13 +26016,13 @@
|
|
|
26026
26016
|
|
|
26027
26017
|
const easeVal = options.easing;
|
|
26028
26018
|
|
|
26029
|
-
if (flags.
|
|
26019
|
+
if (flags._hasTransitions) {
|
|
26030
26020
|
easeProp = "transitionTimingFunction";
|
|
26031
26021
|
temporaryStyles.push([easeProp, easeVal]);
|
|
26032
26022
|
node.style[easeProp] = easeVal;
|
|
26033
26023
|
}
|
|
26034
26024
|
|
|
26035
|
-
if (flags.
|
|
26025
|
+
if (flags._hasAnimations) {
|
|
26036
26026
|
easeProp = "animationTimingFunction";
|
|
26037
26027
|
temporaryStyles.push([easeProp, easeVal]);
|
|
26038
26028
|
node.style[easeProp] = easeVal;
|
|
@@ -26118,7 +26108,7 @@
|
|
|
26118
26108
|
];
|
|
26119
26109
|
}
|
|
26120
26110
|
|
|
26121
|
-
function
|
|
26111
|
+
function _blockTransitions(node, duration) {
|
|
26122
26112
|
// we use a negative delay value since it performs blocking
|
|
26123
26113
|
// yet it doesn't kill any existing transitions running on the
|
|
26124
26114
|
// same element which makes this safe for class-based animations
|
|
@@ -26272,7 +26262,7 @@
|
|
|
26272
26262
|
*
|
|
26273
26263
|
* @param {ng.RootScopeService} $rootScope
|
|
26274
26264
|
* @param {ng.InjectorService} $injector
|
|
26275
|
-
* @param {
|
|
26265
|
+
* @param {import("../interface.ts").AnimationService} $$animation
|
|
26276
26266
|
* @returns {import("../queue/interface.ts").AnimateQueueService}
|
|
26277
26267
|
*/
|
|
26278
26268
|
function ($rootScope, $injector, $$animation) {
|
|
@@ -26952,7 +26942,7 @@
|
|
|
26952
26942
|
* @param {ng.InjectorService} $injector
|
|
26953
26943
|
* @returns {import("./interface.ts").AnimateJsFn}
|
|
26954
26944
|
*/
|
|
26955
|
-
|
|
26945
|
+
($injector) => {
|
|
26956
26946
|
const applyAnimationClasses = applyAnimationClassesFactory();
|
|
26957
26947
|
|
|
26958
26948
|
/**
|
|
@@ -27022,7 +27012,7 @@
|
|
|
27022
27012
|
let runner;
|
|
27023
27013
|
|
|
27024
27014
|
return {
|
|
27025
|
-
|
|
27015
|
+
_willAnimate: true,
|
|
27026
27016
|
|
|
27027
27017
|
start() {
|
|
27028
27018
|
if (runner) return runner;
|
|
@@ -27070,7 +27060,7 @@
|
|
|
27070
27060
|
const klass = classList[i];
|
|
27071
27061
|
|
|
27072
27062
|
const animationFactory =
|
|
27073
|
-
$animateProvider
|
|
27063
|
+
$animateProvider._registeredAnimations[klass];
|
|
27074
27064
|
|
|
27075
27065
|
if (animationFactory && !flagMap[klass]) {
|
|
27076
27066
|
matches.push($injector.get(animationFactory));
|
|
@@ -27193,7 +27183,7 @@
|
|
|
27193
27183
|
*
|
|
27194
27184
|
* @param {ng.RootScopeService} $rootScope
|
|
27195
27185
|
* @param {ng.InjectorService} $injector
|
|
27196
|
-
* @
|
|
27186
|
+
* @return {import("./interface.ts").AnimationService}
|
|
27197
27187
|
*/
|
|
27198
27188
|
function ($rootScope, $injector) {
|
|
27199
27189
|
/**
|
|
@@ -27883,7 +27873,7 @@
|
|
|
27883
27873
|
|
|
27884
27874
|
// read the comment within `prepareRegularAnimation` to understand
|
|
27885
27875
|
// why this check is necessary
|
|
27886
|
-
return animator
|
|
27876
|
+
return animator._willAnimate ? animator : null;
|
|
27887
27877
|
}
|
|
27888
27878
|
|
|
27889
27879
|
function getClassVal(element) {
|
|
@@ -27906,7 +27896,7 @@
|
|
|
27906
27896
|
|
|
27907
27897
|
// read the comment within `prepareRegularAnimation` to understand
|
|
27908
27898
|
// why this check is necessary
|
|
27909
|
-
return animator
|
|
27899
|
+
return animator._willAnimate ? animator : null;
|
|
27910
27900
|
}
|
|
27911
27901
|
|
|
27912
27902
|
function end() {
|
|
@@ -28004,11 +27994,11 @@
|
|
|
28004
27994
|
const animator = $animateCss(animationDetails.element, options);
|
|
28005
27995
|
|
|
28006
27996
|
// the driver lookup code inside of $$animation attempts to spawn a
|
|
28007
|
-
// driver one by one until a driver returns a
|
|
27997
|
+
// driver one by one until a driver returns a._willAnimate animator object.
|
|
28008
27998
|
// $animateCss will always return an object, however, it will pass in
|
|
28009
27999
|
// a flag as a hint as to whether an animation was detected or not
|
|
28010
28000
|
|
|
28011
|
-
return animator
|
|
28001
|
+
return animator._willAnimate ? animator : null;
|
|
28012
28002
|
}
|
|
28013
28003
|
},
|
|
28014
28004
|
];
|
|
@@ -28028,6 +28018,10 @@
|
|
|
28028
28018
|
}
|
|
28029
28019
|
|
|
28030
28020
|
AnimateJsDriverProvider.$inject = provider([$injectTokens._animation]);
|
|
28021
|
+
|
|
28022
|
+
/**
|
|
28023
|
+
* @param {import("./animation.js").AnimationProvider} $$animationProvider
|
|
28024
|
+
*/
|
|
28031
28025
|
function AnimateJsDriverProvider($$animationProvider) {
|
|
28032
28026
|
$$animationProvider.drivers.push($injectTokens._animateJsDriver);
|
|
28033
28027
|
this.$get = [
|
|
@@ -33213,7 +33207,7 @@
|
|
|
33213
33207
|
*/
|
|
33214
33208
|
function makeEnterExitRetainHook(hookName) {
|
|
33215
33209
|
return (transition, state) => {
|
|
33216
|
-
const _state = state
|
|
33210
|
+
const _state = state._state();
|
|
33217
33211
|
|
|
33218
33212
|
const hookFn = _state[hookName];
|
|
33219
33213
|
|
|
@@ -33298,7 +33292,7 @@
|
|
|
33298
33292
|
*/
|
|
33299
33293
|
const lazyResolveState = (trans, state) =>
|
|
33300
33294
|
new ResolveContext(trans.treeChanges().to)
|
|
33301
|
-
.subContext(state
|
|
33295
|
+
.subContext(state._state())
|
|
33302
33296
|
.resolvePath("LAZY", trans)
|
|
33303
33297
|
.then(() => {
|
|
33304
33298
|
/* empty */
|
|
@@ -33490,7 +33484,7 @@
|
|
|
33490
33484
|
}
|
|
33491
33485
|
const promises = transition
|
|
33492
33486
|
.entering()
|
|
33493
|
-
.filter((state) => !!state
|
|
33487
|
+
.filter((state) => !!state._state().lazyLoad)
|
|
33494
33488
|
.map((state) => lazyLoadState(transition, state, stateRegistry));
|
|
33495
33489
|
|
|
33496
33490
|
return Promise.all(promises).then(retryTransition);
|
|
@@ -33506,7 +33500,7 @@
|
|
|
33506
33500
|
* @returns A promise for the lazy load result
|
|
33507
33501
|
*/
|
|
33508
33502
|
function lazyLoadState(transition, state, stateRegistry) {
|
|
33509
|
-
const lazyLoadFn = state
|
|
33503
|
+
const lazyLoadFn = state._state().lazyLoad;
|
|
33510
33504
|
|
|
33511
33505
|
// Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked
|
|
33512
33506
|
let promise = lazyLoadFn._promise;
|
|
@@ -33514,7 +33508,7 @@
|
|
|
33514
33508
|
if (!promise) {
|
|
33515
33509
|
const success = (result) => {
|
|
33516
33510
|
delete state.lazyLoad;
|
|
33517
|
-
delete state
|
|
33511
|
+
delete state._state().lazyLoad;
|
|
33518
33512
|
delete lazyLoadFn._promise;
|
|
33519
33513
|
|
|
33520
33514
|
return result;
|
|
@@ -34776,37 +34770,6 @@
|
|
|
34776
34770
|
}
|
|
34777
34771
|
}
|
|
34778
34772
|
|
|
34779
|
-
class ViewScrollProvider {
|
|
34780
|
-
constructor() {
|
|
34781
|
-
this.enabled = false;
|
|
34782
|
-
}
|
|
34783
|
-
|
|
34784
|
-
useAnchorScroll() {
|
|
34785
|
-
this.enabled = true;
|
|
34786
|
-
}
|
|
34787
|
-
|
|
34788
|
-
$get = [
|
|
34789
|
-
$injectTokens._anchorScroll,
|
|
34790
|
-
/**
|
|
34791
|
-
* @param {ng.AnchorScrollObject} $anchorScroll
|
|
34792
|
-
* @returns {ng.ViewScrollService}
|
|
34793
|
-
*/
|
|
34794
|
-
($anchorScroll) => {
|
|
34795
|
-
if (this.enabled) {
|
|
34796
|
-
return $anchorScroll;
|
|
34797
|
-
}
|
|
34798
|
-
|
|
34799
|
-
return (/** @type {Element} */ $element) => {
|
|
34800
|
-
validateInstanceOf($element, Element, "$element");
|
|
34801
|
-
|
|
34802
|
-
setTimeout(() => {
|
|
34803
|
-
$element.scrollIntoView(false);
|
|
34804
|
-
}, 0);
|
|
34805
|
-
};
|
|
34806
|
-
},
|
|
34807
|
-
];
|
|
34808
|
-
}
|
|
34809
|
-
|
|
34810
34773
|
/**
|
|
34811
34774
|
* @typedef BindingTuple
|
|
34812
34775
|
* @property {string} name
|
|
@@ -35746,7 +35709,7 @@
|
|
|
35746
35709
|
*
|
|
35747
35710
|
* Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].
|
|
35748
35711
|
*
|
|
35749
|
-
* A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration
|
|
35712
|
+
* A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration._state]]) which returns the corresponding [[StateObject]] object.
|
|
35750
35713
|
*
|
|
35751
35714
|
* This class prototypally inherits from the corresponding [[StateDeclaration]].
|
|
35752
35715
|
* Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].
|
|
@@ -35766,7 +35729,7 @@
|
|
|
35766
35729
|
*/
|
|
35767
35730
|
constructor(config) {
|
|
35768
35731
|
Object.assign(this, config);
|
|
35769
|
-
this
|
|
35732
|
+
this._state = () => {
|
|
35770
35733
|
return this;
|
|
35771
35734
|
};
|
|
35772
35735
|
/**
|
|
@@ -35858,7 +35821,7 @@
|
|
|
35858
35821
|
}
|
|
35859
35822
|
}
|
|
35860
35823
|
/** Predicate which returns true if the object is a [[StateDeclaration]] object */
|
|
35861
|
-
StateObject.isStateDeclaration = (obj) => isFunction(obj
|
|
35824
|
+
StateObject.isStateDeclaration = (obj) => isFunction(obj._state);
|
|
35862
35825
|
/** Predicate which returns true if the object is an internal [[StateObject]] object */
|
|
35863
35826
|
StateObject.isState = (obj) => isObject(obj._stateObjectCache);
|
|
35864
35827
|
|
|
@@ -35999,7 +35962,7 @@
|
|
|
35999
35962
|
*/
|
|
36000
35963
|
fromState(stateOrDecl, stateService, globals) {
|
|
36001
35964
|
const state = StateObject.isStateDeclaration(stateOrDecl)
|
|
36002
|
-
? stateOrDecl
|
|
35965
|
+
? stateOrDecl._state()
|
|
36003
35966
|
: stateOrDecl;
|
|
36004
35967
|
|
|
36005
35968
|
/**
|
|
@@ -36952,7 +36915,7 @@
|
|
|
36952
36915
|
}
|
|
36953
36916
|
|
|
36954
36917
|
function selfBuilder(state) {
|
|
36955
|
-
state.self
|
|
36918
|
+
state.self._state = () => state;
|
|
36956
36919
|
|
|
36957
36920
|
return state.self;
|
|
36958
36921
|
}
|
|
@@ -37565,7 +37528,7 @@
|
|
|
37565
37528
|
function decoratedNg1Hook(trans, state) {
|
|
37566
37529
|
const resolveContext = new ResolveContext(trans.treeChanges(pathname));
|
|
37567
37530
|
|
|
37568
|
-
const subContext = resolveContext.subContext(state
|
|
37531
|
+
const subContext = resolveContext.subContext(state._state());
|
|
37569
37532
|
|
|
37570
37533
|
const locals = Object.assign(getLocals(subContext), {
|
|
37571
37534
|
$state$: state,
|
|
@@ -37665,7 +37628,7 @@
|
|
|
37665
37628
|
}
|
|
37666
37629
|
|
|
37667
37630
|
_deregisterTree(state) {
|
|
37668
|
-
const all = this.getAll().map((x) => x
|
|
37631
|
+
const all = this.getAll().map((x) => x._state());
|
|
37669
37632
|
|
|
37670
37633
|
const getChildren = (states) => {
|
|
37671
37634
|
const _children = all.filter((x) => states.indexOf(x.parent) !== -1);
|
|
@@ -37714,7 +37677,7 @@
|
|
|
37714
37677
|
const deregisteredStates = this._deregisterTree(
|
|
37715
37678
|
/** @type {import("./interface.ts").BuiltStateDeclaration} */ (
|
|
37716
37679
|
state
|
|
37717
|
-
)
|
|
37680
|
+
)._state(),
|
|
37718
37681
|
);
|
|
37719
37682
|
|
|
37720
37683
|
this.listeners.forEach((listener) =>
|
|
@@ -38260,7 +38223,7 @@
|
|
|
38260
38223
|
* The ng-view can be targeted in a View using the name ([[StateDeclaration.views]]).
|
|
38261
38224
|
*
|
|
38262
38225
|
* - `autoscroll`: an expression. When it evaluates to true, the `ng-view` will be scrolled into view when it is activated.
|
|
38263
|
-
* Uses [[$
|
|
38226
|
+
* Uses [[$anchorScroll]] to do the scrolling.
|
|
38264
38227
|
*
|
|
38265
38228
|
* - `onload`: Expression to evaluate whenever the view updates.
|
|
38266
38229
|
*
|
|
@@ -38378,18 +38341,18 @@
|
|
|
38378
38341
|
$ViewDirective.$inject = [
|
|
38379
38342
|
$injectTokens._view,
|
|
38380
38343
|
$injectTokens._animate,
|
|
38381
|
-
$injectTokens.
|
|
38344
|
+
$injectTokens._anchorScroll,
|
|
38382
38345
|
$injectTokens._interpolate,
|
|
38383
38346
|
];
|
|
38384
38347
|
|
|
38385
38348
|
/**
|
|
38386
38349
|
* @param {ng.ViewService} $view
|
|
38387
38350
|
* @param {ng.AnimateService} $animate
|
|
38388
|
-
* @param {ng.AnchorScrollService} $
|
|
38351
|
+
* @param {ng.AnchorScrollService} $anchorScroll
|
|
38389
38352
|
* @param {ng.InterpolateService} $interpolate
|
|
38390
38353
|
* @returns {ng.Directive}
|
|
38391
38354
|
*/
|
|
38392
|
-
function $ViewDirective($view, $animate, $
|
|
38355
|
+
function $ViewDirective($view, $animate, $anchorScroll, $interpolate) {
|
|
38393
38356
|
function getRenderer() {
|
|
38394
38357
|
return {
|
|
38395
38358
|
enter(element, target, cb) {
|
|
@@ -38543,7 +38506,7 @@
|
|
|
38543
38506
|
(isDefined(autoScrollExp) && !autoScrollExp) ||
|
|
38544
38507
|
(autoScrollExp && scope.$eval(autoScrollExp))
|
|
38545
38508
|
) {
|
|
38546
|
-
/** @type {ng.
|
|
38509
|
+
/** @type {ng.AnchorScrollService} */ ($anchorScroll)(clone);
|
|
38547
38510
|
}
|
|
38548
38511
|
});
|
|
38549
38512
|
cleanupLastView();
|
|
@@ -40472,7 +40435,6 @@
|
|
|
40472
40435
|
$view: ViewService,
|
|
40473
40436
|
$transitions: TransitionProvider,
|
|
40474
40437
|
$state: StateProvider,
|
|
40475
|
-
$viewScroll: ViewScrollProvider,
|
|
40476
40438
|
$templateFactory: TemplateFactoryProvider,
|
|
40477
40439
|
$url: UrlService,
|
|
40478
40440
|
$stateRegistry: StateRegistryProvider,
|
|
@@ -40524,7 +40486,7 @@
|
|
|
40524
40486
|
* @public
|
|
40525
40487
|
* @type {string} `version` from `package.json`
|
|
40526
40488
|
*/
|
|
40527
|
-
this.version = "0.
|
|
40489
|
+
this.version = "0.18.0"; //inserted via rollup plugin
|
|
40528
40490
|
|
|
40529
40491
|
/**
|
|
40530
40492
|
* Gets the controller instance for a given element, if exists. Defaults to "ngControllerController"
|
|
@@ -40762,7 +40724,7 @@
|
|
|
40762
40724
|
stateRegistry
|
|
40763
40725
|
.getAll()
|
|
40764
40726
|
.map((x) => {
|
|
40765
|
-
return x
|
|
40727
|
+
return x._state().resolvables;
|
|
40766
40728
|
})
|
|
40767
40729
|
.reduce(unnestR, [])
|
|
40768
40730
|
.filter(
|