@angular-wave/angular.ts 0.0.2 → 0.0.4
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/dist/angular-ts.cjs.js +3 -10
- package/dist/angular-ts.esm.js +3 -10
- package/dist/angular-ts.umd.js +3 -10
- package/package.json +1 -1
- package/public/README.md +1 -0
- package/src/core/cache.js +2 -0
- package/src/core/compile.js +2 -1
- package/src/directive/csp.md +2 -0
- package/src/jqLite.js +1 -10
- package/test/jqlite.spec.js +5 -4
- package/test/ng/compile.spec.js +4 -3
- package/test/original-test.html +1 -1
- package/dist/build/angular-mocks.js +0 -3757
- package/dist/build/angular-parse-ext.js +0 -1275
- package/dist/build/angular-resource.js +0 -911
- package/dist/build/angular-touch.js +0 -368
- /package/{dist/build → legacy}/angular-animate.js +0 -0
- /package/{dist/build → legacy}/angular-aria.js +0 -0
- /package/{dist/build → legacy}/angular-message-format.js +0 -0
- /package/{dist/build → legacy}/angular-messages.js +0 -0
- /package/{dist/build → legacy}/angular-route.js +0 -0
- /package/{dist/build → legacy}/angular-sanitize.js +0 -0
- /package/{dist/build → legacy}/angular.js +0 -0
package/dist/angular-ts.cjs.js
CHANGED
|
@@ -1351,6 +1351,8 @@ function directiveNormalize(name) {
|
|
|
1351
1351
|
*
|
|
1352
1352
|
*/
|
|
1353
1353
|
|
|
1354
|
+
const EXPANDO = "ngId";
|
|
1355
|
+
|
|
1354
1356
|
/**
|
|
1355
1357
|
* Expando cache for adding properties to DOM nodes with JavaScript.
|
|
1356
1358
|
* This used to be an Object in JQLite decorator, but swapped out for a Map
|
|
@@ -1467,7 +1469,6 @@ const CACHE = new Proxy(new Map(), {
|
|
|
1467
1469
|
|
|
1468
1470
|
JQLite.cache = CACHE;
|
|
1469
1471
|
|
|
1470
|
-
const EXPANDO = "ngId";
|
|
1471
1472
|
let jqId = 1;
|
|
1472
1473
|
|
|
1473
1474
|
/**
|
|
@@ -1562,13 +1563,6 @@ function elementAcceptsData(node) {
|
|
|
1562
1563
|
}
|
|
1563
1564
|
}
|
|
1564
1565
|
|
|
1565
|
-
function jqLiteHasData(node) {
|
|
1566
|
-
for (const key in JQLite.cache.get(node[EXPANDO])) {
|
|
1567
|
-
return true;
|
|
1568
|
-
}
|
|
1569
|
-
return false;
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
1566
|
function jqLiteBuildFragment(html, context) {
|
|
1573
1567
|
let tmp;
|
|
1574
1568
|
let tag;
|
|
@@ -1964,7 +1958,6 @@ forEach(
|
|
|
1964
1958
|
{
|
|
1965
1959
|
data: jqLiteData,
|
|
1966
1960
|
removeData: jqLiteRemoveData,
|
|
1967
|
-
hasData: jqLiteHasData,
|
|
1968
1961
|
cleanData: jqLiteCleanData,
|
|
1969
1962
|
},
|
|
1970
1963
|
(fn, name) => {
|
|
@@ -9641,7 +9634,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
|
9641
9634
|
fragment.appendChild(elementsToRemove[i]);
|
|
9642
9635
|
}
|
|
9643
9636
|
|
|
9644
|
-
if (
|
|
9637
|
+
if (CACHE.has(firstElementToRemove[EXPANDO])) {
|
|
9645
9638
|
// Copy over user data (that includes AngularJS's $scope etc.). Don't copy private
|
|
9646
9639
|
// data here because there's no public interface in jQuery to do that and copying over
|
|
9647
9640
|
// event listeners (which is the main use of private data) wouldn't work anyway.
|
package/dist/angular-ts.esm.js
CHANGED
|
@@ -1349,6 +1349,8 @@ function directiveNormalize(name) {
|
|
|
1349
1349
|
*
|
|
1350
1350
|
*/
|
|
1351
1351
|
|
|
1352
|
+
const EXPANDO = "ngId";
|
|
1353
|
+
|
|
1352
1354
|
/**
|
|
1353
1355
|
* Expando cache for adding properties to DOM nodes with JavaScript.
|
|
1354
1356
|
* This used to be an Object in JQLite decorator, but swapped out for a Map
|
|
@@ -1465,7 +1467,6 @@ const CACHE = new Proxy(new Map(), {
|
|
|
1465
1467
|
|
|
1466
1468
|
JQLite.cache = CACHE;
|
|
1467
1469
|
|
|
1468
|
-
const EXPANDO = "ngId";
|
|
1469
1470
|
let jqId = 1;
|
|
1470
1471
|
|
|
1471
1472
|
/**
|
|
@@ -1560,13 +1561,6 @@ function elementAcceptsData(node) {
|
|
|
1560
1561
|
}
|
|
1561
1562
|
}
|
|
1562
1563
|
|
|
1563
|
-
function jqLiteHasData(node) {
|
|
1564
|
-
for (const key in JQLite.cache.get(node[EXPANDO])) {
|
|
1565
|
-
return true;
|
|
1566
|
-
}
|
|
1567
|
-
return false;
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
1564
|
function jqLiteBuildFragment(html, context) {
|
|
1571
1565
|
let tmp;
|
|
1572
1566
|
let tag;
|
|
@@ -1962,7 +1956,6 @@ forEach(
|
|
|
1962
1956
|
{
|
|
1963
1957
|
data: jqLiteData,
|
|
1964
1958
|
removeData: jqLiteRemoveData,
|
|
1965
|
-
hasData: jqLiteHasData,
|
|
1966
1959
|
cleanData: jqLiteCleanData,
|
|
1967
1960
|
},
|
|
1968
1961
|
(fn, name) => {
|
|
@@ -9639,7 +9632,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
|
9639
9632
|
fragment.appendChild(elementsToRemove[i]);
|
|
9640
9633
|
}
|
|
9641
9634
|
|
|
9642
|
-
if (
|
|
9635
|
+
if (CACHE.has(firstElementToRemove[EXPANDO])) {
|
|
9643
9636
|
// Copy over user data (that includes AngularJS's $scope etc.). Don't copy private
|
|
9644
9637
|
// data here because there's no public interface in jQuery to do that and copying over
|
|
9645
9638
|
// event listeners (which is the main use of private data) wouldn't work anyway.
|
package/dist/angular-ts.umd.js
CHANGED
|
@@ -1354,6 +1354,8 @@
|
|
|
1354
1354
|
*
|
|
1355
1355
|
*/
|
|
1356
1356
|
|
|
1357
|
+
const EXPANDO = "ngId";
|
|
1358
|
+
|
|
1357
1359
|
/**
|
|
1358
1360
|
* Expando cache for adding properties to DOM nodes with JavaScript.
|
|
1359
1361
|
* This used to be an Object in JQLite decorator, but swapped out for a Map
|
|
@@ -1470,7 +1472,6 @@
|
|
|
1470
1472
|
|
|
1471
1473
|
JQLite.cache = CACHE;
|
|
1472
1474
|
|
|
1473
|
-
const EXPANDO = "ngId";
|
|
1474
1475
|
let jqId = 1;
|
|
1475
1476
|
|
|
1476
1477
|
/**
|
|
@@ -1565,13 +1566,6 @@
|
|
|
1565
1566
|
}
|
|
1566
1567
|
}
|
|
1567
1568
|
|
|
1568
|
-
function jqLiteHasData(node) {
|
|
1569
|
-
for (const key in JQLite.cache.get(node[EXPANDO])) {
|
|
1570
|
-
return true;
|
|
1571
|
-
}
|
|
1572
|
-
return false;
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
1569
|
function jqLiteBuildFragment(html, context) {
|
|
1576
1570
|
let tmp;
|
|
1577
1571
|
let tag;
|
|
@@ -1967,7 +1961,6 @@
|
|
|
1967
1961
|
{
|
|
1968
1962
|
data: jqLiteData,
|
|
1969
1963
|
removeData: jqLiteRemoveData,
|
|
1970
|
-
hasData: jqLiteHasData,
|
|
1971
1964
|
cleanData: jqLiteCleanData,
|
|
1972
1965
|
},
|
|
1973
1966
|
(fn, name) => {
|
|
@@ -9644,7 +9637,7 @@
|
|
|
9644
9637
|
fragment.appendChild(elementsToRemove[i]);
|
|
9645
9638
|
}
|
|
9646
9639
|
|
|
9647
|
-
if (
|
|
9640
|
+
if (CACHE.has(firstElementToRemove[EXPANDO])) {
|
|
9648
9641
|
// Copy over user data (that includes AngularJS's $scope etc.). Don't copy private
|
|
9649
9642
|
// data here because there's no public interface in jQuery to do that and copying over
|
|
9650
9643
|
// event listeners (which is the main use of private data) wouldn't work anyway.
|
package/package.json
CHANGED
package/public/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
These templates are used by express for various tests.
|
package/src/core/cache.js
CHANGED
package/src/core/compile.js
CHANGED
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
import { SCE_CONTEXTS } from "./sce";
|
|
36
36
|
import { PREFIX_REGEXP, ALIASED_ATTR } from "../constants";
|
|
37
37
|
import { createEventDirective } from "../directive/events";
|
|
38
|
+
import { CACHE, EXPANDO } from "./cache";
|
|
38
39
|
|
|
39
40
|
const $compileMinErr = minErr("$compile");
|
|
40
41
|
|
|
@@ -3277,7 +3278,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
|
3277
3278
|
fragment.appendChild(elementsToRemove[i]);
|
|
3278
3279
|
}
|
|
3279
3280
|
|
|
3280
|
-
if (
|
|
3281
|
+
if (CACHE.has(firstElementToRemove[EXPANDO])) {
|
|
3281
3282
|
// Copy over user data (that includes AngularJS's $scope etc.). Don't copy private
|
|
3282
3283
|
// data here because there's no public interface in jQuery to do that and copying over
|
|
3283
3284
|
// event listeners (which is the main use of private data) wouldn't work anyway.
|
package/src/directive/csp.md
CHANGED
|
@@ -39,12 +39,14 @@
|
|
|
39
39
|
- ```
|
|
40
40
|
|
|
41
41
|
```
|
|
42
|
+
|
|
42
43
|
- Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of
|
|
43
44
|
- script in the following Content Security Policy directive: "default-src 'self'". Note that
|
|
44
45
|
- 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
|
|
45
46
|
- ```
|
|
46
47
|
|
|
47
48
|
```
|
|
49
|
+
|
|
48
50
|
-
|
|
49
51
|
- This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`
|
|
50
52
|
- directive on an element of the HTML document that appears before the `<script>` tag that loads
|
package/src/jqLite.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
shallowCopy,
|
|
16
16
|
trim,
|
|
17
17
|
} from "./core/utils";
|
|
18
|
-
import { CACHE } from "./core/cache";
|
|
18
|
+
import { CACHE, EXPANDO } from "./core/cache";
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* @ngdoc function
|
|
@@ -96,7 +96,6 @@ import { CACHE } from "./core/cache";
|
|
|
96
96
|
|
|
97
97
|
JQLite.cache = CACHE;
|
|
98
98
|
|
|
99
|
-
const EXPANDO = "ngId";
|
|
100
99
|
let jqId = 1;
|
|
101
100
|
|
|
102
101
|
/**
|
|
@@ -191,13 +190,6 @@ function elementAcceptsData(node) {
|
|
|
191
190
|
}
|
|
192
191
|
}
|
|
193
192
|
|
|
194
|
-
function jqLiteHasData(node) {
|
|
195
|
-
for (const key in JQLite.cache.get(node[EXPANDO])) {
|
|
196
|
-
return true;
|
|
197
|
-
}
|
|
198
|
-
return false;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
193
|
export function jqLiteBuildFragment(html, context) {
|
|
202
194
|
let tmp;
|
|
203
195
|
let tag;
|
|
@@ -593,7 +585,6 @@ forEach(
|
|
|
593
585
|
{
|
|
594
586
|
data: jqLiteData,
|
|
595
587
|
removeData: jqLiteRemoveData,
|
|
596
|
-
hasData: jqLiteHasData,
|
|
597
588
|
cleanData: jqLiteCleanData,
|
|
598
589
|
},
|
|
599
590
|
(fn, name) => {
|
package/test/jqlite.spec.js
CHANGED
|
@@ -4,6 +4,7 @@ import { createInjector } from "../src/injector";
|
|
|
4
4
|
import { publishExternalAPI } from "../src/public";
|
|
5
5
|
import { equals, forEach } from "../src/core/utils";
|
|
6
6
|
import { browserTrigger } from "./test-utils";
|
|
7
|
+
import { CACHE, EXPANDO } from "../src/core/cache";
|
|
7
8
|
|
|
8
9
|
describe("jqLite", () => {
|
|
9
10
|
let scope;
|
|
@@ -572,13 +573,13 @@ describe("jqLite", () => {
|
|
|
572
573
|
const node = document.createElement("div");
|
|
573
574
|
document.body.appendChild(node);
|
|
574
575
|
|
|
575
|
-
expect(
|
|
576
|
+
expect(CACHE.has(node[EXPANDO])).toBe(false);
|
|
576
577
|
expect(jqLite.data(node, "foo")).toBeUndefined();
|
|
577
|
-
expect(
|
|
578
|
+
expect(CACHE.has(node[EXPANDO])).toBe(false);
|
|
578
579
|
|
|
579
580
|
jqLite.data(node, "foo", "bar");
|
|
580
581
|
|
|
581
|
-
expect(
|
|
582
|
+
expect(CACHE.has(node[EXPANDO])).toBe(true);
|
|
582
583
|
expect(jqLite.data(node, "foo")).toBe("bar");
|
|
583
584
|
expect(jqLite(node).data("foo")).toBe("bar");
|
|
584
585
|
|
|
@@ -593,7 +594,7 @@ describe("jqLite", () => {
|
|
|
593
594
|
expect(jqLite.data(node, "bar")).toBeUndefined();
|
|
594
595
|
|
|
595
596
|
jqLite(node).remove();
|
|
596
|
-
expect(
|
|
597
|
+
expect(CACHE.has(node[EXPANDO])).toBe(false);
|
|
597
598
|
});
|
|
598
599
|
|
|
599
600
|
it("should emit $destroy event if element removed via remove()", function () {
|
package/test/ng/compile.spec.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { publishExternalAPI } from "../../src/public";
|
|
2
2
|
import { createInjector } from "../../src/injector";
|
|
3
|
-
import { dealoc,
|
|
3
|
+
import { dealoc, JQLite } from "../../src/jqLite";
|
|
4
4
|
import {
|
|
5
5
|
forEach,
|
|
6
6
|
isFunction,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
isArray,
|
|
12
12
|
} from "../../src/core/utils";
|
|
13
13
|
import { countChildScopes, countWatchers } from "../../src/core/root-scope";
|
|
14
|
+
import { CACHE, EXPANDO } from "../../src/core/cache";
|
|
14
15
|
|
|
15
16
|
function isUnknownElement(el) {
|
|
16
17
|
return !!el.toString().match(/Unknown/);
|
|
@@ -17624,10 +17625,10 @@ describe("$compile", () => {
|
|
|
17624
17625
|
linkedElements.remove();
|
|
17625
17626
|
|
|
17626
17627
|
forEach(preCompiledChildren, (element, i) => {
|
|
17627
|
-
expect(
|
|
17628
|
+
expect(CACHE.has(element[EXPANDO])).toBe(false, `template#${i}`);
|
|
17628
17629
|
});
|
|
17629
17630
|
forEach(getAll(linkedElements), (element, i) => {
|
|
17630
|
-
expect(
|
|
17631
|
+
expect(CACHE.has(element[EXPANDO])).toBe(false, `linked#${i}`);
|
|
17631
17632
|
});
|
|
17632
17633
|
}
|
|
17633
17634
|
|