@angular-wave/angular.ts 0.7.4 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/core/scope/scope.d.ts +0 -2
- package/@types/directive/setter/setter.d.ts +2 -2
- package/@types/shared/utils.d.ts +8 -0
- package/Makefile +1 -1
- package/dist/angular-ts.esm.js +228 -199
- package/dist/angular-ts.umd.js +228 -199
- package/dist/angular-ts.umd.min.js +1 -1
- package/docs/assets/scss/index.scss +12 -0
- package/docs/content/_index.md +15 -4
- package/docs/content/docs/_index.md +7 -6
- package/docs/content/docs/directive/bind.md +70 -0
- package/docs/content/docs/directive/blur.md +38 -0
- package/docs/content/docs/directive/channel.md +1 -3
- package/docs/content/docs/directive/class-even.md +3 -3
- package/docs/content/docs/directive/class-odd.md +4 -4
- package/docs/content/docs/directive/class.md +7 -7
- package/docs/content/docs/directive/click.md +41 -0
- package/docs/content/docs/directive/cloak.md +4 -8
- package/docs/content/docs/directive/copy.md +38 -0
- package/docs/content/docs/directive/cut.md +40 -0
- package/docs/content/docs/directive/dblclick.md +41 -0
- package/docs/content/docs/directive/focus.md +38 -0
- package/docs/content/docs/directive/keydown.md +38 -0
- package/docs/content/docs/directive/keyup.md +38 -0
- package/docs/content/docs/directive/load.md +43 -0
- package/docs/content/docs/directive/mousedown.md +38 -0
- package/docs/content/docs/directive/mouseenter.md +38 -0
- package/docs/content/docs/directive/mouseleave.md +38 -0
- package/docs/content/docs/directive/mousemove.md +38 -0
- package/docs/content/docs/directive/mouseout.md +38 -0
- package/docs/content/docs/directive/mouseover.md +38 -0
- package/docs/content/docs/directive/mouseup.md +38 -0
- package/docs/layouts/404.html +1 -1
- package/docs/static/examples/eventbus/eventbus.js +1 -1
- package/docs/static/examples/ng-bind/ng-bind.html +9 -0
- package/docs/static/examples/ng-blur/ng-blur.html +9 -0
- package/docs/static/examples/ng-click/ng-click.html +6 -0
- package/docs/static/examples/ng-copy/ng-copy.html +6 -0
- package/docs/static/examples/ng-cut/ng-cut.html +6 -0
- package/docs/static/examples/ng-dblclick/ng-dblclick.html +10 -0
- package/docs/static/examples/ng-focus/ng-focus.html +9 -0
- package/docs/static/examples/ng-keydown/ng-keydown.html +9 -0
- package/docs/static/examples/ng-keyup/ng-keyup.html +9 -0
- package/docs/static/examples/ng-load/ng-load.html +8 -0
- package/docs/static/examples/ng-mousedown/ng-mousedown.html +6 -0
- package/docs/static/examples/ng-mouseenter/ng-mouseenter.html +4 -0
- package/docs/static/examples/ng-mouseleave/ng-mouseleave.html +4 -0
- package/docs/static/examples/ng-mousemove/ng-mousemove.html +4 -0
- package/docs/static/examples/ng-mouseout/ng-mouseout.html +4 -0
- package/docs/static/examples/ng-mouseover/ng-mouseover.html +4 -0
- package/docs/static/examples/ng-mouseup/ng-mouseup.html +4 -0
- package/legacy.d.ts +0 -4
- package/package.json +1 -1
- package/src/core/location/location.js +1 -1
- package/src/core/scope/scope.js +0 -5
- package/src/directive/bind/bind.js +16 -4
- package/src/directive/bind/bind.spec.js +13 -0
- package/src/directive/events/events.js +21 -24
- package/src/directive/events/events.md +0 -41
- package/src/directive/messages/messages.js +1 -1
- package/src/directive/observe/{test.html → observe-demo.html} +0 -1
- package/src/directive/repeat/repeat.js +175 -153
- package/src/directive/setter/setter.js +1 -1
- package/src/directive/switch/switch.spec.js +1 -1
- package/src/router/directives/state-directives.js +4 -6
- package/src/services/anchor-scroll.js +1 -1
- package/src/shared/utils.js +19 -1
- package/docs/static/examples/ng-class/ng-class.js +0 -0
|
@@ -150,7 +150,6 @@ export class Scope {
|
|
|
150
150
|
$destroy: any;
|
|
151
151
|
$eval: any;
|
|
152
152
|
$apply: any;
|
|
153
|
-
$evalAsync: any;
|
|
154
153
|
$postUpdate: any;
|
|
155
154
|
$isRoot: any;
|
|
156
155
|
$target: any;
|
|
@@ -185,7 +184,6 @@ export class Scope {
|
|
|
185
184
|
$newIsolate(instance: any): any;
|
|
186
185
|
$transcluded(parentInstance: any): any;
|
|
187
186
|
$eval(expr: any, locals: any): any;
|
|
188
|
-
$evalAsync(expr: any, locals: any): Promise<any>;
|
|
189
187
|
/**
|
|
190
188
|
* @param {Object} newTarget
|
|
191
189
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {import('../../core/parse/interface.ts').ParseService} $parse
|
|
3
3
|
* @param {import('../../services/log/interface.ts').LogService} $log
|
|
4
|
-
* @returns {import('
|
|
4
|
+
* @returns {import('interface.ts').Directive}
|
|
5
5
|
*/
|
|
6
6
|
export function ngSetterDirective(
|
|
7
7
|
$parse: import("../../core/parse/interface.ts").ParseService,
|
|
8
8
|
$log: import("../../services/log/interface.ts").LogService,
|
|
9
|
-
):
|
|
9
|
+
): any;
|
|
10
10
|
export namespace ngSetterDirective {
|
|
11
11
|
let $inject: string[];
|
|
12
12
|
}
|
package/@types/shared/utils.d.ts
CHANGED
|
@@ -525,6 +525,14 @@ export function isObjectEmpty(obj: any | null | undefined): boolean;
|
|
|
525
525
|
* hasOwn({}, 'bar'); // false
|
|
526
526
|
*/
|
|
527
527
|
export function hasOwn(obj: object, key: string | number | symbol): boolean;
|
|
528
|
+
/**
|
|
529
|
+
* Wraps a function so it can only be called once.
|
|
530
|
+
* Subsequent calls do nothing and return undefined.
|
|
531
|
+
*
|
|
532
|
+
* @param {Function} fn - The function to wrap.
|
|
533
|
+
* @returns {Function} A new function that will call `fn` only once.
|
|
534
|
+
*/
|
|
535
|
+
export function callBackOnce(fn: Function): Function;
|
|
528
536
|
export const isProxySymbol: unique symbol;
|
|
529
537
|
export const ngAttrPrefixes: string[];
|
|
530
538
|
/**
|
package/Makefile
CHANGED
package/dist/angular-ts.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Version: 0.7.
|
|
1
|
+
/* Version: 0.7.7 - July 13, 2025 16:59:18 */
|
|
2
2
|
const VALID_CLASS = "ng-valid";
|
|
3
3
|
const INVALID_CLASS = "ng-invalid";
|
|
4
4
|
const PRISTINE_CLASS = "ng-pristine";
|
|
@@ -241,7 +241,7 @@ function isWindow(obj) {
|
|
|
241
241
|
* @returns {boolean}
|
|
242
242
|
*/
|
|
243
243
|
function isScope(obj) {
|
|
244
|
-
return obj && obj.$
|
|
244
|
+
return obj && obj.$watch;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
/**
|
|
@@ -1130,6 +1130,24 @@ function hasOwn(obj, key) {
|
|
|
1130
1130
|
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
1131
1131
|
}
|
|
1132
1132
|
|
|
1133
|
+
/**
|
|
1134
|
+
* Wraps a function so it can only be called once.
|
|
1135
|
+
* Subsequent calls do nothing and return undefined.
|
|
1136
|
+
*
|
|
1137
|
+
* @param {Function} fn - The function to wrap.
|
|
1138
|
+
* @returns {Function} A new function that will call `fn` only once.
|
|
1139
|
+
*/
|
|
1140
|
+
function callBackOnce(fn) {
|
|
1141
|
+
let called = false;
|
|
1142
|
+
|
|
1143
|
+
return function (...args) {
|
|
1144
|
+
if (!called) {
|
|
1145
|
+
called = true;
|
|
1146
|
+
return fn.apply(this, args);
|
|
1147
|
+
}
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1133
1151
|
/**
|
|
1134
1152
|
* Expando cache for adding properties to DOM nodes with JavaScript.
|
|
1135
1153
|
* This used to be an Object in JQLite decorator, but swapped out for a Map
|
|
@@ -3962,31 +3980,28 @@ function SceProvider() {
|
|
|
3962
3980
|
*/
|
|
3963
3981
|
const ngEventDirectives = {};
|
|
3964
3982
|
|
|
3965
|
-
"click copy cut dblclick focus blur keydown keyup
|
|
3983
|
+
"click copy cut dblclick focus blur keydown keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup paste submit touchstart touchend touchmove"
|
|
3966
3984
|
.split(" ")
|
|
3967
|
-
.forEach(
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
];
|
|
3988
|
-
},
|
|
3989
|
-
);
|
|
3985
|
+
.forEach((eventName) => {
|
|
3986
|
+
const directiveName = directiveNormalize(`ng-${eventName}`);
|
|
3987
|
+
ngEventDirectives[directiveName] = [
|
|
3988
|
+
"$parse",
|
|
3989
|
+
"$exceptionHandler",
|
|
3990
|
+
/**
|
|
3991
|
+
* @param {import("../../core/parse/interface.ts").ParseService} $parse
|
|
3992
|
+
* @param {import('../../core/exception-handler.js').ErrorHandler} $exceptionHandler
|
|
3993
|
+
* @returns
|
|
3994
|
+
*/
|
|
3995
|
+
($parse, $exceptionHandler) => {
|
|
3996
|
+
return createEventDirective(
|
|
3997
|
+
$parse,
|
|
3998
|
+
$exceptionHandler,
|
|
3999
|
+
directiveName,
|
|
4000
|
+
eventName,
|
|
4001
|
+
);
|
|
4002
|
+
},
|
|
4003
|
+
];
|
|
4004
|
+
});
|
|
3990
4005
|
|
|
3991
4006
|
/**
|
|
3992
4007
|
*
|
|
@@ -11219,9 +11234,15 @@ function ngBindDirective() {
|
|
|
11219
11234
|
* @param {import('../../core/compile/attributes.js').Attributes} attr
|
|
11220
11235
|
*/
|
|
11221
11236
|
link(scope, element, attr) {
|
|
11222
|
-
scope.$watch(
|
|
11223
|
-
|
|
11224
|
-
|
|
11237
|
+
scope.$watch(
|
|
11238
|
+
attr["ngBind"],
|
|
11239
|
+
(value) => {
|
|
11240
|
+
element.textContent = stringify$1(
|
|
11241
|
+
isProxy(value) ? value.$target : value,
|
|
11242
|
+
);
|
|
11243
|
+
},
|
|
11244
|
+
isDefined(attr["lazy"]),
|
|
11245
|
+
);
|
|
11225
11246
|
},
|
|
11226
11247
|
};
|
|
11227
11248
|
}
|
|
@@ -11948,7 +11969,7 @@ function ngRepeatDirective($animate) {
|
|
|
11948
11969
|
transclude: "element",
|
|
11949
11970
|
priority: 1000,
|
|
11950
11971
|
terminal: true,
|
|
11951
|
-
compile: (
|
|
11972
|
+
compile: ($element, $attr) => {
|
|
11952
11973
|
const expression = $attr["ngRepeat"];
|
|
11953
11974
|
const hasAnimate = !!$attr["animate"];
|
|
11954
11975
|
|
|
@@ -11994,6 +12015,14 @@ function ngRepeatDirective($animate) {
|
|
|
11994
12015
|
);
|
|
11995
12016
|
}
|
|
11996
12017
|
|
|
12018
|
+
const swap = callBackOnce(() => {
|
|
12019
|
+
if (isDefined($attr["lazy"]) && isDefined($attr["swap"])) {
|
|
12020
|
+
document
|
|
12021
|
+
.querySelectorAll($attr["swap"])
|
|
12022
|
+
.forEach((x) => removeElement(x));
|
|
12023
|
+
}
|
|
12024
|
+
});
|
|
12025
|
+
|
|
11997
12026
|
return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {
|
|
11998
12027
|
// Store a list of elements from previous run. This is a hash where key is the item from the
|
|
11999
12028
|
// iterator, and the value is objects with following properties.
|
|
@@ -12005,174 +12034,181 @@ function ngRepeatDirective($animate) {
|
|
|
12005
12034
|
// hasOwnProperty.
|
|
12006
12035
|
let lastBlockMap = Object.create(null);
|
|
12007
12036
|
// watch props
|
|
12008
|
-
$scope.$watch(
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
|
|
12026
|
-
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
collectionKeys = collection;
|
|
12033
|
-
trackByIdFn = trackByIdArrayFn;
|
|
12034
|
-
} else {
|
|
12035
|
-
trackByIdFn = trackByIdObjFn;
|
|
12036
|
-
// if object, extract keys, in enumeration order, unsorted
|
|
12037
|
-
collectionKeys = [];
|
|
12038
|
-
for (const itemKey in collection) {
|
|
12039
|
-
if (hasOwn(collection, itemKey) && itemKey.charAt(0) !== "$") {
|
|
12040
|
-
collectionKeys.push(itemKey);
|
|
12041
|
-
}
|
|
12037
|
+
$scope.$watch(
|
|
12038
|
+
rhs,
|
|
12039
|
+
(collection) => {
|
|
12040
|
+
swap();
|
|
12041
|
+
let index,
|
|
12042
|
+
length,
|
|
12043
|
+
previousNode = $element, // node that cloned nodes should be inserted after
|
|
12044
|
+
// initialized to the comment node anchor
|
|
12045
|
+
nextNode;
|
|
12046
|
+
const // Same as lastBlockMap but it has the current state. It will become the
|
|
12047
|
+
// lastBlockMap on the next iteration.
|
|
12048
|
+
nextBlockMap = Object.create(null);
|
|
12049
|
+
let collectionLength,
|
|
12050
|
+
key,
|
|
12051
|
+
value, // key/value of iteration
|
|
12052
|
+
trackById,
|
|
12053
|
+
trackByIdFn,
|
|
12054
|
+
collectionKeys,
|
|
12055
|
+
block, // last object information {scope, element, id}
|
|
12056
|
+
nextBlockOrder,
|
|
12057
|
+
elementsToRemove;
|
|
12058
|
+
|
|
12059
|
+
if (aliasAs) {
|
|
12060
|
+
$scope[aliasAs] = collection;
|
|
12042
12061
|
}
|
|
12043
|
-
}
|
|
12044
12062
|
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
// locate existing items
|
|
12049
|
-
for (index = 0; index < collectionLength; index++) {
|
|
12050
|
-
key = collection === collectionKeys ? index : collectionKeys[index];
|
|
12051
|
-
value = collection[key];
|
|
12052
|
-
trackById = trackByIdFn($scope, key, value);
|
|
12053
|
-
if (lastBlockMap[trackById]) {
|
|
12054
|
-
// found previously seen block
|
|
12055
|
-
block = lastBlockMap[trackById];
|
|
12056
|
-
delete lastBlockMap[trackById];
|
|
12057
|
-
nextBlockMap[trackById] = block;
|
|
12058
|
-
nextBlockOrder[index] = block;
|
|
12059
|
-
} else if (nextBlockMap[trackById]) {
|
|
12060
|
-
// if collision detected. restore lastBlockMap and throw an error
|
|
12061
|
-
Object.values(nextBlockOrder).forEach((block) => {
|
|
12062
|
-
if (block && block.scope) lastBlockMap[block.id] = block;
|
|
12063
|
-
});
|
|
12064
|
-
throw ngRepeatMinErr(
|
|
12065
|
-
"dupes",
|
|
12066
|
-
"Duplicates keys in a repeater are not allowed. Repeater: {0}, Duplicate key: {1} for value: {2}",
|
|
12067
|
-
expression,
|
|
12068
|
-
trackById,
|
|
12069
|
-
value,
|
|
12070
|
-
);
|
|
12063
|
+
if (isArrayLike(collection)) {
|
|
12064
|
+
collectionKeys = collection;
|
|
12065
|
+
trackByIdFn = trackByIdArrayFn;
|
|
12071
12066
|
} else {
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12067
|
+
trackByIdFn = trackByIdObjFn;
|
|
12068
|
+
// if object, extract keys, in enumeration order, unsorted
|
|
12069
|
+
collectionKeys = [];
|
|
12070
|
+
for (const itemKey in collection) {
|
|
12071
|
+
if (hasOwn(collection, itemKey) && itemKey.charAt(0) !== "$") {
|
|
12072
|
+
collectionKeys.push(itemKey);
|
|
12073
|
+
}
|
|
12074
|
+
}
|
|
12079
12075
|
}
|
|
12080
|
-
}
|
|
12081
12076
|
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
|
|
12089
|
-
|
|
12077
|
+
collectionLength = collectionKeys.length;
|
|
12078
|
+
nextBlockOrder = new Array(collectionLength);
|
|
12079
|
+
|
|
12080
|
+
// locate existing items
|
|
12081
|
+
for (index = 0; index < collectionLength; index++) {
|
|
12082
|
+
key =
|
|
12083
|
+
collection === collectionKeys ? index : collectionKeys[index];
|
|
12084
|
+
value = collection[key];
|
|
12085
|
+
trackById = trackByIdFn($scope, key, value);
|
|
12086
|
+
if (lastBlockMap[trackById]) {
|
|
12087
|
+
// found previously seen block
|
|
12088
|
+
block = lastBlockMap[trackById];
|
|
12089
|
+
delete lastBlockMap[trackById];
|
|
12090
|
+
nextBlockMap[trackById] = block;
|
|
12091
|
+
nextBlockOrder[index] = block;
|
|
12092
|
+
} else if (nextBlockMap[trackById]) {
|
|
12093
|
+
// if collision detected. restore lastBlockMap and throw an error
|
|
12094
|
+
Object.values(nextBlockOrder).forEach((block) => {
|
|
12095
|
+
if (block && block.scope) lastBlockMap[block.id] = block;
|
|
12096
|
+
});
|
|
12097
|
+
throw ngRepeatMinErr(
|
|
12098
|
+
"dupes",
|
|
12099
|
+
"Duplicates keys in a repeater are not allowed. Repeater: {0}, Duplicate key: {1} for value: {2}",
|
|
12100
|
+
expression,
|
|
12101
|
+
trackById,
|
|
12102
|
+
value,
|
|
12103
|
+
);
|
|
12104
|
+
} else {
|
|
12105
|
+
// new never before seen block
|
|
12106
|
+
nextBlockOrder[index] = {
|
|
12107
|
+
id: trackById,
|
|
12108
|
+
scope: undefined,
|
|
12109
|
+
clone: undefined,
|
|
12110
|
+
};
|
|
12111
|
+
nextBlockMap[trackById] = true;
|
|
12112
|
+
}
|
|
12090
12113
|
}
|
|
12091
|
-
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
|
|
12095
|
-
|
|
12096
|
-
|
|
12097
|
-
|
|
12098
|
-
|
|
12099
|
-
elementsToRemove
|
|
12114
|
+
|
|
12115
|
+
// remove leftover items
|
|
12116
|
+
for (let blockKey in lastBlockMap) {
|
|
12117
|
+
block = lastBlockMap[blockKey];
|
|
12118
|
+
elementsToRemove = block.clone;
|
|
12119
|
+
if (hasAnimate) {
|
|
12120
|
+
$animate.leave(elementsToRemove);
|
|
12121
|
+
} else {
|
|
12122
|
+
elementsToRemove.remove();
|
|
12123
|
+
}
|
|
12124
|
+
if (elementsToRemove.parentNode) {
|
|
12125
|
+
// if the element was not removed yet because of pending animation, mark it as deleted
|
|
12126
|
+
// so that we can ignore it later
|
|
12127
|
+
for (
|
|
12128
|
+
index = 0, length = elementsToRemove.length;
|
|
12129
|
+
index < length;
|
|
12130
|
+
index++
|
|
12131
|
+
) {
|
|
12132
|
+
elementsToRemove[index][NG_REMOVED] = true;
|
|
12133
|
+
}
|
|
12100
12134
|
}
|
|
12135
|
+
block.scope.$destroy();
|
|
12101
12136
|
}
|
|
12102
|
-
block.scope.$destroy();
|
|
12103
|
-
}
|
|
12104
12137
|
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
|
|
12138
|
+
for (index = 0; index < collectionLength; index++) {
|
|
12139
|
+
key =
|
|
12140
|
+
collection === collectionKeys ? index : collectionKeys[index];
|
|
12141
|
+
value = collection[key];
|
|
12142
|
+
block = nextBlockOrder[index];
|
|
12109
12143
|
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12144
|
+
if (block.scope) {
|
|
12145
|
+
// if we have already seen this object, then we need to reuse the
|
|
12146
|
+
// associated scope/element
|
|
12113
12147
|
|
|
12114
|
-
|
|
12148
|
+
nextNode = previousNode;
|
|
12115
12149
|
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12150
|
+
// skip nodes that are already pending removal via leave animation
|
|
12151
|
+
do {
|
|
12152
|
+
nextNode = nextNode.nextSibling;
|
|
12153
|
+
} while (nextNode && nextNode[NG_REMOVED]);
|
|
12120
12154
|
|
|
12121
|
-
|
|
12122
|
-
|
|
12123
|
-
|
|
12124
|
-
|
|
12125
|
-
|
|
12126
|
-
|
|
12127
|
-
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
|
|
12138
|
-
|
|
12139
|
-
|
|
12140
|
-
|
|
12141
|
-
|
|
12142
|
-
|
|
12143
|
-
|
|
12144
|
-
(clone, scope) => {
|
|
12145
|
-
block.scope = scope;
|
|
12146
|
-
const endNode = clone;
|
|
12147
|
-
if (hasAnimate) {
|
|
12148
|
-
$animate.enter(clone, null, previousNode);
|
|
12149
|
-
} else {
|
|
12150
|
-
// @ts-ignore
|
|
12151
|
-
previousNode.after(clone);
|
|
12152
|
-
}
|
|
12155
|
+
if (getBlockStart(block) !== nextNode) {
|
|
12156
|
+
// existing item which got moved
|
|
12157
|
+
$animate.move(getBlockNodes(block.clone), null, previousNode);
|
|
12158
|
+
}
|
|
12159
|
+
previousNode = getBlockEnd(block);
|
|
12160
|
+
updateScope(
|
|
12161
|
+
block.scope,
|
|
12162
|
+
index,
|
|
12163
|
+
valueIdentifier,
|
|
12164
|
+
value,
|
|
12165
|
+
keyIdentifier,
|
|
12166
|
+
key,
|
|
12167
|
+
collectionLength,
|
|
12168
|
+
);
|
|
12169
|
+
} else {
|
|
12170
|
+
// new item which we don't know about
|
|
12171
|
+
$transclude(
|
|
12172
|
+
/**
|
|
12173
|
+
* Clone attach function
|
|
12174
|
+
* @param {Array<NodeList>} clone
|
|
12175
|
+
* @param {import("../../core/scope/scope.js").Scope} scope
|
|
12176
|
+
*/
|
|
12153
12177
|
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
|
|
12178
|
+
(clone, scope) => {
|
|
12179
|
+
block.scope = scope;
|
|
12180
|
+
const endNode = clone;
|
|
12181
|
+
if (hasAnimate) {
|
|
12182
|
+
$animate.enter(clone, null, previousNode);
|
|
12183
|
+
} else {
|
|
12184
|
+
// @ts-ignore
|
|
12185
|
+
previousNode.after(clone);
|
|
12186
|
+
}
|
|
12187
|
+
|
|
12188
|
+
// @ts-ignore
|
|
12189
|
+
previousNode = endNode;
|
|
12190
|
+
// Note: We only need the first/last node of the cloned nodes.
|
|
12191
|
+
// However, we need to keep the reference to the dom wrapper as it might be changed later
|
|
12192
|
+
// by a directive with templateUrl when its template arrives.
|
|
12193
|
+
block.clone = clone;
|
|
12194
|
+
nextBlockMap[block.id] = block;
|
|
12195
|
+
updateScope(
|
|
12196
|
+
block.scope,
|
|
12197
|
+
index,
|
|
12198
|
+
valueIdentifier,
|
|
12199
|
+
value,
|
|
12200
|
+
keyIdentifier,
|
|
12201
|
+
key,
|
|
12202
|
+
collectionLength,
|
|
12203
|
+
);
|
|
12204
|
+
},
|
|
12205
|
+
);
|
|
12206
|
+
}
|
|
12172
12207
|
}
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
|
|
12208
|
+
lastBlockMap = nextBlockMap;
|
|
12209
|
+
},
|
|
12210
|
+
isDefined($attr["lazy"]),
|
|
12211
|
+
);
|
|
12176
12212
|
};
|
|
12177
12213
|
},
|
|
12178
12214
|
};
|
|
@@ -13556,7 +13592,7 @@ class AnchorScrollProvider {
|
|
|
13556
13592
|
// skip the initial scroll if $location.hash is empty
|
|
13557
13593
|
if (newVal === oldVal && newVal === "") return;
|
|
13558
13594
|
|
|
13559
|
-
const action = () =>
|
|
13595
|
+
const action = () => Promise.resolve().then(scroll);
|
|
13560
13596
|
if (document.readyState === "complete") {
|
|
13561
13597
|
// Force the action to be run async for consistent behavior
|
|
13562
13598
|
// from the action's point of view
|
|
@@ -19998,7 +20034,7 @@ class LocationProvider {
|
|
|
19998
20034
|
return;
|
|
19999
20035
|
}
|
|
20000
20036
|
|
|
20001
|
-
|
|
20037
|
+
Promise.resolve().then(() => {
|
|
20002
20038
|
const oldUrl = $location.absUrl();
|
|
20003
20039
|
const oldState = $location.$$state;
|
|
20004
20040
|
let defaultPrevented;
|
|
@@ -20726,7 +20762,6 @@ class Scope {
|
|
|
20726
20762
|
$destroy: this.$destroy.bind(this),
|
|
20727
20763
|
$eval: this.$eval.bind(this),
|
|
20728
20764
|
$apply: this.$apply.bind(this),
|
|
20729
|
-
$evalAsync: this.$evalAsync.bind(this),
|
|
20730
20765
|
$postUpdate: this.$postUpdate.bind(this),
|
|
20731
20766
|
$isRoot: this.#isRoot.bind(this),
|
|
20732
20767
|
$target: target,
|
|
@@ -21232,10 +21267,6 @@ class Scope {
|
|
|
21232
21267
|
return res;
|
|
21233
21268
|
}
|
|
21234
21269
|
|
|
21235
|
-
async $evalAsync(expr, locals) {
|
|
21236
|
-
return await this.$eval(expr, locals);
|
|
21237
|
-
}
|
|
21238
|
-
|
|
21239
21270
|
/**
|
|
21240
21271
|
* @param {Object} newTarget
|
|
21241
21272
|
*/
|
|
@@ -21978,7 +22009,7 @@ class NgMessageCtrl {
|
|
|
21978
22009
|
reRender() {
|
|
21979
22010
|
if (!this.renderLater) {
|
|
21980
22011
|
this.renderLater = true;
|
|
21981
|
-
|
|
22012
|
+
Promise.resolve().then(() => {
|
|
21982
22013
|
if (this.renderLater && this.cachedCollection) {
|
|
21983
22014
|
this.render(this.cachedCollection);
|
|
21984
22015
|
}
|
|
@@ -35093,12 +35124,10 @@ function $StateRefActiveDirective(
|
|
|
35093
35124
|
const removeClasses = allClasses.filter(
|
|
35094
35125
|
(cls) => !addClasses.includes(cls),
|
|
35095
35126
|
);
|
|
35096
|
-
|
|
35097
|
-
|
|
35098
|
-
|
|
35099
|
-
|
|
35100
|
-
);
|
|
35101
|
-
});
|
|
35127
|
+
addClasses.forEach((className) => $element.classList.add(className));
|
|
35128
|
+
removeClasses.forEach((className) =>
|
|
35129
|
+
$element.classList.remove(className),
|
|
35130
|
+
);
|
|
35102
35131
|
}
|
|
35103
35132
|
update();
|
|
35104
35133
|
},
|
|
@@ -35606,7 +35635,7 @@ ngSetterDirective.$inject = ["$parse", "$log"];
|
|
|
35606
35635
|
/**
|
|
35607
35636
|
* @param {import('../../core/parse/interface.ts').ParseService} $parse
|
|
35608
35637
|
* @param {import('../../services/log/interface.ts').LogService} $log
|
|
35609
|
-
* @returns {import('
|
|
35638
|
+
* @returns {import('interface.ts').Directive}
|
|
35610
35639
|
*/
|
|
35611
35640
|
function ngSetterDirective($parse, $log) {
|
|
35612
35641
|
return {
|
|
@@ -36091,7 +36120,7 @@ class Angular {
|
|
|
36091
36120
|
/**
|
|
36092
36121
|
* @type {string} `version` from `package.json`
|
|
36093
36122
|
*/
|
|
36094
|
-
this.version = "0.7.
|
|
36123
|
+
this.version = "0.7.7"; //inserted via rollup plugin
|
|
36095
36124
|
|
|
36096
36125
|
/** @type {!Array<string|any>} */
|
|
36097
36126
|
this.bootsrappedModules = [];
|