@angular-wave/angular.ts 0.0.7 → 0.0.9
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.esm.js +1 -1
- package/dist/angular-ts.umd.js +1 -1
- package/docs/.cspell.yml +8 -0
- package/docs/.github/dependabot.yml +14 -0
- package/docs/.nvmrc +1 -0
- package/docs/CONTRIBUTING.md +28 -0
- package/docs/Dockerfile +4 -0
- package/docs/LICENSE +201 -0
- package/docs/README.md +184 -0
- package/docs/assets/scss/_variables_project.scss +6 -0
- package/docs/config.yaml +15 -0
- package/docs/content/en/_index.md +77 -0
- package/docs/content/en/about/featured-background.jpg +0 -0
- package/docs/content/en/about/index.md +35 -0
- package/docs/content/en/blog/_index.md +8 -0
- package/docs/content/en/blog/news/_index.md +4 -0
- package/docs/content/en/blog/news/first-post/featured-sunset-get.png +0 -0
- package/docs/content/en/blog/news/first-post/index.md +48 -0
- package/docs/content/en/blog/news/second-post.md +244 -0
- package/docs/content/en/blog/releases/_index.md +4 -0
- package/docs/content/en/blog/releases/in-depth-monoliths-detailed-spec.md +244 -0
- package/docs/content/en/community/_index.md +6 -0
- package/docs/content/en/docs/_index.md +29 -0
- package/docs/content/en/docs/concepts/_index.md +14 -0
- package/docs/content/en/docs/contribution-guidelines/_index.md +79 -0
- package/docs/content/en/docs/examples/_index.md +13 -0
- package/docs/content/en/docs/getting-started/_index.md +35 -0
- package/docs/content/en/docs/getting-started/example-page.md +240 -0
- package/docs/content/en/docs/overview/_index.md +36 -0
- package/docs/content/en/docs/reference/_index.md +12 -0
- package/docs/content/en/docs/reference/parameter-reference.md +211 -0
- package/docs/content/en/docs/tasks/Ponycopters/_index.md +12 -0
- package/docs/content/en/docs/tasks/Ponycopters/configuring-ponycopters.md +238 -0
- package/docs/content/en/docs/tasks/Ponycopters/launching-ponycopters.md +236 -0
- package/docs/content/en/docs/tasks/_index.md +21 -0
- package/docs/content/en/docs/tasks/beds.md +237 -0
- package/docs/content/en/docs/tasks/porridge.md +237 -0
- package/docs/content/en/docs/tasks/task.md +237 -0
- package/docs/content/en/docs/tutorials/_index.md +13 -0
- package/docs/content/en/docs/tutorials/multi-bear.md +236 -0
- package/docs/content/en/docs/tutorials/tutorial2.md +236 -0
- package/docs/content/en/featured-background.jpg +0 -0
- package/docs/content/en/search.md +4 -0
- package/docs/docker-compose.yaml +13 -0
- package/docs/docsy.work +5 -0
- package/docs/docsy.work.sum +0 -0
- package/docs/go.mod +5 -0
- package/docs/go.sum +6 -0
- package/docs/hugo-disabled.toml +221 -0
- package/docs/hugo.yaml +220 -0
- package/docs/layouts/404.html +7 -0
- package/docs/layouts/_default/_markup/render-heading.html +1 -0
- package/docs/netlify.toml +12 -0
- package/docs/package.json +42 -0
- package/package.json +1 -1
- package/rollup.config.js +2 -5
- package/src/core/compile.js +82 -269
- package/src/core/compile.md +51 -16
- package/src/core/filter.md +23 -17
- package/src/core/interval.md +73 -72
- package/src/core/sce.js +2 -13
- package/src/directive/if.js +2 -7
- package/src/directive/repeat.js +5 -346
- package/src/directive/repeat.md +358 -0
- package/src/directive/switch.js +2 -4
- package/src/exts/messages.js +2 -494
- package/src/exts/messages.md +550 -0
- package/src/injector.md +30 -1
- package/src/jqLite.js +11 -17
- package/src/loader.js +0 -4
- package/test/binding.spec.js +24 -24
- package/test/jqlite.spec.js +0 -56
- package/test/messages/messages.spec.js +3 -5
- package/test/module-test.html +5 -1
- package/test/ng/compile.spec.js +94 -371
- package/test/ng/directive/form.spec.js +8 -8
- package/test/ng/directive/repeat.spec.js +0 -37
- package/test/ng/directive/switch.spec.js +2 -9
- package/types/jqlite.d.ts +0 -78
- package/dist/angular-ts.cjs.js +0 -1
|
@@ -325,7 +325,7 @@ describe("form", () => {
|
|
|
325
325
|
it("should trigger update on form submit with nested forms", () => {
|
|
326
326
|
const form = $compile(
|
|
327
327
|
'<form name="test" ng-model-options="{ updateOn: \'submit\' }" >' +
|
|
328
|
-
'<div
|
|
328
|
+
'<div ng-form name="child">' +
|
|
329
329
|
'<input type="text" ng-model="name" />' +
|
|
330
330
|
"</div>" +
|
|
331
331
|
"</form>",
|
|
@@ -387,7 +387,7 @@ describe("form", () => {
|
|
|
387
387
|
it("should trigger rollback on form controls with nested forms", () => {
|
|
388
388
|
const form = $compile(
|
|
389
389
|
'<form name="test" ng-model-options="{ updateOn: \'submit\' }" >' +
|
|
390
|
-
'<div
|
|
390
|
+
'<div ng-form name="child">' +
|
|
391
391
|
'<input type="text" ng-model="name" />' +
|
|
392
392
|
"</div>" +
|
|
393
393
|
'<button ng-click="test.$rollbackViewValue()" />' +
|
|
@@ -669,7 +669,7 @@ describe("form", () => {
|
|
|
669
669
|
it("should deregister a child form when its DOM is removed", function () {
|
|
670
670
|
doc = jqLite(
|
|
671
671
|
'<form name="parent">' +
|
|
672
|
-
'<div
|
|
672
|
+
'<div ng-form name="child">' +
|
|
673
673
|
'<input ng:model="modelA" name="inputA" required>' +
|
|
674
674
|
"</div>" +
|
|
675
675
|
"</form>",
|
|
@@ -693,7 +693,7 @@ describe("form", () => {
|
|
|
693
693
|
it("should deregister a child form whose name is an expression when its DOM is removed", () => {
|
|
694
694
|
doc = jqLite(
|
|
695
695
|
'<form name="parent">' +
|
|
696
|
-
'<div
|
|
696
|
+
'<div ng-form name="child.form">' +
|
|
697
697
|
'<input ng:model="modelA" name="inputA" required>' +
|
|
698
698
|
"</div>" +
|
|
699
699
|
"</form>",
|
|
@@ -717,7 +717,7 @@ describe("form", () => {
|
|
|
717
717
|
it("should deregister a input when it is removed from DOM", () => {
|
|
718
718
|
doc = jqLite(
|
|
719
719
|
'<form name="parent">' +
|
|
720
|
-
'<div
|
|
720
|
+
'<div ng-form name="child">' +
|
|
721
721
|
'<input ng-if="inputPresent" ng-model="modelA" name="inputA" required maxlength="10">' +
|
|
722
722
|
"</div>" +
|
|
723
723
|
"</form>",
|
|
@@ -783,7 +783,7 @@ describe("form", () => {
|
|
|
783
783
|
it("should deregister a input that is $pending when it is removed from DOM", () => {
|
|
784
784
|
doc = jqLite(
|
|
785
785
|
'<form name="parent">' +
|
|
786
|
-
'<div
|
|
786
|
+
'<div ng-form name="child">' +
|
|
787
787
|
'<input ng-if="inputPresent" ng-model="modelA" name="inputA">' +
|
|
788
788
|
"</div>" +
|
|
789
789
|
"</form>",
|
|
@@ -819,7 +819,7 @@ describe("form", () => {
|
|
|
819
819
|
it("should leave the parent form invalid when deregister a removed input", () => {
|
|
820
820
|
doc = jqLite(
|
|
821
821
|
'<form name="parent">' +
|
|
822
|
-
'<div
|
|
822
|
+
'<div ng-form name="child">' +
|
|
823
823
|
'<input ng-if="inputPresent" ng-model="modelA" name="inputA" required>' +
|
|
824
824
|
'<input ng-model="modelB" name="inputB" required>' +
|
|
825
825
|
"</div>" +
|
|
@@ -1227,7 +1227,7 @@ describe("form", () => {
|
|
|
1227
1227
|
it("should trigger setUntouched on form controls with nested forms", () => {
|
|
1228
1228
|
const form = $compile(
|
|
1229
1229
|
'<form name="myForm">' +
|
|
1230
|
-
'<div
|
|
1230
|
+
'<div ng-form name="childForm">' +
|
|
1231
1231
|
'<input name="alias" type="text" ng-model="name" />' +
|
|
1232
1232
|
"</div>" +
|
|
1233
1233
|
"</form>",
|
|
@@ -1076,43 +1076,6 @@ describe("ngRepeat", () => {
|
|
|
1076
1076
|
}, 300);
|
|
1077
1077
|
});
|
|
1078
1078
|
|
|
1079
|
-
it("should add separator comments after each item", () => {
|
|
1080
|
-
const check = function () {
|
|
1081
|
-
const children = element.find("div");
|
|
1082
|
-
expect(children.length).toBe(3);
|
|
1083
|
-
|
|
1084
|
-
// Note: COMMENT_NODE === 8
|
|
1085
|
-
expect(children[0].nextSibling.nodeType).toBe(8);
|
|
1086
|
-
expect(children[0].nextSibling.nodeValue).toBe(
|
|
1087
|
-
" end ngRepeat: val in values ",
|
|
1088
|
-
);
|
|
1089
|
-
expect(children[1].nextSibling.nodeType).toBe(8);
|
|
1090
|
-
expect(children[1].nextSibling.nodeValue).toBe(
|
|
1091
|
-
" end ngRepeat: val in values ",
|
|
1092
|
-
);
|
|
1093
|
-
expect(children[2].nextSibling.nodeType).toBe(8);
|
|
1094
|
-
expect(children[2].nextSibling.nodeValue).toBe(
|
|
1095
|
-
" end ngRepeat: val in values ",
|
|
1096
|
-
);
|
|
1097
|
-
};
|
|
1098
|
-
|
|
1099
|
-
scope.values = [1, 2, 3];
|
|
1100
|
-
|
|
1101
|
-
element = $compile(
|
|
1102
|
-
"<div>" +
|
|
1103
|
-
'<div ng-repeat="val in values">val:{{val}};</div>' +
|
|
1104
|
-
"</div>",
|
|
1105
|
-
)(scope);
|
|
1106
|
-
|
|
1107
|
-
scope.$digest();
|
|
1108
|
-
check();
|
|
1109
|
-
|
|
1110
|
-
scope.values.shift();
|
|
1111
|
-
scope.values.push(4);
|
|
1112
|
-
scope.$digest();
|
|
1113
|
-
check();
|
|
1114
|
-
});
|
|
1115
|
-
|
|
1116
1079
|
it("should remove whole block even if the number of elements inside it changes", () => {
|
|
1117
1080
|
scope.values = [1, 2, 3];
|
|
1118
1081
|
|
|
@@ -29,9 +29,7 @@ describe("ngSwitch", () => {
|
|
|
29
29
|
'<div ng-switch-when="true">true:{{name}}</div>' +
|
|
30
30
|
"</div>",
|
|
31
31
|
)($scope);
|
|
32
|
-
expect(element[0].innerHTML).toEqual(
|
|
33
|
-
"<!-- ngSwitchWhen: 1 --><!-- ngSwitchWhen: 2 --><!-- ngSwitchWhen: true -->",
|
|
34
|
-
);
|
|
32
|
+
expect(element[0].innerHTML).toEqual("<!----><!----><!---->");
|
|
35
33
|
$scope.select = 1;
|
|
36
34
|
$scope.$apply();
|
|
37
35
|
expect(element.text()).toEqual("first:");
|
|
@@ -58,12 +56,7 @@ describe("ngSwitch", () => {
|
|
|
58
56
|
'<li ng-switch-when="true">true:{{name}}</li>' +
|
|
59
57
|
"</ul>",
|
|
60
58
|
)($scope);
|
|
61
|
-
expect(element[0].innerHTML).toEqual(
|
|
62
|
-
"<!-- ngSwitchWhen: 1 -->" +
|
|
63
|
-
"<!-- ngSwitchWhen: 1 -->" +
|
|
64
|
-
"<!-- ngSwitchWhen: 2 -->" +
|
|
65
|
-
"<!-- ngSwitchWhen: true -->",
|
|
66
|
-
);
|
|
59
|
+
expect(element[0].innerHTML).toEqual("<!----><!----><!----><!---->");
|
|
67
60
|
$scope.select = 1;
|
|
68
61
|
$scope.$apply();
|
|
69
62
|
expect(element.text()).toEqual("first:, first too:");
|
package/types/jqlite.d.ts
CHANGED
|
@@ -56,30 +56,6 @@ interface JQLite {
|
|
|
56
56
|
*/
|
|
57
57
|
attr(attributes: Object): this;
|
|
58
58
|
|
|
59
|
-
/**
|
|
60
|
-
* Attach a handler to an event for the elements.
|
|
61
|
-
*
|
|
62
|
-
* @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
|
|
63
|
-
* @param handler A function to execute each time the event is triggered.
|
|
64
|
-
* @see {@link https://api.jquery.com/bind/#bind-eventType-eventData-handler}
|
|
65
|
-
*/
|
|
66
|
-
bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): this;
|
|
67
|
-
/**
|
|
68
|
-
* Attach a handler to an event for the elements.
|
|
69
|
-
*
|
|
70
|
-
* @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
|
|
71
|
-
* @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.
|
|
72
|
-
* @see {@link https://api.jquery.com/bind/#bind-eventType-eventData-preventBubble}
|
|
73
|
-
*/
|
|
74
|
-
bind(eventType: string, preventBubble: boolean): this;
|
|
75
|
-
/**
|
|
76
|
-
* Attach a handler to an event for the elements.
|
|
77
|
-
*
|
|
78
|
-
* @param events An object containing one or more DOM event types and functions to execute for them.
|
|
79
|
-
* @see {@link https://api.jquery.com/bind/#bind-events}
|
|
80
|
-
*/
|
|
81
|
-
bind(events: any): this;
|
|
82
|
-
|
|
83
59
|
/**
|
|
84
60
|
* Get the children of each element in the set of matched elements, optionally filtered by a selector.
|
|
85
61
|
*
|
|
@@ -276,60 +252,6 @@ interface JQLite {
|
|
|
276
252
|
*/
|
|
277
253
|
off(events: { [key: string]: any }, selector?: string): this;
|
|
278
254
|
|
|
279
|
-
/**
|
|
280
|
-
* Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
|
|
281
|
-
*
|
|
282
|
-
* @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
|
|
283
|
-
* @param handler A function to execute at the time the event is triggered.
|
|
284
|
-
* @see {@link https://api.jquery.com/one/#one-events-data-handler}
|
|
285
|
-
*/
|
|
286
|
-
one(events: string, handler: (eventObject: JQueryEventObject) => any): this;
|
|
287
|
-
/**
|
|
288
|
-
* Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
|
|
289
|
-
*
|
|
290
|
-
* @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
|
|
291
|
-
* @param data An object containing data that will be passed to the event handler.
|
|
292
|
-
* @param handler A function to execute at the time the event is triggered.
|
|
293
|
-
* @see {@link https://api.jquery.com/one/#one-events-data-handler}
|
|
294
|
-
*/
|
|
295
|
-
one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): this;
|
|
296
|
-
/**
|
|
297
|
-
* Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
|
|
298
|
-
*
|
|
299
|
-
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
|
300
|
-
* @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
|
|
301
|
-
* @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
|
|
302
|
-
* @see {@link https://api.jquery.com/one/#one-events-selector-data-handler}
|
|
303
|
-
*/
|
|
304
|
-
one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): this;
|
|
305
|
-
/**
|
|
306
|
-
* Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
|
|
307
|
-
*
|
|
308
|
-
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
|
309
|
-
* @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
|
|
310
|
-
* @param data Data to be passed to the handler in event.data when an event is triggered.
|
|
311
|
-
* @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
|
|
312
|
-
* @see {@link https://api.jquery.com/one/#one-events-selector-data-handler}
|
|
313
|
-
*/
|
|
314
|
-
one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): this;
|
|
315
|
-
/**
|
|
316
|
-
* Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
|
|
317
|
-
*
|
|
318
|
-
* @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
|
|
319
|
-
* @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
|
|
320
|
-
* @param data Data to be passed to the handler in event.data when an event occurs.
|
|
321
|
-
* @see {@link https://api.jquery.com/one/#one-events-selector-data}
|
|
322
|
-
*/
|
|
323
|
-
one(events: { [key: string]: any }, selector?: string, data?: any): this;
|
|
324
|
-
/**
|
|
325
|
-
* Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
|
|
326
|
-
*
|
|
327
|
-
* @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
|
|
328
|
-
* @param data Data to be passed to the handler in event.data when an event occurs.
|
|
329
|
-
* @see {@link https://api.jquery.com/one/#one-events-selector-data}
|
|
330
|
-
*/
|
|
331
|
-
one(events: { [key: string]: any }, data?: any): this;
|
|
332
|
-
|
|
333
255
|
/**
|
|
334
256
|
* Get the parent of each element in the current set of matched elements, optionally filtered by a selector.
|
|
335
257
|
*
|