@angular-wave/angular.ts 0.0.1
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/.eslintignore +1 -0
- package/.eslintrc.cjs +29 -0
- package/.github/workflows/playwright.yml +27 -0
- package/CHANGELOG.md +17974 -0
- package/CODE_OF_CONDUCT.md +3 -0
- package/CONTRIBUTING.md +246 -0
- package/DEVELOPERS.md +488 -0
- package/LICENSE +22 -0
- package/Makefile +31 -0
- package/README.md +115 -0
- package/RELEASE.md +98 -0
- package/SECURITY.md +16 -0
- package/TRIAGING.md +135 -0
- package/css/angular.css +22 -0
- package/dist/angular-ts.cjs.js +36843 -0
- package/dist/angular-ts.esm.js +36841 -0
- package/dist/angular-ts.umd.js +36848 -0
- package/dist/build/angular-animate.js +4272 -0
- package/dist/build/angular-aria.js +426 -0
- package/dist/build/angular-message-format.js +1072 -0
- package/dist/build/angular-messages.js +829 -0
- package/dist/build/angular-mocks.js +3757 -0
- package/dist/build/angular-parse-ext.js +1275 -0
- package/dist/build/angular-resource.js +911 -0
- package/dist/build/angular-route.js +1266 -0
- package/dist/build/angular-sanitize.js +891 -0
- package/dist/build/angular-touch.js +368 -0
- package/dist/build/angular.js +36600 -0
- package/e2e/unit.spec.ts +15 -0
- package/images/android-chrome-192x192.png +0 -0
- package/images/android-chrome-512x512.png +0 -0
- package/images/apple-touch-icon.png +0 -0
- package/images/favicon-16x16.png +0 -0
- package/images/favicon-32x32.png +0 -0
- package/images/favicon.ico +0 -0
- package/images/site.webmanifest +1 -0
- package/index.html +104 -0
- package/package.json +47 -0
- package/playwright.config.ts +78 -0
- package/public/circle.html +1 -0
- package/public/my_child_directive.html +1 -0
- package/public/my_directive.html +1 -0
- package/public/my_other_directive.html +1 -0
- package/public/test.html +1 -0
- package/rollup.config.js +31 -0
- package/src/animations/animateCache.js +55 -0
- package/src/animations/animateChildrenDirective.js +105 -0
- package/src/animations/animateCss.js +1139 -0
- package/src/animations/animateCssDriver.js +291 -0
- package/src/animations/animateJs.js +367 -0
- package/src/animations/animateJsDriver.js +67 -0
- package/src/animations/animateQueue.js +851 -0
- package/src/animations/animation.js +506 -0
- package/src/animations/module.js +779 -0
- package/src/animations/ngAnimateSwap.js +119 -0
- package/src/animations/rafScheduler.js +50 -0
- package/src/animations/shared.js +378 -0
- package/src/constants.js +20 -0
- package/src/core/animate.js +845 -0
- package/src/core/animateCss.js +73 -0
- package/src/core/animateRunner.js +195 -0
- package/src/core/attributes.js +199 -0
- package/src/core/cache.js +45 -0
- package/src/core/compile.js +4727 -0
- package/src/core/controller.js +225 -0
- package/src/core/exceptionHandler.js +63 -0
- package/src/core/filter.js +146 -0
- package/src/core/interpolate.js +442 -0
- package/src/core/interval.js +188 -0
- package/src/core/intervalFactory.js +57 -0
- package/src/core/location.js +1086 -0
- package/src/core/parser/parse.js +2562 -0
- package/src/core/parser/parse.md +13 -0
- package/src/core/q.js +746 -0
- package/src/core/rootScope.js +1596 -0
- package/src/core/sanitizeUri.js +85 -0
- package/src/core/sce.js +1161 -0
- package/src/core/taskTrackerFactory.js +125 -0
- package/src/core/timeout.js +121 -0
- package/src/core/urlUtils.js +187 -0
- package/src/core/utils.js +1349 -0
- package/src/directive/a.js +37 -0
- package/src/directive/attrs.js +283 -0
- package/src/directive/bind.js +51 -0
- package/src/directive/bind.md +142 -0
- package/src/directive/change.js +12 -0
- package/src/directive/change.md +25 -0
- package/src/directive/cloak.js +12 -0
- package/src/directive/cloak.md +24 -0
- package/src/directive/events.js +75 -0
- package/src/directive/events.md +166 -0
- package/src/directive/form.js +725 -0
- package/src/directive/init.js +15 -0
- package/src/directive/init.md +41 -0
- package/src/directive/input.js +1783 -0
- package/src/directive/list.js +46 -0
- package/src/directive/list.md +22 -0
- package/src/directive/ngClass.js +249 -0
- package/src/directive/ngController.js +64 -0
- package/src/directive/ngCsp.js +82 -0
- package/src/directive/ngIf.js +134 -0
- package/src/directive/ngInclude.js +217 -0
- package/src/directive/ngModel.js +1356 -0
- package/src/directive/ngModelOptions.js +509 -0
- package/src/directive/ngOptions.js +670 -0
- package/src/directive/ngRef.js +90 -0
- package/src/directive/ngRepeat.js +650 -0
- package/src/directive/ngShowHide.js +255 -0
- package/src/directive/ngSwitch.js +178 -0
- package/src/directive/ngTransclude.js +98 -0
- package/src/directive/non-bindable.js +11 -0
- package/src/directive/non-bindable.md +17 -0
- package/src/directive/script.js +30 -0
- package/src/directive/select.js +624 -0
- package/src/directive/style.js +25 -0
- package/src/directive/style.md +23 -0
- package/src/directive/validators.js +329 -0
- package/src/exts/aria.js +544 -0
- package/src/exts/messages.js +852 -0
- package/src/filters/filter.js +207 -0
- package/src/filters/filter.md +69 -0
- package/src/filters/filters.js +239 -0
- package/src/filters/json.md +16 -0
- package/src/filters/limit-to.js +43 -0
- package/src/filters/limit-to.md +19 -0
- package/src/filters/order-by.js +183 -0
- package/src/filters/order-by.md +83 -0
- package/src/index.js +13 -0
- package/src/injector.js +1034 -0
- package/src/jqLite.js +1117 -0
- package/src/loader.js +1320 -0
- package/src/public.js +215 -0
- package/src/routeToRegExp.js +41 -0
- package/src/services/anchorScroll.js +135 -0
- package/src/services/browser.js +321 -0
- package/src/services/cacheFactory.js +398 -0
- package/src/services/cookieReader.js +72 -0
- package/src/services/document.js +64 -0
- package/src/services/http.js +1537 -0
- package/src/services/httpBackend.js +206 -0
- package/src/services/log.js +160 -0
- package/src/services/templateRequest.js +139 -0
- package/test/angular.spec.js +2153 -0
- package/test/aria/aria.spec.js +1245 -0
- package/test/binding.spec.js +504 -0
- package/test/build-test.html +14 -0
- package/test/injector.spec.js +2327 -0
- package/test/jasmine/jasmine-5.1.2/boot0.js +65 -0
- package/test/jasmine/jasmine-5.1.2/boot1.js +133 -0
- package/test/jasmine/jasmine-5.1.2/jasmine-html.js +963 -0
- package/test/jasmine/jasmine-5.1.2/jasmine.css +320 -0
- package/test/jasmine/jasmine-5.1.2/jasmine.js +10824 -0
- package/test/jasmine/jasmine-5.1.2/jasmine_favicon.png +0 -0
- package/test/jasmine/jasmine-browser.json +17 -0
- package/test/jasmine/jasmine.json +9 -0
- package/test/jqlite.spec.js +2133 -0
- package/test/loader.spec.js +219 -0
- package/test/messages/messages.spec.js +1146 -0
- package/test/min-err.spec.js +174 -0
- package/test/mock-test.html +13 -0
- package/test/module-test.html +15 -0
- package/test/ng/anomate.spec.js +606 -0
- package/test/ng/cache-factor.spec.js +334 -0
- package/test/ng/compile.spec.js +17956 -0
- package/test/ng/controller-provider.spec.js +227 -0
- package/test/ng/cookie-reader.spec.js +98 -0
- package/test/ng/directive/a.spec.js +192 -0
- package/test/ng/directive/bind.spec.js +334 -0
- package/test/ng/directive/boolean.spec.js +136 -0
- package/test/ng/directive/change.spec.js +71 -0
- package/test/ng/directive/class.spec.js +858 -0
- package/test/ng/directive/click.spec.js +38 -0
- package/test/ng/directive/cloak.spec.js +44 -0
- package/test/ng/directive/constoller.spec.js +194 -0
- package/test/ng/directive/element-style.spec.js +92 -0
- package/test/ng/directive/event.spec.js +282 -0
- package/test/ng/directive/form.spec.js +1518 -0
- package/test/ng/directive/href.spec.js +143 -0
- package/test/ng/directive/if.spec.js +402 -0
- package/test/ng/directive/include.spec.js +828 -0
- package/test/ng/directive/init.spec.js +68 -0
- package/test/ng/directive/input.spec.js +3810 -0
- package/test/ng/directive/list.spec.js +170 -0
- package/test/ng/directive/model-options.spec.js +1008 -0
- package/test/ng/directive/model.spec.js +1905 -0
- package/test/ng/directive/non-bindable.spec.js +55 -0
- package/test/ng/directive/options.spec.js +3583 -0
- package/test/ng/directive/ref.spec.js +575 -0
- package/test/ng/directive/repeat.spec.js +1675 -0
- package/test/ng/directive/script.spec.js +52 -0
- package/test/ng/directive/scrset.spec.js +67 -0
- package/test/ng/directive/select.spec.js +2541 -0
- package/test/ng/directive/show-hide.spec.js +253 -0
- package/test/ng/directive/src.spec.js +157 -0
- package/test/ng/directive/style.spec.js +178 -0
- package/test/ng/directive/switch.spec.js +647 -0
- package/test/ng/directive/validators.spec.js +717 -0
- package/test/ng/document.spec.js +52 -0
- package/test/ng/filter/filter.spec.js +714 -0
- package/test/ng/filter/filters.spec.js +35 -0
- package/test/ng/filter/limit-to.spec.js +251 -0
- package/test/ng/filter/order-by.spec.js +891 -0
- package/test/ng/filter.spec.js +149 -0
- package/test/ng/http-backend.spec.js +398 -0
- package/test/ng/http.spec.js +4071 -0
- package/test/ng/interpolate.spec.js +642 -0
- package/test/ng/interval.spec.js +343 -0
- package/test/ng/location.spec.js +3488 -0
- package/test/ng/on.spec.js +229 -0
- package/test/ng/parse.spec.js +4655 -0
- package/test/ng/prop.spec.js +805 -0
- package/test/ng/q.spec.js +2904 -0
- package/test/ng/root-element.spec.js +16 -0
- package/test/ng/sanitize-uri.spec.js +249 -0
- package/test/ng/sce.spec.js +660 -0
- package/test/ng/scope.spec.js +3442 -0
- package/test/ng/template-request.spec.js +236 -0
- package/test/ng/timeout.spec.js +351 -0
- package/test/ng/url-utils.spec.js +156 -0
- package/test/ng/utils.spec.js +144 -0
- package/test/original-test.html +21 -0
- package/test/public.spec.js +34 -0
- package/test/sanitize/bing-html.spec.js +36 -0
- package/test/server/express.js +158 -0
- package/test/test-utils.js +11 -0
- package/tsconfig.json +17 -0
- package/types/angular.d.ts +138 -0
- package/types/global.d.ts +9 -0
- package/types/index.d.ts +2357 -0
- package/types/jqlite.d.ts +558 -0
- package/vite.config.js +14 -0
package/e2e/unit.spec.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
test('unit tests contain no errors', async ({ page }) => {
|
|
4
|
+
await page.goto('/?random=false');
|
|
5
|
+
|
|
6
|
+
await page.content();
|
|
7
|
+
// on average 15-17 seconds
|
|
8
|
+
await page.waitForTimeout(20000);
|
|
9
|
+
//await page.screenshot({ path: 'errors-view.png' , fullPage: true });
|
|
10
|
+
// Expect a jasmine bar to contain 0 failures
|
|
11
|
+
console.log(await page.content());
|
|
12
|
+
await expect(page.locator('.jasmine-overall-result')).toHaveText(/0 failures/);
|
|
13
|
+
|
|
14
|
+
});
|
|
15
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
package/index.html
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>AngularTS Test Runner</title>
|
|
6
|
+
|
|
7
|
+
<link rel="shortcut icon" type="image/png" href="images/favicon.ico">
|
|
8
|
+
<link rel="stylesheet" href="test/jasmine/jasmine-5.1.2/jasmine.css">
|
|
9
|
+
<script src="test/jasmine/jasmine-5.1.2/jasmine.js"></script>
|
|
10
|
+
<script src="test/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
|
|
11
|
+
<script src="test/jasmine/jasmine-5.1.2/boot0.js"></script>
|
|
12
|
+
<script src="test/jasmine/jasmine-5.1.2/boot1.js"></script>
|
|
13
|
+
<script>
|
|
14
|
+
window.angular = {}
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<!-- <script src="dist/angular-ts.umd.js"></script> -->
|
|
18
|
+
<!-- include spec files here... -->
|
|
19
|
+
|
|
20
|
+
<script type="module" src="test/ng/directive/a.spec.js"></script>
|
|
21
|
+
<script type="module" src="test/ng/directive/boolean.spec.js"></script>
|
|
22
|
+
<script type="module" src="test/ng/directive/form.spec.js"></script>
|
|
23
|
+
<script type="module" src="test/ng/directive/input.spec.js"></script>
|
|
24
|
+
<script type="module" src="test/ng/directive/bind.spec.js"></script>
|
|
25
|
+
<script type="module" src="test/ng/directive/change.spec.js"></script>
|
|
26
|
+
<script type="module" src="test/ng/directive/class.spec.js"></script>
|
|
27
|
+
<script type="module" src="test/ng/directive/click.spec.js"></script>
|
|
28
|
+
<script type="module" src="test/ng/directive/cloak.spec.js"></script>
|
|
29
|
+
<script type="module" src="test/ng/directive/constoller.spec.js"></script>
|
|
30
|
+
<script type="module" src="test/ng/directive/event.spec.js"></script>
|
|
31
|
+
<script type="module" src="test/ng/directive/href.spec.js"></script>
|
|
32
|
+
<script type="module" src="test/ng/directive/if.spec.js"></script>
|
|
33
|
+
<script type="module" src="test/ng/directive/include.spec.js"></script>
|
|
34
|
+
<script type="module" src="test/ng/directive/init.spec.js"></script>
|
|
35
|
+
|
|
36
|
+
<script type="module" src="test/ng/directive/list.spec.js"></script>
|
|
37
|
+
<script type="module" src="test/ng/directive/model-options.spec.js"></script>
|
|
38
|
+
<script type="module" src="test/ng/directive/model.spec.js"></script>
|
|
39
|
+
<script type="module" src="test/ng/directive/non-bindable.spec.js"></script>
|
|
40
|
+
|
|
41
|
+
<script type="module" src="test/ng/directive/ref.spec.js"></script>
|
|
42
|
+
|
|
43
|
+
<script type="module" src="test/ng/directive/repeat.spec.js"></script>
|
|
44
|
+
<script type="module" src="test/ng/directive/show-hide.spec.js"></script>
|
|
45
|
+
<script type="module" src="test/ng/directive/scrset.spec.js"></script>
|
|
46
|
+
<script type="module" src="test/ng/directive/src.spec.js"></script>
|
|
47
|
+
<script type="module" src="test/ng/directive/style.spec.js"></script>
|
|
48
|
+
<script type="module" src="test/ng/directive/switch.spec.js"></script>
|
|
49
|
+
<script type="module" src="test/ng/directive/script.spec.js"></script>
|
|
50
|
+
<script type="module" src="test/ng/directive/select.spec.js"></script>
|
|
51
|
+
<script type="module" src="test/ng/directive/style.spec.js"></script>
|
|
52
|
+
<script type="module" src="test/ng/directive/validators.spec.js"></script>
|
|
53
|
+
|
|
54
|
+
<script type="module" src="test/ng/filter/filter.spec.js"></script>
|
|
55
|
+
<script type="module" src="test/ng/filter/filters.spec.js"></script>
|
|
56
|
+
<script type="module" src="test/ng/filter/limit-to.spec.js"></script>
|
|
57
|
+
<script type="module" src="test/ng/filter/order-by.spec.js"></script>
|
|
58
|
+
|
|
59
|
+
<script type="module" src="test/ng/cache-factor.spec.js"></script>
|
|
60
|
+
<script type="module" src="test/ng/compile.spec.js"></script>
|
|
61
|
+
<script type="module" src="test/ng/controller-provider.spec.js"></script>
|
|
62
|
+
<script type="module" src="test/ng/cookie-reader.spec.js"></script>
|
|
63
|
+
<script type="module" src="test/ng/document.spec.js"></script>
|
|
64
|
+
<script type="module" src="test/ng/filter.spec.js"></script>
|
|
65
|
+
<script type="module" src="test/ng/http-backend.spec.js"></script>
|
|
66
|
+
<script type="module" src="test/ng/http.spec.js"></script>
|
|
67
|
+
|
|
68
|
+
<script type="module" src="test/ng/interpolate.spec.js"></script>
|
|
69
|
+
|
|
70
|
+
<script type="module" src="test/ng/location.spec.js"></script>
|
|
71
|
+
<script type="module" src="test/ng/on.spec.js"></script>
|
|
72
|
+
<script type="module" src="test/ng/prop.spec.js"></script>
|
|
73
|
+
<script type="module" src="test/ng/parse.spec.js"></script>
|
|
74
|
+
<script type="module" src="test/ng/q.spec.js"></script>
|
|
75
|
+
<script type="module" src="test/ng/root-element.spec.js"></script>
|
|
76
|
+
|
|
77
|
+
<script type="module" src="test/ng/sce.spec.js"></script>
|
|
78
|
+
<script type="module" src="test/ng/sanitize-uri.spec.js"></script>
|
|
79
|
+
<script type="module" src="test/ng/scope.spec.js"></script>
|
|
80
|
+
|
|
81
|
+
<script type="module" src="test/ng/template-request.spec.js"></script>
|
|
82
|
+
|
|
83
|
+
<script type="module" src="test/ng/utils.spec.js"></script>
|
|
84
|
+
<script type="module" src="test/ng/url-utils.spec.js"></script>
|
|
85
|
+
|
|
86
|
+
<script type="module" src="test/aria/aria.spec.js"></script>
|
|
87
|
+
<script type="module" src="test/messages/messages.spec.js"></script>
|
|
88
|
+
<script type="module" src="test/sanitize/bing-html.spec.js"></script>
|
|
89
|
+
<script type="module" src="test/angular.spec.js"></script>
|
|
90
|
+
<script type="module" src="test/binding.spec.js"></script>
|
|
91
|
+
<script type="module" src="test/injector.spec.js"></script>
|
|
92
|
+
<script type="module" src="test/jqlite.spec.js"></script>
|
|
93
|
+
<script type="module" src="test/loader.spec.js"></script>
|
|
94
|
+
<script type="module" src="test/min-err.spec.js"></script>
|
|
95
|
+
<script type="module" src="test/public.spec.js"></script>
|
|
96
|
+
|
|
97
|
+
<!-- Run asyncs last to prevent digest polution-->
|
|
98
|
+
<script type="module" src="test/ng/interval.spec.js"></script>
|
|
99
|
+
<script type="module" src="test/ng/timeout.spec.js"></script>
|
|
100
|
+
</head>
|
|
101
|
+
<body>
|
|
102
|
+
<div id="dummy"></div>
|
|
103
|
+
</body>
|
|
104
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@angular-wave/angular.ts",
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/angular-ts.cjs.js",
|
|
7
|
+
"module": "dist/angular-ts.esm.js",
|
|
8
|
+
"browser": "dist/angular-ts.umd.js",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/Angular-Wave/angular.ts.git"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=18.18.2"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"serve": "npm-run-all --parallel dev express",
|
|
18
|
+
"dev": "vite",
|
|
19
|
+
"express": "node --watch ./test/server/express.js",
|
|
20
|
+
"build": "vite build",
|
|
21
|
+
"playwright": "./node_modules/.bin/playwright test"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@playwright/test": "^1.44.0",
|
|
25
|
+
"@rollup/plugin-commonjs": "latest",
|
|
26
|
+
"@rollup/plugin-node-resolve": "latest",
|
|
27
|
+
"@types/jasmine": "latest",
|
|
28
|
+
"@types/node": "latest",
|
|
29
|
+
"eslint": "latest",
|
|
30
|
+
"eslint-config-airbnb-base": "latest",
|
|
31
|
+
"eslint-config-prettier": "latest",
|
|
32
|
+
"eslint-plugin-import": "latest",
|
|
33
|
+
"eslint-plugin-promise": "latest",
|
|
34
|
+
"express": "latest",
|
|
35
|
+
"jasmine-core": "latest",
|
|
36
|
+
"npm-run-all": "latest",
|
|
37
|
+
"playwright": "^1.44.0",
|
|
38
|
+
"prettier": "latest",
|
|
39
|
+
"rollup": "latest",
|
|
40
|
+
"sinon": "latest",
|
|
41
|
+
"typescript": "latest",
|
|
42
|
+
"vite": "latest"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Read environment variables from file.
|
|
5
|
+
* https://github.com/motdotla/dotenv
|
|
6
|
+
*/
|
|
7
|
+
// require('dotenv').config();
|
|
8
|
+
const baseUrl = 'http://localhost:4000';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* See https://playwright.dev/docs/test-configuration.
|
|
12
|
+
*/
|
|
13
|
+
export default defineConfig({
|
|
14
|
+
testDir: './e2e',
|
|
15
|
+
/* Run tests in files in parallel */
|
|
16
|
+
fullyParallel: true,
|
|
17
|
+
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
18
|
+
forbidOnly: !!process.env.CI,
|
|
19
|
+
/* Retry on CI only */
|
|
20
|
+
retries: process.env.CI ? 2 : 0,
|
|
21
|
+
/* Opt out of parallel tests on CI. */
|
|
22
|
+
workers: process.env.CI ? 1 : undefined,
|
|
23
|
+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
24
|
+
reporter: 'html',
|
|
25
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
26
|
+
use: {
|
|
27
|
+
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
28
|
+
baseURL: baseUrl,
|
|
29
|
+
|
|
30
|
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
31
|
+
trace: 'on-first-retry',
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
/* Configure projects for major browsers */
|
|
35
|
+
projects: [
|
|
36
|
+
{
|
|
37
|
+
name: 'chromium',
|
|
38
|
+
use: { ...devices['Desktop Chrome'] },
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
// {
|
|
42
|
+
// name: 'firefox',
|
|
43
|
+
// use: { ...devices['Desktop Firefox'] },
|
|
44
|
+
// },
|
|
45
|
+
|
|
46
|
+
// {
|
|
47
|
+
// name: 'webkit',
|
|
48
|
+
// use: { ...devices['Desktop Safari'] },
|
|
49
|
+
// },
|
|
50
|
+
|
|
51
|
+
/* Test against mobile viewports. */
|
|
52
|
+
// {
|
|
53
|
+
// name: 'Mobile Chrome',
|
|
54
|
+
// use: { ...devices['Pixel 5'] },
|
|
55
|
+
// },
|
|
56
|
+
// {
|
|
57
|
+
// name: 'Mobile Safari',
|
|
58
|
+
// use: { ...devices['iPhone 12'] },
|
|
59
|
+
// },
|
|
60
|
+
|
|
61
|
+
/* Test against branded browsers. */
|
|
62
|
+
// {
|
|
63
|
+
// name: 'Microsoft Edge',
|
|
64
|
+
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
65
|
+
// },
|
|
66
|
+
// {
|
|
67
|
+
// name: 'Google Chrome',
|
|
68
|
+
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
69
|
+
// },
|
|
70
|
+
],
|
|
71
|
+
|
|
72
|
+
/* Run your local dev server before starting the tests */
|
|
73
|
+
webServer: {
|
|
74
|
+
command: 'make serve',
|
|
75
|
+
url: baseUrl,
|
|
76
|
+
reuseExistingServer: !process.env.CI,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<circle></circle>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div my-child-directive></div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div id="my-directive" class="from-template">test</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div my-other-directive></div>
|
package/public/test.html
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div>hello</div>
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
+
import pkg from './package.json' assert { type: 'json' };
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
// browser-friendly UMD build
|
|
7
|
+
{
|
|
8
|
+
input: 'src/index.js',
|
|
9
|
+
output: {
|
|
10
|
+
name: 'angular',
|
|
11
|
+
file: pkg.browser,
|
|
12
|
+
format: 'umd',
|
|
13
|
+
},
|
|
14
|
+
plugins: [resolve(), commonjs()],
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
// CommonJS (for Node) and ES module (for bundlers) build.
|
|
18
|
+
// (We could have three entries in the configuration array
|
|
19
|
+
// instead of two, but it's quicker to generate multiple
|
|
20
|
+
// builds from a single configuration where possible, using
|
|
21
|
+
// an array for the `output` option, where we can specify
|
|
22
|
+
// `file` and `format` for each target)
|
|
23
|
+
{
|
|
24
|
+
input: 'src/index.js',
|
|
25
|
+
external: ['ms'],
|
|
26
|
+
output: [
|
|
27
|
+
{ file: pkg.main, format: 'cjs' },
|
|
28
|
+
{ file: pkg.module, format: 'es' },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const KEY = "$$ngAnimateParentKey";
|
|
2
|
+
let parentCounter = 0;
|
|
3
|
+
let cache = Object.create(null);
|
|
4
|
+
|
|
5
|
+
export function animateCache() {
|
|
6
|
+
return {
|
|
7
|
+
cacheKey(node, method, addClass, removeClass) {
|
|
8
|
+
const { parentNode } = node;
|
|
9
|
+
const parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter);
|
|
10
|
+
const parts = [parentID, method, node.getAttribute("class")];
|
|
11
|
+
if (addClass) {
|
|
12
|
+
parts.push(addClass);
|
|
13
|
+
}
|
|
14
|
+
if (removeClass) {
|
|
15
|
+
parts.push(removeClass);
|
|
16
|
+
}
|
|
17
|
+
return parts.join(" ");
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
containsCachedAnimationWithoutDuration(key) {
|
|
21
|
+
const entry = cache[key];
|
|
22
|
+
|
|
23
|
+
// nothing cached, so go ahead and animate
|
|
24
|
+
// otherwise it should be a valid animation
|
|
25
|
+
return (entry && !entry.isValid) || false;
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
flush() {
|
|
29
|
+
cache = Object.create(null);
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
count(key) {
|
|
33
|
+
const entry = cache[key];
|
|
34
|
+
return entry ? entry.total : 0;
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
get(key) {
|
|
38
|
+
const entry = cache[key];
|
|
39
|
+
return entry && entry.value;
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
put(key, value, isValid) {
|
|
43
|
+
if (!cache[key]) {
|
|
44
|
+
cache[key] = { total: 1, value, isValid };
|
|
45
|
+
} else {
|
|
46
|
+
cache[key].total++;
|
|
47
|
+
cache[key].value = value;
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function $$AnimateCacheProvider() {
|
|
54
|
+
this.$get = [animateCache];
|
|
55
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { isString } from "../core/utils";
|
|
2
|
+
import { NG_ANIMATE_CHILDREN_DATA } from "./shared";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @ngdoc directive
|
|
6
|
+
* @name ngAnimateChildren
|
|
7
|
+
* @restrict AE
|
|
8
|
+
* @element ANY
|
|
9
|
+
*
|
|
10
|
+
* @description
|
|
11
|
+
*
|
|
12
|
+
* ngAnimateChildren allows you to specify that children of this element should animate even if any
|
|
13
|
+
* of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move`
|
|
14
|
+
* (structural) animation, child elements that also have an active structural animation are not animated.
|
|
15
|
+
*
|
|
16
|
+
* Note that even if `ngAnimateChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation).
|
|
17
|
+
*
|
|
18
|
+
*
|
|
19
|
+
* @param {string} ngAnimateChildren If the value is empty, `true` or `on`,
|
|
20
|
+
* then child animations are allowed. If the value is `false`, child animations are not allowed.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <example module="ngAnimateChildren" name="ngAnimateChildren" deps="angular-animate.js" animations="true">
|
|
24
|
+
<file name="index.html">
|
|
25
|
+
<div ng-controller="MainController as main">
|
|
26
|
+
<label>Show container? <input type="checkbox" ng-model="main.enterElement" /></label>
|
|
27
|
+
<label>Animate children? <input type="checkbox" ng-model="main.animateChildren" /></label>
|
|
28
|
+
<hr>
|
|
29
|
+
<div ng-animate-children="{{main.animateChildren}}">
|
|
30
|
+
<div ng-if="main.enterElement" class="container">
|
|
31
|
+
List of items:
|
|
32
|
+
<div ng-repeat="item in [0, 1, 2, 3]" class="item">Item {{item}}</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</file>
|
|
37
|
+
<file name="animations.css">
|
|
38
|
+
|
|
39
|
+
.container.ng-enter,
|
|
40
|
+
.container.ng-leave {
|
|
41
|
+
transition: all ease 1.5s;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.container.ng-enter,
|
|
45
|
+
.container.ng-leave-active {
|
|
46
|
+
opacity: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.container.ng-leave,
|
|
50
|
+
.container.ng-enter-active {
|
|
51
|
+
opacity: 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.item {
|
|
55
|
+
background: firebrick;
|
|
56
|
+
color: #FFF;
|
|
57
|
+
margin-bottom: 10px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.item.ng-enter,
|
|
61
|
+
.item.ng-leave {
|
|
62
|
+
transition: transform 1.5s ease;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.item.ng-enter {
|
|
66
|
+
transform: translateX(50px);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.item.ng-enter-active {
|
|
70
|
+
transform: translateX(0);
|
|
71
|
+
}
|
|
72
|
+
</file>
|
|
73
|
+
<file name="script.js">
|
|
74
|
+
angular.module('ngAnimateChildren', ['ngAnimate'])
|
|
75
|
+
.controller('MainController', function MainController() {
|
|
76
|
+
this.animateChildren = false;
|
|
77
|
+
this.enterElement = false;
|
|
78
|
+
});
|
|
79
|
+
</file>
|
|
80
|
+
</example>
|
|
81
|
+
*/
|
|
82
|
+
export const $$AnimateChildrenDirective = [
|
|
83
|
+
"$interpolate",
|
|
84
|
+
function ($interpolate) {
|
|
85
|
+
return {
|
|
86
|
+
link(scope, element, attrs) {
|
|
87
|
+
const val = attrs.ngAnimateChildren;
|
|
88
|
+
if (isString(val) && val.length === 0) {
|
|
89
|
+
// empty attribute
|
|
90
|
+
element.data(NG_ANIMATE_CHILDREN_DATA, true);
|
|
91
|
+
} else {
|
|
92
|
+
// Interpolate and set the value, so that it is available to
|
|
93
|
+
// animations that run right after compilation
|
|
94
|
+
setData($interpolate(val)(scope));
|
|
95
|
+
attrs.$observe("ngAnimateChildren", setData);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function setData(value) {
|
|
99
|
+
value = value === "on" || value === "true";
|
|
100
|
+
element.data(NG_ANIMATE_CHILDREN_DATA, value);
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
];
|