ember-source 4.5.0-alpha.3 → 4.5.0-beta.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/CHANGELOG.md +10 -1
- package/build-metadata.json +3 -3
- package/dist/dependencies/@glimmer/global-context.js +9 -1
- package/dist/dependencies/@glimmer/manager.js +276 -212
- package/dist/dependencies/@glimmer/runtime.js +2 -2
- package/dist/dependencies/@glimmer/util.js +1 -22
- package/dist/ember-template-compiler.js +37 -30
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +1 -1
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +1204 -1431
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +2 -2
- package/dist/packages/@ember/-internals/glimmer/index.js +24 -19
- package/dist/packages/@ember/-internals/metal/index.js +19 -7
- package/dist/packages/@ember/-internals/routing/lib/location/api.js +3 -3
- package/dist/packages/@ember/-internals/routing/lib/location/auto_location.js +5 -1
- package/dist/packages/@ember/-internals/routing/lib/services/router.js +7 -6
- package/dist/packages/@ember/-internals/routing/lib/services/routing.js +9 -6
- package/dist/packages/@ember/-internals/routing/lib/system/route.js +6 -9
- package/dist/packages/@ember/-internals/routing/lib/system/router.js +4 -2
- package/dist/packages/@ember/-internals/routing/lib/utils.js +15 -25
- package/dist/packages/@ember/-internals/runtime/lib/compare.js +4 -1
- package/dist/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +14 -15
- package/dist/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +32 -44
- package/dist/packages/@ember/-internals/runtime/lib/mixins/array.js +1 -1
- package/dist/packages/@ember/-internals/runtime/lib/mixins/comparable.js +7 -22
- package/dist/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js +34 -46
- package/dist/packages/@ember/-internals/runtime/lib/mixins/enumerable.js +2 -15
- package/dist/packages/@ember/-internals/runtime/lib/mixins/evented.js +13 -57
- package/dist/packages/@ember/-internals/runtime/lib/mixins/mutable_enumerable.js +2 -16
- package/dist/packages/@ember/-internals/runtime/lib/mixins/observable.js +64 -134
- package/dist/packages/@ember/-internals/runtime/lib/mixins/promise_proxy.js +28 -86
- package/dist/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +59 -61
- package/dist/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +17 -24
- package/dist/packages/@ember/-internals/runtime/lib/system/array_proxy.js +59 -85
- package/dist/packages/@ember/-internals/runtime/lib/system/object.js +9 -2
- package/dist/packages/@ember/-internals/runtime/lib/system/object_proxy.js +3 -77
- package/dist/packages/@ember/-internals/utils/index.js +1 -1
- package/dist/packages/@ember/-internals/utils/types.js +1 -0
- package/dist/packages/@ember/-internals/views/lib/compat/attrs.js +1 -2
- package/dist/packages/@ember/-internals/views/lib/component_lookup.js +2 -2
- package/dist/packages/@ember/-internals/views/lib/mixins/action_support.js +3 -9
- package/dist/packages/@ember/-internals/views/lib/mixins/child_views_support.js +4 -6
- package/dist/packages/@ember/-internals/views/lib/mixins/class_names_support.js +13 -18
- package/dist/packages/@ember/-internals/views/lib/mixins/view_state_support.js +3 -2
- package/dist/packages/@ember/-internals/views/lib/mixins/view_support.js +57 -58
- package/dist/packages/@ember/-internals/views/lib/system/event_dispatcher.js +142 -120
- package/dist/packages/@ember/-internals/views/lib/system/utils.js +1 -1
- package/dist/packages/@ember/-internals/views/lib/views/states/destroying.js +1 -1
- package/dist/packages/@ember/-internals/views/lib/views/states/has_element.js +2 -2
- package/dist/packages/@ember/-internals/views/lib/views/states/in_dom.js +3 -1
- package/dist/packages/@ember/application/instance.js +1 -0
- package/dist/packages/@ember/application/lib/application.js +8 -1
- package/dist/packages/@ember/canary-features/index.js +6 -4
- package/dist/packages/@ember/engine/instance.js +1 -1
- package/dist/packages/@ember/engine/lib/engine-parent.js +1 -5
- package/dist/packages/@ember/renderer/index.js +28 -0
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +823 -709
- package/package.json +16 -16
package/docs/data.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "The Ember API",
|
|
4
4
|
"description": "The Ember API: a framework for building ambitious web applications",
|
|
5
5
|
"url": "https://emberjs.com/",
|
|
6
|
-
"version": "4.5.0-
|
|
6
|
+
"version": "4.5.0-beta.1"
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"node_modules/rsvp/lib/rsvp/promise/all.js": {
|
|
@@ -937,15 +937,8 @@
|
|
|
937
937
|
"fors": {},
|
|
938
938
|
"namespaces": {}
|
|
939
939
|
},
|
|
940
|
-
"packages/@ember/-internals/runtime/lib/mixins/-proxy.
|
|
941
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/-proxy.
|
|
942
|
-
"modules": {},
|
|
943
|
-
"classes": {},
|
|
944
|
-
"fors": {},
|
|
945
|
-
"namespaces": {}
|
|
946
|
-
},
|
|
947
|
-
"packages/@ember/-internals/runtime/lib/mixins/-proxy.js": {
|
|
948
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/-proxy.js",
|
|
940
|
+
"packages/@ember/-internals/runtime/lib/mixins/-proxy.ts": {
|
|
941
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/-proxy.ts",
|
|
949
942
|
"modules": {},
|
|
950
943
|
"classes": {
|
|
951
944
|
"Ember.ProxyMixin": 1
|
|
@@ -955,8 +948,8 @@
|
|
|
955
948
|
"Ember": 1
|
|
956
949
|
}
|
|
957
950
|
},
|
|
958
|
-
"packages/@ember/-internals/runtime/lib/mixins/action_handler.
|
|
959
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/action_handler.
|
|
951
|
+
"packages/@ember/-internals/runtime/lib/mixins/action_handler.ts": {
|
|
952
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts",
|
|
960
953
|
"modules": {},
|
|
961
954
|
"classes": {
|
|
962
955
|
"Ember.ActionHandler": 1
|
|
@@ -979,8 +972,8 @@
|
|
|
979
972
|
},
|
|
980
973
|
"namespaces": {}
|
|
981
974
|
},
|
|
982
|
-
"packages/@ember/-internals/runtime/lib/mixins/comparable.
|
|
983
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/comparable.
|
|
975
|
+
"packages/@ember/-internals/runtime/lib/mixins/comparable.ts": {
|
|
976
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/comparable.ts",
|
|
984
977
|
"modules": {},
|
|
985
978
|
"classes": {
|
|
986
979
|
"Ember.Comparable": 1
|
|
@@ -990,15 +983,8 @@
|
|
|
990
983
|
"Ember": 1
|
|
991
984
|
}
|
|
992
985
|
},
|
|
993
|
-
"packages/@ember/-internals/runtime/lib/mixins/container_proxy.
|
|
994
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.
|
|
995
|
-
"modules": {},
|
|
996
|
-
"classes": {},
|
|
997
|
-
"fors": {},
|
|
998
|
-
"namespaces": {}
|
|
999
|
-
},
|
|
1000
|
-
"packages/@ember/-internals/runtime/lib/mixins/container_proxy.js": {
|
|
1001
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.js",
|
|
986
|
+
"packages/@ember/-internals/runtime/lib/mixins/container_proxy.ts": {
|
|
987
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.ts",
|
|
1002
988
|
"modules": {},
|
|
1003
989
|
"classes": {
|
|
1004
990
|
"ContainerProxyMixin": 1
|
|
@@ -1006,8 +992,8 @@
|
|
|
1006
992
|
"fors": {},
|
|
1007
993
|
"namespaces": {}
|
|
1008
994
|
},
|
|
1009
|
-
"packages/@ember/-internals/runtime/lib/mixins/enumerable.
|
|
1010
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/enumerable.
|
|
995
|
+
"packages/@ember/-internals/runtime/lib/mixins/enumerable.ts": {
|
|
996
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/enumerable.ts",
|
|
1011
997
|
"modules": {
|
|
1012
998
|
"@ember/enumerable": 1
|
|
1013
999
|
},
|
|
@@ -1017,15 +1003,8 @@
|
|
|
1017
1003
|
"fors": {},
|
|
1018
1004
|
"namespaces": {}
|
|
1019
1005
|
},
|
|
1020
|
-
"packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
1021
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
1022
|
-
"modules": {},
|
|
1023
|
-
"classes": {},
|
|
1024
|
-
"fors": {},
|
|
1025
|
-
"namespaces": {}
|
|
1026
|
-
},
|
|
1027
|
-
"packages/@ember/-internals/runtime/lib/mixins/evented.js": {
|
|
1028
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/evented.js",
|
|
1006
|
+
"packages/@ember/-internals/runtime/lib/mixins/evented.ts": {
|
|
1007
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/evented.ts",
|
|
1029
1008
|
"modules": {},
|
|
1030
1009
|
"classes": {
|
|
1031
1010
|
"Evented": 1
|
|
@@ -1033,8 +1012,8 @@
|
|
|
1033
1012
|
"fors": {},
|
|
1034
1013
|
"namespaces": {}
|
|
1035
1014
|
},
|
|
1036
|
-
"packages/@ember/-internals/runtime/lib/mixins/mutable_enumerable.
|
|
1037
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/mutable_enumerable.
|
|
1015
|
+
"packages/@ember/-internals/runtime/lib/mixins/mutable_enumerable.ts": {
|
|
1016
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/mutable_enumerable.ts",
|
|
1038
1017
|
"modules": {},
|
|
1039
1018
|
"classes": {
|
|
1040
1019
|
"Ember.MutableEnumerable": 1
|
|
@@ -1044,15 +1023,8 @@
|
|
|
1044
1023
|
"Ember": 1
|
|
1045
1024
|
}
|
|
1046
1025
|
},
|
|
1047
|
-
"packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
1048
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
1049
|
-
"modules": {},
|
|
1050
|
-
"classes": {},
|
|
1051
|
-
"fors": {},
|
|
1052
|
-
"namespaces": {}
|
|
1053
|
-
},
|
|
1054
|
-
"packages/@ember/-internals/runtime/lib/mixins/observable.js": {
|
|
1055
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/observable.js",
|
|
1026
|
+
"packages/@ember/-internals/runtime/lib/mixins/observable.ts": {
|
|
1027
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
1056
1028
|
"modules": {},
|
|
1057
1029
|
"classes": {
|
|
1058
1030
|
"Observable": 1
|
|
@@ -1060,8 +1032,8 @@
|
|
|
1060
1032
|
"fors": {},
|
|
1061
1033
|
"namespaces": {}
|
|
1062
1034
|
},
|
|
1063
|
-
"packages/@ember/-internals/runtime/lib/mixins/promise_proxy.
|
|
1064
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.
|
|
1035
|
+
"packages/@ember/-internals/runtime/lib/mixins/promise_proxy.ts": {
|
|
1036
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.ts",
|
|
1065
1037
|
"modules": {},
|
|
1066
1038
|
"classes": {
|
|
1067
1039
|
"PromiseProxyMixin": 1
|
|
@@ -1069,15 +1041,8 @@
|
|
|
1069
1041
|
"fors": {},
|
|
1070
1042
|
"namespaces": {}
|
|
1071
1043
|
},
|
|
1072
|
-
"packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
1073
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
1074
|
-
"modules": {},
|
|
1075
|
-
"classes": {},
|
|
1076
|
-
"fors": {},
|
|
1077
|
-
"namespaces": {}
|
|
1078
|
-
},
|
|
1079
|
-
"packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js": {
|
|
1080
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js",
|
|
1044
|
+
"packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts": {
|
|
1045
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
1081
1046
|
"modules": {},
|
|
1082
1047
|
"classes": {
|
|
1083
1048
|
"RegistryProxyMixin": 1
|
|
@@ -1085,8 +1050,8 @@
|
|
|
1085
1050
|
"fors": {},
|
|
1086
1051
|
"namespaces": {}
|
|
1087
1052
|
},
|
|
1088
|
-
"packages/@ember/-internals/runtime/lib/mixins/target_action_support.
|
|
1089
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.
|
|
1053
|
+
"packages/@ember/-internals/runtime/lib/mixins/target_action_support.ts": {
|
|
1054
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.ts",
|
|
1090
1055
|
"modules": {},
|
|
1091
1056
|
"classes": {
|
|
1092
1057
|
"Ember.TargetActionSupport": 1
|
|
@@ -1096,8 +1061,8 @@
|
|
|
1096
1061
|
"Ember": 1
|
|
1097
1062
|
}
|
|
1098
1063
|
},
|
|
1099
|
-
"packages/@ember/-internals/runtime/lib/system/array_proxy.
|
|
1100
|
-
"name": "packages/@ember/-internals/runtime/lib/system/array_proxy.
|
|
1064
|
+
"packages/@ember/-internals/runtime/lib/system/array_proxy.ts": {
|
|
1065
|
+
"name": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
1101
1066
|
"modules": {},
|
|
1102
1067
|
"classes": {
|
|
1103
1068
|
"ArrayProxy": 1
|
|
@@ -1134,8 +1099,8 @@
|
|
|
1134
1099
|
"fors": {},
|
|
1135
1100
|
"namespaces": {}
|
|
1136
1101
|
},
|
|
1137
|
-
"packages/@ember/-internals/runtime/lib/system/object_proxy.
|
|
1138
|
-
"name": "packages/@ember/-internals/runtime/lib/system/object_proxy.
|
|
1102
|
+
"packages/@ember/-internals/runtime/lib/system/object_proxy.ts": {
|
|
1103
|
+
"name": "packages/@ember/-internals/runtime/lib/system/object_proxy.ts",
|
|
1139
1104
|
"modules": {},
|
|
1140
1105
|
"classes": {
|
|
1141
1106
|
"ObjectProxy": 1
|
|
@@ -1232,8 +1197,8 @@
|
|
|
1232
1197
|
},
|
|
1233
1198
|
"namespaces": {}
|
|
1234
1199
|
},
|
|
1235
|
-
"packages/@ember/-internals/views/lib/mixins/action_support.
|
|
1236
|
-
"name": "packages/@ember/-internals/views/lib/mixins/action_support.
|
|
1200
|
+
"packages/@ember/-internals/views/lib/mixins/action_support.ts": {
|
|
1201
|
+
"name": "packages/@ember/-internals/views/lib/mixins/action_support.ts",
|
|
1237
1202
|
"modules": {},
|
|
1238
1203
|
"classes": {
|
|
1239
1204
|
"Ember.ActionSupport": 1
|
|
@@ -1243,15 +1208,15 @@
|
|
|
1243
1208
|
"Ember": 1
|
|
1244
1209
|
}
|
|
1245
1210
|
},
|
|
1246
|
-
"packages/@ember/-internals/views/lib/mixins/child_views_support.
|
|
1247
|
-
"name": "packages/@ember/-internals/views/lib/mixins/child_views_support.
|
|
1211
|
+
"packages/@ember/-internals/views/lib/mixins/child_views_support.ts": {
|
|
1212
|
+
"name": "packages/@ember/-internals/views/lib/mixins/child_views_support.ts",
|
|
1248
1213
|
"modules": {},
|
|
1249
1214
|
"classes": {},
|
|
1250
1215
|
"fors": {},
|
|
1251
1216
|
"namespaces": {}
|
|
1252
1217
|
},
|
|
1253
|
-
"packages/@ember/-internals/views/lib/mixins/class_names_support.
|
|
1254
|
-
"name": "packages/@ember/-internals/views/lib/mixins/class_names_support.
|
|
1218
|
+
"packages/@ember/-internals/views/lib/mixins/class_names_support.ts": {
|
|
1219
|
+
"name": "packages/@ember/-internals/views/lib/mixins/class_names_support.ts",
|
|
1255
1220
|
"modules": {},
|
|
1256
1221
|
"classes": {
|
|
1257
1222
|
"Ember.ClassNamesSupport": 1
|
|
@@ -1261,15 +1226,15 @@
|
|
|
1261
1226
|
"Ember": 1
|
|
1262
1227
|
}
|
|
1263
1228
|
},
|
|
1264
|
-
"packages/@ember/-internals/views/lib/mixins/view_state_support.
|
|
1265
|
-
"name": "packages/@ember/-internals/views/lib/mixins/view_state_support.
|
|
1229
|
+
"packages/@ember/-internals/views/lib/mixins/view_state_support.ts": {
|
|
1230
|
+
"name": "packages/@ember/-internals/views/lib/mixins/view_state_support.ts",
|
|
1266
1231
|
"modules": {},
|
|
1267
1232
|
"classes": {},
|
|
1268
1233
|
"fors": {},
|
|
1269
1234
|
"namespaces": {}
|
|
1270
1235
|
},
|
|
1271
|
-
"packages/@ember/-internals/views/lib/mixins/view_support.
|
|
1272
|
-
"name": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
1236
|
+
"packages/@ember/-internals/views/lib/mixins/view_support.ts": {
|
|
1237
|
+
"name": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
1273
1238
|
"modules": {},
|
|
1274
1239
|
"classes": {
|
|
1275
1240
|
"Ember.ViewMixin": 1
|
|
@@ -1279,22 +1244,15 @@
|
|
|
1279
1244
|
"Ember": 1
|
|
1280
1245
|
}
|
|
1281
1246
|
},
|
|
1282
|
-
"packages/@ember/-internals/views/lib/system/action_manager.
|
|
1283
|
-
"name": "packages/@ember/-internals/views/lib/system/action_manager.
|
|
1284
|
-
"modules": {},
|
|
1285
|
-
"classes": {},
|
|
1286
|
-
"fors": {},
|
|
1287
|
-
"namespaces": {}
|
|
1288
|
-
},
|
|
1289
|
-
"packages/@ember/-internals/views/lib/system/event_dispatcher.d.ts": {
|
|
1290
|
-
"name": "packages/@ember/-internals/views/lib/system/event_dispatcher.d.ts",
|
|
1247
|
+
"packages/@ember/-internals/views/lib/system/action_manager.ts": {
|
|
1248
|
+
"name": "packages/@ember/-internals/views/lib/system/action_manager.ts",
|
|
1291
1249
|
"modules": {},
|
|
1292
1250
|
"classes": {},
|
|
1293
1251
|
"fors": {},
|
|
1294
1252
|
"namespaces": {}
|
|
1295
1253
|
},
|
|
1296
|
-
"packages/@ember/-internals/views/lib/system/event_dispatcher.
|
|
1297
|
-
"name": "packages/@ember/-internals/views/lib/system/event_dispatcher.
|
|
1254
|
+
"packages/@ember/-internals/views/lib/system/event_dispatcher.ts": {
|
|
1255
|
+
"name": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts",
|
|
1298
1256
|
"modules": {},
|
|
1299
1257
|
"classes": {
|
|
1300
1258
|
"Ember.EventDispatcher": 1
|
|
@@ -1585,6 +1543,17 @@
|
|
|
1585
1543
|
},
|
|
1586
1544
|
"namespaces": {}
|
|
1587
1545
|
},
|
|
1546
|
+
"packages/@ember/renderer/index.ts": {
|
|
1547
|
+
"name": "packages/@ember/renderer/index.ts",
|
|
1548
|
+
"modules": {
|
|
1549
|
+
"@ember/renderer": 1
|
|
1550
|
+
},
|
|
1551
|
+
"classes": {
|
|
1552
|
+
"Renderer": 1
|
|
1553
|
+
},
|
|
1554
|
+
"fors": {},
|
|
1555
|
+
"namespaces": {}
|
|
1556
|
+
},
|
|
1588
1557
|
"packages/@ember/runloop/index.ts": {
|
|
1589
1558
|
"name": "packages/@ember/runloop/index.ts",
|
|
1590
1559
|
"modules": {
|
|
@@ -1818,7 +1787,7 @@
|
|
|
1818
1787
|
"namespaces": {},
|
|
1819
1788
|
"tag": "main",
|
|
1820
1789
|
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
1821
|
-
"line":
|
|
1790
|
+
"line": 45,
|
|
1822
1791
|
"description": "[Glimmer](https://github.com/tildeio/glimmer) is a templating engine used by Ember.js that is compatible with a subset of the [Handlebars](http://handlebarsjs.com/) syntax.\n\n### Showing a property\n\nTemplates manage the flow of an application's UI, and display state (through\nthe DOM) to a user. For example, given a component with the property \"name\",\nthat component's template can use the name in several ways:\n\n```app/components/person-profile.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n name: 'Jill'\n});\n```\n\n```app/components/person-profile.hbs\n{{this.name}}\n<div>{{this.name}}</div>\n<span data-name={{this.name}}></span>\n```\n\nAny time the \"name\" property on the component changes, the DOM will be\nupdated.\n\nProperties can be chained as well:\n\n```handlebars\n{{@aUserModel.name}}\n<div>{{@listOfUsers.firstObject.name}}</div>\n```\n\n### Using Ember helpers\n\nWhen content is passed in mustaches `{{}}`, Ember will first try to find a helper\nor component with that name. For example, the `if` helper:\n\n```app/components/person-profile.hbs\n{{if this.name \"I have a name\" \"I have no name\"}}\n<span data-has-name={{if this.name true}}></span>\n```\n\nThe returned value is placed where the `{{}}` is called. The above style is\ncalled \"inline\". A second style of helper usage is called \"block\". For example:\n\n```handlebars\n{{#if this.name}}\n I have a name\n{{else}}\n I have no name\n{{/if}}\n```\n\nThe block form of helpers allows you to control how the UI is created based\non the values of properties.\nA third form of helper is called \"nested\". For example here the concat\nhelper will add \" Doe\" to a displayed name if the person has no last name:\n\n```handlebars\n<span data-name={{concat this.firstName (\n if this.lastName (concat \" \" this.lastName) \"Doe\"\n)}}></span>\n```\n\nEmber's built-in helpers are described under the [Ember.Templates.helpers](/ember/release/classes/Ember.Templates.helpers)\nnamespace. Documentation on creating custom helpers can be found under\n[helper](/ember/release/functions/@ember%2Fcomponent%2Fhelper/helper) (or\nunder [Helper](/ember/release/classes/Helper) if a helper requires access to\ndependency injection).\n\n### Invoking a Component\n\nEmber components represent state to the UI of an application. Further\nreading on components can be found under [Component](/ember/release/classes/Component).",
|
|
1823
1792
|
"itemtype": "main"
|
|
1824
1793
|
},
|
|
@@ -1999,7 +1968,7 @@
|
|
|
1999
1968
|
},
|
|
2000
1969
|
"namespaces": {},
|
|
2001
1970
|
"tag": "module",
|
|
2002
|
-
"file": "packages/@ember/-internals/runtime/lib/system/object_proxy.
|
|
1971
|
+
"file": "packages/@ember/-internals/runtime/lib/system/object_proxy.ts",
|
|
2003
1972
|
"line": 4
|
|
2004
1973
|
},
|
|
2005
1974
|
"@ember/utils": {
|
|
@@ -2039,7 +2008,7 @@
|
|
|
2039
2008
|
},
|
|
2040
2009
|
"tag": "module",
|
|
2041
2010
|
"file": "packages/@ember/application/instance.ts",
|
|
2042
|
-
"line":
|
|
2011
|
+
"line": 325
|
|
2043
2012
|
},
|
|
2044
2013
|
"@ember/array": {
|
|
2045
2014
|
"name": "@ember/array",
|
|
@@ -2056,8 +2025,8 @@
|
|
|
2056
2025
|
},
|
|
2057
2026
|
"namespaces": {},
|
|
2058
2027
|
"tag": "module",
|
|
2059
|
-
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.
|
|
2060
|
-
"line":
|
|
2028
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
2029
|
+
"line": 58
|
|
2061
2030
|
},
|
|
2062
2031
|
"@ember/enumerable": {
|
|
2063
2032
|
"name": "@ember/enumerable",
|
|
@@ -2069,7 +2038,7 @@
|
|
|
2069
2038
|
"fors": {},
|
|
2070
2039
|
"namespaces": {},
|
|
2071
2040
|
"tag": "module",
|
|
2072
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/enumerable.
|
|
2041
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/enumerable.ts",
|
|
2073
2042
|
"line": 8,
|
|
2074
2043
|
"access": "private",
|
|
2075
2044
|
"tagname": ""
|
|
@@ -2085,7 +2054,7 @@
|
|
|
2085
2054
|
"namespaces": {},
|
|
2086
2055
|
"tag": "module",
|
|
2087
2056
|
"file": "packages/@ember/canary-features/index.ts",
|
|
2088
|
-
"line":
|
|
2057
|
+
"line": 21,
|
|
2089
2058
|
"description": "Set `EmberENV.FEATURES` in your application's `config/environment.js` file\nto enable canary features in your application.\n\nSee the [feature flag guide](https://guides.emberjs.com/release/configuring-ember/feature-flags/)\nfor more details.",
|
|
2090
2059
|
"access": "public",
|
|
2091
2060
|
"tagname": ""
|
|
@@ -2221,6 +2190,21 @@
|
|
|
2221
2190
|
"file": "packages/@ember/polyfills/lib/assign.ts",
|
|
2222
2191
|
"line": 3
|
|
2223
2192
|
},
|
|
2193
|
+
"@ember/renderer": {
|
|
2194
|
+
"name": "@ember/renderer",
|
|
2195
|
+
"submodules": {},
|
|
2196
|
+
"elements": {},
|
|
2197
|
+
"classes": {
|
|
2198
|
+
"Renderer": 1
|
|
2199
|
+
},
|
|
2200
|
+
"fors": {},
|
|
2201
|
+
"namespaces": {},
|
|
2202
|
+
"tag": "module",
|
|
2203
|
+
"file": "packages/@ember/renderer/index.ts",
|
|
2204
|
+
"line": 6,
|
|
2205
|
+
"access": "public",
|
|
2206
|
+
"tagname": ""
|
|
2207
|
+
},
|
|
2224
2208
|
"@ember/runloop": {
|
|
2225
2209
|
"name": "@ember/runloop",
|
|
2226
2210
|
"submodules": {},
|
|
@@ -2234,7 +2218,7 @@
|
|
|
2234
2218
|
"namespaces": {},
|
|
2235
2219
|
"tag": "module",
|
|
2236
2220
|
"file": "packages/@ember/runloop/index.ts",
|
|
2237
|
-
"line":
|
|
2221
|
+
"line": 97
|
|
2238
2222
|
},
|
|
2239
2223
|
"@ember/service": {
|
|
2240
2224
|
"name": "@ember/service",
|
|
@@ -2514,7 +2498,7 @@
|
|
|
2514
2498
|
"module": "@ember/component",
|
|
2515
2499
|
"namespace": "",
|
|
2516
2500
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
2517
|
-
"line":
|
|
2501
|
+
"line": 38,
|
|
2518
2502
|
"description": "A component is a reusable UI element that consists of a `.hbs` template and an\noptional JavaScript class that defines its behavior. For example, someone\nmight make a `button` in the template and handle the click behavior in the\nJavaScript file that shares the same name as the template.\n\nComponents are broken down into two categories:\n\n- Components _without_ JavaScript, that are based only on a template. These\n are called Template-only or TO components.\n- Components _with_ JavaScript, which consist of a template and a backing\n class.\n\nEmber ships with two types of JavaScript classes for components:\n\n1. Glimmer components, imported from `@glimmer/component`, which are the\n default component's for Ember Octane (3.15) and more recent editions.\n2. Classic components, imported from `@ember/component`, which were the\n default for older editions of Ember (pre 3.15).\n\nBelow is the documentation for Classic components. If you are looking for the\nAPI documentation for Template-only or Glimmer components, it is\n[available here](/ember/release/modules/@glimmer%2Fcomponent).\n\n## Defining a Classic Component\n\nIf you want to customize the component in order to handle events, transform\narguments or maintain internal state, you implement a subclass of `Component`.\n\nOne example is to add computed properties to your component:\n\n```app/components/person-profile.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n displayName: computed('person.title', 'person.firstName', 'person.lastName', function() {\n let { title, firstName, lastName } = this.person;\n\n if (title) {\n return `${title} ${lastName}`;\n } else {\n return `${firstName} ${lastName}`;\n }\n })\n});\n```\n\nAnd then use it in the component's template:\n\n```app/templates/components/person-profile.hbs\n<h1>{{this.displayName}}</h1>\n{{yield}}\n```\n\n## Customizing a Classic Component's HTML Element in JavaScript\n\n### HTML Tag\n\nThe default HTML tag name used for a component's HTML representation is `div`.\nThis can be customized by setting the `tagName` property.\n\nConsider the following component class:\n\n```app/components/emphasized-paragraph.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n tagName: 'em'\n});\n```\n\nWhen invoked, this component would produce output that looks something like\nthis:\n\n```html\n<em id=\"ember1\" class=\"ember-view\"></em>\n```\n\n### HTML `class` Attribute\n\nThe HTML `class` attribute of a component's tag can be set by providing a\n`classNames` property that is set to an array of strings:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n classNames: ['my-class', 'my-other-class']\n});\n```\n\nInvoking this component will produce output that looks like this:\n\n```html\n<div id=\"ember1\" class=\"ember-view my-class my-other-class\"></div>\n```\n\n`class` attribute values can also be set by providing a `classNameBindings`\nproperty set to an array of properties names for the component. The return\nvalue of these properties will be added as part of the value for the\ncomponents's `class` attribute. These properties can be computed properties:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\nimport { computed } from '@ember/object';\n\nexport default Component.extend({\n classNames: ['my-class', 'my-other-class'],\n classNameBindings: ['propertyA', 'propertyB'],\n\n propertyA: 'from-a',\n propertyB: computed(function() {\n if (someLogic) { return 'from-b'; }\n })\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view my-class my-other-class from-a from-b\"></div>\n```\n\nNote that `classNames` and `classNameBindings` is in addition to the `class`\nattribute passed with the angle bracket invocation syntax. Therefore, if this\ncomponent was invoked like so:\n\n```handlebars\n<MyWidget class=\"from-invocation\" />\n```\n\nThe resulting HTML will look similar to this:\n\n```html\n<div id=\"ember1\" class=\"from-invocation ember-view my-class my-other-class from-a from-b\"></div>\n```\n\nIf the value of a class name binding returns a boolean the property name\nitself will be used as the class name if the property is true. The class name\nwill not be added if the value is `false` or `undefined`.\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n classNameBindings: ['hovered'],\n\n hovered: true\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view hovered\"></div>\n```\n\n### Custom Class Names for Boolean Values\n\nWhen using boolean class name bindings you can supply a string value other\nthan the property name for use as the `class` HTML attribute by appending the\npreferred value after a \":\" character when defining the binding:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n classNameBindings: ['awesome:so-very-cool'],\n\n awesome: true\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view so-very-cool\"></div>\n```\n\nBoolean value class name bindings whose property names are in a\ncamelCase-style format will be converted to a dasherized format:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n classNameBindings: ['isUrgent'],\n\n isUrgent: true\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view is-urgent\"></div>\n```\n\nClass name bindings can also refer to object values that are found by\ntraversing a path relative to the component itself:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\nimport EmberObject from '@ember/object';\n\nexport default Component.extend({\n classNameBindings: ['messages.empty'],\n\n messages: EmberObject.create({\n empty: true\n })\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view empty\"></div>\n```\n\nIf you want to add a class name for a property which evaluates to true and\nand a different class name if it evaluates to false, you can pass a binding\nlike this:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n classNameBindings: ['isEnabled:enabled:disabled'],\n isEnabled: true\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view enabled\"></div>\n```\n\nWhen isEnabled is `false`, the resulting HTML representation looks like this:\n\n```html\n<div id=\"ember1\" class=\"ember-view disabled\"></div>\n```\n\nThis syntax offers the convenience to add a class if a property is `false`:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\n// Applies no class when isEnabled is true and class 'disabled' when isEnabled is false\nexport default Component.extend({\n classNameBindings: ['isEnabled::disabled'],\n isEnabled: true\n});\n```\n\nInvoking this component when the `isEnabled` property is true will produce\nHTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view\"></div>\n```\n\nInvoking it when the `isEnabled` property on the component is `false` will\nproduce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view disabled\"></div>\n```\n\nUpdates to the value of a class name binding will result in automatic update\nof the HTML `class` attribute in the component's rendered HTML\nrepresentation. If the value becomes `false` or `undefined` the class name\nwill be removed.\n\nBoth `classNames` and `classNameBindings` are concatenated properties. See\n[EmberObject](/ember/release/classes/EmberObject) documentation for more\ninformation about concatenated properties.\n\n### Other HTML Attributes\n\nThe HTML attribute section of a component's tag can be set by providing an\n`attributeBindings` property set to an array of property names on the component.\nThe return value of these properties will be used as the value of the component's\nHTML associated attribute:\n\n```app/components/my-anchor.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n tagName: 'a',\n attributeBindings: ['href'],\n\n href: 'http://google.com'\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<a id=\"ember1\" class=\"ember-view\" href=\"http://google.com\"></a>\n```\n\nOne property can be mapped on to another by placing a \":\" between\nthe source property and the destination property:\n\n```app/components/my-anchor.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n tagName: 'a',\n attributeBindings: ['url:href'],\n\n url: 'http://google.com'\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<a id=\"ember1\" class=\"ember-view\" href=\"http://google.com\"></a>\n```\n\nHTML attributes passed with angle bracket invocations will take precedence\nover those specified in `attributeBindings`. Therefore, if this component was\ninvoked like so:\n\n```handlebars\n<MyAnchor href=\"http://bing.com\" @url=\"http://google.com\" />\n```\n\nThe resulting HTML will looks like this:\n\n```html\n<a id=\"ember1\" class=\"ember-view\" href=\"http://bing.com\"></a>\n```\n\nNote that the `href` attribute is ultimately set to `http://bing.com`,\ndespite it having attribute binidng to the `url` property, which was\nset to `http://google.com`.\n\nNamespaced attributes (e.g. `xlink:href`) are supported, but have to be\nmapped, since `:` is not a valid character for properties in Javascript:\n\n```app/components/my-use.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n tagName: 'use',\n attributeBindings: ['xlinkHref:xlink:href'],\n\n xlinkHref: '#triangle'\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<use xlink:href=\"#triangle\"></use>\n```\n\nIf the value of a property monitored by `attributeBindings` is a boolean, the\nattribute will be present or absent depending on the value:\n\n```app/components/my-text-input.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n tagName: 'input',\n attributeBindings: ['disabled'],\n\n disabled: false\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<input id=\"ember1\" class=\"ember-view\" />\n```\n\n`attributeBindings` can refer to computed properties:\n\n```app/components/my-text-input.js\nimport Component from '@ember/component';\nimport { computed } from '@ember/object';\n\nexport default Component.extend({\n tagName: 'input',\n attributeBindings: ['disabled'],\n\n disabled: computed(function() {\n if (someLogic) {\n return true;\n } else {\n return false;\n }\n })\n});\n```\n\nTo prevent setting an attribute altogether, use `null` or `undefined` as the\nvalue of the property used in `attributeBindings`:\n\n```app/components/my-text-input.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n tagName: 'form',\n attributeBindings: ['novalidate'],\n novalidate: null\n});\n```\n\nUpdates to the property of an attribute binding will result in automatic\nupdate of the HTML attribute in the component's HTML output.\n\n`attributeBindings` is a concatenated property. See\n[EmberObject](/ember/release/classes/EmberObject) documentation for more\ninformation about concatenated properties.\n\n## Layouts\n\nThe `layout` property can be used to dynamically specify a template associated\nwith a component class, instead of relying on Ember to link together a\ncomponent class and a template based on file names.\n\nIn general, applications should not use this feature, but it's commonly used\nin addons for historical reasons.\n\nThe `layout` property should be set to the default export of a template\nmodule, which is the name of a template file without the `.hbs` extension.\n\n```app/templates/components/person-profile.hbs\n<h1>Person's Title</h1>\n<div class='details'>{{yield}}</div>\n```\n\n```app/components/person-profile.js\n import Component from '@ember/component';\n import layout from '../templates/components/person-profile';\n\n export default Component.extend({\n layout\n });\n```\n\nIf you invoke the component:\n\n```handlebars\n<PersonProfile>\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n</PersonProfile>\n```\n\nor\n\n```handlebars\n{{#person-profile}}\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n{{/person-profile}}\n```\n\nIt will result in the following HTML output:\n\n```html\n<h1>Person's Title</h1>\n <div class=\"details\">\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n</div>\n```\n\n## Handling Browser Events\n\nComponents can respond to user-initiated events in one of three ways: passing\nactions with angle bracket invocation, adding event handler methods to the\ncomponent's class, or adding actions to the component's template.\n\n### Passing Actions With Angle Bracket Invocation\n\nFor one-off events specific to particular instance of a component, it is possible\nto pass actions to the component's element using angle bracket invocation syntax.\n\n```handlebars\n<MyWidget {{action 'firstWidgetClicked'}} />\n\n<MyWidget {{action 'secondWidgetClicked'}} />\n```\n\nIn this case, when the first component is clicked on, Ember will invoke the\n`firstWidgetClicked` action. When the second component is clicked on, Ember\nwill invoke the `secondWidgetClicked` action instead.\n\nBesides `{{action}}`, it is also possible to pass any arbitrary element modifiers\nusing the angle bracket invocation syntax.\n\n### Event Handler Methods\n\nComponents can also respond to user-initiated events by implementing a method\nthat matches the event name. This approach is appropriate when the same event\nshould be handled by all instances of the same component.\n\nAn event object will be passed as the argument to the event handler method.\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n click(event) {\n // `event.target` is either the component's element or one of its children\n let tag = event.target.tagName.toLowerCase();\n console.log('clicked on a `<${tag}>` HTML element!');\n }\n});\n```\n\nIn this example, whenever the user clicked anywhere inside the component, it\nwill log a message to the console.\n\nIt is possible to handle event types other than `click` by implementing the\nfollowing event handler methods. In addition, custom events can be registered\nby using `Application.customEvents`.\n\nTouch events:\n\n* `touchStart`\n* `touchMove`\n* `touchEnd`\n* `touchCancel`\n\nKeyboard events:\n\n* `keyDown`\n* `keyUp`\n* `keyPress`\n\nMouse events:\n\n* `mouseDown`\n* `mouseUp`\n* `contextMenu`\n* `click`\n* `doubleClick`\n* `focusIn`\n* `focusOut`\n\nForm events:\n\n* `submit`\n* `change`\n* `focusIn`\n* `focusOut`\n* `input`\n\nDrag and drop events:\n\n* `dragStart`\n* `drag`\n* `dragEnter`\n* `dragLeave`\n* `dragOver`\n* `dragEnd`\n* `drop`\n\n### `{{action}}` Helper\n\nInstead of handling all events of a particular type anywhere inside the\ncomponent's element, you may instead want to limit it to a particular\nelement in the component's template. In this case, it would be more\nconvenient to implement an action instead.\n\nFor example, you could implement the action `hello` for the `person-profile`\ncomponent:\n\n```app/components/person-profile.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n actions: {\n hello(name) {\n console.log(\"Hello\", name);\n }\n }\n});\n```\n\nAnd then use it in the component's template:\n\n```app/templates/components/person-profile.hbs\n<h1>{{@person.name}}</h1>\n\n<button {{action 'hello' @person.name}}>\n Say Hello to {{@person.name}}\n</button>\n```\n\nWhen the user clicks the button, Ember will invoke the `hello` action,\npassing in the current value of `@person.name` as an argument.\n\nSee [Ember.Templates.helpers.action](/ember/release/classes/Ember.Templates.helpers/methods/action?anchor=action).",
|
|
2519
2503
|
"extends": "Ember.CoreView",
|
|
2520
2504
|
"uses": [
|
|
@@ -2549,7 +2533,7 @@
|
|
|
2549
2533
|
"module": "@ember/component",
|
|
2550
2534
|
"namespace": "",
|
|
2551
2535
|
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
2552
|
-
"line":
|
|
2536
|
+
"line": 45,
|
|
2553
2537
|
"description": "Ember Helpers are functions that can compute values, and are used in templates.\nFor example, this code calls a helper named `format-currency`:\n\n```app/templates/application.hbs\n<Cost @cents={{230}} />\n```\n\n```app/components/cost.hbs\n<div>{{format-currency @cents currency=\"$\"}}</div>\n```\n\nAdditionally a helper can be called as a nested helper.\nIn this example, we show the formatted currency value if the `showMoney`\nnamed argument is truthy.\n\n```handlebars\n{{if @showMoney (format-currency @cents currency=\"$\")}}\n```\n\nHelpers defined using a class must provide a `compute` function. For example:\n\n```app/helpers/format-currency.js\nimport Helper from '@ember/component/helper';\n\nexport default class extends Helper {\n compute([cents], { currency }) {\n return `${currency}${cents * 0.01}`;\n }\n}\n```\n\nEach time the input to a helper changes, the `compute` function will be\ncalled again.\n\nAs instances, these helpers also have access to the container and will accept\ninjected dependencies.\n\nAdditionally, class helpers can call `recompute` to force a new computation.",
|
|
2554
2538
|
"extends": "CoreObject",
|
|
2555
2539
|
"access": "public",
|
|
@@ -2600,7 +2584,7 @@
|
|
|
2600
2584
|
"module": "@ember/object",
|
|
2601
2585
|
"namespace": "",
|
|
2602
2586
|
"file": "packages/@ember/-internals/metal/lib/computed.ts",
|
|
2603
|
-
"line":
|
|
2587
|
+
"line": 74,
|
|
2604
2588
|
"description": "`@computed` is a decorator that turns a JavaScript getter and setter into a\ncomputed property, which is a _cached, trackable value_. By default the getter\nwill only be called once and the result will be cached. You can specify\nvarious properties that your computed property depends on. This will force the\ncached result to be cleared if the dependencies are modified, and lazily recomputed the next time something asks for it.\n\nIn the following example we decorate a getter - `fullName` - by calling\n`computed` with the property dependencies (`firstName` and `lastName`) as\narguments. The `fullName` getter will be called once (regardless of how many\ntimes it is accessed) as long as its dependencies do not change. Once\n`firstName` or `lastName` are updated any future calls to `fullName` will\nincorporate the new values, and any watchers of the value such as templates\nwill be updated:\n\n```javascript\nimport { computed, set } from '@ember/object';\n\nclass Person {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @computed('firstName', 'lastName')\n get fullName() {\n return `${this.firstName} ${this.lastName}`;\n }\n});\n\nlet tom = new Person('Tom', 'Dale');\n\ntom.fullName; // 'Tom Dale'\n```\n\nYou can also provide a setter, which will be used when updating the computed\nproperty. Ember's `set` function must be used to update the property\nsince it will also notify observers of the property:\n\n```javascript\nimport { computed, set } from '@ember/object';\n\nclass Person {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @computed('firstName', 'lastName')\n get fullName() {\n return `${this.firstName} ${this.lastName}`;\n }\n\n set fullName(value) {\n let [firstName, lastName] = value.split(' ');\n\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n});\n\nlet person = new Person();\n\nset(person, 'fullName', 'Peter Wagenet');\nperson.firstName; // 'Peter'\nperson.lastName; // 'Wagenet'\n```\n\nYou can also pass a getter function or object with `get` and `set` functions\nas the last argument to the computed decorator. This allows you to define\ncomputed property _macros_:\n\n```js\nimport { computed } from '@ember/object';\n\nfunction join(...keys) {\n return computed(...keys, function() {\n return keys.map(key => this[key]).join(' ');\n });\n}\n\nclass Person {\n @join('firstName', 'lastName')\n fullName;\n}\n```\n\nNote that when defined this way, getters and setters receive the _key_ of the\nproperty they are decorating as the first argument. Setters receive the value\nthey are setting to as the second argument instead. Additionally, setters must\n_return_ the value that should be cached:\n\n```javascript\nimport { computed, set } from '@ember/object';\n\nfunction fullNameMacro(firstNameKey, lastNameKey) {\n return computed(firstNameKey, lastNameKey, {\n get() {\n return `${this[firstNameKey]} ${this[lastNameKey]}`;\n }\n\n set(key, value) {\n let [firstName, lastName] = value.split(' ');\n\n set(this, firstNameKey, firstName);\n set(this, lastNameKey, lastName);\n\n return value;\n }\n });\n}\n\nclass Person {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @fullNameMacro('firstName', 'lastName') fullName;\n});\n\nlet person = new Person();\n\nset(person, 'fullName', 'Peter Wagenet');\nperson.firstName; // 'Peter'\nperson.lastName; // 'Wagenet'\n```\n\nComputed properties can also be used in classic classes. To do this, we\nprovide the getter and setter as the last argument like we would for a macro,\nand we assign it to a property on the class definition. This is an _anonymous_\ncomputed macro:\n\n```javascript\nimport EmberObject, { computed, set } from '@ember/object';\n\nlet Person = EmberObject.extend({\n // these will be supplied by `create`\n firstName: null,\n lastName: null,\n\n fullName: computed('firstName', 'lastName', {\n get() {\n return `${this.firstName} ${this.lastName}`;\n }\n\n set(key, value) {\n let [firstName, lastName] = value.split(' ');\n\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n\n return value;\n }\n })\n});\n\nlet tom = Person.create({\n firstName: 'Tom',\n lastName: 'Dale'\n});\n\ntom.get('fullName') // 'Tom Dale'\n```\n\nYou can overwrite computed property without setters with a normal property (no\nlonger computed) that won't change if dependencies change. You can also mark\ncomputed property as `.readOnly()` and block all attempts to set it.\n\n```javascript\nimport { computed, set } from '@ember/object';\n\nclass Person {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @computed('firstName', 'lastName').readOnly()\n get fullName() {\n return `${this.firstName} ${this.lastName}`;\n }\n});\n\nlet person = new Person();\nperson.set('fullName', 'Peter Wagenet'); // Uncaught Error: Cannot set read-only property \"fullName\" on object: <(...):emberXXX>\n```\n\nAdditional resources:\n- [Decorators RFC](https://github.com/emberjs/rfcs/blob/master/text/0408-decorators.md)\n- [New CP syntax RFC](https://github.com/emberjs/rfcs/blob/master/text/0011-improved-cp-syntax.md)\n- [New computed syntax explained in \"Ember 1.12 released\" ](https://emberjs.com/blog/2015/05/13/ember-1-12-released.html#toc_new-computed-syntax)",
|
|
2605
2589
|
"access": "public",
|
|
2606
2590
|
"tagname": ""
|
|
@@ -2744,7 +2728,7 @@
|
|
|
2744
2728
|
"module": "@ember/object",
|
|
2745
2729
|
"namespace": "",
|
|
2746
2730
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
2747
|
-
"line":
|
|
2731
|
+
"line": 445,
|
|
2748
2732
|
"description": "The `Mixin` class allows you to create mixins, whose properties can be\nadded to other classes. For instance,\n\n```javascript\nimport Mixin from '@ember/object/mixin';\n\nconst EditableMixin = Mixin.create({\n edit() {\n console.log('starting to edit');\n this.set('isEditing', true);\n },\n isEditing: false\n});\n```\n\n```javascript\nimport EmberObject from '@ember/object';\nimport EditableMixin from '../mixins/editable';\n\n// Mix mixins into classes by passing them as the first arguments to\n// `.extend.`\nconst Comment = EmberObject.extend(EditableMixin, {\n post: null\n});\n\nlet comment = Comment.create({\n post: somePost\n});\n\ncomment.edit(); // outputs 'starting to edit'\n```\n\nNote that Mixins are created with `Mixin.create`, not\n`Mixin.extend`.\n\nNote that mixins extend a constructor's prototype so arrays and object literals\ndefined as properties will be shared amongst objects that implement the mixin.\nIf you want to define a property in a mixin that is not shared, you can define\nit either as a computed property or have it be created on initialization of the object.\n\n```javascript\n// filters array will be shared amongst any object implementing mixin\nimport Mixin from '@ember/object/mixin';\nimport { A } from '@ember/array';\n\nconst FilterableMixin = Mixin.create({\n filters: A()\n});\n```\n\n```javascript\nimport Mixin from '@ember/object/mixin';\nimport { A } from '@ember/array';\nimport { computed } from '@ember/object';\n\n// filters will be a separate array for every object implementing the mixin\nconst FilterableMixin = Mixin.create({\n filters: computed(function() {\n return A();\n })\n});\n```\n\n```javascript\nimport Mixin from '@ember/object/mixin';\nimport { A } from '@ember/array';\n\n// filters will be created as a separate array during the object's initialization\nconst Filterable = Mixin.create({\n filters: null,\n\n init() {\n this._super(...arguments);\n this.set(\"filters\", A());\n }\n});\n```",
|
|
2749
2733
|
"access": "public",
|
|
2750
2734
|
"tagname": ""
|
|
@@ -2829,7 +2813,7 @@
|
|
|
2829
2813
|
"module": "@ember/routing",
|
|
2830
2814
|
"namespace": "",
|
|
2831
2815
|
"file": "packages/@ember/-internals/routing/lib/location/auto_location.ts",
|
|
2832
|
-
"line":
|
|
2816
|
+
"line": 22,
|
|
2833
2817
|
"description": "AutoLocation will select the best location option based off browser\nsupport with the priority order: history, hash, none.\n\nClean pushState paths accessed by hashchange-only browsers will be redirected\nto the hash-equivalent and vice versa so future transitions are consistent.\n\nKeep in mind that since some of your users will use `HistoryLocation`, your\nserver must serve the Ember app at all the routes you define.\n\nBrowsers that support the `history` API will use `HistoryLocation`, those that\ndo not, but still support the `hashchange` event will use `HashLocation`, and\nin the rare case neither is supported will use `NoneLocation`.\n\nExample:\n\n```app/router.js\nRouter.map(function() {\n this.route('posts', function() {\n this.route('new');\n });\n});\n\nRouter.reopen({\n location: 'auto'\n});\n```\n\nThis will result in a posts.new url of `/posts/new` for modern browsers that\nsupport the `history` api or `/#/posts/new` for older ones, like Internet\nExplorer 9 and below.\n\nWhen a user visits a link to your application, they will be automatically\nupgraded or downgraded to the appropriate `Location` class, with the URL\ntransformed accordingly, if needed.\n\nKeep in mind that since some of your users will use `HistoryLocation`, your\nserver must serve the Ember app at all the routes you define.",
|
|
2834
2818
|
"static": 1,
|
|
2835
2819
|
"access": "protected",
|
|
@@ -2897,7 +2881,7 @@
|
|
|
2897
2881
|
"module": "@ember/routing",
|
|
2898
2882
|
"namespace": "",
|
|
2899
2883
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
2900
|
-
"line":
|
|
2884
|
+
"line": 23,
|
|
2901
2885
|
"description": "The Router service is the public API that provides access to the router.\n\nThe immediate benefit of the Router service is that you can inject it into components,\ngiving them a friendly way to initiate transitions and ask questions about the current\nglobal router state.\n\nIn this example, the Router service is injected into a component to initiate a transition\nto a dedicated route:\n\n```app/components/example.js\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { service } from '@ember/service';\n\nexport default class ExampleComponent extends Component {\n @service router;\n\n @action\n next() {\n this.router.transitionTo('other.route');\n }\n}\n```\n\nLike any service, it can also be injected into helpers, routes, etc.",
|
|
2902
2886
|
"access": "public",
|
|
2903
2887
|
"tagname": "",
|
|
@@ -2914,7 +2898,7 @@
|
|
|
2914
2898
|
"module": "ember",
|
|
2915
2899
|
"namespace": "",
|
|
2916
2900
|
"file": "packages/@ember/-internals/routing/lib/services/routing.ts",
|
|
2917
|
-
"line":
|
|
2901
|
+
"line": 15,
|
|
2918
2902
|
"description": "The Routing service is used by LinkTo, and provides facilities for\nthe component/view layer to interact with the router.\n\nThis is a private service for internal usage only. For public usage,\nrefer to the `Router` service.",
|
|
2919
2903
|
"access": "private",
|
|
2920
2904
|
"tagname": ""
|
|
@@ -2978,7 +2962,7 @@
|
|
|
2978
2962
|
"module": "@ember/routing",
|
|
2979
2963
|
"namespace": "",
|
|
2980
2964
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
2981
|
-
"line":
|
|
2965
|
+
"line": 85,
|
|
2982
2966
|
"description": "The `Route` class is used to define individual routes. Refer to\nthe [routing guide](https://guides.emberjs.com/release/routing/) for documentation.",
|
|
2983
2967
|
"extends": "EmberObject",
|
|
2984
2968
|
"uses": [
|
|
@@ -3000,7 +2984,7 @@
|
|
|
3000
2984
|
"module": "@ember/routing",
|
|
3001
2985
|
"namespace": "",
|
|
3002
2986
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
3003
|
-
"line":
|
|
2987
|
+
"line": 141,
|
|
3004
2988
|
"description": "The `EmberRouter` class manages the application state and URLs. Refer to\nthe [routing guide](https://guides.emberjs.com/release/routing/) for documentation.",
|
|
3005
2989
|
"extends": "EmberObject",
|
|
3006
2990
|
"uses": [
|
|
@@ -3037,8 +3021,8 @@
|
|
|
3037
3021
|
],
|
|
3038
3022
|
"module": "ember",
|
|
3039
3023
|
"namespace": "Ember",
|
|
3040
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/-proxy.
|
|
3041
|
-
"line":
|
|
3024
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/-proxy.ts",
|
|
3025
|
+
"line": 62,
|
|
3042
3026
|
"description": "`Ember.ProxyMixin` forwards all properties not defined by the proxy itself\nto a proxied `content` object. See ObjectProxy for more details.",
|
|
3043
3027
|
"access": "private",
|
|
3044
3028
|
"tagname": ""
|
|
@@ -3056,7 +3040,7 @@
|
|
|
3056
3040
|
],
|
|
3057
3041
|
"module": "ember",
|
|
3058
3042
|
"namespace": "Ember",
|
|
3059
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.
|
|
3043
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts",
|
|
3060
3044
|
"line": 8,
|
|
3061
3045
|
"description": "`Ember.ActionHandler` is available on some familiar classes including\n`Route`, `Component`, and `Controller`.\n(Internally the mixin is used by `Ember.CoreView`, `Ember.ControllerMixin`,\nand `Route` and available to the above classes through\ninheritance.)",
|
|
3062
3046
|
"access": "private",
|
|
@@ -3148,7 +3132,7 @@
|
|
|
3148
3132
|
"extension_for": [],
|
|
3149
3133
|
"module": "ember",
|
|
3150
3134
|
"namespace": "Ember",
|
|
3151
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/comparable.
|
|
3135
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/comparable.ts",
|
|
3152
3136
|
"line": 7,
|
|
3153
3137
|
"description": "Implements some standard methods for comparing objects. Add this mixin to\nany class you create that can compare its instances.\n\nYou should implement the `compare()` method.",
|
|
3154
3138
|
"since": "Ember 0.9",
|
|
@@ -3167,8 +3151,8 @@
|
|
|
3167
3151
|
],
|
|
3168
3152
|
"module": "ember",
|
|
3169
3153
|
"namespace": "",
|
|
3170
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.
|
|
3171
|
-
"line":
|
|
3154
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.ts",
|
|
3155
|
+
"line": 18,
|
|
3172
3156
|
"description": "ContainerProxyMixin is used to provide public access to specific\ncontainer functionality.",
|
|
3173
3157
|
"access": "private",
|
|
3174
3158
|
"tagname": ""
|
|
@@ -3186,7 +3170,7 @@
|
|
|
3186
3170
|
],
|
|
3187
3171
|
"module": "@ember/enumerable",
|
|
3188
3172
|
"namespace": "",
|
|
3189
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/enumerable.
|
|
3173
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/enumerable.ts",
|
|
3190
3174
|
"line": 8,
|
|
3191
3175
|
"description": "The methods in this mixin have been moved to [MutableArray](/ember/release/classes/MutableArray). This mixin has\nbeen intentionally preserved to avoid breaking Enumerable.detect checks\nuntil the community migrates away from them.",
|
|
3192
3176
|
"access": "private",
|
|
@@ -3206,7 +3190,7 @@
|
|
|
3206
3190
|
],
|
|
3207
3191
|
"module": "@ember/object",
|
|
3208
3192
|
"namespace": "",
|
|
3209
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
3193
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.ts",
|
|
3210
3194
|
"line": 13,
|
|
3211
3195
|
"description": "This mixin allows for Ember objects to subscribe to and emit events.\n\n```app/utils/person.js\nimport EmberObject from '@ember/object';\nimport Evented from '@ember/object/evented';\n\nexport default EmberObject.extend(Evented, {\n greet() {\n // ...\n this.trigger('greet');\n }\n});\n```\n\n```javascript\nvar person = Person.create();\n\nperson.on('greet', function() {\n console.log('Our person has greeted');\n});\n\nperson.greet();\n\n// outputs: 'Our person has greeted'\n```\n\nYou can also chain multiple event subscriptions:\n\n```javascript\nperson.on('greet', function() {\n console.log('Our person has greeted');\n}).one('greet', function() {\n console.log('Offer one-time special');\n}).off('event', this, forgetThis);\n```",
|
|
3212
3196
|
"access": "public",
|
|
@@ -3222,7 +3206,7 @@
|
|
|
3222
3206
|
"extension_for": [],
|
|
3223
3207
|
"module": "ember",
|
|
3224
3208
|
"namespace": "Ember",
|
|
3225
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/mutable_enumerable.
|
|
3209
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/mutable_enumerable.ts",
|
|
3226
3210
|
"line": 8,
|
|
3227
3211
|
"description": "The methods in this mixin have been moved to MutableArray. This mixin has\nbeen intentionally preserved to avoid breaking MutableEnumerable.detect\nchecks until the community migrates away from them.",
|
|
3228
3212
|
"uses": [
|
|
@@ -3244,8 +3228,8 @@
|
|
|
3244
3228
|
],
|
|
3245
3229
|
"module": "@ember/object",
|
|
3246
3230
|
"namespace": "",
|
|
3247
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
3248
|
-
"line":
|
|
3231
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
3232
|
+
"line": 25,
|
|
3249
3233
|
"description": "## Overview\n\nThis mixin provides properties and property observing functionality, core\nfeatures of the Ember object model.\n\nProperties and observers allow one object to observe changes to a\nproperty on another object. This is one of the fundamental ways that\nmodels, controllers and views communicate with each other in an Ember\napplication.\n\nAny object that has this mixin applied can be used in observer\noperations. That includes `EmberObject` and most objects you will\ninteract with as you write your Ember application.\n\nNote that you will not generally apply this mixin to classes yourself,\nbut you will use the features provided by this module frequently, so it\nis important to understand how to use it.\n\n## Using `get()` and `set()`\n\nBecause of Ember's support for bindings and observers, you will always\naccess properties using the get method, and set properties using the\nset method. This allows the observing objects to be notified and\ncomputed properties to be handled properly.\n\nMore documentation about `get` and `set` are below.\n\n## Observing Property Changes\n\nYou typically observe property changes simply by using the `observer`\nfunction in classes that you write.\n\nFor example:\n\n```javascript\nimport { observer } from '@ember/object';\nimport EmberObject from '@ember/object';\n\nEmberObject.extend({\n valueObserver: observer('value', function(sender, key, value, rev) {\n // Executes whenever the \"value\" property changes\n // See the addObserver method for more information about the callback arguments\n })\n});\n```\n\nAlthough this is the most common way to add an observer, this capability\nis actually built into the `EmberObject` class on top of two methods\ndefined in this mixin: `addObserver` and `removeObserver`. You can use\nthese two methods to add and remove observers yourself if you need to\ndo so at runtime.\n\nTo add an observer for a property, call:\n\n```javascript\nobject.addObserver('propertyKey', targetObject, targetAction)\n```\n\nThis will call the `targetAction` method on the `targetObject` whenever\nthe value of the `propertyKey` changes.\n\nNote that if `propertyKey` is a computed property, the observer will be\ncalled when any of the property dependencies are changed, even if the\nresulting value of the computed property is unchanged. This is necessary\nbecause computed properties are not computed until `get` is called.",
|
|
3250
3234
|
"access": "public",
|
|
3251
3235
|
"tagname": ""
|
|
@@ -3260,8 +3244,8 @@
|
|
|
3260
3244
|
"extension_for": [],
|
|
3261
3245
|
"module": "@ember/object",
|
|
3262
3246
|
"namespace": "",
|
|
3263
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.
|
|
3264
|
-
"line":
|
|
3247
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.ts",
|
|
3248
|
+
"line": 46,
|
|
3265
3249
|
"description": "A low level mixin making ObjectProxy promise-aware.\n\n```javascript\nimport { resolve } from 'rsvp';\nimport $ from 'jquery';\nimport ObjectProxy from '@ember/object/proxy';\nimport PromiseProxyMixin from '@ember/object/promise-proxy-mixin';\n\nlet ObjectPromiseProxy = ObjectProxy.extend(PromiseProxyMixin);\n\nlet proxy = ObjectPromiseProxy.create({\n promise: resolve($.getJSON('/some/remote/data.json'))\n});\n\nproxy.then(function(json){\n // the json\n}, function(reason) {\n // the reason why you have no json\n});\n```\n\nthe proxy has bindable attributes which\ntrack the promises life cycle\n\n```javascript\nproxy.get('isPending') //=> true\nproxy.get('isSettled') //=> false\nproxy.get('isRejected') //=> false\nproxy.get('isFulfilled') //=> false\n```\n\nWhen the $.getJSON completes, and the promise is fulfilled\nwith json, the life cycle attributes will update accordingly.\nNote that $.getJSON doesn't return an ECMA specified promise,\nit is useful to wrap this with an `RSVP.resolve` so that it behaves\nas a spec compliant promise.\n\n```javascript\nproxy.get('isPending') //=> false\nproxy.get('isSettled') //=> true\nproxy.get('isRejected') //=> false\nproxy.get('isFulfilled') //=> true\n```\n\nAs the proxy is an ObjectProxy, and the json now its content,\nall the json properties will be available directly from the proxy.\n\n```javascript\n// Assuming the following json:\n{\n firstName: 'Stefan',\n lastName: 'Penner'\n}\n\n// both properties will accessible on the proxy\nproxy.get('firstName') //=> 'Stefan'\nproxy.get('lastName') //=> 'Penner'\n```",
|
|
3266
3250
|
"access": "public",
|
|
3267
3251
|
"tagname": ""
|
|
@@ -3279,8 +3263,8 @@
|
|
|
3279
3263
|
],
|
|
3280
3264
|
"module": "ember",
|
|
3281
3265
|
"namespace": "",
|
|
3282
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
3283
|
-
"line":
|
|
3266
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
3267
|
+
"line": 37,
|
|
3284
3268
|
"description": "RegistryProxyMixin is used to provide public access to specific\nregistry functionality.",
|
|
3285
3269
|
"access": "private",
|
|
3286
3270
|
"tagname": ""
|
|
@@ -3297,7 +3281,7 @@
|
|
|
3297
3281
|
],
|
|
3298
3282
|
"module": "ember",
|
|
3299
3283
|
"namespace": "Ember",
|
|
3300
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.
|
|
3284
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.ts",
|
|
3301
3285
|
"line": 10,
|
|
3302
3286
|
"description": "`Ember.TargetActionSupport` is a mixin that can be included in a class\nto add a `triggerAction` method with semantics similar to the Handlebars\n`{{action}}` helper. In normal Ember usage, the `{{action}}` helper is\nusually the best choice. This mixin is most often useful when you are\ndoing more complex event handling in Components.",
|
|
3303
3287
|
"extends": "Mixin",
|
|
@@ -3314,8 +3298,8 @@
|
|
|
3314
3298
|
"extension_for": [],
|
|
3315
3299
|
"module": "@ember/array",
|
|
3316
3300
|
"namespace": "",
|
|
3317
|
-
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.
|
|
3318
|
-
"line":
|
|
3301
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
3302
|
+
"line": 58,
|
|
3319
3303
|
"description": "An ArrayProxy wraps any other object that implements `Array` and/or\n`MutableArray,` forwarding all requests. This makes it very useful for\na number of binding use cases or other cases where being able to swap\nout the underlying array is useful.\n\nA simple example of usage:\n\n```javascript\nimport { A } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nlet pets = ['dog', 'cat', 'fish'];\nlet ap = ArrayProxy.create({ content: A(pets) });\n\nap.get('firstObject'); // 'dog'\nap.set('content', ['amoeba', 'paramecium']);\nap.get('firstObject'); // 'amoeba'\n```\n\nThis class can also be useful as a layer to transform the contents of\nan array, as they are accessed. This can be done by overriding\n`objectAtContent`:\n\n```javascript\nimport { A } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nlet pets = ['dog', 'cat', 'fish'];\nlet ap = ArrayProxy.create({\n content: A(pets),\n objectAtContent: function(idx) {\n return this.get('content').objectAt(idx).toUpperCase();\n }\n});\n\nap.get('firstObject'); // . 'DOG'\n```\n\nWhen overriding this class, it is important to place the call to\n`_super` *after* setting `content` so the internal observers have\na chance to fire properly:\n\n```javascript\nimport { A } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nexport default ArrayProxy.extend({\n init() {\n this.set('content', A(['dog', 'cat', 'fish']));\n this._super(...arguments);\n }\n});\n```",
|
|
3320
3304
|
"extends": "EmberObject",
|
|
3321
3305
|
"uses": [
|
|
@@ -3387,7 +3371,7 @@
|
|
|
3387
3371
|
"extension_for": [],
|
|
3388
3372
|
"module": "@ember/object",
|
|
3389
3373
|
"namespace": "",
|
|
3390
|
-
"file": "packages/@ember/-internals/runtime/lib/system/object_proxy.
|
|
3374
|
+
"file": "packages/@ember/-internals/runtime/lib/system/object_proxy.ts",
|
|
3391
3375
|
"line": 4,
|
|
3392
3376
|
"description": "`ObjectProxy` forwards all properties not defined by the proxy itself\nto a proxied `content` object.\n\n```javascript\nimport EmberObject from '@ember/object';\nimport ObjectProxy from '@ember/object/proxy';\n\nlet exampleObject = EmberObject.create({\n name: 'Foo'\n});\n\nlet exampleProxy = ObjectProxy.create({\n content: exampleObject\n});\n\n// Access and change existing properties\nexampleProxy.get('name'); // 'Foo'\nexampleProxy.set('name', 'Bar');\nexampleObject.get('name'); // 'Bar'\n\n// Create new 'description' property on `exampleObject`\nexampleProxy.set('description', 'Foo is a whizboo baz');\nexampleObject.get('description'); // 'Foo is a whizboo baz'\n```\n\nWhile `content` is unset, setting a property to be delegated will throw an\nError.\n\n```javascript\nimport ObjectProxy from '@ember/object/proxy';\n\nlet exampleProxy = ObjectProxy.create({\n content: null,\n flag: null\n});\nexampleProxy.set('flag', true);\nexampleProxy.get('flag'); // true\nexampleProxy.get('foo'); // undefined\nexampleProxy.set('foo', 'data'); // throws Error\n```\n\nDelegated properties can be bound to and will change when content is updated.\n\nComputed properties on the proxy itself can depend on delegated properties.\n\n```javascript\nimport { computed } from '@ember/object';\nimport ObjectProxy from '@ember/object/proxy';\n\nProxyWithComputedProperty = ObjectProxy.extend({\n fullName: computed('firstName', 'lastName', function() {\n var firstName = this.get('firstName'),\n lastName = this.get('lastName');\n if (firstName && lastName) {\n return firstName + ' ' + lastName;\n }\n return firstName || lastName;\n })\n});\n\nlet exampleProxy = ProxyWithComputedProperty.create();\n\nexampleProxy.get('fullName'); // undefined\nexampleProxy.set('content', {\n firstName: 'Tom', lastName: 'Dale'\n}); // triggers property change for fullName on proxy\n\nexampleProxy.get('fullName'); // 'Tom Dale'\n```",
|
|
3393
3377
|
"extends": "EmberObject",
|
|
@@ -3420,8 +3404,8 @@
|
|
|
3420
3404
|
],
|
|
3421
3405
|
"module": "ember",
|
|
3422
3406
|
"namespace": "Ember",
|
|
3423
|
-
"file": "packages/@ember/-internals/views/lib/mixins/action_support.
|
|
3424
|
-
"line":
|
|
3407
|
+
"file": "packages/@ember/-internals/views/lib/mixins/action_support.ts",
|
|
3408
|
+
"line": 8,
|
|
3425
3409
|
"access": "private",
|
|
3426
3410
|
"tagname": ""
|
|
3427
3411
|
},
|
|
@@ -3437,7 +3421,7 @@
|
|
|
3437
3421
|
],
|
|
3438
3422
|
"module": "ember",
|
|
3439
3423
|
"namespace": "Ember",
|
|
3440
|
-
"file": "packages/@ember/-internals/views/lib/mixins/class_names_support.
|
|
3424
|
+
"file": "packages/@ember/-internals/views/lib/mixins/class_names_support.ts",
|
|
3441
3425
|
"line": 9,
|
|
3442
3426
|
"access": "private",
|
|
3443
3427
|
"tagname": ""
|
|
@@ -3454,8 +3438,8 @@
|
|
|
3454
3438
|
],
|
|
3455
3439
|
"module": "ember",
|
|
3456
3440
|
"namespace": "Ember",
|
|
3457
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
3458
|
-
"line":
|
|
3441
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
3442
|
+
"line": 14,
|
|
3459
3443
|
"access": "private",
|
|
3460
3444
|
"tagname": ""
|
|
3461
3445
|
},
|
|
@@ -3469,8 +3453,8 @@
|
|
|
3469
3453
|
"extension_for": [],
|
|
3470
3454
|
"module": "ember",
|
|
3471
3455
|
"namespace": "Ember",
|
|
3472
|
-
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.
|
|
3473
|
-
"line":
|
|
3456
|
+
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts",
|
|
3457
|
+
"line": 19,
|
|
3474
3458
|
"description": "`Ember.EventDispatcher` handles delegating browser events to their\ncorresponding `Ember.Views.` For example, when you click on a view,\n`Ember.EventDispatcher` ensures that that view's `mouseDown` method gets\ncalled.",
|
|
3475
3459
|
"access": "private",
|
|
3476
3460
|
"tagname": "",
|
|
@@ -3510,7 +3494,7 @@
|
|
|
3510
3494
|
"module": "@ember/application",
|
|
3511
3495
|
"namespace": "",
|
|
3512
3496
|
"file": "packages/@ember/application/lib/application.ts",
|
|
3513
|
-
"line":
|
|
3497
|
+
"line": 32,
|
|
3514
3498
|
"description": "An instance of `Application` is the starting point for every Ember\napplication. It instantiates, initializes and coordinates the\nobjects that make up your app.\n\nEach Ember app has one and only one `Application` object. Although\nEmber CLI creates this object implicitly, the `Application` class\nis defined in the `app/app.js`. You can define a `ready` method on the\n`Application` class, which will be run by Ember when the application is\ninitialized.\n\n```app/app.js\nconst App = Application.extend({\n ready() {\n // your code here\n }\n})\n```\n\nBecause `Application` ultimately inherits from `Ember.Namespace`, any classes\nyou create will have useful string representations when calling `toString()`.\nSee the `Ember.Namespace` documentation for more information.\n\nWhile you can think of your `Application` as a container that holds the\nother classes in your application, there are several other responsibilities\ngoing on under-the-hood that you may want to understand. It is also important\nto understand that an `Application` is different from an `ApplicationInstance`.\nRefer to the Guides to understand the difference between these.\n\n### Event Delegation\n\nEmber uses a technique called _event delegation_. This allows the framework\nto set up a global, shared event listener instead of requiring each view to\ndo it manually. For example, instead of each view registering its own\n`mousedown` listener on its associated element, Ember sets up a `mousedown`\nlistener on the `body`.\n\nIf a `mousedown` event occurs, Ember will look at the target of the event and\nstart walking up the DOM node tree, finding corresponding views and invoking\ntheir `mouseDown` method as it goes.\n\n`Application` has a number of default events that it listens for, as\nwell as a mapping from lowercase events to camel-cased view method names. For\nexample, the `keypress` event causes the `keyPress` method on the view to be\ncalled, the `dblclick` event causes `doubleClick` to be called, and so on.\n\nIf there is a bubbling browser event that Ember does not listen for by\ndefault, you can specify custom events and their corresponding view method\nnames by setting the application's `customEvents` property:\n\n```app/app.js\nimport Application from '@ember/application';\n\nlet App = Application.extend({\n customEvents: {\n // add support for the paste event\n paste: 'paste'\n }\n});\n```\n\nTo prevent Ember from setting up a listener for a default event,\nspecify the event name with a `null` value in the `customEvents`\nproperty:\n\n```app/app.js\nimport Application from '@ember/application';\n\nlet App = Application.extend({\n customEvents: {\n // prevent listeners for mouseenter/mouseleave events\n mouseenter: null,\n mouseleave: null\n }\n});\n```\n\nBy default, the application sets up these event listeners on the document\nbody. However, in cases where you are embedding an Ember application inside\nan existing page, you may want it to set up the listeners on an element\ninside the body.\n\nFor example, if only events inside a DOM element with the ID of `ember-app`\nshould be delegated, set your application's `rootElement` property:\n\n```app/app.js\nimport Application from '@ember/application';\n\nlet App = Application.extend({\n rootElement: '#ember-app'\n});\n```\n\nThe `rootElement` can be either a DOM element or a CSS selector\nstring. Note that *views appended to the DOM outside the root element will\nnot receive events.* If you specify a custom root element, make sure you only\nappend views inside it!\n\nTo learn more about the events Ember components use, see\n\n[components/handling-events](https://guides.emberjs.com/release/components/handling-events/#toc_event-names).\n\n### Initializers\n\nTo add behavior to the Application's boot process, you can define initializers in\nthe `app/initializers` directory, or with `ember generate initializer` using Ember CLI.\nThese files should export a named `initialize` function which will receive the created `application`\nobject as its first argument.\n\n```javascript\nexport function initialize(application) {\n // application.inject('route', 'foo', 'service:foo');\n}\n```\n\nApplication initializers can be used for a variety of reasons including:\n\n- setting up external libraries\n- injecting dependencies\n- setting up event listeners in embedded apps\n- deferring the boot process using the `deferReadiness` and `advanceReadiness` APIs.\n\n### Routing\n\nIn addition to creating your application's router, `Application` is\nalso responsible for telling the router when to start routing. Transitions\nbetween routes can be logged with the `LOG_TRANSITIONS` flag, and more\ndetailed intra-transition logging can be logged with\nthe `LOG_TRANSITIONS_INTERNAL` flag:\n\n```javascript\nimport Application from '@ember/application';\n\nlet App = Application.create({\n LOG_TRANSITIONS: true, // basic logging of successful transitions\n LOG_TRANSITIONS_INTERNAL: true // detailed logging of all routing steps\n});\n```\n\nBy default, the router will begin trying to translate the current URL into\napplication state once the browser emits the `DOMContentReady` event. If you\nneed to defer routing, you can call the application's `deferReadiness()`\nmethod. Once routing can begin, call the `advanceReadiness()` method.\n\nIf there is any setup required before routing begins, you can implement a\n`ready()` method on your app that will be invoked immediately before routing\nbegins.",
|
|
3515
3499
|
"extends": "Engine",
|
|
3516
3500
|
"access": "public",
|
|
@@ -3527,7 +3511,7 @@
|
|
|
3527
3511
|
"module": "@ember/application",
|
|
3528
3512
|
"namespace": "",
|
|
3529
3513
|
"file": "packages/@ember/application/instance.ts",
|
|
3530
|
-
"line":
|
|
3514
|
+
"line": 28,
|
|
3531
3515
|
"description": "The `ApplicationInstance` encapsulates all of the stateful aspects of a\nrunning `Application`.\n\nAt a high-level, we break application boot into two distinct phases:\n\n* Definition time, where all of the classes, templates, and other\n dependencies are loaded (typically in the browser).\n* Run time, where we begin executing the application once everything\n has loaded.\n\nDefinition time can be expensive and only needs to happen once since it is\nan idempotent operation. For example, between test runs and FastBoot\nrequests, the application stays the same. It is only the state that we want\nto reset.\n\nThat state is what the `ApplicationInstance` manages: it is responsible for\ncreating the container that contains all application state, and disposing of\nit once the particular test run or FastBoot request has finished.",
|
|
3532
3516
|
"access": "public",
|
|
3533
3517
|
"tagname": "",
|
|
@@ -3544,7 +3528,7 @@
|
|
|
3544
3528
|
"module": "@ember/application",
|
|
3545
3529
|
"namespace": "ApplicationInstance",
|
|
3546
3530
|
"file": "packages/@ember/application/instance.ts",
|
|
3547
|
-
"line":
|
|
3531
|
+
"line": 325,
|
|
3548
3532
|
"description": "A list of boot-time configuration options for customizing the behavior of\nan `ApplicationInstance`.\n\nThis is an interface class that exists purely to document the available\noptions; you do not need to construct it manually. Simply pass a regular\nJavaScript object containing the desired options into methods that require\none of these options object:\n\n```javascript\nMyApp.visit(\"/\", { location: \"none\", rootElement: \"#container\" });\n```\n\nNot all combinations of the supported options are valid. See the documentation\non `Application#visit` for the supported configurations.\n\nInternal, experimental or otherwise unstable flags are marked as private.",
|
|
3549
3533
|
"access": "public",
|
|
3550
3534
|
"tagname": ""
|
|
@@ -3560,7 +3544,7 @@
|
|
|
3560
3544
|
"module": "@ember/canary-features",
|
|
3561
3545
|
"namespace": "",
|
|
3562
3546
|
"file": "packages/@ember/canary-features/index.ts",
|
|
3563
|
-
"line":
|
|
3547
|
+
"line": 21,
|
|
3564
3548
|
"description": "The hash of enabled Canary features. Add to this, any canary features\nbefore creating your application.",
|
|
3565
3549
|
"static": 1,
|
|
3566
3550
|
"since": "1.1.0",
|
|
@@ -3750,6 +3734,21 @@
|
|
|
3750
3734
|
"module": "@ember/polyfills",
|
|
3751
3735
|
"namespace": ""
|
|
3752
3736
|
},
|
|
3737
|
+
"Renderer": {
|
|
3738
|
+
"name": "Renderer",
|
|
3739
|
+
"shortname": "Renderer",
|
|
3740
|
+
"classitems": [],
|
|
3741
|
+
"plugins": [],
|
|
3742
|
+
"extensions": [],
|
|
3743
|
+
"plugin_for": [],
|
|
3744
|
+
"extension_for": [],
|
|
3745
|
+
"module": "@ember/renderer",
|
|
3746
|
+
"namespace": "",
|
|
3747
|
+
"file": "packages/@ember/renderer/index.ts",
|
|
3748
|
+
"line": 6,
|
|
3749
|
+
"access": "public",
|
|
3750
|
+
"tagname": ""
|
|
3751
|
+
},
|
|
3753
3752
|
"@ember/runloop": {
|
|
3754
3753
|
"name": "@ember/runloop",
|
|
3755
3754
|
"shortname": "@ember/runloop",
|
|
@@ -5625,7 +5624,7 @@
|
|
|
5625
5624
|
},
|
|
5626
5625
|
{
|
|
5627
5626
|
"file": "packages/@ember/-internals/glimmer/lib/components/link-to.ts",
|
|
5628
|
-
"line":
|
|
5627
|
+
"line": 41,
|
|
5629
5628
|
"description": "The `LinkTo` component renders a link to the supplied `routeName` passing an optionally\nsupplied model to the route as its `model` context of the route. The block for `LinkTo`\nbecomes the contents of the rendered element:\n\n```handlebars\n<LinkTo @route='photoGallery'>\n Great Hamster Photos\n</LinkTo>\n```\n\nThis will result in:\n\n```html\n<a href=\"/hamster-photos\">\n Great Hamster Photos\n</a>\n```\n\n### Disabling the `LinkTo` component\n\nThe `LinkTo` component can be disabled by using the `disabled` argument. A disabled link\ndoesn't result in a transition when activated, and adds the `disabled` class to the `<a>`\nelement.\n\n(The class name to apply to the element can be overridden by using the `disabledClass`\nargument)\n\n```handlebars\n<LinkTo @route='photoGallery' @disabled={{true}}>\n Great Hamster Photos\n</LinkTo>\n```\n\n### Handling `href`\n\n`<LinkTo>` will use your application's Router to fill the element's `href` property with a URL\nthat matches the path to the supplied `routeName`.\n\n### Handling current route\n\nThe `LinkTo` component will apply a CSS class name of 'active' when the application's current\nroute matches the supplied routeName. For example, if the application's current route is\n'photoGallery.recent', then the following invocation of `LinkTo`:\n\n```handlebars\n<LinkTo @route='photoGallery.recent'>\n Great Hamster Photos\n</LinkTo>\n```\n\nwill result in\n\n```html\n<a href=\"/hamster-photos/this-week\" class=\"active\">\n Great Hamster Photos\n</a>\n```\n\nThe CSS class used for active classes can be customized by passing an `activeClass` argument:\n\n```handlebars\n<LinkTo @route='photoGallery.recent' @activeClass=\"current-url\">\n Great Hamster Photos\n</LinkTo>\n```\n\n```html\n<a href=\"/hamster-photos/this-week\" class=\"current-url\">\n Great Hamster Photos\n</a>\n```\n\n### Keeping a link active for other routes\n\nIf you need a link to be 'active' even when it doesn't match the current route, you can use the\n`current-when` argument.\n\n```handlebars\n<LinkTo @route='photoGallery' @current-when='photos'>\n Photo Gallery\n</LinkTo>\n```\n\nThis may be helpful for keeping links active for:\n\n* non-nested routes that are logically related\n* some secondary menu approaches\n* 'top navigation' with 'sub navigation' scenarios\n\nA link will be active if `current-when` is `true` or the current\nroute is the route this link would transition to.\n\nTo match multiple routes 'space-separate' the routes:\n\n```handlebars\n<LinkTo @route='gallery' @current-when='photos drawings paintings'>\n Art Gallery\n</LinkTo>\n```\n\n### Supplying a model\n\nAn optional `model` argument can be used for routes whose\npaths contain dynamic segments. This argument will become\nthe model context of the linked route:\n\n```javascript\nRouter.map(function() {\n this.route(\"photoGallery\", {path: \"hamster-photos/:photo_id\"});\n});\n```\n\n```handlebars\n<LinkTo @route='photoGallery' @model={{this.aPhoto}}>\n {{aPhoto.title}}\n</LinkTo>\n```\n\n```html\n<a href=\"/hamster-photos/42\">\n Tomster\n</a>\n```\n\n### Supplying multiple models\n\nFor deep-linking to route paths that contain multiple\ndynamic segments, the `models` argument can be used.\n\nAs the router transitions through the route path, each\nsupplied model argument will become the context for the\nroute with the dynamic segments:\n\n```javascript\nRouter.map(function() {\n this.route(\"photoGallery\", { path: \"hamster-photos/:photo_id\" }, function() {\n this.route(\"comment\", {path: \"comments/:comment_id\"});\n });\n});\n```\n\nThis argument will become the model context of the linked route:\n\n```handlebars\n<LinkTo @route='photoGallery.comment' @models={{array this.aPhoto this.comment}}>\n {{comment.body}}\n</LinkTo>\n```\n\n```html\n<a href=\"/hamster-photos/42/comments/718\">\n A+++ would snuggle again.\n</a>\n```\n\n### Supplying an explicit dynamic segment value\n\nIf you don't have a model object available to pass to `LinkTo`,\nan optional string or integer argument can be passed for routes whose\npaths contain dynamic segments. This argument will become the value\nof the dynamic segment:\n\n```javascript\nRouter.map(function() {\n this.route(\"photoGallery\", { path: \"hamster-photos/:photo_id\" });\n});\n```\n\n```handlebars\n<LinkTo @route='photoGallery' @model={{aPhotoId}}>\n {{this.aPhoto.title}}\n</LinkTo>\n```\n\n```html\n<a href=\"/hamster-photos/42\">\n Tomster\n</a>\n```\n\nWhen transitioning into the linked route, the `model` hook will\nbe triggered with parameters including this passed identifier.\n\n### Supplying query parameters\n\nIf you need to add optional key-value pairs that appear to the right of the ? in a URL,\nyou can use the `query` argument.\n\n```handlebars\n<LinkTo @route='photoGallery' @query={{hash page=1 per_page=20}}>\n Great Hamster Photos\n</LinkTo>\n```\n\nThis will result in:\n\n```html\n<a href=\"/hamster-photos?page=1&per_page=20\">\n Great Hamster Photos\n</a>\n```",
|
|
5630
5629
|
"itemtype": "method",
|
|
5631
5630
|
"name": "LinkTo",
|
|
@@ -5636,7 +5635,7 @@
|
|
|
5636
5635
|
},
|
|
5637
5636
|
{
|
|
5638
5637
|
"file": "packages/@ember/-internals/glimmer/lib/components/link-to.ts",
|
|
5639
|
-
"line":
|
|
5638
|
+
"line": 253,
|
|
5640
5639
|
"description": "See [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).",
|
|
5641
5640
|
"itemtype": "method",
|
|
5642
5641
|
"name": "link-to",
|
|
@@ -5650,7 +5649,7 @@
|
|
|
5650
5649
|
},
|
|
5651
5650
|
{
|
|
5652
5651
|
"file": "packages/@ember/-internals/glimmer/lib/components/link-to.ts",
|
|
5653
|
-
"line":
|
|
5652
|
+
"line": 262,
|
|
5654
5653
|
"description": "An opaque interface which can be imported and used in strict-mode\ntemplates to call <LinkTo>.\n\nSee [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).",
|
|
5655
5654
|
"itemtype": "method",
|
|
5656
5655
|
"name": "LinkTo",
|
|
@@ -5710,7 +5709,7 @@
|
|
|
5710
5709
|
},
|
|
5711
5710
|
{
|
|
5712
5711
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/action.ts",
|
|
5713
|
-
"line":
|
|
5712
|
+
"line": 23,
|
|
5714
5713
|
"description": "The `{{action}}` helper provides a way to pass triggers for behavior (usually\njust a function) between components, and into components from controllers.\n\n### Passing functions with the action helper\n\nThere are three contexts an action helper can be used in. The first two\ncontexts to discuss are attribute context, and Handlebars value context.\n\n```handlebars\n{{! An example of attribute context }}\n<div onclick={{action \"save\"}}></div>\n{{! Examples of Handlebars value context }}\n{{input on-input=(action \"save\")}}\n{{yield (action \"refreshData\") andAnotherParam}}\n```\n\nIn these contexts,\nthe helper is called a \"closure action\" helper. Its behavior is simple:\nIf passed a function name, read that function off the `actions` property\nof the current context. Once that function is read, or immediately if a function was\npassed, create a closure over that function and any arguments.\nThe resulting value of an action helper used this way is simply a function.\n\nFor example, in the attribute context:\n\n```handlebars\n{{! An example of attribute context }}\n<div onclick={{action \"save\"}}></div>\n```\n\nThe resulting template render logic would be:\n\n```js\nvar div = document.createElement('div');\nvar actionFunction = (function(context){\n return function() {\n return context.actions.save.apply(context, arguments);\n };\n})(context);\ndiv.onclick = actionFunction;\n```\n\nThus when the div is clicked, the action on that context is called.\nBecause the `actionFunction` is just a function, closure actions can be\npassed between components and still execute in the correct context.\n\nHere is an example action handler on a component:\n\n```app/components/my-component.js\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class extends Component {\n @action\n save() {\n this.model.save();\n }\n}\n```\n\nActions are always looked up on the `actions` property of the current context.\nThis avoids collisions in the naming of common actions, such as `destroy`.\nTwo options can be passed to the `action` helper when it is used in this way.\n\n* `target=someProperty` will look to `someProperty` instead of the current\n context for the `actions` hash. This can be useful when targeting a\n service for actions.\n* `value=\"target.value\"` will read the path `target.value` off the first\n argument to the action when it is called and rewrite the first argument\n to be that value. This is useful when attaching actions to event listeners.\n\n### Invoking an action\n\nClosure actions curry both their scope and any arguments. When invoked, any\nadditional arguments are added to the already curried list.\nActions are presented in JavaScript as callbacks, and are\ninvoked like any other JavaScript function.\n\nFor example\n\n```app/components/update-name.js\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class extends Component {\n @action\n setName(model, name) {\n model.set('name', name);\n }\n}\n```\n\n```app/components/update-name.hbs\n{{input on-input=(action (action 'setName' @model) value=\"target.value\")}}\n```\n\nThe first argument (`@model`) was curried over, and the run-time argument (`event`)\nbecomes a second argument. Action calls can be nested this way because each simply\nreturns a function. Any function can be passed to the `{{action}}` helper, including\nother actions.\n\nActions invoked with `sendAction` have the same currying behavior as demonstrated\nwith `on-input` above. For example:\n\n```app/components/my-input.js\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class extends Component {\n @action\n setName(model, name) {\n model.set('name', name);\n }\n}\n```\n\n```handlebars\n<MyInput @submit={{action 'setName' @model}} />\n```\n\nor\n\n```handlebars\n{{my-input submit=(action 'setName' @model)}}\n```\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n click() {\n // Note that model is not passed, it was curried in the template\n this.submit('bob');\n }\n});\n```\n\n### Attaching actions to DOM elements\n\nThe third context of the `{{action}}` helper can be called \"element space\".\nFor example:\n\n```handlebars\n{{! An example of element space }}\n<div {{action \"save\"}}></div>\n```\n\nUsed this way, the `{{action}}` helper provides a useful shortcut for\nregistering an HTML element in a template for a single DOM event and\nforwarding that interaction to the template's context (controller or component).\nIf the context of a template is a controller, actions used this way will\nbubble to routes when the controller does not implement the specified action.\nOnce an action hits a route, it will bubble through the route hierarchy.\n\n### Event Propagation\n\n`{{action}}` helpers called in element space can control event bubbling. Note\nthat the closure style actions cannot.\n\nEvents triggered through the action helper will automatically have\n`.preventDefault()` called on them. You do not need to do so in your event\nhandlers. If you need to allow event propagation (to handle file inputs for\nexample) you can supply the `preventDefault=false` option to the `{{action}}` helper:\n\n```handlebars\n<div {{action \"sayHello\" preventDefault=false}}>\n <input type=\"file\" />\n <input type=\"checkbox\" />\n</div>\n```\n\nTo disable bubbling, pass `bubbles=false` to the helper:\n\n```handlebars\n<button {{action 'edit' post bubbles=false}}>Edit</button>\n```\n\nTo disable bubbling with closure style actions you must create your own\nwrapper helper that makes use of `event.stopPropagation()`:\n\n```handlebars\n<div onclick={{disable-bubbling (action \"sayHello\")}}>Hello</div>\n```\n\n```app/helpers/disable-bubbling.js\nimport { helper } from '@ember/component/helper';\n\nexport function disableBubbling([action]) {\n return function(event) {\n event.stopPropagation();\n return action(event);\n };\n}\nexport default helper(disableBubbling);\n```\n\nIf you need the default handler to trigger you should either register your\nown event handler, or use event methods on your view class. See\n[\"Responding to Browser Events\"](/ember/release/classes/Component)\nin the documentation for `Component` for more information.\n\n### Specifying DOM event type\n\n`{{action}}` helpers called in element space can specify an event type.\nBy default the `{{action}}` helper registers for DOM `click` events. You can\nsupply an `on` option to the helper to specify a different DOM event name:\n\n```handlebars\n<div {{action \"anActionName\" on=\"doubleClick\"}}>\n click me\n</div>\n```\n\nSee [\"Event Names\"](/ember/release/classes/Component) for a list of\nacceptable DOM event names.\n\n### Specifying whitelisted modifier keys\n\n`{{action}}` helpers called in element space can specify modifier keys.\nBy default the `{{action}}` helper will ignore click events with pressed modifier\nkeys. You can supply an `allowedKeys` option to specify which keys should not be ignored.\n\n```handlebars\n<div {{action \"anActionName\" allowedKeys=\"alt\"}}>\n click me\n</div>\n```\n\nThis way the action will fire when clicking with the alt key pressed down.\nAlternatively, supply \"any\" to the `allowedKeys` option to accept any combination of modifier keys.\n\n```handlebars\n<div {{action \"anActionName\" allowedKeys=\"any\"}}>\n click me with any key pressed\n</div>\n```\n\n### Specifying a Target\n\nA `target` option can be provided to the helper to change\nwhich object will receive the method call. This option must be a path\nto an object, accessible in the current context:\n\n```app/templates/application.hbs\n<div {{action \"anActionName\" target=someService}}>\n click me\n</div>\n```\n\n```app/controllers/application.js\nimport Controller from '@ember/controller';\nimport { service } from '@ember/service';\n\nexport default class extends Controller {\n @service someService;\n}\n```",
|
|
5715
5714
|
"itemtype": "method",
|
|
5716
5715
|
"name": "action",
|
|
@@ -6160,7 +6159,7 @@
|
|
|
6160
6159
|
},
|
|
6161
6160
|
{
|
|
6162
6161
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6163
|
-
"line":
|
|
6162
|
+
"line": 655,
|
|
6164
6163
|
"description": "Called when the attributes passed into the component have been updated.\n Called both during the initial render of a container and during a rerender.\n Can be used in place of an observer; code placed here will be executed\n every time any attribute updates.",
|
|
6165
6164
|
"itemtype": "method",
|
|
6166
6165
|
"name": "didReceiveAttrs",
|
|
@@ -6172,7 +6171,7 @@
|
|
|
6172
6171
|
},
|
|
6173
6172
|
{
|
|
6174
6173
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6175
|
-
"line":
|
|
6174
|
+
"line": 666,
|
|
6176
6175
|
"description": "Called when the attributes passed into the component have been updated.\n Called both during the initial render of a container and during a rerender.\n Can be used in place of an observer; code placed here will be executed\n every time any attribute updates.",
|
|
6177
6176
|
"itemtype": "event",
|
|
6178
6177
|
"name": "didReceiveAttrs",
|
|
@@ -6184,7 +6183,7 @@
|
|
|
6184
6183
|
},
|
|
6185
6184
|
{
|
|
6186
6185
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6187
|
-
"line":
|
|
6186
|
+
"line": 676,
|
|
6188
6187
|
"description": "Called after a component has been rendered, both on initial render and\n in subsequent rerenders.",
|
|
6189
6188
|
"itemtype": "method",
|
|
6190
6189
|
"name": "didRender",
|
|
@@ -6196,7 +6195,7 @@
|
|
|
6196
6195
|
},
|
|
6197
6196
|
{
|
|
6198
6197
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6199
|
-
"line":
|
|
6198
|
+
"line": 685,
|
|
6200
6199
|
"description": "Called after a component has been rendered, both on initial render and\n in subsequent rerenders.",
|
|
6201
6200
|
"itemtype": "event",
|
|
6202
6201
|
"name": "didRender",
|
|
@@ -6208,7 +6207,7 @@
|
|
|
6208
6207
|
},
|
|
6209
6208
|
{
|
|
6210
6209
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6211
|
-
"line":
|
|
6210
|
+
"line": 693,
|
|
6212
6211
|
"description": "Called before a component has been rendered, both on initial render and\n in subsequent rerenders.",
|
|
6213
6212
|
"itemtype": "method",
|
|
6214
6213
|
"name": "willRender",
|
|
@@ -6220,7 +6219,7 @@
|
|
|
6220
6219
|
},
|
|
6221
6220
|
{
|
|
6222
6221
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6223
|
-
"line":
|
|
6222
|
+
"line": 702,
|
|
6224
6223
|
"description": "Called before a component has been rendered, both on initial render and\n in subsequent rerenders.",
|
|
6225
6224
|
"itemtype": "event",
|
|
6226
6225
|
"name": "willRender",
|
|
@@ -6232,7 +6231,7 @@
|
|
|
6232
6231
|
},
|
|
6233
6232
|
{
|
|
6234
6233
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6235
|
-
"line":
|
|
6234
|
+
"line": 710,
|
|
6236
6235
|
"description": "Called when the attributes passed into the component have been changed.\n Called only during a rerender, not during an initial render.",
|
|
6237
6236
|
"itemtype": "method",
|
|
6238
6237
|
"name": "didUpdateAttrs",
|
|
@@ -6244,7 +6243,7 @@
|
|
|
6244
6243
|
},
|
|
6245
6244
|
{
|
|
6246
6245
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6247
|
-
"line":
|
|
6246
|
+
"line": 719,
|
|
6248
6247
|
"description": "Called when the attributes passed into the component have been changed.\n Called only during a rerender, not during an initial render.",
|
|
6249
6248
|
"itemtype": "event",
|
|
6250
6249
|
"name": "didUpdateAttrs",
|
|
@@ -6256,7 +6255,7 @@
|
|
|
6256
6255
|
},
|
|
6257
6256
|
{
|
|
6258
6257
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6259
|
-
"line":
|
|
6258
|
+
"line": 727,
|
|
6260
6259
|
"description": "Called when the component is about to update and rerender itself.\n Called only during a rerender, not during an initial render.",
|
|
6261
6260
|
"itemtype": "method",
|
|
6262
6261
|
"name": "willUpdate",
|
|
@@ -6268,7 +6267,7 @@
|
|
|
6268
6267
|
},
|
|
6269
6268
|
{
|
|
6270
6269
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6271
|
-
"line":
|
|
6270
|
+
"line": 736,
|
|
6272
6271
|
"description": "Called when the component is about to update and rerender itself.\n Called only during a rerender, not during an initial render.",
|
|
6273
6272
|
"itemtype": "event",
|
|
6274
6273
|
"name": "willUpdate",
|
|
@@ -6280,7 +6279,7 @@
|
|
|
6280
6279
|
},
|
|
6281
6280
|
{
|
|
6282
6281
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6283
|
-
"line":
|
|
6282
|
+
"line": 744,
|
|
6284
6283
|
"description": "Called when the component has updated and rerendered itself.\n Called only during a rerender, not during an initial render.",
|
|
6285
6284
|
"itemtype": "method",
|
|
6286
6285
|
"name": "didUpdate",
|
|
@@ -6292,7 +6291,7 @@
|
|
|
6292
6291
|
},
|
|
6293
6292
|
{
|
|
6294
6293
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6295
|
-
"line":
|
|
6294
|
+
"line": 753,
|
|
6296
6295
|
"description": "Called when the component has updated and rerendered itself.\n Called only during a rerender, not during an initial render.",
|
|
6297
6296
|
"itemtype": "event",
|
|
6298
6297
|
"name": "didUpdate",
|
|
@@ -6304,7 +6303,7 @@
|
|
|
6304
6303
|
},
|
|
6305
6304
|
{
|
|
6306
6305
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6307
|
-
"line":
|
|
6306
|
+
"line": 761,
|
|
6308
6307
|
"description": "The HTML `id` of the component's element in the DOM. You can provide this\nvalue yourself but it must be unique (just as in HTML):\n\n```handlebars\n{{my-component elementId=\"a-really-cool-id\"}}\n```\n\n```handlebars\n<MyComponent @elementId=\"a-really-cool-id\" />\n```\nIf not manually set a default value will be provided by the framework.\nOnce rendered an element's `elementId` is considered immutable and you\nshould never change it. If you need to compute a dynamic value for the\n`elementId`, you should do this when the component or element is being\ninstantiated:\n\n```javascript\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n var index = this.get('index');\n this.set('elementId', `component-id${index}`);\n }\n});\n```",
|
|
6309
6308
|
"itemtype": "property",
|
|
6310
6309
|
"name": "elementId",
|
|
@@ -6316,7 +6315,7 @@
|
|
|
6316
6315
|
},
|
|
6317
6316
|
{
|
|
6318
6317
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6319
|
-
"line":
|
|
6318
|
+
"line": 950,
|
|
6320
6319
|
"description": "Normally, Ember's component model is \"write-only\". The component takes a\nbunch of attributes that it got passed in, and uses them to render its\ntemplate.\n\nOne nice thing about this model is that if you try to set a value to the\nsame thing as last time, Ember (through HTMLBars) will avoid doing any\nwork on the DOM.\n\nThis is not just a performance optimization. If an attribute has not\nchanged, it is important not to clobber the element's \"hidden state\".\nFor example, if you set an input's `value` to the same value as before,\nit will clobber selection state and cursor position. In other words,\nsetting an attribute is not **always** idempotent.\n\nThis method provides a way to read an element's attribute and also\nupdate the last value Ember knows about at the same time. This makes\nsetting an attribute idempotent.\n\nIn particular, what this means is that if you get an `<input>` element's\n`value` attribute and then re-render the template with the same value,\nit will avoid clobbering the cursor and selection position.\nSince most attribute sets are idempotent in the browser, you typically\ncan get away with reading attributes using jQuery, but the most reliable\nway to do so is through this method.",
|
|
6321
6320
|
"itemtype": "method",
|
|
6322
6321
|
"name": "readDOMAttr",
|
|
@@ -6337,7 +6336,7 @@
|
|
|
6337
6336
|
},
|
|
6338
6337
|
{
|
|
6339
6338
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6340
|
-
"line":
|
|
6339
|
+
"line": 1010,
|
|
6341
6340
|
"description": "Layout can be used to wrap content in a component.",
|
|
6342
6341
|
"itemtype": "property",
|
|
6343
6342
|
"name": "layout",
|
|
@@ -6349,7 +6348,7 @@
|
|
|
6349
6348
|
},
|
|
6350
6349
|
{
|
|
6351
6350
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6352
|
-
"line":
|
|
6351
|
+
"line": 1018,
|
|
6353
6352
|
"description": "The name of the layout to lookup if no layout is provided.\nBy default `Component` will lookup a template with this name in\n`Ember.TEMPLATES` (a shared global object).",
|
|
6354
6353
|
"itemtype": "property",
|
|
6355
6354
|
"name": "layoutName",
|
|
@@ -6362,7 +6361,7 @@
|
|
|
6362
6361
|
},
|
|
6363
6362
|
{
|
|
6364
6363
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6365
|
-
"line":
|
|
6364
|
+
"line": 1029,
|
|
6366
6365
|
"description": "The WAI-ARIA role of the control represented by this view. For example, a\n button may have a role of type 'button', or a pane may have a role of\n type 'alertdialog'. This property is used by assistive software to help\n visually challenged users navigate rich web applications.\n\n The full list of valid WAI-ARIA roles is available at:\n [https://www.w3.org/TR/wai-aria/#roles_categorization](https://www.w3.org/TR/wai-aria/#roles_categorization)",
|
|
6367
6366
|
"itemtype": "property",
|
|
6368
6367
|
"name": "ariaRole",
|
|
@@ -6375,7 +6374,7 @@
|
|
|
6375
6374
|
},
|
|
6376
6375
|
{
|
|
6377
6376
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6378
|
-
"line":
|
|
6377
|
+
"line": 1054,
|
|
6379
6378
|
"description": "Enables components to take a list of parameters as arguments.\n For example, a component that takes two parameters with the names\n `name` and `age`:\n\n ```app/components/my-component.js\n import Component from '@ember/component';\n\n let MyComponent = Component.extend();\n\n MyComponent.reopenClass({\n positionalParams: ['name', 'age']\n });\n\n export default MyComponent;\n ```\n\n It can then be invoked like this:\n\n ```hbs\n {{my-component \"John\" 38}}\n ```\n\n The parameters can be referred to just like named parameters:\n\n ```hbs\n Name: {{name}}, Age: {{age}}.\n ```\n\n Using a string instead of an array allows for an arbitrary number of\n parameters:\n\n ```app/components/my-component.js\n import Component from '@ember/component';\n\n let MyComponent = Component.extend();\n\n MyComponent.reopenClass({\n positionalParams: 'names'\n });\n\n export default MyComponent;\n ```\n\n It can then be invoked like this:\n\n ```hbs\n {{my-component \"John\" \"Michael\" \"Scott\"}}\n ```\n The parameters can then be referred to by enumerating over the list:\n\n ```hbs\n {{#each names as |name|}}{{name}}{{/each}}\n ```",
|
|
6380
6379
|
"static": 1,
|
|
6381
6380
|
"access": "public",
|
|
@@ -6400,7 +6399,7 @@
|
|
|
6400
6399
|
},
|
|
6401
6400
|
{
|
|
6402
6401
|
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
6403
|
-
"line":
|
|
6402
|
+
"line": 91,
|
|
6404
6403
|
"description": "Override this function when writing a class-based helper.",
|
|
6405
6404
|
"itemtype": "method",
|
|
6406
6405
|
"name": "compute",
|
|
@@ -6424,7 +6423,7 @@
|
|
|
6424
6423
|
},
|
|
6425
6424
|
{
|
|
6426
6425
|
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
6427
|
-
"line":
|
|
6426
|
+
"line": 115,
|
|
6428
6427
|
"description": "On a class-based helper, it may be useful to force a recomputation of that\nhelpers value. This is akin to `rerender` on a component.\n\nFor example, this component will rerender when the `currentUser` on a\nsession service changes:\n\n```app/helpers/current-user-email.js\nimport Helper from '@ember/component/helper'\nimport { service } from '@ember/service'\nimport { observer } from '@ember/object'\n\nexport default Helper.extend({\n session: service(),\n\n onNewUser: observer('session.currentUser', function() {\n this.recompute();\n }),\n\n compute() {\n return this.get('session.currentUser.email');\n }\n});\n```",
|
|
6429
6428
|
"itemtype": "method",
|
|
6430
6429
|
"name": "recompute",
|
|
@@ -6436,7 +6435,7 @@
|
|
|
6436
6435
|
},
|
|
6437
6436
|
{
|
|
6438
6437
|
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
6439
|
-
"line":
|
|
6438
|
+
"line": 267,
|
|
6440
6439
|
"description": "In many cases it is not necessary to use the full `Helper` class.\nThe `helper` method create pure-function helpers without instances.\nFor example:\n\n```app/helpers/format-currency.js\nimport { helper } from '@ember/component/helper';\n\nexport default helper(function([cents], {currency}) {\n return `${currency}${cents * 0.01}`;\n});\n```",
|
|
6441
6440
|
"static": 1,
|
|
6442
6441
|
"params": [
|
|
@@ -6456,7 +6455,7 @@
|
|
|
6456
6455
|
},
|
|
6457
6456
|
{
|
|
6458
6457
|
"file": "packages/@ember/-internals/glimmer/lib/renderer.ts",
|
|
6459
|
-
"line":
|
|
6458
|
+
"line": 298,
|
|
6460
6459
|
"class": "Ember.Templates.helpers",
|
|
6461
6460
|
"module": "@ember/component"
|
|
6462
6461
|
},
|
|
@@ -6852,7 +6851,7 @@
|
|
|
6852
6851
|
},
|
|
6853
6852
|
{
|
|
6854
6853
|
"file": "packages/@ember/-internals/metal/lib/computed.ts",
|
|
6855
|
-
"line":
|
|
6854
|
+
"line": 604,
|
|
6856
6855
|
"description": "Call on a computed property to set it into read-only mode. When in this\nmode the computed property will throw an error when set.\n\nExample:\n\n```javascript\nimport { computed, set } from '@ember/object';\n\nclass Person {\n @computed().readOnly()\n get guid() {\n return 'guid-guid-guid';\n }\n}\n\nlet person = new Person();\nset(person, 'guid', 'new-guid'); // will throw an exception\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { computed } from '@ember/object';\n\nlet Person = EmberObject.extend({\n guid: computed(function() {\n return 'guid-guid-guid';\n }).readOnly()\n});\n\nlet person = Person.create();\nperson.set('guid', 'new-guid'); // will throw an exception\n```",
|
|
6857
6856
|
"itemtype": "method",
|
|
6858
6857
|
"name": "readOnly",
|
|
@@ -6868,7 +6867,7 @@
|
|
|
6868
6867
|
},
|
|
6869
6868
|
{
|
|
6870
6869
|
"file": "packages/@ember/-internals/metal/lib/computed.ts",
|
|
6871
|
-
"line":
|
|
6870
|
+
"line": 654,
|
|
6872
6871
|
"description": "In some cases, you may want to annotate computed properties with additional\nmetadata about how they function or what values they operate on. For example,\ncomputed property functions may close over variables that are then no longer\navailable for introspection. You can pass a hash of these values to a\ncomputed property.\n\nExample:\n\n```javascript\nimport { computed } from '@ember/object';\nimport Person from 'my-app/utils/person';\n\nclass Store {\n @computed().meta({ type: Person })\n get person() {\n let personId = this.personId;\n return Person.create({ id: personId });\n }\n}\n```\n\nClassic Class Example:\n\n```javascript\nimport { computed } from '@ember/object';\nimport Person from 'my-app/utils/person';\n\nconst Store = EmberObject.extend({\n person: computed(function() {\n let personId = this.get('personId');\n return Person.create({ id: personId });\n }).meta({ type: Person })\n});\n```\n\nThe hash that you pass to the `meta()` function will be saved on the\ncomputed property descriptor under the `_meta` key. Ember runtime\nexposes a public API for retrieving these values from classes,\nvia the `metaForProperty()` function.",
|
|
6873
6872
|
"itemtype": "method",
|
|
6874
6873
|
"name": "meta",
|
|
@@ -6887,19 +6886,19 @@
|
|
|
6887
6886
|
},
|
|
6888
6887
|
{
|
|
6889
6888
|
"file": "packages/@ember/-internals/metal/lib/computed.ts",
|
|
6890
|
-
"line":
|
|
6889
|
+
"line": 713,
|
|
6891
6890
|
"class": "ComputedProperty",
|
|
6892
6891
|
"module": "@ember/object"
|
|
6893
6892
|
},
|
|
6894
6893
|
{
|
|
6895
6894
|
"file": "packages/@ember/-internals/metal/lib/computed.ts",
|
|
6896
|
-
"line":
|
|
6895
|
+
"line": 719,
|
|
6897
6896
|
"class": "ComputedProperty",
|
|
6898
6897
|
"module": "@ember/object"
|
|
6899
6898
|
},
|
|
6900
6899
|
{
|
|
6901
6900
|
"file": "packages/@ember/-internals/metal/lib/computed.ts",
|
|
6902
|
-
"line":
|
|
6901
|
+
"line": 727,
|
|
6903
6902
|
"description": "This helper returns a new property descriptor that wraps the passed\ncomputed property function. You can use this helper to define properties with\nnative decorator syntax, mixins, or via `defineProperty()`.\n\nExample:\n\n```js\nimport { computed, set } from '@ember/object';\n\nclass Person {\n constructor() {\n this.firstName = 'Betty';\n this.lastName = 'Jones';\n },\n\n @computed('firstName', 'lastName')\n get fullName() {\n return `${this.firstName} ${this.lastName}`;\n }\n}\n\nlet client = new Person();\n\nclient.fullName; // 'Betty Jones'\n\nset(client, 'lastName', 'Fuller');\nclient.fullName; // 'Betty Fuller'\n```\n\nClassic Class Example:\n\n```js\nimport EmberObject, { computed } from '@ember/object';\n\nlet Person = EmberObject.extend({\n init() {\n this._super(...arguments);\n\n this.firstName = 'Betty';\n this.lastName = 'Jones';\n },\n\n fullName: computed('firstName', 'lastName', function() {\n return `${this.get('firstName')} ${this.get('lastName')}`;\n })\n});\n\nlet client = Person.create();\n\nclient.get('fullName'); // 'Betty Jones'\n\nclient.set('lastName', 'Fuller');\nclient.get('fullName'); // 'Betty Fuller'\n```\n\nYou can also provide a setter, either directly on the class using native class\nsyntax, or by passing a hash with `get` and `set` functions.\n\nExample:\n\n```js\nimport { computed, set } from '@ember/object';\n\nclass Person {\n constructor() {\n this.firstName = 'Betty';\n this.lastName = 'Jones';\n },\n\n @computed('firstName', 'lastName')\n get fullName() {\n return `${this.firstName} ${this.lastName}`;\n }\n\n set fullName(value) {\n let [firstName, lastName] = value.split(/\\s+/);\n\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n\n return value;\n }\n}\n\nlet client = new Person();\n\nclient.fullName; // 'Betty Jones'\n\nset(client, 'lastName', 'Fuller');\nclient.fullName; // 'Betty Fuller'\n```\n\nClassic Class Example:\n\n```js\nimport EmberObject, { computed } from '@ember/object';\n\nlet Person = EmberObject.extend({\n init() {\n this._super(...arguments);\n\n this.firstName = 'Betty';\n this.lastName = 'Jones';\n },\n\n fullName: computed('firstName', 'lastName', {\n get(key) {\n return `${this.get('firstName')} ${this.get('lastName')}`;\n },\n set(key, value) {\n let [firstName, lastName] = value.split(/\\s+/);\n this.setProperties({ firstName, lastName });\n return value;\n }\n })\n});\n\nlet client = Person.create();\nclient.get('firstName'); // 'Betty'\n\nclient.set('fullName', 'Carroll Fuller');\nclient.get('firstName'); // 'Carroll'\n```\n\nWhen passed as an argument, the `set` function should accept two parameters,\n`key` and `value`. The value returned from `set` will be the new value of the\nproperty.\n\n_Note: This is the preferred way to define computed properties when writing third-party\nlibraries that depend on or use Ember, since there is no guarantee that the user\nwill have [prototype Extensions](https://guides.emberjs.com/release/configuring-ember/disabling-prototype-extensions/) enabled._",
|
|
6904
6903
|
"itemtype": "method",
|
|
6905
6904
|
"name": "computed",
|
|
@@ -6928,7 +6927,7 @@
|
|
|
6928
6927
|
},
|
|
6929
6928
|
{
|
|
6930
6929
|
"file": "packages/@ember/-internals/metal/lib/computed.ts",
|
|
6931
|
-
"line":
|
|
6930
|
+
"line": 915,
|
|
6932
6931
|
"description": "Allows checking if a given property on an object is a computed property. For the most part,\nthis doesn't matter (you would normally just access the property directly and use its value),\nbut for some tooling specific scenarios (e.g. the ember-inspector) it is important to\ndifferentiate if a property is a computed property or a \"normal\" property.\n\nThis will work on either a class's prototype or an instance itself.",
|
|
6933
6932
|
"static": 1,
|
|
6934
6933
|
"itemtype": "method",
|
|
@@ -7036,7 +7035,7 @@
|
|
|
7036
7035
|
},
|
|
7037
7036
|
{
|
|
7038
7037
|
"file": "packages/@ember/-internals/metal/lib/events.ts",
|
|
7039
|
-
"line":
|
|
7038
|
+
"line": 27,
|
|
7040
7039
|
"description": "Add an event listener",
|
|
7041
7040
|
"itemtype": "method",
|
|
7042
7041
|
"name": "addListener",
|
|
@@ -7074,7 +7073,7 @@
|
|
|
7074
7073
|
},
|
|
7075
7074
|
{
|
|
7076
7075
|
"file": "packages/@ember/-internals/metal/lib/events.ts",
|
|
7077
|
-
"line":
|
|
7076
|
+
"line": 61,
|
|
7078
7077
|
"description": "Remove an event listener\n\nArguments should match those passed to `addListener`.",
|
|
7079
7078
|
"itemtype": "method",
|
|
7080
7079
|
"name": "removeListener",
|
|
@@ -7107,7 +7106,7 @@
|
|
|
7107
7106
|
},
|
|
7108
7107
|
{
|
|
7109
7108
|
"file": "packages/@ember/-internals/metal/lib/events.ts",
|
|
7110
|
-
"line":
|
|
7109
|
+
"line": 104,
|
|
7111
7110
|
"description": "Send an event. The execution of suspended listeners\nis skipped, and once listeners are removed. A listener without\na target is executed on the passed object. If an array of actions\nis not passed, the actions stored on the passed object are invoked.",
|
|
7112
7111
|
"itemtype": "method",
|
|
7113
7112
|
"name": "sendEvent",
|
|
@@ -7139,7 +7138,7 @@
|
|
|
7139
7138
|
},
|
|
7140
7139
|
{
|
|
7141
7140
|
"file": "packages/@ember/-internals/metal/lib/events.ts",
|
|
7142
|
-
"line":
|
|
7141
|
+
"line": 161,
|
|
7143
7142
|
"access": "public",
|
|
7144
7143
|
"tagname": "",
|
|
7145
7144
|
"itemtype": "method",
|
|
@@ -7165,7 +7164,7 @@
|
|
|
7165
7164
|
},
|
|
7166
7165
|
{
|
|
7167
7166
|
"file": "packages/@ember/-internals/metal/lib/events.ts",
|
|
7168
|
-
"line":
|
|
7167
|
+
"line": 179,
|
|
7169
7168
|
"description": "Define a property as a function that should be executed when\na specified event or events are triggered.\n\n``` javascript\nimport EmberObject from '@ember/object';\nimport { on } from '@ember/object/evented';\nimport { sendEvent } from '@ember/object/events';\n\nlet Job = EmberObject.extend({\n logCompleted: on('completed', function() {\n console.log('Job completed!');\n })\n});\n\nlet job = Job.create();\n\nsendEvent(job, 'completed'); // Logs 'Job completed!'\n ```",
|
|
7170
7169
|
"itemtype": "method",
|
|
7171
7170
|
"name": "on",
|
|
@@ -7340,7 +7339,7 @@
|
|
|
7340
7339
|
},
|
|
7341
7340
|
{
|
|
7342
7341
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7343
|
-
"line":
|
|
7342
|
+
"line": 431,
|
|
7344
7343
|
"itemtype": "method",
|
|
7345
7344
|
"name": "mixin",
|
|
7346
7345
|
"params": [
|
|
@@ -7364,43 +7363,43 @@
|
|
|
7364
7363
|
},
|
|
7365
7364
|
{
|
|
7366
7365
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7367
|
-
"line":
|
|
7366
|
+
"line": 528,
|
|
7368
7367
|
"class": "Mixin",
|
|
7369
7368
|
"module": "@ember/object"
|
|
7370
7369
|
},
|
|
7371
7370
|
{
|
|
7372
7371
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7373
|
-
"line":
|
|
7372
|
+
"line": 531,
|
|
7374
7373
|
"class": "Mixin",
|
|
7375
7374
|
"module": "@ember/object"
|
|
7376
7375
|
},
|
|
7377
7376
|
{
|
|
7378
7377
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7379
|
-
"line":
|
|
7378
|
+
"line": 534,
|
|
7380
7379
|
"class": "Mixin",
|
|
7381
7380
|
"module": "@ember/object"
|
|
7382
7381
|
},
|
|
7383
7382
|
{
|
|
7384
7383
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7385
|
-
"line":
|
|
7384
|
+
"line": 537,
|
|
7386
7385
|
"class": "Mixin",
|
|
7387
7386
|
"module": "@ember/object"
|
|
7388
7387
|
},
|
|
7389
7388
|
{
|
|
7390
7389
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7391
|
-
"line":
|
|
7390
|
+
"line": 540,
|
|
7392
7391
|
"class": "Mixin",
|
|
7393
7392
|
"module": "@ember/object"
|
|
7394
7393
|
},
|
|
7395
7394
|
{
|
|
7396
7395
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7397
|
-
"line":
|
|
7396
|
+
"line": 545,
|
|
7398
7397
|
"class": "Mixin",
|
|
7399
7398
|
"module": "@ember/object"
|
|
7400
7399
|
},
|
|
7401
7400
|
{
|
|
7402
7401
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7403
|
-
"line":
|
|
7402
|
+
"line": 571,
|
|
7404
7403
|
"itemtype": "method",
|
|
7405
7404
|
"name": "create",
|
|
7406
7405
|
"static": 1,
|
|
@@ -7418,13 +7417,13 @@
|
|
|
7418
7417
|
},
|
|
7419
7418
|
{
|
|
7420
7419
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7421
|
-
"line":
|
|
7420
|
+
"line": 586,
|
|
7422
7421
|
"class": "@ember/object/mixin",
|
|
7423
7422
|
"module": "@ember/object"
|
|
7424
7423
|
},
|
|
7425
7424
|
{
|
|
7426
7425
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7427
|
-
"line":
|
|
7426
|
+
"line": 604,
|
|
7428
7427
|
"itemtype": "method",
|
|
7429
7428
|
"name": "reopen",
|
|
7430
7429
|
"params": [
|
|
@@ -7442,7 +7441,7 @@
|
|
|
7442
7441
|
},
|
|
7443
7442
|
{
|
|
7444
7443
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7445
|
-
"line":
|
|
7444
|
+
"line": 627,
|
|
7446
7445
|
"itemtype": "method",
|
|
7447
7446
|
"name": "apply",
|
|
7448
7447
|
"params": [
|
|
@@ -7462,13 +7461,13 @@
|
|
|
7462
7461
|
},
|
|
7463
7462
|
{
|
|
7464
7463
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7465
|
-
"line":
|
|
7464
|
+
"line": 643,
|
|
7466
7465
|
"class": "@ember/object/mixin",
|
|
7467
7466
|
"module": "@ember/object"
|
|
7468
7467
|
},
|
|
7469
7468
|
{
|
|
7470
7469
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7471
|
-
"line":
|
|
7470
|
+
"line": 648,
|
|
7472
7471
|
"itemtype": "method",
|
|
7473
7472
|
"name": "detect",
|
|
7474
7473
|
"params": [
|
|
@@ -7489,25 +7488,25 @@
|
|
|
7489
7488
|
},
|
|
7490
7489
|
{
|
|
7491
7490
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7492
|
-
"line":
|
|
7491
|
+
"line": 669,
|
|
7493
7492
|
"class": "@ember/object/mixin",
|
|
7494
7493
|
"module": "@ember/object"
|
|
7495
7494
|
},
|
|
7496
7495
|
{
|
|
7497
7496
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7498
|
-
"line":
|
|
7497
|
+
"line": 676,
|
|
7499
7498
|
"class": "@ember/object/mixin",
|
|
7500
7499
|
"module": "@ember/object"
|
|
7501
7500
|
},
|
|
7502
7501
|
{
|
|
7503
7502
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7504
|
-
"line":
|
|
7503
|
+
"line": 681,
|
|
7505
7504
|
"class": "@ember/object/mixin",
|
|
7506
7505
|
"module": "@ember/object"
|
|
7507
7506
|
},
|
|
7508
7507
|
{
|
|
7509
7508
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7510
|
-
"line":
|
|
7509
|
+
"line": 773,
|
|
7511
7510
|
"description": "Specify a method that observes property changes.\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { observer } from '@ember/object';\n\nexport default EmberObject.extend({\n valueObserver: observer('value', function() {\n // Executes whenever the \"value\" property changes\n })\n});\n```\n\nAlso available as `Function.prototype.observes` if prototype extensions are\nenabled.",
|
|
7512
7511
|
"itemtype": "method",
|
|
7513
7512
|
"name": "observer",
|
|
@@ -7652,7 +7651,7 @@
|
|
|
7652
7651
|
},
|
|
7653
7652
|
{
|
|
7654
7653
|
"file": "packages/@ember/-internals/metal/lib/property_events.ts",
|
|
7655
|
-
"line":
|
|
7654
|
+
"line": 31,
|
|
7656
7655
|
"description": "This function is called just after an object property has changed.\nIt will notify any observers and clear caches among other things.\n\nNormally you will not need to call this method directly but if for some\nreason you can't directly watch a property you can invoke this method\nmanually.",
|
|
7657
7656
|
"itemtype": "method",
|
|
7658
7657
|
"name": "notifyPropertyChange",
|
|
@@ -7692,7 +7691,7 @@
|
|
|
7692
7691
|
},
|
|
7693
7692
|
{
|
|
7694
7693
|
"file": "packages/@ember/-internals/metal/lib/property_events.ts",
|
|
7695
|
-
"line":
|
|
7694
|
+
"line": 82,
|
|
7696
7695
|
"itemtype": "method",
|
|
7697
7696
|
"name": "beginPropertyChanges",
|
|
7698
7697
|
"chainable": 1,
|
|
@@ -7703,7 +7702,7 @@
|
|
|
7703
7702
|
},
|
|
7704
7703
|
{
|
|
7705
7704
|
"file": "packages/@ember/-internals/metal/lib/property_events.ts",
|
|
7706
|
-
"line":
|
|
7705
|
+
"line": 92,
|
|
7707
7706
|
"itemtype": "method",
|
|
7708
7707
|
"name": "endPropertyChanges",
|
|
7709
7708
|
"access": "private",
|
|
@@ -7713,7 +7712,7 @@
|
|
|
7713
7712
|
},
|
|
7714
7713
|
{
|
|
7715
7714
|
"file": "packages/@ember/-internals/metal/lib/property_events.ts",
|
|
7716
|
-
"line":
|
|
7715
|
+
"line": 104,
|
|
7717
7716
|
"description": "Make a series of property changes together in an\nexception-safe way.\n\n```javascript\nEmber.changeProperties(function() {\n obj1.set('foo', mayBlowUpWhenSet);\n obj2.set('bar', baz);\n});\n```",
|
|
7718
7717
|
"itemtype": "method",
|
|
7719
7718
|
"name": "changeProperties",
|
|
@@ -8044,13 +8043,13 @@
|
|
|
8044
8043
|
},
|
|
8045
8044
|
{
|
|
8046
8045
|
"file": "packages/@ember/-internals/routing/lib/location/auto_location.ts",
|
|
8047
|
-
"line":
|
|
8046
|
+
"line": 77,
|
|
8048
8047
|
"class": "AutoLocation",
|
|
8049
8048
|
"module": "@ember/routing"
|
|
8050
8049
|
},
|
|
8051
8050
|
{
|
|
8052
8051
|
"file": "packages/@ember/-internals/routing/lib/location/auto_location.ts",
|
|
8053
|
-
"line":
|
|
8052
|
+
"line": 80,
|
|
8054
8053
|
"access": "private",
|
|
8055
8054
|
"tagname": "Will be pre-pended to path upon state change.",
|
|
8056
8055
|
"since": "1.5.1",
|
|
@@ -8062,7 +8061,7 @@
|
|
|
8062
8061
|
},
|
|
8063
8062
|
{
|
|
8064
8063
|
"file": "packages/@ember/-internals/routing/lib/location/auto_location.ts",
|
|
8065
|
-
"line":
|
|
8064
|
+
"line": 92,
|
|
8066
8065
|
"access": "private",
|
|
8067
8066
|
"tagname": "The browser's `location` object. This is typically equivalent to\n`window.location`, but may be overridden for testing.",
|
|
8068
8067
|
"itemtype": "property",
|
|
@@ -8073,7 +8072,7 @@
|
|
|
8073
8072
|
},
|
|
8074
8073
|
{
|
|
8075
8074
|
"file": "packages/@ember/-internals/routing/lib/location/auto_location.ts",
|
|
8076
|
-
"line":
|
|
8075
|
+
"line": 104,
|
|
8077
8076
|
"access": "private",
|
|
8078
8077
|
"tagname": "The browser's `history` object. This is typically equivalent to\n`window.history`, but may be overridden for testing.",
|
|
8079
8078
|
"since": "1.5.1",
|
|
@@ -8085,7 +8084,7 @@
|
|
|
8085
8084
|
},
|
|
8086
8085
|
{
|
|
8087
8086
|
"file": "packages/@ember/-internals/routing/lib/location/auto_location.ts",
|
|
8088
|
-
"line":
|
|
8087
|
+
"line": 117,
|
|
8089
8088
|
"access": "private",
|
|
8090
8089
|
"tagname": "The user agent's global variable. In browsers, this will be `window`.",
|
|
8091
8090
|
"since": "1.11",
|
|
@@ -8097,7 +8096,7 @@
|
|
|
8097
8096
|
},
|
|
8098
8097
|
{
|
|
8099
8098
|
"file": "packages/@ember/-internals/routing/lib/location/auto_location.ts",
|
|
8100
|
-
"line":
|
|
8099
|
+
"line": 129,
|
|
8101
8100
|
"access": "private",
|
|
8102
8101
|
"tagname": "The browser's `userAgent`. This is typically equivalent to\n`navigator.userAgent`, but may be overridden for testing.",
|
|
8103
8102
|
"since": "1.5.1",
|
|
@@ -8109,7 +8108,7 @@
|
|
|
8109
8108
|
},
|
|
8110
8109
|
{
|
|
8111
8110
|
"file": "packages/@ember/-internals/routing/lib/location/auto_location.ts",
|
|
8112
|
-
"line":
|
|
8111
|
+
"line": 142,
|
|
8113
8112
|
"access": "private",
|
|
8114
8113
|
"tagname": "This property is used by the router to know whether to cancel the routing\nsetup process, which is needed while we redirect the browser.",
|
|
8115
8114
|
"since": "1.5.1",
|
|
@@ -8121,7 +8120,7 @@
|
|
|
8121
8120
|
},
|
|
8122
8121
|
{
|
|
8123
8122
|
"file": "packages/@ember/-internals/routing/lib/location/auto_location.ts",
|
|
8124
|
-
"line":
|
|
8123
|
+
"line": 155,
|
|
8125
8124
|
"description": "Called by the router to instruct the location to do any feature detection\nnecessary. In the case of AutoLocation, we detect whether to use history\nor hash concrete implementations.",
|
|
8126
8125
|
"access": "private",
|
|
8127
8126
|
"tagname": "",
|
|
@@ -8130,7 +8129,7 @@
|
|
|
8130
8129
|
},
|
|
8131
8130
|
{
|
|
8132
8131
|
"file": "packages/@ember/-internals/routing/lib/location/auto_location.ts",
|
|
8133
|
-
"line":
|
|
8132
|
+
"line": 308,
|
|
8134
8133
|
"access": "private",
|
|
8135
8134
|
"tagname": "Returns the current path as it should appear for HistoryLocation supported\nbrowsers. This may very well differ from the real current path (e.g. if it\nstarts off as a hashed URL)",
|
|
8136
8135
|
"class": "AutoLocation",
|
|
@@ -8138,7 +8137,7 @@
|
|
|
8138
8137
|
},
|
|
8139
8138
|
{
|
|
8140
8139
|
"file": "packages/@ember/-internals/routing/lib/location/auto_location.ts",
|
|
8141
|
-
"line":
|
|
8140
|
+
"line": 354,
|
|
8142
8141
|
"access": "private",
|
|
8143
8142
|
"tagname": "Returns the current path as it should appear for HashLocation supported\nbrowsers. This may very well differ from the real current path.",
|
|
8144
8143
|
"itemtype": "method",
|
|
@@ -8560,7 +8559,7 @@
|
|
|
8560
8559
|
},
|
|
8561
8560
|
{
|
|
8562
8561
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8563
|
-
"line":
|
|
8562
|
+
"line": 81,
|
|
8564
8563
|
"description": "Transition the application into another route. The route may\nbe either a single route or route path:\n\nCalling `transitionTo` from the Router service will cause default query parameter values to be included in the URL.\nThis behavior is different from calling `transitionTo` on a route or `transitionToRoute` on a controller.\nSee the [Router Service RFC](https://github.com/emberjs/rfcs/blob/master/text/0095-router-service.md#query-parameter-semantics) for more info.\n\nIn the following example we use the Router service to navigate to a route with a\nspecific model from a Component in the first action, and in the second we trigger\na query-params only transition.\n\n```app/components/example.js\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { service } from '@ember/service';\n\nexport default class extends Component {\n @service router;\n\n @action\n goToComments(post) {\n this.router.transitionTo('comments', post);\n }\n\n @action\n fetchMoreComments(latestComment) {\n this.router.transitionTo({\n queryParams: { commentsAfter: latestComment }\n });\n }\n}\n```",
|
|
8565
8564
|
"itemtype": "method",
|
|
8566
8565
|
"name": "transitionTo",
|
|
@@ -8595,7 +8594,7 @@
|
|
|
8595
8594
|
},
|
|
8596
8595
|
{
|
|
8597
8596
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8598
|
-
"line":
|
|
8597
|
+
"line": 140,
|
|
8599
8598
|
"description": "Similar to `transitionTo`, but instead of adding the destination to the browser's URL history,\nit replaces the entry for the current route.\nWhen the user clicks the \"back\" button in the browser, there will be fewer steps.\nThis is most commonly used to manage redirects in a way that does not cause confusing additions\nto the user's browsing history.\n\nCalling `replaceWith` from the Router service will cause default query parameter values to be included in the URL.\nThis behavior is different from calling `replaceWith` on a route.\nSee the [Router Service RFC](https://github.com/emberjs/rfcs/blob/master/text/0095-router-service.md#query-parameter-semantics) for more info.\n\nUsage example:\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\n\nexport default class extends Route {\n beforeModel() {\n if (!authorized()){\n this.replaceWith('unauthorized');\n }\n }\n});\n```",
|
|
8600
8599
|
"itemtype": "method",
|
|
8601
8600
|
"name": "replaceWith",
|
|
@@ -8628,7 +8627,7 @@
|
|
|
8628
8627
|
},
|
|
8629
8628
|
{
|
|
8630
8629
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8631
|
-
"line":
|
|
8630
|
+
"line": 179,
|
|
8632
8631
|
"description": "Generate a URL based on the supplied route name and optionally a model. The\nURL is returned as a string that can be used for any purpose.\n\nIn this example, the URL for the `author.books` route for a given author\nis copied to the clipboard.\n\n```app/templates/application.hbs\n<CopyLink @author={{hash id=\"tomster\" name=\"Tomster\"}} />\n```\n\n```app/components/copy-link.js\nimport Component from '@glimmer/component';\nimport { service } from '@ember/service';\nimport { action } from '@ember/object';\n\nexport default class CopyLinkComponent extends Component {\n @service router;\n @service clipboard;\n\n @action\n copyBooksURL() {\n if (this.author) {\n const url = this.router.urlFor('author.books', this.args.author);\n this.clipboard.set(url);\n // Clipboard now has /author/tomster/books\n }\n }\n}\n```\n\nJust like with `transitionTo` and `replaceWith`, `urlFor` can also handle\nquery parameters.\n\n```app/templates/application.hbs\n<CopyLink @author={{hash id=\"tomster\" name=\"Tomster\"}} />\n```\n\n```app/components/copy-link.js\nimport Component from '@glimmer/component';\nimport { service } from '@ember/service';\nimport { action } from '@ember/object';\n\nexport default class CopyLinkComponent extends Component {\n @service router;\n @service clipboard;\n\n @action\n copyOnlyEmberBooksURL() {\n if (this.author) {\n const url = this.router.urlFor('author.books', this.author, {\n queryParams: { filter: 'emberjs' }\n });\n this.clipboard.set(url);\n // Clipboard now has /author/tomster/books?filter=emberjs\n }\n }\n}\n```",
|
|
8633
8632
|
"itemtype": "method",
|
|
8634
8633
|
"name": "urlFor",
|
|
@@ -8661,7 +8660,7 @@
|
|
|
8661
8660
|
},
|
|
8662
8661
|
{
|
|
8663
8662
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8664
|
-
"line":
|
|
8663
|
+
"line": 252,
|
|
8665
8664
|
"description": "Returns `true` if `routeName/models/queryParams` is the active route, where `models` and `queryParams` are optional.\nSee [model](api/ember/release/classes/Route/methods/model?anchor=model) and\n[queryParams](/api/ember/3.7/classes/Route/properties/queryParams?anchor=queryParams) for more information about these arguments.\n\nIn the following example, `isActive` will return `true` if the current route is `/posts`.\n\n```app/components/posts.js\nimport Component from '@glimmer/component';\nimport { service } from '@ember/service';\n\nexport default class extends Component {\n @service router;\n\n displayComments() {\n return this.router.isActive('posts');\n }\n});\n```\n\nThe next example includes a dynamic segment, and will return `true` if the current route is `/posts/1`,\nassuming the post has an id of 1:\n\n```app/components/posts.js\nimport Component from '@glimmer/component';\nimport { service } from '@ember/service';\n\nexport default class extends Component {\n @service router;\n\n displayComments(post) {\n return this.router.isActive('posts', post.id);\n }\n});\n```\n\nWhere `post.id` is the id of a specific post, which is represented in the route as /posts/[post.id].\nIf `post.id` is equal to 1, then isActive will return true if the current route is /posts/1, and false if the route is anything else.",
|
|
8666
8665
|
"itemtype": "method",
|
|
8667
8666
|
"name": "isActive",
|
|
@@ -8694,7 +8693,7 @@
|
|
|
8694
8693
|
},
|
|
8695
8694
|
{
|
|
8696
8695
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8697
|
-
"line":
|
|
8696
|
+
"line": 356,
|
|
8698
8697
|
"description": "Takes a string URL and returns a `RouteInfo` for the leafmost route represented\nby the URL. Returns `null` if the URL is not recognized. This method expects to\nreceive the actual URL as seen by the browser including the app's `rootURL`.\n\nSee [RouteInfo](/ember/release/classes/RouteInfo) for more info.\n\nIn the following example `recognize` is used to verify if a path belongs to our\napplication before transitioning to it.\n\n```\nimport Component from '@ember/component';\nimport { service } from '@ember/service';\n\nexport default class extends Component {\n @service router;\n path = '/';\n\n click() {\n if (this.router.recognize(this.path)) {\n this.router.transitionTo(this.path);\n }\n }\n}\n```",
|
|
8699
8698
|
"itemtype": "method",
|
|
8700
8699
|
"name": "recognize",
|
|
@@ -8716,7 +8715,7 @@
|
|
|
8716
8715
|
},
|
|
8717
8716
|
{
|
|
8718
8717
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8719
|
-
"line":
|
|
8718
|
+
"line": 397,
|
|
8720
8719
|
"description": "Takes a string URL and returns a promise that resolves to a\n`RouteInfoWithAttributes` for the leafmost route represented by the URL.\nThe promise rejects if the URL is not recognized or an unhandled exception\nis encountered. This method expects to receive the actual URL as seen by\nthe browser including the app's `rootURL`.",
|
|
8721
8720
|
"itemtype": "method",
|
|
8722
8721
|
"name": "recognizeAndLoad",
|
|
@@ -8738,7 +8737,7 @@
|
|
|
8738
8737
|
},
|
|
8739
8738
|
{
|
|
8740
8739
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8741
|
-
"line":
|
|
8740
|
+
"line": 419,
|
|
8742
8741
|
"description": "You can register a listener for events emitted by this service with `.on()`:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing';\nimport { service } from '@ember/service';\n\nexport default class extends Route {\n @service router;\n\n activate() {\n this.router.on('routeWillChange', (transition) => {\n if (!transition.to.find(route => route.name === this.routeName)) {\n alert(\"Please save or cancel your changes.\");\n transition.abort();\n }\n })\n }\n}\n```",
|
|
8743
8742
|
"itemtype": "method",
|
|
8744
8743
|
"name": "on",
|
|
@@ -8761,7 +8760,7 @@
|
|
|
8761
8760
|
},
|
|
8762
8761
|
{
|
|
8763
8762
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8764
|
-
"line":
|
|
8763
|
+
"line": 446,
|
|
8765
8764
|
"description": "You can unregister a listener for events emitted by this service with `.off()`:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing';\nimport { service } from '@ember/service';\n\nexport default class extends Route {\n @service router;\n\n callback = (transition) => {\n if (!transition.to.find(route => route.name === this.routeName)) {\n alert(\"Please save or cancel your changes.\");\n transition.abort();\n }\n };\n\n activate() {\n this.router.on('routeWillChange', this.callback);\n }\n\n deactivate() {\n this.router.off('routeWillChange', this.callback);\n}\n```",
|
|
8766
8765
|
"itemtype": "method",
|
|
8767
8766
|
"name": "off",
|
|
@@ -8784,7 +8783,7 @@
|
|
|
8784
8783
|
},
|
|
8785
8784
|
{
|
|
8786
8785
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8787
|
-
"line":
|
|
8786
|
+
"line": 478,
|
|
8788
8787
|
"description": "The `routeWillChange` event is fired at the beginning of any\nattempted transition with a `Transition` object as the sole\nargument. This action can be used for aborting, redirecting,\nor decorating the transition from the currently active routes.\n\nA good example is preventing navigation when a form is\nhalf-filled out:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing';\nimport { service } from '@ember/service';\n\nexport default class extends Route {\n @service router;\n\n activate() {\n this.router.on('routeWillChange', (transition) => {\n if (!transition.to.find(route => route.name === this.routeName)) {\n alert(\"Please save or cancel your changes.\");\n transition.abort();\n }\n })\n }\n}\n```\n\nThe `routeWillChange` event fires whenever a new route is chosen as the desired target of a transition. This includes `transitionTo`, `replaceWith`, all redirection for any reason including error handling, and abort. Aborting implies changing the desired target back to where you already were. Once a transition has completed, `routeDidChange` fires.",
|
|
8789
8788
|
"itemtype": "event",
|
|
8790
8789
|
"name": "routeWillChange",
|
|
@@ -8802,7 +8801,7 @@
|
|
|
8802
8801
|
},
|
|
8803
8802
|
{
|
|
8804
8803
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8805
|
-
"line":
|
|
8804
|
+
"line": 512,
|
|
8806
8805
|
"description": "The `routeDidChange` event only fires once a transition has settled.\nThis includes aborts and error substates. Like the `routeWillChange` event\nit receives a Transition as the sole argument.\n\nA good example is sending some analytics when the route has transitioned:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing';\nimport { service } from '@ember/service';\n\nexport default class extends Route {\n @service router;\n\n activate() {\n this.router.on('routeDidChange', (transition) => {\n ga.send('pageView', {\n current: transition.to.name,\n from: transition.from.name\n });\n })\n }\n}\n```\n\n`routeDidChange` will be called after any `Route`'s\n[didTransition](/ember/release/classes/Route/events/didTransition?anchor=didTransition)\naction has been fired.\nThe updates of properties\n[currentURL](/ember/release/classes/RouterService/properties/currentURL?anchor=currentURL),\n[currentRouteName](/ember/release/classes/RouterService/properties/currentURL?anchor=currentRouteName)\nand\n[currentRoute](/ember/release/classes/RouterService/properties/currentURL?anchor=currentRoute)\nare completed at the time `routeDidChange` is called.",
|
|
8807
8806
|
"itemtype": "event",
|
|
8808
8807
|
"name": "routeDidChange",
|
|
@@ -8820,7 +8819,7 @@
|
|
|
8820
8819
|
},
|
|
8821
8820
|
{
|
|
8822
8821
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8823
|
-
"line":
|
|
8822
|
+
"line": 552,
|
|
8824
8823
|
"description": "Refreshes all currently active routes, doing a full transition.\nIf a route name is provided and refers to a currently active route,\nit will refresh only that route and its descendents.\nReturns a promise that will be resolved once the refresh is complete.\nAll resetController, beforeModel, model, afterModel, redirect, and setupController\nhooks will be called again. You will get new data from the model hook.",
|
|
8825
8824
|
"itemtype": "method",
|
|
8826
8825
|
"name": "refresh",
|
|
@@ -8842,7 +8841,7 @@
|
|
|
8842
8841
|
},
|
|
8843
8842
|
{
|
|
8844
8843
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8845
|
-
"line":
|
|
8844
|
+
"line": 582,
|
|
8846
8845
|
"description": "Name of the current route.\n\n This property represents the logical name of the route,\n which is dot separated.\n For the following router:\n\n ```app/router.js\n Router.map(function() {\n this.route('about');\n this.route('blog', function () {\n this.route('post', { path: ':post_id' });\n });\n });\n ```\n\n It will return:\n\n * `index` when you visit `/`\n * `about` when you visit `/about`\n * `blog.index` when you visit `/blog`\n * `blog.post` when you visit `/blog/some-post-id`",
|
|
8847
8846
|
"itemtype": "property",
|
|
8848
8847
|
"name": "currentRouteName",
|
|
@@ -8854,7 +8853,7 @@
|
|
|
8854
8853
|
},
|
|
8855
8854
|
{
|
|
8856
8855
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8857
|
-
"line":
|
|
8856
|
+
"line": 612,
|
|
8858
8857
|
"description": "Current URL for the application.\n\n This property represents the URL path for this route.\n For the following router:\n\n ```app/router.js\n Router.map(function() {\n this.route('about');\n this.route('blog', function () {\n this.route('post', { path: ':post_id' });\n });\n });\n ```\n\n It will return:\n\n * `/` when you visit `/`\n * `/about` when you visit `/about`\n * `/blog` when you visit `/blog`\n * `/blog/some-post-id` when you visit `/blog/some-post-id`",
|
|
8859
8858
|
"itemtype": "property",
|
|
8860
8859
|
"name": "currentURL",
|
|
@@ -8866,7 +8865,7 @@
|
|
|
8866
8865
|
},
|
|
8867
8866
|
{
|
|
8868
8867
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8869
|
-
"line":
|
|
8868
|
+
"line": 641,
|
|
8870
8869
|
"description": "The `location` property returns what implementation of the `location` API\nyour application is using, which determines what type of URL is being used.\n\nSee [Location](/ember/release/classes/Location) for more information.\n\nTo force a particular `location` API implementation to be used in your\napplication you can set a location type on your `config/environment`.\nFor example, to set the `history` type:\n\n```config/environment.js\n'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'router-service',\n environment,\n rootURL: '/',\n locationType: 'history',\n ...\n }\n}\n```\n\nThe following location types are available by default:\n`auto`, `hash`, `history`, `none`.\n\nSee [HashLocation](/ember/release/classes/HashLocation).\nSee [HistoryLocation](/ember/release/classes/HistoryLocation).\nSee [NoneLocation](/ember/release/classes/NoneLocation).\nSee [AutoLocation](/ember/release/classes/AutoLocation).",
|
|
8871
8870
|
"itemtype": "property",
|
|
8872
8871
|
"name": "location",
|
|
@@ -8881,7 +8880,7 @@
|
|
|
8881
8880
|
},
|
|
8882
8881
|
{
|
|
8883
8882
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8884
|
-
"line":
|
|
8883
|
+
"line": 681,
|
|
8885
8884
|
"description": "The `rootURL` property represents the URL of the root of\nthe application, '/' by default.\nThis prefix is assumed on all routes defined on this app.\n\nIf you change the `rootURL` in your environment configuration\nlike so:\n\n```config/environment.js\n'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'router-service',\n environment,\n rootURL: '/my-root',\n …\n }\n]\n```\n\nThis property will return `/my-root`.",
|
|
8886
8885
|
"itemtype": "property",
|
|
8887
8886
|
"name": "rootURL",
|
|
@@ -8893,7 +8892,7 @@
|
|
|
8893
8892
|
},
|
|
8894
8893
|
{
|
|
8895
8894
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8896
|
-
"line":
|
|
8895
|
+
"line": 711,
|
|
8897
8896
|
"description": "The `currentRoute` property contains metadata about the current leaf route.\nIt returns a `RouteInfo` object that has information like the route name,\nparams, query params and more.\n\nSee [RouteInfo](/ember/release/classes/RouteInfo) for more info.\n\nThis property is guaranteed to change whenever a route transition\nhappens (even when that transition only changes parameters\nand doesn't change the active route).\n\nUsage example:\n```app/components/header.js\n import Component from '@glimmer/component';\n import { service } from '@ember/service';\n import { notEmpty } from '@ember/object/computed';\n\n export default class extends Component {\n @service router;\n\n @notEmpty('router.currentRoute.child') isChildRoute;\n });\n```",
|
|
8898
8897
|
"itemtype": "property",
|
|
8899
8898
|
"name": "currentRoute",
|
|
@@ -9199,7 +9198,7 @@
|
|
|
9199
9198
|
},
|
|
9200
9199
|
{
|
|
9201
9200
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9202
|
-
"line":
|
|
9201
|
+
"line": 97,
|
|
9203
9202
|
"description": "The `willTransition` action is fired at the beginning of any\nattempted transition with a `Transition` object as the sole\nargument. This action can be used for aborting, redirecting,\nor decorating the transition from the currently active routes.\n\nA good example is preventing navigation when a form is\nhalf-filled out:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class ContactFormRoute extends Route {\n @action\n willTransition(transition) {\n if (this.controller.get('userHasEnteredData')) {\n this.controller.displayNavigationConfirm();\n transition.abort();\n }\n }\n}\n```\n\nYou can also redirect elsewhere by calling\n`this.transitionTo('elsewhere')` from within `willTransition`.\nNote that `willTransition` will not be fired for the\nredirecting `transitionTo`, since `willTransition` doesn't\nfire when there is already a transition underway. If you want\nsubsequent `willTransition` actions to fire for the redirecting\ntransition, you must first explicitly call\n`transition.abort()`.\n\nTo allow the `willTransition` event to continue bubbling to the parent\nroute, use `return true;`. When the `willTransition` method has a\nreturn value of `true` then the parent route's `willTransition` method\nwill be fired, enabling \"bubbling\" behavior for the event.",
|
|
9204
9203
|
"itemtype": "event",
|
|
9205
9204
|
"name": "willTransition",
|
|
@@ -9218,7 +9217,7 @@
|
|
|
9218
9217
|
},
|
|
9219
9218
|
{
|
|
9220
9219
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9221
|
-
"line":
|
|
9220
|
+
"line": 142,
|
|
9222
9221
|
"description": "The `didTransition` action is fired after a transition has\nsuccessfully been completed. This occurs after the normal model\nhooks (`beforeModel`, `model`, `afterModel`, `setupController`)\nhave resolved. The `didTransition` action has no arguments,\nhowever, it can be useful for tracking page views or resetting\nstate on the controller.\n\n```app/routes/login.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class LoginRoute extends Route {\n @action\n didTransition() {\n this.controller.get('errors.base').clear();\n return true; // Bubble the didTransition event\n }\n}\n```",
|
|
9223
9222
|
"itemtype": "event",
|
|
9224
9223
|
"name": "didTransition",
|
|
@@ -9230,7 +9229,7 @@
|
|
|
9230
9229
|
},
|
|
9231
9230
|
{
|
|
9232
9231
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9233
|
-
"line":
|
|
9232
|
+
"line": 169,
|
|
9234
9233
|
"description": "The `loading` action is fired on the route when a route's `model`\nhook returns a promise that is not already resolved. The current\n`Transition` object is the first parameter and the route that\ntriggered the loading event is the second parameter.\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class ApplicationRoute extends Route {\n @action\n loading(transition, route) {\n let controller = this.controllerFor('foo');\n\n // The controller may not be instantiated when initially loading\n if (controller) {\n controller.currentlyLoading = true;\n\n transition.finally(function() {\n controller.currentlyLoading = false;\n });\n }\n }\n}\n```",
|
|
9235
9234
|
"itemtype": "event",
|
|
9236
9235
|
"name": "loading",
|
|
@@ -9254,7 +9253,7 @@
|
|
|
9254
9253
|
},
|
|
9255
9254
|
{
|
|
9256
9255
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9257
|
-
"line":
|
|
9256
|
+
"line": 204,
|
|
9258
9257
|
"description": "When attempting to transition into a route, any of the hooks\nmay return a promise that rejects, at which point an `error`\naction will be fired on the partially-entered routes, allowing\nfor per-route error handling logic, or shared error handling\nlogic defined on a parent route.\n\nHere is an example of an error handler that will be invoked\nfor rejected promises from the various hooks on the route,\nas well as any unhandled errors from child routes:\n\n```app/routes/admin.js\nimport { reject } from 'rsvp';\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class AdminRoute extends Route {\n beforeModel() {\n return reject('bad things!');\n }\n\n @action\n error(error, transition) {\n // Assuming we got here due to the error in `beforeModel`,\n // we can expect that error === \"bad things!\",\n // but a promise model rejecting would also\n // call this hook, as would any errors encountered\n // in `afterModel`.\n\n // The `error` hook is also provided the failed\n // `transition`, which can be stored and later\n // `.retry()`d if desired.\n\n this.transitionTo('login');\n }\n}\n```\n\n`error` actions that bubble up all the way to `ApplicationRoute`\nwill fire a default error handler that logs the error. You can\nspecify your own global default error handler by overriding the\n`error` handler on `ApplicationRoute`:\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class ApplicationRoute extends Route {\n @action\n error(error, transition) {\n this.controllerFor('banner').displayError(error.message);\n }\n}\n```",
|
|
9259
9258
|
"itemtype": "event",
|
|
9260
9259
|
"name": "error",
|
|
@@ -9278,7 +9277,7 @@
|
|
|
9278
9277
|
},
|
|
9279
9278
|
{
|
|
9280
9279
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9281
|
-
"line":
|
|
9280
|
+
"line": 311,
|
|
9282
9281
|
"description": "A hook you can implement to convert the route's model into parameters\nfor the URL.\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' });\n});\n\n```\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class PostRoute extends Route {\n model({ post_id }) {\n // the server returns `{ id: 12 }`\n return fetch(`/posts/${post_id}`;\n }\n\n serialize(model) {\n // this will make the URL `/posts/12`\n return { post_id: model.id };\n }\n}\n```\n\nThe default `serialize` method will insert the model's `id` into the\nroute's dynamic segment (in this case, `:post_id`) if the segment contains '_id'.\nIf the route has multiple dynamic segments or does not contain '_id', `serialize`\nwill return `getProperties(model, params)`\n\nThis method is called when `transitionTo` is called with a context\nin order to populate the URL.",
|
|
9283
9282
|
"itemtype": "method",
|
|
9284
9283
|
"name": "serialize",
|
|
@@ -9306,7 +9305,7 @@
|
|
|
9306
9305
|
},
|
|
9307
9306
|
{
|
|
9308
9307
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9309
|
-
"line":
|
|
9308
|
+
"line": 379,
|
|
9310
9309
|
"description": "Configuration hash for this route's queryParams. The possible\nconfiguration options and their defaults are as follows\n(assuming a query param whose controller property is `page`):\n\n```javascript\nqueryParams = {\n page: {\n // By default, controller query param properties don't\n // cause a full transition when they are changed, but\n // rather only cause the URL to update. Setting\n // `refreshModel` to true will cause an \"in-place\"\n // transition to occur, whereby the model hooks for\n // this route (and any child routes) will re-fire, allowing\n // you to reload models (e.g., from the server) using the\n // updated query param values.\n refreshModel: false,\n\n // By default, changes to controller query param properties\n // cause the URL to update via `pushState`, which means an\n // item will be added to the browser's history, allowing\n // you to use the back button to restore the app to the\n // previous state before the query param property was changed.\n // Setting `replace` to true will use `replaceState` (or its\n // hash location equivalent), which causes no browser history\n // item to be added. This options name and default value are\n // the same as the `link-to` helper's `replace` option.\n replace: false,\n\n // By default, the query param URL key is the same name as\n // the controller property name. Use `as` to specify a\n // different URL key.\n as: 'page'\n }\n};\n```",
|
|
9311
9310
|
"itemtype": "property",
|
|
9312
9311
|
"name": "queryParams",
|
|
@@ -9319,8 +9318,8 @@
|
|
|
9319
9318
|
},
|
|
9320
9319
|
{
|
|
9321
9320
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9322
|
-
"line":
|
|
9323
|
-
"description": "The name of the template to use by default when rendering this
|
|
9321
|
+
"line": 432,
|
|
9322
|
+
"description": "The name of the template to use by default when rendering this route's\ntemplate.\n\n```app/routes/posts/list.js\nimport Route from '@ember/routing/route';\n\nexport default class PostsListRoute extends Route {\n templateName = 'posts/list';\n}\n```\n\n```app/routes/posts/index.js\nimport PostsListRoute from '../posts/list';\n\nexport default class PostsIndexRoute extends PostsListRoute {};\n```\n\n```app/routes/posts/archived.js\nimport PostsListRoute from '../posts/list';\n\nexport default class PostsArchivedRoute extends PostsListRoute {};\n```",
|
|
9324
9323
|
"itemtype": "property",
|
|
9325
9324
|
"name": "templateName",
|
|
9326
9325
|
"type": "String",
|
|
@@ -9333,7 +9332,7 @@
|
|
|
9333
9332
|
},
|
|
9334
9333
|
{
|
|
9335
9334
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9336
|
-
"line":
|
|
9335
|
+
"line": 465,
|
|
9337
9336
|
"description": "The name of the controller to associate with this route.\n\nBy default, Ember will lookup a route's controller that matches the name\nof the route (i.e. `posts.new`). However,\nif you would like to define a specific controller to use, you can do so\nusing this property.\n\nThis is useful in many ways, as the controller specified will be:\n\n* passed to the `setupController` method.\n* used as the controller for the template being rendered by the route.\n* returned from a call to `controllerFor` for the route.",
|
|
9338
9337
|
"itemtype": "property",
|
|
9339
9338
|
"name": "controllerName",
|
|
@@ -9347,7 +9346,7 @@
|
|
|
9347
9346
|
},
|
|
9348
9347
|
{
|
|
9349
9348
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9350
|
-
"line":
|
|
9349
|
+
"line": 488,
|
|
9351
9350
|
"description": "The controller associated with this route.\n\nExample\n\n```app/routes/form.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class FormRoute extends Route {\n @action\n willTransition(transition) {\n if (this.controller.get('userHasEnteredData') &&\n !confirm('Are you sure you want to abandon progress?')) {\n transition.abort();\n } else {\n // Bubble the `willTransition` action so that\n // parent routes can decide whether or not to abort.\n return true;\n }\n }\n}\n```",
|
|
9352
9351
|
"itemtype": "property",
|
|
9353
9352
|
"name": "controller",
|
|
@@ -9360,7 +9359,7 @@
|
|
|
9360
9359
|
},
|
|
9361
9360
|
{
|
|
9362
9361
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9363
|
-
"line":
|
|
9362
|
+
"line": 519,
|
|
9364
9363
|
"description": "The name of the route, dot-delimited.\n\nFor example, a route found at `app/routes/posts/post.js` will have\na `routeName` of `posts.post`.",
|
|
9365
9364
|
"itemtype": "property",
|
|
9366
9365
|
"name": "routeName",
|
|
@@ -9373,7 +9372,7 @@
|
|
|
9373
9372
|
},
|
|
9374
9373
|
{
|
|
9375
9374
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9376
|
-
"line":
|
|
9375
|
+
"line": 533,
|
|
9377
9376
|
"description": "The name of the route, dot-delimited, including the engine prefix\nif applicable.\n\nFor example, a route found at `addon/routes/posts/post.js` within an\nengine named `admin` will have a `fullRouteName` of `admin.posts.post`.",
|
|
9378
9377
|
"itemtype": "property",
|
|
9379
9378
|
"name": "fullRouteName",
|
|
@@ -9386,7 +9385,7 @@
|
|
|
9386
9385
|
},
|
|
9387
9386
|
{
|
|
9388
9387
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9389
|
-
"line":
|
|
9388
|
+
"line": 548,
|
|
9390
9389
|
"description": "Sets the name for this route, including a fully resolved name for routes\ninside engines.",
|
|
9391
9390
|
"access": "private",
|
|
9392
9391
|
"tagname": "",
|
|
@@ -9404,7 +9403,7 @@
|
|
|
9404
9403
|
},
|
|
9405
9404
|
{
|
|
9406
9405
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9407
|
-
"line":
|
|
9406
|
+
"line": 563,
|
|
9408
9407
|
"access": "private",
|
|
9409
9408
|
"tagname": "",
|
|
9410
9409
|
"itemtype": "method",
|
|
@@ -9414,7 +9413,7 @@
|
|
|
9414
9413
|
},
|
|
9415
9414
|
{
|
|
9416
9415
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9417
|
-
"line":
|
|
9416
|
+
"line": 597,
|
|
9418
9417
|
"access": "private",
|
|
9419
9418
|
"tagname": "",
|
|
9420
9419
|
"itemtype": "property",
|
|
@@ -9424,7 +9423,7 @@
|
|
|
9424
9423
|
},
|
|
9425
9424
|
{
|
|
9426
9425
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9427
|
-
"line":
|
|
9426
|
+
"line": 606,
|
|
9428
9427
|
"access": "private",
|
|
9429
9428
|
"tagname": "",
|
|
9430
9429
|
"itemtype": "method",
|
|
@@ -9434,7 +9433,7 @@
|
|
|
9434
9433
|
},
|
|
9435
9434
|
{
|
|
9436
9435
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9437
|
-
"line":
|
|
9436
|
+
"line": 614,
|
|
9438
9437
|
"description": "Returns a hash containing the parameters of an ancestor route.\n\nYou may notice that `this.paramsFor` sometimes works when referring to a\nchild route, but this behavior should not be relied upon as only ancestor\nroutes are certain to be loaded in time.\n\nExample\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('member', { path: ':name' }, function() {\n this.route('interest', { path: ':interest' });\n });\n});\n```\n\n```app/routes/member.js\nimport Route from '@ember/routing/route';\n\nexport default class MemberRoute extends Route {\n queryParams = {\n memberQp: { refreshModel: true }\n }\n}\n```\n\n```app/routes/member/interest.js\nimport Route from '@ember/routing/route';\n\nexport default class MemberInterestRoute extends Route {\n queryParams = {\n interestQp: { refreshModel: true }\n }\n\n model() {\n return this.paramsFor('member');\n }\n}\n```\n\nIf we visit `/turing/maths?memberQp=member&interestQp=interest` the model for\nthe `member.interest` route is a hash with:\n\n* `name`: `turing`\n* `memberQp`: `member`",
|
|
9439
9438
|
"itemtype": "method",
|
|
9440
9439
|
"name": "paramsFor",
|
|
@@ -9457,7 +9456,7 @@
|
|
|
9457
9456
|
},
|
|
9458
9457
|
{
|
|
9459
9458
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9460
|
-
"line":
|
|
9459
|
+
"line": 695,
|
|
9461
9460
|
"description": "Serializes the query parameter key",
|
|
9462
9461
|
"itemtype": "method",
|
|
9463
9462
|
"name": "serializeQueryParamKey",
|
|
@@ -9475,7 +9474,7 @@
|
|
|
9475
9474
|
},
|
|
9476
9475
|
{
|
|
9477
9476
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9478
|
-
"line":
|
|
9477
|
+
"line": 706,
|
|
9479
9478
|
"description": "Serializes value of the query parameter based on defaultValueType",
|
|
9480
9479
|
"itemtype": "method",
|
|
9481
9480
|
"name": "serializeQueryParam",
|
|
@@ -9503,7 +9502,7 @@
|
|
|
9503
9502
|
},
|
|
9504
9503
|
{
|
|
9505
9504
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9506
|
-
"line":
|
|
9505
|
+
"line": 722,
|
|
9507
9506
|
"description": "Deserializes value of the query parameter based on defaultValueType",
|
|
9508
9507
|
"itemtype": "method",
|
|
9509
9508
|
"name": "deserializeQueryParam",
|
|
@@ -9531,7 +9530,7 @@
|
|
|
9531
9530
|
},
|
|
9532
9531
|
{
|
|
9533
9532
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9534
|
-
"line":
|
|
9533
|
+
"line": 738,
|
|
9535
9534
|
"access": "private",
|
|
9536
9535
|
"tagname": "",
|
|
9537
9536
|
"itemtype": "property",
|
|
@@ -9541,7 +9540,7 @@
|
|
|
9541
9540
|
},
|
|
9542
9541
|
{
|
|
9543
9542
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9544
|
-
"line":
|
|
9543
|
+
"line": 754,
|
|
9545
9544
|
"description": "A hook you can use to reset controller values either when the model\nchanges or the route is exiting.\n\n```app/routes/articles.js\nimport Route from '@ember/routing/route';\n\nexport default class ArticlesRoute extends Route {\n resetController(controller, isExiting, transition) {\n if (isExiting && transition.targetName !== 'error') {\n controller.set('page', 1);\n }\n }\n}\n```",
|
|
9546
9545
|
"itemtype": "method",
|
|
9547
9546
|
"name": "resetController",
|
|
@@ -9570,7 +9569,7 @@
|
|
|
9570
9569
|
},
|
|
9571
9570
|
{
|
|
9572
9571
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9573
|
-
"line":
|
|
9572
|
+
"line": 781,
|
|
9574
9573
|
"access": "private",
|
|
9575
9574
|
"tagname": "",
|
|
9576
9575
|
"itemtype": "method",
|
|
@@ -9580,7 +9579,7 @@
|
|
|
9580
9579
|
},
|
|
9581
9580
|
{
|
|
9582
9581
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9583
|
-
"line":
|
|
9582
|
+
"line": 792,
|
|
9584
9583
|
"access": "private",
|
|
9585
9584
|
"tagname": "",
|
|
9586
9585
|
"itemtype": "method",
|
|
@@ -9591,7 +9590,7 @@
|
|
|
9591
9590
|
},
|
|
9592
9591
|
{
|
|
9593
9592
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9594
|
-
"line":
|
|
9593
|
+
"line": 806,
|
|
9595
9594
|
"access": "private",
|
|
9596
9595
|
"tagname": "",
|
|
9597
9596
|
"itemtype": "method",
|
|
@@ -9601,7 +9600,7 @@
|
|
|
9601
9600
|
},
|
|
9602
9601
|
{
|
|
9603
9602
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9604
|
-
"line":
|
|
9603
|
+
"line": 817,
|
|
9605
9604
|
"description": "This event is triggered when the router enters the route. It is\nnot executed when the model for the route changes.\n\n```app/routes/application.js\nimport { on } from '@ember/object/evented';\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n collectAnalytics: on('activate', function(){\n collectAnalytics();\n })\n});\n```",
|
|
9606
9605
|
"itemtype": "event",
|
|
9607
9606
|
"name": "activate",
|
|
@@ -9613,7 +9612,7 @@
|
|
|
9613
9612
|
},
|
|
9614
9613
|
{
|
|
9615
9614
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9616
|
-
"line":
|
|
9615
|
+
"line": 837,
|
|
9617
9616
|
"description": "This event is triggered when the router completely exits this\nroute. It is not executed when the model for the route changes.\n\n```app/routes/index.js\nimport { on } from '@ember/object/evented';\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n trackPageLeaveAnalytics: on('deactivate', function(){\n trackPageLeaveAnalytics();\n })\n});\n```",
|
|
9618
9617
|
"itemtype": "event",
|
|
9619
9618
|
"name": "deactivate",
|
|
@@ -9625,7 +9624,7 @@
|
|
|
9625
9624
|
},
|
|
9626
9625
|
{
|
|
9627
9626
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9628
|
-
"line":
|
|
9627
|
+
"line": 857,
|
|
9629
9628
|
"description": "This hook is executed when the router completely exits this route. It is\nnot executed when the model for the route changes.",
|
|
9630
9629
|
"itemtype": "method",
|
|
9631
9630
|
"name": "deactivate",
|
|
@@ -9644,7 +9643,7 @@
|
|
|
9644
9643
|
},
|
|
9645
9644
|
{
|
|
9646
9645
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9647
|
-
"line":
|
|
9646
|
+
"line": 868,
|
|
9648
9647
|
"description": "This hook is executed when the router enters the route. It is not executed\nwhen the model for the route changes.",
|
|
9649
9648
|
"itemtype": "method",
|
|
9650
9649
|
"name": "activate",
|
|
@@ -9663,7 +9662,7 @@
|
|
|
9663
9662
|
},
|
|
9664
9663
|
{
|
|
9665
9664
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9666
|
-
"line":
|
|
9665
|
+
"line": 879,
|
|
9667
9666
|
"description": "Transition the application into another route. The route may\nbe either a single route or route path:\n\n```javascript\nthis.transitionTo('blogPosts');\nthis.transitionTo('blogPosts.recentEntries');\n```\n\nOptionally supply a model for the route in question. The model\nwill be serialized into the URL using the `serialize` hook of\nthe route:\n\n```javascript\nthis.transitionTo('blogPost', aPost);\n```\n\nIf a literal is passed (such as a number or a string), it will\nbe treated as an identifier instead. In this case, the `model`\nhook of the route will be triggered:\n\n```javascript\nthis.transitionTo('blogPost', 1);\n```\n\nMultiple models will be applied last to first recursively up the\nroute tree.\n\n```app/routes.js\n// ...\n\nRouter.map(function() {\n this.route('blogPost', { path:':blogPostId' }, function() {\n this.route('blogComment', { path: ':blogCommentId' });\n });\n});\n\nexport default Router;\n```\n\n```javascript\nthis.transitionTo('blogComment', aPost, aComment);\nthis.transitionTo('blogComment', 1, 13);\n```\n\nIt is also possible to pass a URL (a string that starts with a\n`/`).\n\n```javascript\nthis.transitionTo('/');\nthis.transitionTo('/blog/post/1/comment/13');\nthis.transitionTo('/blog/posts?sort=title');\n```\n\nAn options hash with a `queryParams` property may be provided as\nthe final argument to add query parameters to the destination URL.\n\n```javascript\nthis.transitionTo('blogPost', 1, {\n queryParams: { showComments: 'true' }\n});\n\n// if you just want to transition the query parameters without changing the route\nthis.transitionTo({ queryParams: { sort: 'date' } });\n```\n\nSee also [replaceWith](#method_replaceWith).\n\nSimple Transition Example\n\n```app/routes.js\n// ...\n\nRouter.map(function() {\n this.route('index');\n this.route('secret');\n this.route('fourOhFour', { path: '*:' });\n});\n\nexport default Router;\n```\n\n```app/routes/index.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class IndexRoute extends Route {\n @action\n moveToSecret(context) {\n if (authorized()) {\n this.transitionTo('secret', context);\n } else {\n this.transitionTo('fourOhFour');\n }\n }\n}\n```\n\nTransition to a nested route\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('articles', { path: '/articles' }, function() {\n this.route('new');\n });\n});\n\nexport default Router;\n```\n\n```app/routes/index.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class IndexRoute extends Route {\n @action\n transitionToNewArticle() {\n this.transitionTo('articles.new');\n }\n}\n```\n\nMultiple Models Example\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('index');\n\n this.route('breakfast', { path: ':breakfastId' }, function() {\n this.route('cereal', { path: ':cerealId' });\n });\n});\n\nexport default Router;\n```\n\n```app/routes/index.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class IndexRoute extends Route {\n @action\n moveToChocolateCereal() {\n let cereal = { cerealId: 'ChocolateYumminess' };\n let breakfast = { breakfastId: 'CerealAndMilk' };\n\n this.transitionTo('breakfast.cereal', breakfast, cereal);\n }\n}\n```\n\nNested Route with Query String Example\n\n```app/routes.js\n// ...\n\nRouter.map(function() {\n this.route('fruits', function() {\n this.route('apples');\n });\n});\n\nexport default Router;\n```\n\n```app/routes/index.js\nimport Route from '@ember/routing/route';\n\nexport default class IndexRoute extends Route {\n @action\n transitionToApples() {\n this.transitionTo('fruits.apples', { queryParams: { color: 'red' } });\n }\n}\n```",
|
|
9668
9667
|
"itemtype": "method",
|
|
9669
9668
|
"name": "transitionTo",
|
|
@@ -9701,7 +9700,7 @@
|
|
|
9701
9700
|
},
|
|
9702
9701
|
{
|
|
9703
9702
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9704
|
-
"line":
|
|
9703
|
+
"line": 1077,
|
|
9705
9704
|
"description": "Perform a synchronous transition into another route without attempting\nto resolve promises, update the URL, or abort any currently active\nasynchronous transitions (i.e. regular transitions caused by\n`transitionTo` or URL changes).\n\nThis method is handy for performing intermediate transitions on the\nway to a final destination route, and is called internally by the\ndefault implementations of the `error` and `loading` handlers.",
|
|
9706
9705
|
"itemtype": "method",
|
|
9707
9706
|
"name": "intermediateTransitionTo",
|
|
@@ -9725,7 +9724,7 @@
|
|
|
9725
9724
|
},
|
|
9726
9725
|
{
|
|
9727
9726
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9728
|
-
"line":
|
|
9727
|
+
"line": 1099,
|
|
9729
9728
|
"description": "Refresh the model on this route and any child routes, firing the\n`beforeModel`, `model`, and `afterModel` hooks in a similar fashion\nto how routes are entered when transitioning in from other route.\nThe current route params (e.g. `article_id`) will be passed in\nto the respective model hooks, and if a different model is returned,\n`setupController` and associated route hooks will re-fire as well.\n\nAn example usage of this method is re-querying the server for the\nlatest information using the same parameters as when the route\nwas first entered.\n\nNote that this will cause `model` hooks to fire even on routes\nthat were provided a model object when the route was initially\nentered.",
|
|
9730
9729
|
"itemtype": "method",
|
|
9731
9730
|
"name": "refresh",
|
|
@@ -9741,7 +9740,7 @@
|
|
|
9741
9740
|
},
|
|
9742
9741
|
{
|
|
9743
9742
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9744
|
-
"line":
|
|
9743
|
+
"line": 1125,
|
|
9745
9744
|
"description": "Transition into another route while replacing the current URL, if possible.\nThis will replace the current history entry instead of adding a new one.\nBeside that, it is identical to `transitionTo` in all other respects. See\n'transitionTo' for additional information regarding multiple models.\n\nExample\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('index');\n this.route('secret');\n});\n\nexport default Router;\n```\n\n```app/routes/secret.js\nimport Route from '@ember/routing/route';\n\nexport default class SecretRoute Route {\n afterModel() {\n if (!authorized()){\n this.replaceWith('index');\n }\n }\n}\n```",
|
|
9746
9745
|
"itemtype": "method",
|
|
9747
9746
|
"name": "replaceWith",
|
|
@@ -9777,7 +9776,7 @@
|
|
|
9777
9776
|
},
|
|
9778
9777
|
{
|
|
9779
9778
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9780
|
-
"line":
|
|
9779
|
+
"line": 1173,
|
|
9781
9780
|
"description": "This hook is the entry point for router.js",
|
|
9782
9781
|
"access": "private",
|
|
9783
9782
|
"tagname": "",
|
|
@@ -9788,7 +9787,7 @@
|
|
|
9788
9787
|
},
|
|
9789
9788
|
{
|
|
9790
9789
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9791
|
-
"line":
|
|
9790
|
+
"line": 1248,
|
|
9792
9791
|
"description": "This hook is the first of the route entry validation hooks\ncalled when an attempt is made to transition into a route\nor one of its children. It is called before `model` and\n`afterModel`, and is appropriate for cases when:\n\n1) A decision can be made to redirect elsewhere without\n needing to resolve the model first.\n2) Any async operations need to occur first before the\n model is attempted to be resolved.\n\nThis hook is provided the current `transition` attempt\nas a parameter, which can be used to `.abort()` the transition,\nsave it for a later `.retry()`, or retrieve values set\non it from a previous hook. You can also just call\n`this.transitionTo` to another route to implicitly\nabort the `transition`.\n\nYou can return a promise from this hook to pause the\ntransition until the promise resolves (or rejects). This could\nbe useful, for instance, for retrieving async code from\nthe server that is required to enter a route.",
|
|
9793
9792
|
"itemtype": "method",
|
|
9794
9793
|
"name": "beforeModel",
|
|
@@ -9811,7 +9810,7 @@
|
|
|
9811
9810
|
},
|
|
9812
9811
|
{
|
|
9813
9812
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9814
|
-
"line":
|
|
9813
|
+
"line": 1283,
|
|
9815
9814
|
"description": "This hook is called after this route's model has resolved.\nIt follows identical async/promise semantics to `beforeModel`\nbut is provided the route's resolved model in addition to\nthe `transition`, and is therefore suited to performing\nlogic that can only take place after the model has already\nresolved.\n\n```app/routes/posts.js\nimport Route from '@ember/routing/route';\n\nexport default class PostsRoute extends Route {\n afterModel(posts, transition) {\n if (posts.get('length') === 1) {\n this.transitionTo('post.show', posts.get('firstObject'));\n }\n }\n}\n```\n\nRefer to documentation for `beforeModel` for a description\nof transition-pausing semantics when a promise is returned\nfrom this hook.",
|
|
9816
9815
|
"itemtype": "method",
|
|
9817
9816
|
"name": "afterModel",
|
|
@@ -9839,7 +9838,7 @@
|
|
|
9839
9838
|
},
|
|
9840
9839
|
{
|
|
9841
9840
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9842
|
-
"line":
|
|
9841
|
+
"line": 1321,
|
|
9843
9842
|
"description": "A hook you can implement to optionally redirect to another route.\n\nCalling `this.transitionTo` from inside of the `redirect` hook will\nabort the current transition (into the route that has implemented `redirect`).\n\n`redirect` and `afterModel` behave very similarly and are\ncalled almost at the same time, but they have an important\ndistinction when calling `this.transitionTo` to a child route\nof the current route. From `afterModel`, this new transition\ninvalidates the current transition, causing `beforeModel`,\n`model`, and `afterModel` hooks to be called again. But the\nsame transition started from `redirect` does _not_ invalidate\nthe current transition. In other words, by the time the `redirect`\nhook has been called, both the resolved model and the attempted\nentry into this route are considered fully validated.",
|
|
9844
9843
|
"itemtype": "method",
|
|
9845
9844
|
"name": "redirect",
|
|
@@ -9863,7 +9862,7 @@
|
|
|
9863
9862
|
},
|
|
9864
9863
|
{
|
|
9865
9864
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9866
|
-
"line":
|
|
9865
|
+
"line": 1346,
|
|
9867
9866
|
"description": "Called when the context is changed by router.js.",
|
|
9868
9867
|
"access": "private",
|
|
9869
9868
|
"tagname": "",
|
|
@@ -9874,7 +9873,7 @@
|
|
|
9874
9873
|
},
|
|
9875
9874
|
{
|
|
9876
9875
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9877
|
-
"line":
|
|
9876
|
+
"line": 1356,
|
|
9878
9877
|
"description": "A hook you can implement to convert the URL into the model for\nthis route.\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' });\n});\n\nexport default Router;\n```\n\nThe model for the `post` route is `store.findRecord('post', params.post_id)`.\n\nBy default, if your route has a dynamic segment ending in `_id`:\n\n* The model class is determined from the segment (`post_id`'s\n class is `App.Post`)\n* The find method is called on the model class with the value of\n the dynamic segment.\n\nNote that for routes with dynamic segments, this hook is not always\nexecuted. If the route is entered through a transition (e.g. when\nusing the `link-to` Handlebars helper or the `transitionTo` method\nof routes), and a model context is already provided this hook\nis not called.\n\nA model context does not include a primitive string or number,\nwhich does cause the model hook to be called.\n\nRoutes without dynamic segments will always execute the model hook.\n\n```javascript\n// no dynamic segment, model hook always called\nthis.transitionTo('posts');\n\n// model passed in, so model hook not called\nthePost = store.findRecord('post', 1);\nthis.transitionTo('post', thePost);\n\n// integer passed in, model hook is called\nthis.transitionTo('post', 1);\n\n// model id passed in, model hook is called\n// useful for forcing the hook to execute\nthePost = store.findRecord('post', 1);\nthis.transitionTo('post', thePost.id);\n```\n\nThis hook follows the asynchronous/promise semantics\ndescribed in the documentation for `beforeModel`. In particular,\nif a promise returned from `model` fails, the error will be\nhandled by the `error` hook on `Route`.\n\nExample\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class PostRoute extends Route {\n model(params) {\n return this.store.findRecord('post', params.post_id);\n }\n}\n```",
|
|
9879
9878
|
"itemtype": "method",
|
|
9880
9879
|
"name": "model",
|
|
@@ -9902,7 +9901,7 @@
|
|
|
9902
9901
|
},
|
|
9903
9902
|
{
|
|
9904
9903
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9905
|
-
"line":
|
|
9904
|
+
"line": 1471,
|
|
9906
9905
|
"access": "private",
|
|
9907
9906
|
"tagname": "",
|
|
9908
9907
|
"itemtype": "method",
|
|
@@ -9928,7 +9927,7 @@
|
|
|
9928
9927
|
},
|
|
9929
9928
|
{
|
|
9930
9929
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9931
|
-
"line":
|
|
9930
|
+
"line": 1484,
|
|
9932
9931
|
"itemtype": "method",
|
|
9933
9932
|
"name": "findModel",
|
|
9934
9933
|
"params": [
|
|
@@ -9950,7 +9949,7 @@
|
|
|
9950
9949
|
},
|
|
9951
9950
|
{
|
|
9952
9951
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9953
|
-
"line":
|
|
9952
|
+
"line": 1495,
|
|
9954
9953
|
"description": "A hook you can use to setup the controller for the current route.\n\nThis method is called with the controller for the current route and the\nmodel supplied by the `model` hook.\n\nBy default, the `setupController` hook sets the `model` property of\nthe controller to the specified `model` when it is not `undefined`.\n\nIf you implement the `setupController` hook in your Route, it will\nprevent this default behavior. If you want to preserve that behavior\nwhen implementing your `setupController` function, make sure to call\n`super`:\n\n```app/routes/photos.js\nimport Route from '@ember/routing/route';\n\nexport default class PhotosRoute extends Route {\n model() {\n return this.store.findAll('photo');\n }\n\n setupController(controller, model) {\n super.setupController(controller, model);\n\n this.controllerFor('application').set('showingPhotos', true);\n }\n}\n```\n\nThe provided controller will be one resolved based on the name\nof this route.\n\nIf no explicit controller is defined, Ember will automatically create one.\n\nAs an example, consider the router:\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' });\n});\n\nexport default Router;\n```\n\nIf you have defined a file for the post controller,\nthe framework will use it.\nIf it is not defined, a basic `Controller` instance would be used.",
|
|
9955
9954
|
"example": [
|
|
9956
9955
|
" Behavior of a basic Controller\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class PostRoute extends Route {\n setupController(controller, model) {\n controller.set('model', model);\n }\n});\n```"
|
|
@@ -9983,7 +9982,7 @@
|
|
|
9983
9982
|
},
|
|
9984
9983
|
{
|
|
9985
9984
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9986
|
-
"line":
|
|
9985
|
+
"line": 1571,
|
|
9987
9986
|
"description": "Returns the controller of the current route, or a parent (or any ancestor)\nroute in a route hierarchy.\n\nThe controller instance must already have been created, either through entering the\nassociated route or using `generateController`.\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class PostRoute extends Route {\n setupController(controller, post) {\n super.setupController(controller, post);\n\n this.controllerFor('posts').set('currentPost', post);\n }\n}\n```",
|
|
9988
9987
|
"itemtype": "method",
|
|
9989
9988
|
"name": "controllerFor",
|
|
@@ -10006,7 +10005,7 @@
|
|
|
10006
10005
|
},
|
|
10007
10006
|
{
|
|
10008
10007
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10009
|
-
"line":
|
|
10008
|
+
"line": 1625,
|
|
10010
10009
|
"description": "Generates a controller for a route.\n\nExample\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class Post extends Route {\n setupController(controller, post) {\n super.setupController(controller, post);\n\n this.generateController('posts');\n }\n}\n```",
|
|
10011
10010
|
"itemtype": "method",
|
|
10012
10011
|
"name": "generateController",
|
|
@@ -10024,7 +10023,7 @@
|
|
|
10024
10023
|
},
|
|
10025
10024
|
{
|
|
10026
10025
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10027
|
-
"line":
|
|
10026
|
+
"line": 1653,
|
|
10028
10027
|
"description": "Returns the resolved model of a parent (or any ancestor) route\nin a route hierarchy. During a transition, all routes\nmust resolve a model object, and if a route\nneeds access to a parent route's model in order to\nresolve a model (or just reuse the model from a parent),\nit can call `this.modelFor(theNameOfParentRoute)` to\nretrieve it. If the ancestor route's model was a promise,\nits resolved result is returned.\n\nExample\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' }, function() {\n this.route('comments');\n });\n});\n\nexport default Router;\n```\n\n```app/routes/post/comments.js\nimport Route from '@ember/routing/route';\n\nexport default class PostCommentsRoute extends Route {\n model() {\n let post = this.modelFor('post');\n\n return post.comments;\n }\n}\n```",
|
|
10029
10028
|
"itemtype": "method",
|
|
10030
10029
|
"name": "modelFor",
|
|
@@ -10047,7 +10046,7 @@
|
|
|
10047
10046
|
},
|
|
10048
10047
|
{
|
|
10049
10048
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10050
|
-
"line":
|
|
10049
|
+
"line": 1725,
|
|
10051
10050
|
"description": "`this[RENDER]` is used to render a template into a region of another template\n(indicated by an `{{outlet}}`).",
|
|
10052
10051
|
"itemtype": "method",
|
|
10053
10052
|
"name": "this[RENDER]",
|
|
@@ -10097,7 +10096,7 @@
|
|
|
10097
10096
|
},
|
|
10098
10097
|
{
|
|
10099
10098
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10100
|
-
"line":
|
|
10099
|
+
"line": 1752,
|
|
10101
10100
|
"access": "private",
|
|
10102
10101
|
"tagname": "",
|
|
10103
10102
|
"itemtype": "method",
|
|
@@ -10107,7 +10106,7 @@
|
|
|
10107
10106
|
},
|
|
10108
10107
|
{
|
|
10109
10108
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10110
|
-
"line":
|
|
10109
|
+
"line": 1765,
|
|
10111
10110
|
"description": "Allows you to produce custom metadata for the route.\nThe return value of this method will be attached to\nits corresponding RouteInfoWithAttributes object.\n\nExample\n\n```app/routes/posts/index.js\nimport Route from '@ember/routing/route';\n\nexport default class PostsIndexRoute extends Route {\n buildRouteInfoMetadata() {\n return { title: 'Posts Page' }\n }\n}\n```\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { service } from '@ember/service';\n\nexport default class ApplicationRoute extends Route {\n @service router\n\n constructor() {\n super(...arguments);\n\n this.router.on('routeDidChange', transition => {\n document.title = transition.to.metadata.title;\n // would update document's title to \"Posts Page\"\n });\n }\n}\n```",
|
|
10112
10111
|
"itemtype": "method",
|
|
10113
10112
|
"name": "buildRouteInfoMetadata",
|
|
@@ -10122,7 +10121,7 @@
|
|
|
10122
10121
|
},
|
|
10123
10122
|
{
|
|
10124
10123
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10125
|
-
"line":
|
|
10124
|
+
"line": 1816,
|
|
10126
10125
|
"description": "Store property provides a hook for data persistence libraries to inject themselves.\n\nBy default, this store property provides the exact same functionality previously\nin the model hook.\n\nCurrently, the required interface is:\n\n`store.find(modelName, findArguments)`",
|
|
10127
10126
|
"itemtype": "property",
|
|
10128
10127
|
"name": "store",
|
|
@@ -10134,7 +10133,7 @@
|
|
|
10134
10133
|
},
|
|
10135
10134
|
{
|
|
10136
10135
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10137
|
-
"line":
|
|
10136
|
+
"line": 1882,
|
|
10138
10137
|
"access": "private",
|
|
10139
10138
|
"tagname": "",
|
|
10140
10139
|
"itemtype": "property",
|
|
@@ -10144,7 +10143,7 @@
|
|
|
10144
10143
|
},
|
|
10145
10144
|
{
|
|
10146
10145
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10147
|
-
"line":
|
|
10146
|
+
"line": 2021,
|
|
10148
10147
|
"description": "Sends an action to the router, which will delegate it to the currently\nactive route hierarchy per the bubbling rules explained under `actions`.\n\nExample\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('index');\n});\n\nexport default Router;\n```\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class ApplicationRoute extends Route {\n @action\n track(arg) {\n console.log(arg, 'was clicked');\n }\n}\n```\n\n```app/routes/index.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class IndexRoute extends Route {\n @action\n trackIfDebug(arg) {\n if (debug) {\n this.send('track', arg);\n }\n }\n}\n```",
|
|
10149
10148
|
"itemtype": "method",
|
|
10150
10149
|
"name": "send",
|
|
@@ -10168,7 +10167,7 @@
|
|
|
10168
10167
|
},
|
|
10169
10168
|
{
|
|
10170
10169
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10171
|
-
"line":
|
|
10170
|
+
"line": 2406,
|
|
10172
10171
|
"description": "The controller associated with this route.\n\nExample\n\n```app/routes/form.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class FormRoute extends Route {\n @action\n willTransition(transition) {\n if (this.controller.get('userHasEnteredData') &&\n !confirm('Are you sure you want to abandon progress?')) {\n transition.abort();\n } else {\n // Bubble the `willTransition` action so that\n // parent routes can decide whether or not to abort.\n return true;\n }\n }\n}\n```",
|
|
10173
10172
|
"itemtype": "property",
|
|
10174
10173
|
"name": "controller",
|
|
@@ -10181,7 +10180,7 @@
|
|
|
10181
10180
|
},
|
|
10182
10181
|
{
|
|
10183
10182
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10184
|
-
"line":
|
|
10183
|
+
"line": 2437,
|
|
10185
10184
|
"description": "This action is called when one or more query params have changed. Bubbles.",
|
|
10186
10185
|
"itemtype": "method",
|
|
10187
10186
|
"name": "queryParamsDidChange",
|
|
@@ -10213,7 +10212,7 @@
|
|
|
10213
10212
|
},
|
|
10214
10213
|
{
|
|
10215
10214
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10216
|
-
"line":
|
|
10215
|
+
"line": 151,
|
|
10217
10216
|
"description": "Represents the URL of the root of the application, often '/'. This prefix is\n assumed on all routes defined on this router.",
|
|
10218
10217
|
"itemtype": "property",
|
|
10219
10218
|
"name": "rootURL",
|
|
@@ -10225,7 +10224,7 @@
|
|
|
10225
10224
|
},
|
|
10226
10225
|
{
|
|
10227
10226
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10228
|
-
"line":
|
|
10227
|
+
"line": 162,
|
|
10229
10228
|
"description": "The `location` property determines the type of URL's that your\n application will use.\n\n The following location types are currently available:\n\n * `history` - use the browser's history API to make the URLs look just like any standard URL\n * `hash` - use `#` to separate the server part of the URL from the Ember part: `/blog/#/posts/new`\n * `none` - do not store the Ember URL in the actual browser URL (mainly used for testing)\n * `auto` - use the best option based on browser capabilities: `history` if possible, then `hash` if possible, otherwise `none`\n\n This value is defaulted to `auto` by the `locationType` setting of `/config/environment.js`",
|
|
10230
10229
|
"itemtype": "property",
|
|
10231
10230
|
"name": "location",
|
|
@@ -10240,7 +10239,7 @@
|
|
|
10240
10239
|
},
|
|
10241
10240
|
{
|
|
10242
10241
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10243
|
-
"line":
|
|
10242
|
+
"line": 220,
|
|
10244
10243
|
"description": "The `Router.map` function allows you to define mappings from URLs to routes\nin your application. These mappings are defined within the\nsupplied callback function using `this.route`.\n\nThe first parameter is the name of the route which is used by default as the\npath name as well.\n\nThe second parameter is the optional options hash. Available options are:\n\n * `path`: allows you to provide your own path as well as mark dynamic\n segments.\n * `resetNamespace`: false by default; when nesting routes, ember will\n combine the route names to form the fully-qualified route name, which is\n used with `{{link-to}}` or manually transitioning to routes. Setting\n `resetNamespace: true` will cause the route not to inherit from its\n parent route's names. This is handy for preventing extremely long route names.\n Keep in mind that the actual URL path behavior is still retained.\n\nThe third parameter is a function, which can be used to nest routes.\nNested routes, by default, will have the parent route tree's route name and\npath prepended to it's own.\n\n```app/router.js\nRouter.map(function(){\n this.route('post', { path: '/post/:post_id' }, function() {\n this.route('edit');\n this.route('comments', { resetNamespace: true }, function() {\n this.route('new');\n });\n });\n});\n```",
|
|
10245
10244
|
"itemtype": "method",
|
|
10246
10245
|
"name": "map",
|
|
@@ -10257,7 +10256,7 @@
|
|
|
10257
10256
|
},
|
|
10258
10257
|
{
|
|
10259
10258
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10260
|
-
"line":
|
|
10259
|
+
"line": 555,
|
|
10261
10260
|
"description": "Initializes the current router instance and sets up the change handling\nevent listeners used by the instances `location` implementation.\n\nA property named `initialURL` will be used to determine the initial URL.\nIf no value is found `/` will be used.",
|
|
10262
10261
|
"itemtype": "method",
|
|
10263
10262
|
"name": "startRouting",
|
|
@@ -10268,7 +10267,7 @@
|
|
|
10268
10267
|
},
|
|
10269
10268
|
{
|
|
10270
10269
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10271
|
-
"line":
|
|
10270
|
+
"line": 678,
|
|
10272
10271
|
"description": "Transition the application into another route. The route may\nbe either a single route or route path:",
|
|
10273
10272
|
"itemtype": "method",
|
|
10274
10273
|
"name": "transitionTo",
|
|
@@ -10302,7 +10301,7 @@
|
|
|
10302
10301
|
},
|
|
10303
10302
|
{
|
|
10304
10303
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10305
|
-
"line":
|
|
10304
|
+
"line": 723,
|
|
10306
10305
|
"description": "Similar to `transitionTo`, but instead of adding the destination to the browser's URL history,\nit replaces the entry for the current route.\nWhen the user clicks the \"back\" button in the browser, there will be fewer steps.\nThis is most commonly used to manage redirects in a way that does not cause confusing additions\nto the user's browsing history.",
|
|
10307
10306
|
"itemtype": "method",
|
|
10308
10307
|
"name": "replaceWith",
|
|
@@ -10336,7 +10335,7 @@
|
|
|
10336
10335
|
},
|
|
10337
10336
|
{
|
|
10338
10337
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10339
|
-
"line":
|
|
10338
|
+
"line": 750,
|
|
10340
10339
|
"description": "Determines if the supplied route is currently active.",
|
|
10341
10340
|
"itemtype": "method",
|
|
10342
10341
|
"name": "isActive",
|
|
@@ -10357,7 +10356,7 @@
|
|
|
10357
10356
|
},
|
|
10358
10357
|
{
|
|
10359
10358
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10360
|
-
"line":
|
|
10359
|
+
"line": 762,
|
|
10361
10360
|
"description": "An alternative form of `isActive` that doesn't require\nmanual concatenation of the arguments into a single\narray.",
|
|
10362
10361
|
"itemtype": "method",
|
|
10363
10362
|
"name": "isActiveIntent",
|
|
@@ -10387,7 +10386,7 @@
|
|
|
10387
10386
|
},
|
|
10388
10387
|
{
|
|
10389
10388
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10390
|
-
"line":
|
|
10389
|
+
"line": 784,
|
|
10391
10390
|
"description": "Does this router instance have the given route.",
|
|
10392
10391
|
"itemtype": "method",
|
|
10393
10392
|
"name": "hasRoute",
|
|
@@ -10402,7 +10401,7 @@
|
|
|
10402
10401
|
},
|
|
10403
10402
|
{
|
|
10404
10403
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10405
|
-
"line":
|
|
10404
|
+
"line": 795,
|
|
10406
10405
|
"description": "Resets the state of the router by clearing the current route\nhandlers and deactivating them.",
|
|
10407
10406
|
"access": "private",
|
|
10408
10407
|
"tagname": "",
|
|
@@ -10413,7 +10412,7 @@
|
|
|
10413
10412
|
},
|
|
10414
10413
|
{
|
|
10415
10414
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10416
|
-
"line":
|
|
10415
|
+
"line": 943,
|
|
10417
10416
|
"description": "Serializes the given query params according to their QP meta information.",
|
|
10418
10417
|
"access": "private",
|
|
10419
10418
|
"tagname": "",
|
|
@@ -10440,7 +10439,7 @@
|
|
|
10440
10439
|
},
|
|
10441
10440
|
{
|
|
10442
10441
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10443
|
-
"line":
|
|
10442
|
+
"line": 973,
|
|
10444
10443
|
"description": "Serializes the value of a query parameter based on a type",
|
|
10445
10444
|
"access": "private",
|
|
10446
10445
|
"tagname": "",
|
|
@@ -10463,7 +10462,7 @@
|
|
|
10463
10462
|
},
|
|
10464
10463
|
{
|
|
10465
10464
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10466
|
-
"line":
|
|
10465
|
+
"line": 991,
|
|
10467
10466
|
"description": "Deserializes the given query params according to their QP meta information.",
|
|
10468
10467
|
"access": "private",
|
|
10469
10468
|
"tagname": "",
|
|
@@ -10490,7 +10489,7 @@
|
|
|
10490
10489
|
},
|
|
10491
10490
|
{
|
|
10492
10491
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10493
|
-
"line":
|
|
10492
|
+
"line": 1019,
|
|
10494
10493
|
"description": "Deserializes the value of a query parameter based on a default type",
|
|
10495
10494
|
"access": "private",
|
|
10496
10495
|
"tagname": "",
|
|
@@ -10513,7 +10512,7 @@
|
|
|
10513
10512
|
},
|
|
10514
10513
|
{
|
|
10515
10514
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10516
|
-
"line":
|
|
10515
|
+
"line": 1040,
|
|
10517
10516
|
"description": "Removes (prunes) any query params with default values from the given QP\nobject. Default values are determined from the QP meta information per key.",
|
|
10518
10517
|
"access": "private",
|
|
10519
10518
|
"tagname": "",
|
|
@@ -10540,7 +10539,7 @@
|
|
|
10540
10539
|
},
|
|
10541
10540
|
{
|
|
10542
10541
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10543
|
-
"line":
|
|
10542
|
+
"line": 1121,
|
|
10544
10543
|
"description": "Prepares the query params for a URL or Transition. Restores any undefined QP\nkeys/values, serializes all values, and then prunes any default values.",
|
|
10545
10544
|
"access": "private",
|
|
10546
10545
|
"tagname": "",
|
|
@@ -10577,7 +10576,7 @@
|
|
|
10577
10576
|
},
|
|
10578
10577
|
{
|
|
10579
10578
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10580
|
-
"line":
|
|
10579
|
+
"line": 1148,
|
|
10581
10580
|
"description": "Returns the meta information for the query params of a given route. This\nwill be overridden to allow support for lazy routes.",
|
|
10582
10581
|
"access": "private",
|
|
10583
10582
|
"tagname": "",
|
|
@@ -10599,7 +10598,7 @@
|
|
|
10599
10598
|
},
|
|
10600
10599
|
{
|
|
10601
10600
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10602
|
-
"line":
|
|
10601
|
+
"line": 1162,
|
|
10603
10602
|
"description": "Returns a merged query params meta object for a given set of routeInfos.\nUseful for knowing what query params are available for a given route hierarchy.",
|
|
10604
10603
|
"access": "private",
|
|
10605
10604
|
"tagname": "",
|
|
@@ -10621,7 +10620,7 @@
|
|
|
10621
10620
|
},
|
|
10622
10621
|
{
|
|
10623
10622
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10624
|
-
"line":
|
|
10623
|
+
"line": 1224,
|
|
10625
10624
|
"description": "Maps all query param keys to their fully scoped property name of the form\n`controllerName:propName`.",
|
|
10626
10625
|
"access": "private",
|
|
10627
10626
|
"tagname": "",
|
|
@@ -10653,7 +10652,7 @@
|
|
|
10653
10652
|
},
|
|
10654
10653
|
{
|
|
10655
10654
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10656
|
-
"line":
|
|
10655
|
+
"line": 1262,
|
|
10657
10656
|
"description": "Hydrates (adds/restores) any query params that have pre-existing values into\nthe given queryParams hash. This is what allows query params to be \"sticky\"\nand restore their last known values for their scope.",
|
|
10658
10657
|
"access": "private",
|
|
10659
10658
|
"tagname": "",
|
|
@@ -10680,7 +10679,7 @@
|
|
|
10680
10679
|
},
|
|
10681
10680
|
{
|
|
10682
10681
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10683
|
-
"line":
|
|
10682
|
+
"line": 1433,
|
|
10684
10683
|
"description": "Handles updating the paths and notifying any listeners of the URL\nchange.\n\nTriggers the router level `didTransition` hook.\n\nFor example, to notify google analytics when the route changes,\nyou could use this hook. (Note: requires also including GA scripts, etc.)\n\n```javascript\nimport config from './config/environment';\nimport EmberRouter from '@ember/routing/router';\nimport { service } from '@ember/service';\n\nlet Router = EmberRouter.extend({\n location: config.locationType,\n\n router: service(),\n\n didTransition: function() {\n this._super(...arguments);\n\n ga('send', 'pageview', {\n page: this.router.currentURL,\n title: this.router.currentRouteName,\n });\n }\n});\n```",
|
|
10685
10684
|
"itemtype": "method",
|
|
10686
10685
|
"name": "didTransition",
|
|
@@ -10692,7 +10691,7 @@
|
|
|
10692
10691
|
},
|
|
10693
10692
|
{
|
|
10694
10693
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10695
|
-
"line":
|
|
10694
|
+
"line": 1470,
|
|
10696
10695
|
"description": "Handles notifying any listeners of an impending URL\nchange.\n\nTriggers the router level `willTransition` hook.",
|
|
10697
10696
|
"itemtype": "method",
|
|
10698
10697
|
"name": "willTransition",
|
|
@@ -10704,7 +10703,7 @@
|
|
|
10704
10703
|
},
|
|
10705
10704
|
{
|
|
10706
10705
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10707
|
-
"line":
|
|
10706
|
+
"line": 1483,
|
|
10708
10707
|
"description": "Represents the current URL.",
|
|
10709
10708
|
"itemtype": "property",
|
|
10710
10709
|
"name": "url",
|
|
@@ -10716,7 +10715,7 @@
|
|
|
10716
10715
|
},
|
|
10717
10716
|
{
|
|
10718
10717
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10719
|
-
"line":
|
|
10718
|
+
"line": 1650,
|
|
10720
10719
|
"description": "Finds the name of the substate route if it exists for the given route. A\nsubstate route is of the form `route_state`, such as `foo_loading`.",
|
|
10721
10720
|
"access": "private",
|
|
10722
10721
|
"tagname": "",
|
|
@@ -10741,7 +10740,7 @@
|
|
|
10741
10740
|
},
|
|
10742
10741
|
{
|
|
10743
10742
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10744
|
-
"line":
|
|
10743
|
+
"line": 1671,
|
|
10745
10744
|
"description": "Finds the name of the state route if it exists for the given route. A state\nroute is of the form `route.state`, such as `foo.loading`. Properly Handles\n`application` named routes.",
|
|
10746
10745
|
"access": "private",
|
|
10747
10746
|
"tagname": "",
|
|
@@ -10766,7 +10765,7 @@
|
|
|
10766
10765
|
},
|
|
10767
10766
|
{
|
|
10768
10767
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10769
|
-
"line":
|
|
10768
|
+
"line": 1693,
|
|
10770
10769
|
"description": "Determines whether or not a route has been defined by checking that the route\nis in the Router's map and the owner has a registration for that route.",
|
|
10771
10770
|
"access": "private",
|
|
10772
10771
|
"tagname": "",
|
|
@@ -11060,8 +11059,8 @@
|
|
|
11060
11059
|
"module": "@ember/routing"
|
|
11061
11060
|
},
|
|
11062
11061
|
{
|
|
11063
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/-proxy.
|
|
11064
|
-
"line":
|
|
11062
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/-proxy.ts",
|
|
11063
|
+
"line": 71,
|
|
11065
11064
|
"description": "The object whose properties will be forwarded.",
|
|
11066
11065
|
"itemtype": "property",
|
|
11067
11066
|
"name": "content",
|
|
@@ -11070,11 +11069,12 @@
|
|
|
11070
11069
|
"access": "public",
|
|
11071
11070
|
"tagname": "",
|
|
11072
11071
|
"class": "Ember.ProxyMixin",
|
|
11073
|
-
"module": "
|
|
11072
|
+
"module": "ember",
|
|
11073
|
+
"namespace": "Ember"
|
|
11074
11074
|
},
|
|
11075
11075
|
{
|
|
11076
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/-proxy.
|
|
11077
|
-
"line":
|
|
11076
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/-proxy.ts",
|
|
11077
|
+
"line": 93,
|
|
11078
11078
|
"description": "The object whose properties will be forwarded.",
|
|
11079
11079
|
"itemtype": "property",
|
|
11080
11080
|
"name": "content",
|
|
@@ -11087,8 +11087,8 @@
|
|
|
11087
11087
|
"namespace": "Ember"
|
|
11088
11088
|
},
|
|
11089
11089
|
{
|
|
11090
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.
|
|
11091
|
-
"line":
|
|
11090
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts",
|
|
11091
|
+
"line": 26,
|
|
11092
11092
|
"description": "The collection of functions, keyed by name, available on this\n`ActionHandler` as action targets.\n\nThese functions will be invoked when a matching `{{action}}` is triggered\nfrom within a template and the application's current route is this route.\n\nActions can also be invoked from other parts of your application\nvia `ActionHandler#send`.\n\nThe `actions` hash will inherit action handlers from\nthe `actions` hash defined on extended parent classes\nor mixins rather than just replace the entire hash, e.g.:\n\n```app/mixins/can-display-banner.js\nimport Mixin from '@ember/mixin';\n\nexport default Mixin.create({\n actions: {\n displayBanner(msg) {\n // ...\n }\n }\n});\n```\n\n```app/routes/welcome.js\nimport Route from '@ember/routing/route';\nimport CanDisplayBanner from '../mixins/can-display-banner';\n\nexport default Route.extend(CanDisplayBanner, {\n actions: {\n playMusic() {\n // ...\n }\n }\n});\n\n// `WelcomeRoute`, when active, will be able to respond\n// to both actions, since the actions hash is merged rather\n// then replaced when extending mixins / parent classes.\nthis.send('displayBanner');\nthis.send('playMusic');\n```\n\nWithin a Controller, Route or Component's action handler,\nthe value of the `this` context is the Controller, Route or\nComponent object:\n\n```app/routes/song.js\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n myAction() {\n this.controllerFor(\"song\");\n this.transitionTo(\"other.route\");\n ...\n }\n }\n});\n```\n\nIt is also possible to call `this._super(...arguments)` from within an\naction handler if it overrides a handler defined on a parent\nclass or mixin:\n\nTake for example the following routes:\n\n```app/mixins/debug-route.js\nimport Mixin from '@ember/mixin';\n\nexport default Mixin.create({\n actions: {\n debugRouteInformation() {\n console.debug(\"It's a-me, console.debug!\");\n }\n }\n});\n```\n\n```app/routes/annoying-debug.js\nimport Route from '@ember/routing/route';\nimport DebugRoute from '../mixins/debug-route';\n\nexport default Route.extend(DebugRoute, {\n actions: {\n debugRouteInformation() {\n // also call the debugRouteInformation of mixed in DebugRoute\n this._super(...arguments);\n\n // show additional annoyance\n window.alert(...);\n }\n }\n});\n```\n\n## Bubbling\n\nBy default, an action will stop bubbling once a handler defined\non the `actions` hash handles it. To continue bubbling the action,\nyou must return `true` from the handler:\n\n```app/router.js\nRouter.map(function() {\n this.route(\"album\", function() {\n this.route(\"song\");\n });\n});\n```\n\n```app/routes/album.js\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n startPlaying: function() {\n }\n }\n});\n```\n\n```app/routes/album-song.js\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n startPlaying() {\n // ...\n\n if (actionShouldAlsoBeTriggeredOnParentRoute) {\n return true;\n }\n }\n }\n});\n```",
|
|
11093
11093
|
"itemtype": "property",
|
|
11094
11094
|
"name": "actions",
|
|
@@ -11101,8 +11101,8 @@
|
|
|
11101
11101
|
"namespace": "Ember"
|
|
11102
11102
|
},
|
|
11103
11103
|
{
|
|
11104
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.
|
|
11105
|
-
"line":
|
|
11104
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts",
|
|
11105
|
+
"line": 171,
|
|
11106
11106
|
"description": "Triggers a named action on the `ActionHandler`. Any parameters\nsupplied after the `actionName` string will be passed as arguments\nto the action target function.\n\nIf the `ActionHandler` has its `target` property set, actions may\nbubble to the `target`. Bubbling happens when an `actionName` can\nnot be found in the `ActionHandler`'s `actions` hash or if the\naction target function returns `true`.\n\nExample\n\n```app/routes/welcome.js\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n playTheme() {\n this.send('playMusic', 'theme.mp3');\n },\n playMusic(track) {\n // ...\n }\n }\n});\n```",
|
|
11107
11107
|
"itemtype": "method",
|
|
11108
11108
|
"name": "send",
|
|
@@ -11949,8 +11949,9 @@
|
|
|
11949
11949
|
},
|
|
11950
11950
|
{
|
|
11951
11951
|
"name": "objects",
|
|
11952
|
-
"description": "An array of zero or more objects that should be\n inserted into the array at *idx*",
|
|
11953
|
-
"type": "EmberArray"
|
|
11952
|
+
"description": "An optional array of zero or more objects that should be\n inserted into the array at *idx*",
|
|
11953
|
+
"type": "EmberArray",
|
|
11954
|
+
"optional": true
|
|
11954
11955
|
}
|
|
11955
11956
|
],
|
|
11956
11957
|
"access": "public",
|
|
@@ -12283,8 +12284,8 @@
|
|
|
12283
12284
|
"module": "@ember/array"
|
|
12284
12285
|
},
|
|
12285
12286
|
{
|
|
12286
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/comparable.
|
|
12287
|
-
"line":
|
|
12287
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/comparable.ts",
|
|
12288
|
+
"line": 22,
|
|
12288
12289
|
"description": "__Required.__ You must implement this method to apply this mixin.\n\nOverride to return the result of the comparison of the two parameters. The\ncompare method should return:\n\n- `-1` if `a < b`\n- `0` if `a == b`\n- `1` if `a > b`\n\nDefault implementation raises an exception.",
|
|
12289
12290
|
"itemtype": "method",
|
|
12290
12291
|
"name": "compare",
|
|
@@ -12311,15 +12312,14 @@
|
|
|
12311
12312
|
"namespace": "Ember"
|
|
12312
12313
|
},
|
|
12313
12314
|
{
|
|
12314
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.
|
|
12315
|
-
"line":
|
|
12315
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.ts",
|
|
12316
|
+
"line": 26,
|
|
12316
12317
|
"class": "ContainerProxyMixin",
|
|
12317
|
-
"module": "ember"
|
|
12318
|
-
"namespace": "Ember"
|
|
12318
|
+
"module": "ember"
|
|
12319
12319
|
},
|
|
12320
12320
|
{
|
|
12321
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.
|
|
12322
|
-
"line":
|
|
12321
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.ts",
|
|
12322
|
+
"line": 30,
|
|
12323
12323
|
"description": "The container stores state.",
|
|
12324
12324
|
"access": "private",
|
|
12325
12325
|
"tagname": "",
|
|
@@ -12330,8 +12330,8 @@
|
|
|
12330
12330
|
"module": "ember"
|
|
12331
12331
|
},
|
|
12332
12332
|
{
|
|
12333
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.
|
|
12334
|
-
"line":
|
|
12333
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.ts",
|
|
12334
|
+
"line": 38,
|
|
12335
12335
|
"description": "Returns an object that can be used to provide an owner to a\nmanually created instance.\n\nExample:\n\n```\nimport { getOwner } from '@ember/application';\n\nlet owner = getOwner(this);\n\nUser.create(\n owner.ownerInjection(),\n { username: 'rwjblue' }\n)\n```",
|
|
12336
12336
|
"access": "public",
|
|
12337
12337
|
"tagname": "",
|
|
@@ -12346,8 +12346,8 @@
|
|
|
12346
12346
|
"module": "ember"
|
|
12347
12347
|
},
|
|
12348
12348
|
{
|
|
12349
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.
|
|
12350
|
-
"line":
|
|
12349
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.ts",
|
|
12350
|
+
"line": 64,
|
|
12351
12351
|
"description": "Given a fullName return a corresponding instance.\n\nThe default behavior is for lookup to return a singleton instance.\nThe singleton is scoped to the container, allowing multiple containers\nto all have their own locally scoped singletons.\n\n```javascript\nlet registry = new Registry();\nlet container = registry.container();\n\nregistry.register('api:twitter', Twitter);\n\nlet twitter = container.lookup('api:twitter');\n\ntwitter instanceof Twitter; // => true\n\n// by default the container will return singletons\nlet twitter2 = container.lookup('api:twitter');\ntwitter2 instanceof Twitter; // => true\n\ntwitter === twitter2; //=> true\n```\n\nIf singletons are not wanted an optional flag can be provided at lookup.\n\n```javascript\nlet registry = new Registry();\nlet container = registry.container();\n\nregistry.register('api:twitter', Twitter);\n\nlet twitter = container.lookup('api:twitter', { singleton: false });\nlet twitter2 = container.lookup('api:twitter', { singleton: false });\n\ntwitter === twitter2; //=> false\n```",
|
|
12352
12352
|
"access": "public",
|
|
12353
12353
|
"tagname": "",
|
|
@@ -12373,8 +12373,8 @@
|
|
|
12373
12373
|
"module": "ember"
|
|
12374
12374
|
},
|
|
12375
12375
|
{
|
|
12376
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.
|
|
12377
|
-
"line":
|
|
12376
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.ts",
|
|
12377
|
+
"line": 125,
|
|
12378
12378
|
"description": "Given a fullName return a factory manager.\n\n This method returns a manager which can be used for introspection of the\n factory's class or for the creation of factory instances with initial\n properties. The manager is an object with the following properties:\n\n * `class` - The registered or resolved class.\n * `create` - A function that will create an instance of the class with\n any dependencies injected.\n\n For example:\n\n ```javascript\n import { getOwner } from '@ember/application';\n\n let owner = getOwner(otherInstance);\n // the owner is commonly the `applicationInstance`, and can be accessed via\n // an instance initializer.\n\n let factory = owner.factoryFor('service:bespoke');\n\n factory.class;\n // The registered or resolved class. For example when used with an Ember-CLI\n // app, this would be the default export from `app/services/bespoke.js`.\n\n let instance = factory.create({\n someProperty: 'an initial property value'\n });\n // Create an instance with any injections and the passed options as\n // initial properties.\n ```\n\n Any instances created via the factory's `.create()` method *must* be destroyed\n manually by the caller of `.create()`. Typically, this is done during the creating\n objects own `destroy` or `willDestroy` methods.",
|
|
12379
12379
|
"access": "public",
|
|
12380
12380
|
"tagname": "",
|
|
@@ -12400,50 +12400,43 @@
|
|
|
12400
12400
|
"module": "ember"
|
|
12401
12401
|
},
|
|
12402
12402
|
{
|
|
12403
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
12404
|
-
"line":
|
|
12405
|
-
"description": "This mixin allows for Ember objects to subscribe to and emit events.",
|
|
12406
|
-
"class": "Evented",
|
|
12407
|
-
"module": "@ember/enumerable"
|
|
12408
|
-
},
|
|
12409
|
-
{
|
|
12410
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.d.ts",
|
|
12411
|
-
"line": 7,
|
|
12403
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.ts",
|
|
12404
|
+
"line": 54,
|
|
12412
12405
|
"description": "Subscribes to a named event with given function.",
|
|
12413
12406
|
"class": "Evented",
|
|
12414
|
-
"module": "@ember/
|
|
12407
|
+
"module": "@ember/object"
|
|
12415
12408
|
},
|
|
12416
12409
|
{
|
|
12417
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
12418
|
-
"line":
|
|
12410
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.ts",
|
|
12411
|
+
"line": 63,
|
|
12419
12412
|
"description": "Subscribes a function to a named event and then cancels the subscription\nafter the first time the event is triggered. It is good to use ``one`` when\nyou only care about the first time an event has taken place.",
|
|
12420
12413
|
"class": "Evented",
|
|
12421
|
-
"module": "@ember/
|
|
12414
|
+
"module": "@ember/object"
|
|
12422
12415
|
},
|
|
12423
12416
|
{
|
|
12424
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
12425
|
-
"line":
|
|
12417
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.ts",
|
|
12418
|
+
"line": 74,
|
|
12426
12419
|
"description": "Triggers a named event for the object. Any additional arguments\nwill be passed as parameters to the functions that are subscribed to the\nevent.",
|
|
12427
12420
|
"class": "Evented",
|
|
12428
|
-
"module": "@ember/
|
|
12421
|
+
"module": "@ember/object"
|
|
12429
12422
|
},
|
|
12430
12423
|
{
|
|
12431
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
12432
|
-
"line":
|
|
12424
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.ts",
|
|
12425
|
+
"line": 80,
|
|
12433
12426
|
"description": "Cancels subscription for given name, target, and method.",
|
|
12434
12427
|
"class": "Evented",
|
|
12435
|
-
"module": "@ember/
|
|
12428
|
+
"module": "@ember/object"
|
|
12436
12429
|
},
|
|
12437
12430
|
{
|
|
12438
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
12439
|
-
"line":
|
|
12431
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.ts",
|
|
12432
|
+
"line": 89,
|
|
12440
12433
|
"description": "Checks to see if object has any subscriptions for named event.",
|
|
12441
12434
|
"class": "Evented",
|
|
12442
|
-
"module": "@ember/
|
|
12435
|
+
"module": "@ember/object"
|
|
12443
12436
|
},
|
|
12444
12437
|
{
|
|
12445
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
12446
|
-
"line":
|
|
12438
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.ts",
|
|
12439
|
+
"line": 95,
|
|
12447
12440
|
"description": "Subscribes to a named event with given function.\n\n```javascript\nperson.on('didLoad', function() {\n // fired once the person has loaded\n});\n```\n\nAn optional target can be passed in as the 2nd argument that will\nbe set as the \"this\" for the callback. This is a good way to give your\nfunction access to the object triggering the event. When the target\nparameter is used the callback method becomes the third argument.",
|
|
12448
12441
|
"itemtype": "method",
|
|
12449
12442
|
"name": "on",
|
|
@@ -12474,8 +12467,8 @@
|
|
|
12474
12467
|
"module": "@ember/object"
|
|
12475
12468
|
},
|
|
12476
12469
|
{
|
|
12477
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
12478
|
-
"line":
|
|
12470
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.ts",
|
|
12471
|
+
"line": 121,
|
|
12479
12472
|
"description": "Subscribes a function to a named event and then cancels the subscription\nafter the first time the event is triggered. It is good to use ``one`` when\nyou only care about the first time an event has taken place.\n\nThis function takes an optional 2nd argument that will become the \"this\"\nvalue for the callback. When the target parameter is used the callback method\nbecomes the third argument.",
|
|
12480
12473
|
"itemtype": "method",
|
|
12481
12474
|
"name": "one",
|
|
@@ -12506,8 +12499,8 @@
|
|
|
12506
12499
|
"module": "@ember/object"
|
|
12507
12500
|
},
|
|
12508
12501
|
{
|
|
12509
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
12510
|
-
"line":
|
|
12502
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.ts",
|
|
12503
|
+
"line": 142,
|
|
12511
12504
|
"description": "Triggers a named event for the object. Any additional arguments\nwill be passed as parameters to the functions that are subscribed to the\nevent.\n\n```javascript\nperson.on('didEat', function(food) {\n console.log('person ate some ' + food);\n});\n\nperson.trigger('didEat', 'broccoli');\n\n// outputs: person ate some broccoli\n```",
|
|
12512
12505
|
"itemtype": "method",
|
|
12513
12506
|
"name": "trigger",
|
|
@@ -12529,8 +12522,8 @@
|
|
|
12529
12522
|
"module": "@ember/object"
|
|
12530
12523
|
},
|
|
12531
12524
|
{
|
|
12532
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
12533
|
-
"line":
|
|
12525
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.ts",
|
|
12526
|
+
"line": 165,
|
|
12534
12527
|
"description": "Cancels subscription for given name, target, and method.",
|
|
12535
12528
|
"itemtype": "method",
|
|
12536
12529
|
"name": "off",
|
|
@@ -12560,8 +12553,8 @@
|
|
|
12560
12553
|
"module": "@ember/object"
|
|
12561
12554
|
},
|
|
12562
12555
|
{
|
|
12563
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
12564
|
-
"line":
|
|
12556
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/evented.ts",
|
|
12557
|
+
"line": 180,
|
|
12565
12558
|
"description": "Checks to see if object has any subscriptions for named event.",
|
|
12566
12559
|
"itemtype": "method",
|
|
12567
12560
|
"name": "has",
|
|
@@ -12582,104 +12575,85 @@
|
|
|
12582
12575
|
"module": "@ember/object"
|
|
12583
12576
|
},
|
|
12584
12577
|
{
|
|
12585
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12586
|
-
"line":
|
|
12587
|
-
"description": "This mixin provides properties and property observing functionality, core features of the Ember object model.",
|
|
12588
|
-
"class": "Observable",
|
|
12589
|
-
"module": "ember",
|
|
12590
|
-
"namespace": "Ember"
|
|
12591
|
-
},
|
|
12592
|
-
{
|
|
12593
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.d.ts",
|
|
12594
|
-
"line": 11,
|
|
12578
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12579
|
+
"line": 96,
|
|
12595
12580
|
"description": "Retrieves the value of a property from the object.",
|
|
12596
12581
|
"class": "Observable",
|
|
12597
|
-
"module": "ember"
|
|
12598
|
-
"namespace": "Ember"
|
|
12582
|
+
"module": "@ember/object"
|
|
12599
12583
|
},
|
|
12600
12584
|
{
|
|
12601
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12602
|
-
"line":
|
|
12585
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12586
|
+
"line": 101,
|
|
12603
12587
|
"description": "To get the values of multiple properties at once, call `getProperties`\nwith a list of strings or an array:",
|
|
12604
12588
|
"class": "Observable",
|
|
12605
|
-
"module": "ember"
|
|
12606
|
-
"namespace": "Ember"
|
|
12589
|
+
"module": "@ember/object"
|
|
12607
12590
|
},
|
|
12608
12591
|
{
|
|
12609
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12610
|
-
"line":
|
|
12592
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12593
|
+
"line": 109,
|
|
12611
12594
|
"description": "Sets the provided key or path to the value.",
|
|
12612
12595
|
"class": "Observable",
|
|
12613
|
-
"module": "ember"
|
|
12614
|
-
"namespace": "Ember"
|
|
12596
|
+
"module": "@ember/object"
|
|
12615
12597
|
},
|
|
12616
12598
|
{
|
|
12617
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12618
|
-
"line":
|
|
12599
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12600
|
+
"line": 115,
|
|
12619
12601
|
"description": "Sets a list of properties at once. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.",
|
|
12620
12602
|
"class": "Observable",
|
|
12621
|
-
"module": "ember"
|
|
12622
|
-
"namespace": "Ember"
|
|
12603
|
+
"module": "@ember/object"
|
|
12623
12604
|
},
|
|
12624
12605
|
{
|
|
12625
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12626
|
-
"line":
|
|
12606
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12607
|
+
"line": 122,
|
|
12627
12608
|
"description": "Convenience method to call `propertyWillChange` and `propertyDidChange` in\nsuccession.",
|
|
12628
12609
|
"class": "Observable",
|
|
12629
|
-
"module": "ember"
|
|
12630
|
-
"namespace": "Ember"
|
|
12610
|
+
"module": "@ember/object"
|
|
12631
12611
|
},
|
|
12632
12612
|
{
|
|
12633
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12634
|
-
"line":
|
|
12613
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12614
|
+
"line": 128,
|
|
12635
12615
|
"description": "Adds an observer on a property.",
|
|
12636
12616
|
"class": "Observable",
|
|
12637
|
-
"module": "ember"
|
|
12638
|
-
"namespace": "Ember"
|
|
12617
|
+
"module": "@ember/object"
|
|
12639
12618
|
},
|
|
12640
12619
|
{
|
|
12641
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12642
|
-
"line":
|
|
12620
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12621
|
+
"line": 134,
|
|
12643
12622
|
"description": "Remove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.",
|
|
12644
12623
|
"class": "Observable",
|
|
12645
|
-
"module": "ember"
|
|
12646
|
-
"namespace": "Ember"
|
|
12624
|
+
"module": "@ember/object"
|
|
12647
12625
|
},
|
|
12648
12626
|
{
|
|
12649
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12650
|
-
"line":
|
|
12627
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12628
|
+
"line": 147,
|
|
12651
12629
|
"description": "Set the value of a property to the current value plus some amount.",
|
|
12652
12630
|
"class": "Observable",
|
|
12653
|
-
"module": "ember"
|
|
12654
|
-
"namespace": "Ember"
|
|
12631
|
+
"module": "@ember/object"
|
|
12655
12632
|
},
|
|
12656
12633
|
{
|
|
12657
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12658
|
-
"line":
|
|
12634
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12635
|
+
"line": 153,
|
|
12659
12636
|
"description": "Set the value of a property to the current value minus some amount.",
|
|
12660
12637
|
"class": "Observable",
|
|
12661
|
-
"module": "ember"
|
|
12662
|
-
"namespace": "Ember"
|
|
12638
|
+
"module": "@ember/object"
|
|
12663
12639
|
},
|
|
12664
12640
|
{
|
|
12665
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12666
|
-
"line":
|
|
12641
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12642
|
+
"line": 159,
|
|
12667
12643
|
"description": "Set the value of a boolean property to the opposite of its\ncurrent value.",
|
|
12668
12644
|
"class": "Observable",
|
|
12669
|
-
"module": "ember"
|
|
12670
|
-
"namespace": "Ember"
|
|
12645
|
+
"module": "@ember/object"
|
|
12671
12646
|
},
|
|
12672
12647
|
{
|
|
12673
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12674
|
-
"line":
|
|
12648
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12649
|
+
"line": 165,
|
|
12675
12650
|
"description": "Returns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.",
|
|
12676
12651
|
"class": "Observable",
|
|
12677
|
-
"module": "ember"
|
|
12678
|
-
"namespace": "Ember"
|
|
12652
|
+
"module": "@ember/object"
|
|
12679
12653
|
},
|
|
12680
12654
|
{
|
|
12681
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12682
|
-
"line":
|
|
12655
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12656
|
+
"line": 174,
|
|
12683
12657
|
"description": "Retrieves the value of a property from the object.\n\nThis method is usually similar to using `object[keyName]` or `object.keyName`,\nhowever it supports both computed properties and the unknownProperty\nhandler.\n\nBecause `get` unifies the syntax for accessing all these kinds\nof properties, it can make many refactorings easier, such as replacing a\nsimple property with a computed property, or vice versa.\n\n### Computed Properties\n\nComputed properties are methods defined with the `property` modifier\ndeclared at the end, such as:\n\n```javascript\nimport { computed } from '@ember/object';\n\nfullName: computed('firstName', 'lastName', function() {\n return this.get('firstName') + ' ' + this.get('lastName');\n})\n```\n\nWhen you call `get` on a computed property, the function will be\ncalled and the return value will be returned instead of the function\nitself.\n\n### Unknown Properties\n\nLikewise, if you try to call `get` on a property whose value is\n`undefined`, the `unknownProperty()` method will be called on the object.\nIf this method returns any value other than `undefined`, it will be returned\ninstead. This allows you to implement \"virtual\" properties that are\nnot defined upfront.",
|
|
12684
12658
|
"itemtype": "method",
|
|
12685
12659
|
"name": "get",
|
|
@@ -12700,8 +12674,8 @@
|
|
|
12700
12674
|
"module": "@ember/object"
|
|
12701
12675
|
},
|
|
12702
12676
|
{
|
|
12703
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12704
|
-
"line":
|
|
12677
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12678
|
+
"line": 219,
|
|
12705
12679
|
"description": "To get the values of multiple properties at once, call `getProperties`\nwith a list of strings or an array:\n\n```javascript\nrecord.getProperties('firstName', 'lastName', 'zipCode');\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```\n\nis equivalent to:\n\n```javascript\nrecord.getProperties(['firstName', 'lastName', 'zipCode']);\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```",
|
|
12706
12680
|
"itemtype": "method",
|
|
12707
12681
|
"name": "getProperties",
|
|
@@ -12722,8 +12696,8 @@
|
|
|
12722
12696
|
"module": "@ember/object"
|
|
12723
12697
|
},
|
|
12724
12698
|
{
|
|
12725
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12726
|
-
"line":
|
|
12699
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12700
|
+
"line": 244,
|
|
12727
12701
|
"description": "Sets the provided key or path to the value.\n\n```javascript\nrecord.set(\"key\", value);\n```\n\nThis method is generally very similar to calling `object[\"key\"] = value` or\n`object.key = value`, except that it provides support for computed\nproperties, the `setUnknownProperty()` method and property observers.\n\n### Computed Properties\n\nIf you try to set a value on a key that has a computed property handler\ndefined (see the `get()` method for an example), then `set()` will call\nthat method, passing both the value and key instead of simply changing\nthe value itself. This is useful for those times when you need to\nimplement a property that is composed of one or more member\nproperties.\n\n### Unknown Properties\n\nIf you try to set a value on a key that is undefined in the target\nobject, then the `setUnknownProperty()` handler will be called instead. This\ngives you an opportunity to implement complex \"virtual\" properties that\nare not predefined on the object. If `setUnknownProperty()` returns\nundefined, then `set()` will simply set the value on the object.\n\n### Property Observers\n\nIn addition to changing the property, `set()` will also register a property\nchange with the object. Unless you have placed this call inside of a\n`beginPropertyChanges()` and `endPropertyChanges(),` any \"local\" observers\n(i.e. observer methods declared on the same object), will be called\nimmediately. Any \"remote\" observers (i.e. observer methods declared on\nanother object) will be placed in a queue and called at a later time in a\ncoalesced manner.",
|
|
12728
12702
|
"itemtype": "method",
|
|
12729
12703
|
"name": "set",
|
|
@@ -12749,8 +12723,8 @@
|
|
|
12749
12723
|
"module": "@ember/object"
|
|
12750
12724
|
},
|
|
12751
12725
|
{
|
|
12752
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12753
|
-
"line":
|
|
12726
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12727
|
+
"line": 292,
|
|
12754
12728
|
"description": "Sets a list of properties at once. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.\n\n```javascript\nrecord.setProperties({ firstName: 'Charles', lastName: 'Jolley' });\n```",
|
|
12755
12729
|
"itemtype": "method",
|
|
12756
12730
|
"name": "setProperties",
|
|
@@ -12771,8 +12745,8 @@
|
|
|
12771
12745
|
"module": "@ember/object"
|
|
12772
12746
|
},
|
|
12773
12747
|
{
|
|
12774
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12775
|
-
"line":
|
|
12748
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12749
|
+
"line": 310,
|
|
12776
12750
|
"description": "Begins a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call this\nmethod at the beginning of the changes to begin deferring change\nnotifications. When you are done making changes, call\n`endPropertyChanges()` to deliver the deferred change notifications and end\ndeferring.",
|
|
12777
12751
|
"itemtype": "method",
|
|
12778
12752
|
"name": "beginPropertyChanges",
|
|
@@ -12786,8 +12760,8 @@
|
|
|
12786
12760
|
"module": "@ember/object"
|
|
12787
12761
|
},
|
|
12788
12762
|
{
|
|
12789
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12790
|
-
"line":
|
|
12763
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12764
|
+
"line": 330,
|
|
12791
12765
|
"description": "Ends a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call\n`beginPropertyChanges()` at the beginning of the changes to defer change\nnotifications. When you are done making changes, call this method to\ndeliver the deferred change notifications and end deferring.",
|
|
12792
12766
|
"itemtype": "method",
|
|
12793
12767
|
"name": "endPropertyChanges",
|
|
@@ -12801,8 +12775,8 @@
|
|
|
12801
12775
|
"module": "@ember/object"
|
|
12802
12776
|
},
|
|
12803
12777
|
{
|
|
12804
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12805
|
-
"line":
|
|
12778
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12779
|
+
"line": 349,
|
|
12806
12780
|
"description": "Notify the observer system that a property has just changed.\n\nSometimes you need to change a value directly or indirectly without\nactually calling `get()` or `set()` on it. In this case, you can use this\nmethod instead. Calling this method will notify all observers that the\nproperty has potentially changed value.",
|
|
12807
12781
|
"itemtype": "method",
|
|
12808
12782
|
"name": "notifyPropertyChange",
|
|
@@ -12823,8 +12797,8 @@
|
|
|
12823
12797
|
"module": "@ember/object"
|
|
12824
12798
|
},
|
|
12825
12799
|
{
|
|
12826
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12827
|
-
"line":
|
|
12800
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12801
|
+
"line": 367,
|
|
12828
12802
|
"description": "Adds an observer on a property.\n\nThis is the core method used to register an observer for a property.\n\nOnce you call this method, any time the key's value is set, your observer\nwill be notified. Note that the observers are triggered any time the\nvalue is set, regardless of whether it has actually changed. Your\nobserver should be prepared to handle that.\n\nThere are two common invocation patterns for `.addObserver()`:\n\n- Passing two arguments:\n - the name of the property to observe (as a string)\n - the function to invoke (an actual function)\n- Passing three arguments:\n - the name of the property to observe (as a string)\n - the target object (will be used to look up and invoke a\n function on)\n - the name of the function to invoke on the target object\n (as a string).\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n // the following are equivalent:\n\n // using three arguments\n this.addObserver('foo', this, 'fooDidChange');\n\n // using two arguments\n this.addObserver('foo', (...args) => {\n this.fooDidChange(...args);\n });\n },\n\n fooDidChange() {\n // your custom logic code\n }\n});\n```\n\n### Observer Methods\n\nObserver methods have the following signature:\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n this.addObserver('foo', this, 'fooDidChange');\n },\n\n fooDidChange(sender, key, value, rev) {\n // your code\n }\n});\n```\n\nThe `sender` is the object that changed. The `key` is the property that\nchanges. The `value` property is currently reserved and unused. The `rev`\nis the last property revision of the object when it changed, which you can\nuse to detect if the key value has really changed or not.\n\nUsually you will not need the value or revision parameters at\nthe end. In this case, it is common to write observer methods that take\nonly a sender and key value as parameters or, if you aren't interested in\nany of these values, to write an observer that has no parameters at all.",
|
|
12829
12803
|
"itemtype": "method",
|
|
12830
12804
|
"name": "addObserver",
|
|
@@ -12860,8 +12834,8 @@
|
|
|
12860
12834
|
"module": "@ember/object"
|
|
12861
12835
|
},
|
|
12862
12836
|
{
|
|
12863
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12864
|
-
"line":
|
|
12837
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12838
|
+
"line": 460,
|
|
12865
12839
|
"description": "Remove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.",
|
|
12866
12840
|
"itemtype": "method",
|
|
12867
12841
|
"name": "removeObserver",
|
|
@@ -12897,8 +12871,8 @@
|
|
|
12897
12871
|
"module": "@ember/object"
|
|
12898
12872
|
},
|
|
12899
12873
|
{
|
|
12900
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12901
|
-
"line":
|
|
12874
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12875
|
+
"line": 483,
|
|
12902
12876
|
"description": "Returns `true` if the object currently has observers registered for a\nparticular key. You can use this method to potentially defer performing\nan expensive action until someone begins observing a particular property\non the object.",
|
|
12903
12877
|
"itemtype": "method",
|
|
12904
12878
|
"name": "hasObserverFor",
|
|
@@ -12919,8 +12893,8 @@
|
|
|
12919
12893
|
"module": "@ember/object"
|
|
12920
12894
|
},
|
|
12921
12895
|
{
|
|
12922
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12923
|
-
"line":
|
|
12896
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12897
|
+
"line": 498,
|
|
12924
12898
|
"description": "Set the value of a property to the current value plus some amount.\n\n```javascript\nperson.incrementProperty('age');\nteam.incrementProperty('score', 2);\n```",
|
|
12925
12899
|
"itemtype": "method",
|
|
12926
12900
|
"name": "incrementProperty",
|
|
@@ -12946,8 +12920,8 @@
|
|
|
12946
12920
|
"module": "@ember/object"
|
|
12947
12921
|
},
|
|
12948
12922
|
{
|
|
12949
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12950
|
-
"line":
|
|
12923
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12924
|
+
"line": 520,
|
|
12951
12925
|
"description": "Set the value of a property to the current value minus some amount.\n\n```javascript\nplayer.decrementProperty('lives');\norc.decrementProperty('health', 5);\n```",
|
|
12952
12926
|
"itemtype": "method",
|
|
12953
12927
|
"name": "decrementProperty",
|
|
@@ -12973,8 +12947,8 @@
|
|
|
12973
12947
|
"module": "@ember/object"
|
|
12974
12948
|
},
|
|
12975
12949
|
{
|
|
12976
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12977
|
-
"line":
|
|
12950
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12951
|
+
"line": 542,
|
|
12978
12952
|
"description": "Set the value of a boolean property to the opposite of its\ncurrent value.\n\n```javascript\nstarship.toggleProperty('warpDriveEngaged');\n```",
|
|
12979
12953
|
"itemtype": "method",
|
|
12980
12954
|
"name": "toggleProperty",
|
|
@@ -12995,8 +12969,8 @@
|
|
|
12995
12969
|
"module": "@ember/object"
|
|
12996
12970
|
},
|
|
12997
12971
|
{
|
|
12998
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
12999
|
-
"line":
|
|
12972
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/observable.ts",
|
|
12973
|
+
"line": 559,
|
|
13000
12974
|
"description": "Returns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.",
|
|
13001
12975
|
"itemtype": "method",
|
|
13002
12976
|
"name": "cacheFor",
|
|
@@ -13017,8 +12991,8 @@
|
|
|
13017
12991
|
"module": "@ember/object"
|
|
13018
12992
|
},
|
|
13019
12993
|
{
|
|
13020
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.
|
|
13021
|
-
"line":
|
|
12994
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.ts",
|
|
12995
|
+
"line": 125,
|
|
13022
12996
|
"description": "If the proxied promise is rejected this will contain the reason\nprovided.",
|
|
13023
12997
|
"itemtype": "property",
|
|
13024
12998
|
"name": "reason",
|
|
@@ -13029,8 +13003,8 @@
|
|
|
13029
13003
|
"module": "@ember/object"
|
|
13030
13004
|
},
|
|
13031
13005
|
{
|
|
13032
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.
|
|
13033
|
-
"line":
|
|
13006
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.ts",
|
|
13007
|
+
"line": 135,
|
|
13034
13008
|
"description": "Once the proxied promise has settled this will become `false`.",
|
|
13035
13009
|
"itemtype": "property",
|
|
13036
13010
|
"name": "isPending",
|
|
@@ -13041,8 +13015,8 @@
|
|
|
13041
13015
|
"module": "@ember/object"
|
|
13042
13016
|
},
|
|
13043
13017
|
{
|
|
13044
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.
|
|
13045
|
-
"line":
|
|
13018
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.ts",
|
|
13019
|
+
"line": 146,
|
|
13046
13020
|
"description": "Once the proxied promise has settled this will become `true`.",
|
|
13047
13021
|
"itemtype": "property",
|
|
13048
13022
|
"name": "isSettled",
|
|
@@ -13053,8 +13027,8 @@
|
|
|
13053
13027
|
"module": "@ember/object"
|
|
13054
13028
|
},
|
|
13055
13029
|
{
|
|
13056
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.
|
|
13057
|
-
"line":
|
|
13030
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.ts",
|
|
13031
|
+
"line": 157,
|
|
13058
13032
|
"description": "Will become `true` if the proxied promise is rejected.",
|
|
13059
13033
|
"itemtype": "property",
|
|
13060
13034
|
"name": "isRejected",
|
|
@@ -13065,8 +13039,8 @@
|
|
|
13065
13039
|
"module": "@ember/object"
|
|
13066
13040
|
},
|
|
13067
13041
|
{
|
|
13068
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.
|
|
13069
|
-
"line":
|
|
13042
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.ts",
|
|
13043
|
+
"line": 166,
|
|
13070
13044
|
"description": "Will become `true` if the proxied promise is fulfilled.",
|
|
13071
13045
|
"itemtype": "property",
|
|
13072
13046
|
"name": "isFulfilled",
|
|
@@ -13077,8 +13051,8 @@
|
|
|
13077
13051
|
"module": "@ember/object"
|
|
13078
13052
|
},
|
|
13079
13053
|
{
|
|
13080
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.
|
|
13081
|
-
"line":
|
|
13054
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.ts",
|
|
13055
|
+
"line": 175,
|
|
13082
13056
|
"description": "The promise whose fulfillment value is being proxied by this object.\n\nThis property must be specified upon creation, and should not be\nchanged once created.\n\nExample:\n\n```javascript\nimport ObjectProxy from '@ember/object/proxy';\nimport PromiseProxyMixin from '@ember/object/promise-proxy-mixin';\n\nObjectProxy.extend(PromiseProxyMixin).create({\n promise: <thenable>\n});\n```",
|
|
13083
13057
|
"itemtype": "property",
|
|
13084
13058
|
"name": "promise",
|
|
@@ -13088,8 +13062,8 @@
|
|
|
13088
13062
|
"module": "@ember/object"
|
|
13089
13063
|
},
|
|
13090
13064
|
{
|
|
13091
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.
|
|
13092
|
-
"line":
|
|
13065
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.ts",
|
|
13066
|
+
"line": 204,
|
|
13093
13067
|
"description": "An alias to the proxied promise's `then`.\n\nSee RSVP.Promise.then.",
|
|
13094
13068
|
"itemtype": "method",
|
|
13095
13069
|
"name": "then",
|
|
@@ -13110,8 +13084,8 @@
|
|
|
13110
13084
|
"module": "@ember/object"
|
|
13111
13085
|
},
|
|
13112
13086
|
{
|
|
13113
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.
|
|
13114
|
-
"line":
|
|
13087
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.ts",
|
|
13088
|
+
"line": 216,
|
|
13115
13089
|
"description": "An alias to the proxied promise's `catch`.\n\nSee RSVP.Promise.catch.",
|
|
13116
13090
|
"itemtype": "method",
|
|
13117
13091
|
"name": "catch",
|
|
@@ -13133,8 +13107,8 @@
|
|
|
13133
13107
|
"module": "@ember/object"
|
|
13134
13108
|
},
|
|
13135
13109
|
{
|
|
13136
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.
|
|
13137
|
-
"line":
|
|
13110
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/promise_proxy.ts",
|
|
13111
|
+
"line": 229,
|
|
13138
13112
|
"description": "An alias to the proxied promise's `finally`.\n\nSee RSVP.Promise.finally.",
|
|
13139
13113
|
"itemtype": "method",
|
|
13140
13114
|
"name": "finally",
|
|
@@ -13156,14 +13130,14 @@
|
|
|
13156
13130
|
"module": "@ember/object"
|
|
13157
13131
|
},
|
|
13158
13132
|
{
|
|
13159
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
13160
|
-
"line":
|
|
13133
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
13134
|
+
"line": 45,
|
|
13161
13135
|
"class": "RegistryProxyMixin",
|
|
13162
|
-
"module": "
|
|
13136
|
+
"module": "ember"
|
|
13163
13137
|
},
|
|
13164
13138
|
{
|
|
13165
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
13166
|
-
"line":
|
|
13139
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
13140
|
+
"line": 51,
|
|
13167
13141
|
"description": "Given a fullName return the corresponding factory.",
|
|
13168
13142
|
"access": "public",
|
|
13169
13143
|
"tagname": "",
|
|
@@ -13184,8 +13158,8 @@
|
|
|
13184
13158
|
"module": "ember"
|
|
13185
13159
|
},
|
|
13186
13160
|
{
|
|
13187
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
13188
|
-
"line":
|
|
13161
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
13162
|
+
"line": 64,
|
|
13189
13163
|
"description": "Registers a factory that can be used for dependency injection (with\n`inject`) or for service lookup. Each factory is registered with\na full name including two parts: `type:name`.\n\nA simple example:\n\n```javascript\nimport Application from '@ember/application';\nimport EmberObject from '@ember/object';\n\nlet App = Application.create();\n\nApp.Orange = EmberObject.extend();\nApp.register('fruit:favorite', App.Orange);\n```\n\nEmber will resolve factories from the `App` namespace automatically.\nFor example `App.CarsController` will be discovered and returned if\nan application requests `controller:cars`.\n\nAn example of registering a controller with a non-standard name:\n\n```javascript\nimport Application from '@ember/application';\nimport Controller from '@ember/controller';\n\nlet App = Application.create();\nlet Session = Controller.extend();\n\nApp.register('controller:session', Session);\n\n// The Session controller can now be treated like a normal controller,\n// despite its non-standard name.\nApp.ApplicationController = Controller.extend({\n needs: ['session']\n});\n```\n\nRegistered factories are **instantiated** by having `create`\ncalled on them. Additionally they are **singletons**, each time\nthey are looked up they return the same instance.\n\nSome examples modifying that default behavior:\n\n```javascript\nimport Application from '@ember/application';\nimport EmberObject from '@ember/object';\n\nlet App = Application.create();\n\nApp.Person = EmberObject.extend();\nApp.Orange = EmberObject.extend();\nApp.Email = EmberObject.extend();\nApp.session = EmberObject.create();\n\nApp.register('model:user', App.Person, { singleton: false });\nApp.register('fruit:favorite', App.Orange);\nApp.register('communication:main', App.Email, { singleton: false });\nApp.register('session', App.session, { instantiate: false });\n```",
|
|
13190
13164
|
"itemtype": "method",
|
|
13191
13165
|
"name": "register",
|
|
@@ -13212,8 +13186,8 @@
|
|
|
13212
13186
|
"module": "ember"
|
|
13213
13187
|
},
|
|
13214
13188
|
{
|
|
13215
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
13216
|
-
"line":
|
|
13189
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
13190
|
+
"line": 134,
|
|
13217
13191
|
"description": "Unregister a factory.\n\n```javascript\nimport Application from '@ember/application';\nimport EmberObject from '@ember/object';\n\nlet App = Application.create();\nlet User = EmberObject.extend();\nApp.register('model:user', User);\n\nApp.resolveRegistration('model:user').create() instanceof User //=> true\n\nApp.unregister('model:user')\nApp.resolveRegistration('model:user') === undefined //=> true\n```",
|
|
13218
13192
|
"access": "public",
|
|
13219
13193
|
"tagname": "",
|
|
@@ -13230,8 +13204,8 @@
|
|
|
13230
13204
|
"module": "ember"
|
|
13231
13205
|
},
|
|
13232
13206
|
{
|
|
13233
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
13234
|
-
"line":
|
|
13207
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
13208
|
+
"line": 157,
|
|
13235
13209
|
"description": "Check if a factory is registered.",
|
|
13236
13210
|
"access": "public",
|
|
13237
13211
|
"tagname": "",
|
|
@@ -13252,8 +13226,8 @@
|
|
|
13252
13226
|
"module": "ember"
|
|
13253
13227
|
},
|
|
13254
13228
|
{
|
|
13255
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
13256
|
-
"line":
|
|
13229
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
13230
|
+
"line": 167,
|
|
13257
13231
|
"description": "Return a specific registered option for a particular factory.",
|
|
13258
13232
|
"access": "public",
|
|
13259
13233
|
"tagname": "",
|
|
@@ -13279,8 +13253,8 @@
|
|
|
13279
13253
|
"module": "ember"
|
|
13280
13254
|
},
|
|
13281
13255
|
{
|
|
13282
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
13283
|
-
"line":
|
|
13256
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
13257
|
+
"line": 178,
|
|
13284
13258
|
"description": "Register options for a particular factory.",
|
|
13285
13259
|
"access": "public",
|
|
13286
13260
|
"tagname": "",
|
|
@@ -13302,8 +13276,8 @@
|
|
|
13302
13276
|
"module": "ember"
|
|
13303
13277
|
},
|
|
13304
13278
|
{
|
|
13305
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
13306
|
-
"line":
|
|
13279
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
13280
|
+
"line": 188,
|
|
13307
13281
|
"description": "Return registered options for a particular factory.",
|
|
13308
13282
|
"access": "public",
|
|
13309
13283
|
"tagname": "",
|
|
@@ -13324,8 +13298,8 @@
|
|
|
13324
13298
|
"module": "ember"
|
|
13325
13299
|
},
|
|
13326
13300
|
{
|
|
13327
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
13328
|
-
"line":
|
|
13301
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
13302
|
+
"line": 198,
|
|
13329
13303
|
"description": "Allow registering options for all factories of a type.\n\n```javascript\nimport Application from '@ember/application';\n\nlet App = Application.create();\nlet appInstance = App.buildInstance();\n\n// if all of type `connection` must not be singletons\nappInstance.registerOptionsForType('connection', { singleton: false });\n\nappInstance.register('connection:twitter', TwitterConnection);\nappInstance.register('connection:facebook', FacebookConnection);\n\nlet twitter = appInstance.lookup('connection:twitter');\nlet twitter2 = appInstance.lookup('connection:twitter');\n\ntwitter === twitter2; // => false\n\nlet facebook = appInstance.lookup('connection:facebook');\nlet facebook2 = appInstance.lookup('connection:facebook');\n\nfacebook === facebook2; // => false\n```",
|
|
13330
13304
|
"access": "public",
|
|
13331
13305
|
"tagname": "",
|
|
@@ -13347,8 +13321,8 @@
|
|
|
13347
13321
|
"module": "ember"
|
|
13348
13322
|
},
|
|
13349
13323
|
{
|
|
13350
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
13351
|
-
"line":
|
|
13324
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
13325
|
+
"line": 231,
|
|
13352
13326
|
"description": "Return the registered options for all factories of a type.",
|
|
13353
13327
|
"access": "public",
|
|
13354
13328
|
"tagname": "",
|
|
@@ -13369,8 +13343,8 @@
|
|
|
13369
13343
|
"module": "ember"
|
|
13370
13344
|
},
|
|
13371
13345
|
{
|
|
13372
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.
|
|
13373
|
-
"line":
|
|
13346
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts",
|
|
13347
|
+
"line": 241,
|
|
13374
13348
|
"description": "Define a dependency injection onto a specific factory or all factories\nof a type.\n\nWhen Ember instantiates a controller, view, or other framework component\nit can attach a dependency to that component. This is often used to\nprovide services to a set of framework components.\n\nAn example of providing a session object to all controllers:\n\n```javascript\nimport { alias } from '@ember/object/computed';\nimport Application from '@ember/application';\nimport Controller from '@ember/controller';\nimport EmberObject from '@ember/object';\n\nlet App = Application.create();\nlet Session = EmberObject.extend({ isAuthenticated: false });\n\n// A factory must be registered before it can be injected\nApp.register('session:main', Session);\n\n// Inject 'session:main' onto all factories of the type 'controller'\n// with the name 'session'\nApp.inject('controller', 'session', 'session:main');\n\nApp.IndexController = Controller.extend({\n isLoggedIn: alias('session.isAuthenticated')\n});\n```\n\nInjections can also be performed on specific factories.\n\n```javascript\nApp.inject(<full_name or type>, <property name>, <full_name>)\nApp.inject('route', 'source', 'source:main')\nApp.inject('route:application', 'email', 'model:email')\n```\n\nIt is important to note that injections can only be performed on\nclasses that are instantiated by Ember itself. Instantiating a class\ndirectly (via `create` or `new`) bypasses the dependency injection\nsystem.",
|
|
13375
13349
|
"access": "public",
|
|
13376
13350
|
"tagname": "",
|
|
@@ -13398,8 +13372,15 @@
|
|
|
13398
13372
|
"module": "ember"
|
|
13399
13373
|
},
|
|
13400
13374
|
{
|
|
13401
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.
|
|
13402
|
-
"line":
|
|
13375
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.ts",
|
|
13376
|
+
"line": 29,
|
|
13377
|
+
"class": "Ember.TargetActionSupport",
|
|
13378
|
+
"module": "ember",
|
|
13379
|
+
"namespace": "Ember"
|
|
13380
|
+
},
|
|
13381
|
+
{
|
|
13382
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.ts",
|
|
13383
|
+
"line": 51,
|
|
13403
13384
|
"description": "Send an `action` with an `actionContext` to a `target`. The action, actionContext\nand target will be retrieved from properties of the object. For example:\n\n```javascript\nimport { alias } from '@ember/object/computed';\n\nApp.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {\n target: alias('controller'),\n action: 'save',\n actionContext: alias('context'),\n click() {\n this.triggerAction(); // Sends the `save` action, along with the current context\n // to the current controller\n }\n});\n```\n\nThe `target`, `action`, and `actionContext` can be provided as properties of\nan optional object argument to `triggerAction` as well.\n\n```javascript\nApp.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {\n click() {\n this.triggerAction({\n action: 'save',\n target: this.get('controller'),\n actionContext: this.get('context')\n }); // Sends the `save` action, along with the current context\n // to the current controller\n }\n});\n```\n\nThe `actionContext` defaults to the object you are mixing `TargetActionSupport` into.\nBut `target` and `action` must be specified either as properties or with the argument\nto `triggerAction`, or a combination:\n\n```javascript\nimport { alias } from '@ember/object/computed';\n\nApp.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {\n target: alias('controller'),\n click() {\n this.triggerAction({\n action: 'save'\n }); // Sends the `save` action, along with a reference to `this`,\n // to the current controller\n }\n});\n```",
|
|
13404
13385
|
"itemtype": "method",
|
|
13405
13386
|
"name": "triggerAction",
|
|
@@ -13421,8 +13402,68 @@
|
|
|
13421
13402
|
"namespace": "Ember"
|
|
13422
13403
|
},
|
|
13423
13404
|
{
|
|
13424
|
-
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.
|
|
13405
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13406
|
+
"line": 134,
|
|
13407
|
+
"class": "ArrayProxy",
|
|
13408
|
+
"module": "@ember/array"
|
|
13409
|
+
},
|
|
13410
|
+
{
|
|
13411
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13412
|
+
"line": 136,
|
|
13413
|
+
"class": "ArrayProxy",
|
|
13414
|
+
"module": "@ember/array"
|
|
13415
|
+
},
|
|
13416
|
+
{
|
|
13417
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13418
|
+
"line": 139,
|
|
13419
|
+
"class": "ArrayProxy",
|
|
13420
|
+
"module": "@ember/array"
|
|
13421
|
+
},
|
|
13422
|
+
{
|
|
13423
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13425
13424
|
"line": 141,
|
|
13425
|
+
"class": "ArrayProxy",
|
|
13426
|
+
"module": "@ember/array"
|
|
13427
|
+
},
|
|
13428
|
+
{
|
|
13429
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13430
|
+
"line": 144,
|
|
13431
|
+
"class": "ArrayProxy",
|
|
13432
|
+
"module": "@ember/array"
|
|
13433
|
+
},
|
|
13434
|
+
{
|
|
13435
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13436
|
+
"line": 146,
|
|
13437
|
+
"class": "ArrayProxy",
|
|
13438
|
+
"module": "@ember/array"
|
|
13439
|
+
},
|
|
13440
|
+
{
|
|
13441
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13442
|
+
"line": 148,
|
|
13443
|
+
"class": "ArrayProxy",
|
|
13444
|
+
"module": "@ember/array"
|
|
13445
|
+
},
|
|
13446
|
+
{
|
|
13447
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13448
|
+
"line": 150,
|
|
13449
|
+
"class": "ArrayProxy",
|
|
13450
|
+
"module": "@ember/array"
|
|
13451
|
+
},
|
|
13452
|
+
{
|
|
13453
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13454
|
+
"line": 152,
|
|
13455
|
+
"class": "ArrayProxy",
|
|
13456
|
+
"module": "@ember/array"
|
|
13457
|
+
},
|
|
13458
|
+
{
|
|
13459
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13460
|
+
"line": 154,
|
|
13461
|
+
"class": "ArrayProxy",
|
|
13462
|
+
"module": "@ember/array"
|
|
13463
|
+
},
|
|
13464
|
+
{
|
|
13465
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13466
|
+
"line": 171,
|
|
13426
13467
|
"description": "The content array. Must be an object that implements `Array` and/or\n`MutableArray.`",
|
|
13427
13468
|
"itemtype": "property",
|
|
13428
13469
|
"name": "content",
|
|
@@ -13433,8 +13474,8 @@
|
|
|
13433
13474
|
"module": "@ember/array"
|
|
13434
13475
|
},
|
|
13435
13476
|
{
|
|
13436
|
-
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.
|
|
13437
|
-
"line":
|
|
13477
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13478
|
+
"line": 183,
|
|
13438
13479
|
"description": "Should actually retrieve the object at the specified index from the\ncontent. You can override this method in subclasses to transform the\ncontent item to something new.\n\nThis method will only be called if content is non-`null`.",
|
|
13439
13480
|
"itemtype": "method",
|
|
13440
13481
|
"name": "objectAtContent",
|
|
@@ -13455,8 +13496,8 @@
|
|
|
13455
13496
|
"module": "@ember/array"
|
|
13456
13497
|
},
|
|
13457
13498
|
{
|
|
13458
|
-
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.
|
|
13459
|
-
"line":
|
|
13499
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13500
|
+
"line": 211,
|
|
13460
13501
|
"description": "Should actually replace the specified objects on the content array.\nYou can override this method in subclasses to transform the content item\ninto something new.\n\nThis method will only be called if content is non-`null`.",
|
|
13461
13502
|
"itemtype": "method",
|
|
13462
13503
|
"name": "replaceContent",
|
|
@@ -13473,7 +13514,7 @@
|
|
|
13473
13514
|
},
|
|
13474
13515
|
{
|
|
13475
13516
|
"name": "objects",
|
|
13476
|
-
"description": "Optional array of objects to insert
|
|
13517
|
+
"description": "Optional array of objects to insert.",
|
|
13477
13518
|
"type": "EmberArray"
|
|
13478
13519
|
}
|
|
13479
13520
|
],
|
|
@@ -13487,8 +13528,8 @@
|
|
|
13487
13528
|
"module": "@ember/array"
|
|
13488
13529
|
},
|
|
13489
13530
|
{
|
|
13490
|
-
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.
|
|
13491
|
-
"line":
|
|
13531
|
+
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13532
|
+
"line": 394,
|
|
13492
13533
|
"description": "The array that the proxy pretends to be. In the default `ArrayProxy`\nimplementation, this and `content` are the same. Subclasses of `ArrayProxy`\ncan override this property to provide things like sorting and filtering.",
|
|
13493
13534
|
"itemtype": "property",
|
|
13494
13535
|
"name": "arrangedContent",
|
|
@@ -13505,7 +13546,7 @@
|
|
|
13505
13546
|
},
|
|
13506
13547
|
{
|
|
13507
13548
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13508
|
-
"line":
|
|
13549
|
+
"line": 320,
|
|
13509
13550
|
"description": "An overridable method called when objects are instantiated. By default,\ndoes nothing unless it is overridden during class definition.\n\nExample:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n init() {\n alert(`Name is ${this.get('name')}`);\n }\n});\n\nlet steve = Person.create({\n name: 'Steve'\n});\n\n// alerts 'Name is Steve'.\n```\n\nNOTE: If you do override `init` for a framework class like `Component`\nfrom `@ember/component`, be sure to call `this._super(...arguments)`\nin your `init` declaration!\nIf you don't, Ember may not have an opportunity to\ndo important setup work, and you'll see strange behavior in your\napplication.",
|
|
13510
13551
|
"itemtype": "method",
|
|
13511
13552
|
"name": "init",
|
|
@@ -13516,7 +13557,7 @@
|
|
|
13516
13557
|
},
|
|
13517
13558
|
{
|
|
13518
13559
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13519
|
-
"line":
|
|
13560
|
+
"line": 354,
|
|
13520
13561
|
"description": "Defines the properties that will be concatenated from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by combining the superclass' property\nvalue with the subclass' value. An example of this in use within Ember\nis the `classNames` property of `Component` from `@ember/component`.\n\nHere is some sample code showing the difference between a concatenated\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties to concatenate\n concatenatedProperties: ['concatenatedProperty'],\n\n someNonConcatenatedProperty: ['bar'],\n concatenatedProperty: ['bar']\n});\n\nconst FooBar = Bar.extend({\n someNonConcatenatedProperty: ['foo'],\n concatenatedProperty: ['foo']\n});\n\nlet fooBar = FooBar.create();\nfooBar.get('someNonConcatenatedProperty'); // ['foo']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo']\n```\n\nThis behavior extends to object creation as well. Continuing the\nabove example:\n\n```javascript\nlet fooBar = FooBar.create({\n someNonConcatenatedProperty: ['baz'],\n concatenatedProperty: ['baz']\n})\nfooBar.get('someNonConcatenatedProperty'); // ['baz']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nAdding a single property that is not an array will just add it in the array:\n\n```javascript\nlet fooBar = FooBar.create({\n concatenatedProperty: 'baz'\n})\nview.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nUsing the `concatenatedProperties` property, we can tell Ember to mix the\ncontent of the properties.\n\nIn `Component` the `classNames`, `classNameBindings` and\n`attributeBindings` properties are concatenated.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual concatenated property (to not\nmislead your users to think they can override the property in a subclass).",
|
|
13521
13562
|
"itemtype": "property",
|
|
13522
13563
|
"name": "concatenatedProperties",
|
|
@@ -13529,7 +13570,7 @@
|
|
|
13529
13570
|
},
|
|
13530
13571
|
{
|
|
13531
13572
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13532
|
-
"line":
|
|
13573
|
+
"line": 428,
|
|
13533
13574
|
"description": "Defines the properties that will be merged from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by merging the superclass property value\nwith the subclass property's value. An example of this in use within Ember\nis the `queryParams` property of routes.\n\nHere is some sample code showing the difference between a merged\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties are to be merged\n mergedProperties: ['mergedProperty'],\n\n someNonMergedProperty: {\n nonMerged: 'superclass value of nonMerged'\n },\n mergedProperty: {\n page: { replace: false },\n limit: { replace: true }\n }\n});\n\nconst FooBar = Bar.extend({\n someNonMergedProperty: {\n completelyNonMerged: 'subclass value of nonMerged'\n },\n mergedProperty: {\n limit: { replace: false }\n }\n});\n\nlet fooBar = FooBar.create();\n\nfooBar.get('someNonMergedProperty');\n// => { completelyNonMerged: 'subclass value of nonMerged' }\n//\n// Note the entire object, including the nonMerged property of\n// the superclass object, has been replaced\n\nfooBar.get('mergedProperty');\n// => {\n// page: {replace: false},\n// limit: {replace: false}\n// }\n//\n// Note the page remains from the superclass, and the\n// `limit` property's value of `false` has been merged from\n// the subclass.\n```\n\nThis behavior is not available during object `create` calls. It is only\navailable at `extend` time.\n\nIn `Route` the `queryParams` property is merged.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual merged property (to not\nmislead your users to think they can override the property in a subclass).",
|
|
13534
13575
|
"itemtype": "property",
|
|
13535
13576
|
"name": "mergedProperties",
|
|
@@ -13542,7 +13583,7 @@
|
|
|
13542
13583
|
},
|
|
13543
13584
|
{
|
|
13544
13585
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13545
|
-
"line":
|
|
13586
|
+
"line": 503,
|
|
13546
13587
|
"description": "Destroyed object property flag.\n\nif this property is `true` the observers and bindings were already\nremoved by the effect of calling the `destroy()` method.",
|
|
13547
13588
|
"itemtype": "property",
|
|
13548
13589
|
"name": "isDestroyed",
|
|
@@ -13554,7 +13595,7 @@
|
|
|
13554
13595
|
},
|
|
13555
13596
|
{
|
|
13556
13597
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13557
|
-
"line":
|
|
13598
|
+
"line": 521,
|
|
13558
13599
|
"description": "Destruction scheduled flag. The `destroy()` method has been called.\n\nThe object stays intact until the end of the run loop at which point\nthe `isDestroyed` flag is set.",
|
|
13559
13600
|
"itemtype": "property",
|
|
13560
13601
|
"name": "isDestroying",
|
|
@@ -13566,7 +13607,7 @@
|
|
|
13566
13607
|
},
|
|
13567
13608
|
{
|
|
13568
13609
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13569
|
-
"line":
|
|
13610
|
+
"line": 539,
|
|
13570
13611
|
"description": "Destroys an object by setting the `isDestroyed` flag and removing its\nmetadata, which effectively destroys observers and bindings.\n\nIf you try to set a property on a destroyed object, an exception will be\nraised.\n\nNote that destruction is scheduled for the end of the run loop and does not\nhappen immediately. It will set an isDestroying flag immediately.",
|
|
13571
13612
|
"itemtype": "method",
|
|
13572
13613
|
"name": "destroy",
|
|
@@ -13581,7 +13622,7 @@
|
|
|
13581
13622
|
},
|
|
13582
13623
|
{
|
|
13583
13624
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13584
|
-
"line":
|
|
13625
|
+
"line": 566,
|
|
13585
13626
|
"description": "Override to implement teardown.",
|
|
13586
13627
|
"itemtype": "method",
|
|
13587
13628
|
"name": "willDestroy",
|
|
@@ -13592,7 +13633,7 @@
|
|
|
13592
13633
|
},
|
|
13593
13634
|
{
|
|
13594
13635
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13595
|
-
"line":
|
|
13636
|
+
"line": 574,
|
|
13596
13637
|
"description": "Returns a string representation which attempts to provide more information\nthan Javascript's `toString` typically does, in a generic way for all Ember\nobjects.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend();\nperson = Person.create();\nperson.toString(); //=> \"<Person:ember1024>\"\n```\n\nIf the object's class is not defined on an Ember namespace, it will\nindicate it is a subclass of the registered superclass:\n\n```javascript\nconst Student = Person.extend();\nlet student = Student.create();\nstudent.toString(); //=> \"<(subclass of Person):ember1025>\"\n```\n\nIf the method `toStringExtension` is defined, its return value will be\nincluded in the output.\n\n```javascript\nconst Teacher = Person.extend({\n toStringExtension() {\n return this.get('fullName');\n }\n});\nteacher = Teacher.create();\nteacher.toString(); //=> \"<Teacher:ember1026:Tom Dale>\"\n```",
|
|
13597
13638
|
"itemtype": "method",
|
|
13598
13639
|
"name": "toString",
|
|
@@ -13607,7 +13648,7 @@
|
|
|
13607
13648
|
},
|
|
13608
13649
|
{
|
|
13609
13650
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13610
|
-
"line":
|
|
13651
|
+
"line": 619,
|
|
13611
13652
|
"description": "Creates a new subclass.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n say(thing) {\n alert(thing);\n }\n});\n```\n\nThis defines a new subclass of EmberObject: `Person`. It contains one method: `say()`.\n\nYou can also create a subclass from any existing class by calling its `extend()` method.\nFor example, you might want to create a subclass of Ember's built-in `Component` class:\n\n```javascript\nimport Component from '@ember/component';\n\nconst PersonComponent = Component.extend({\n tagName: 'li',\n classNameBindings: ['isAdministrator']\n});\n```\n\nWhen defining a subclass, you can override methods but still access the\nimplementation of your parent class by calling the special `_super()` method:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n say(thing) {\n let name = this.get('name');\n alert(`${name} says: ${thing}`);\n }\n});\n\nconst Soldier = Person.extend({\n say(thing) {\n this._super(`${thing}, sir!`);\n },\n march(numberOfHours) {\n alert(`${this.get('name')} marches for ${numberOfHours} hours.`);\n }\n});\n\nlet yehuda = Soldier.create({\n name: 'Yehuda Katz'\n});\n\nyehuda.say('Yes'); // alerts \"Yehuda Katz says: Yes, sir!\"\n```\n\nThe `create()` on line #17 creates an *instance* of the `Soldier` class.\nThe `extend()` on line #8 creates a *subclass* of `Person`. Any instance\nof the `Person` class will *not* have the `march()` method.\n\nYou can also pass `Mixin` classes to add additional properties to the subclass.\n\n```javascript\nimport EmberObject from '@ember/object';\nimport Mixin from '@ember/object/mixin';\n\nconst Person = EmberObject.extend({\n say(thing) {\n alert(`${this.get('name')} says: ${thing}`);\n }\n});\n\nconst SingingMixin = Mixin.create({\n sing(thing) {\n alert(`${this.get('name')} sings: la la la ${thing}`);\n }\n});\n\nconst BroadwayStar = Person.extend(SingingMixin, {\n dance() {\n alert(`${this.get('name')} dances: tap tap tap tap `);\n }\n});\n```\n\nThe `BroadwayStar` class contains three methods: `say()`, `sing()`, and `dance()`.",
|
|
13612
13653
|
"itemtype": "method",
|
|
13613
13654
|
"name": "extend",
|
|
@@ -13635,7 +13676,7 @@
|
|
|
13635
13676
|
},
|
|
13636
13677
|
{
|
|
13637
13678
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13638
|
-
"line":
|
|
13679
|
+
"line": 723,
|
|
13639
13680
|
"description": "Creates an instance of a class. Accepts either no arguments, or an object\ncontaining values to initialize the newly instantiated object with.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n helloWorld() {\n alert(`Hi, my name is ${this.get('name')}`);\n }\n});\n\nlet tom = Person.create({\n name: 'Tom Dale'\n});\n\ntom.helloWorld(); // alerts \"Hi, my name is Tom Dale\".\n```\n\n`create` will call the `init` function if defined during\n`AnyObject.extend`\n\nIf no arguments are passed to `create`, it will not set values to the new\ninstance during initialization:\n\n```javascript\nlet noName = Person.create();\nnoName.helloWorld(); // alerts undefined\n```\n\nNOTE: For performance reasons, you cannot declare methods or computed\nproperties during `create`. You should instead declare methods and computed\nproperties when using `extend`.",
|
|
13640
13681
|
"itemtype": "method",
|
|
13641
13682
|
"name": "create",
|
|
@@ -13655,7 +13696,7 @@
|
|
|
13655
13696
|
},
|
|
13656
13697
|
{
|
|
13657
13698
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13658
|
-
"line":
|
|
13699
|
+
"line": 788,
|
|
13659
13700
|
"description": "Augments a constructor's prototype with additional\nproperties and functions:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst MyObject = EmberObject.extend({\n name: 'an object'\n});\n\no = MyObject.create();\no.get('name'); // 'an object'\n\nMyObject.reopen({\n say(msg) {\n console.log(msg);\n }\n});\n\no2 = MyObject.create();\no2.say('hello'); // logs \"hello\"\n\no.say('goodbye'); // logs \"goodbye\"\n```\n\nTo add functions and properties to the constructor itself,\nsee `reopenClass`",
|
|
13660
13701
|
"itemtype": "method",
|
|
13661
13702
|
"name": "reopen",
|
|
@@ -13667,7 +13708,7 @@
|
|
|
13667
13708
|
},
|
|
13668
13709
|
{
|
|
13669
13710
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13670
|
-
"line":
|
|
13711
|
+
"line": 842,
|
|
13671
13712
|
"description": "Augments a constructor's own properties and functions:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst MyObject = EmberObject.extend({\n name: 'an object'\n});\n\nMyObject.reopenClass({\n canBuild: false\n});\n\nMyObject.canBuild; // false\no = MyObject.create();\n```\n\nIn other words, this creates static properties and functions for the class.\nThese are only available on the class and not on any instance of that class.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n name: '',\n sayHello() {\n alert(`Hello. My name is ${this.get('name')}`);\n }\n});\n\nPerson.reopenClass({\n species: 'Homo sapiens',\n\n createPerson(name) {\n return Person.create({ name });\n }\n});\n\nlet tom = Person.create({\n name: 'Tom Dale'\n});\nlet yehuda = Person.createPerson('Yehuda Katz');\n\ntom.sayHello(); // \"Hello. My name is Tom Dale\"\nyehuda.sayHello(); // \"Hello. My name is Yehuda Katz\"\nalert(Person.species); // \"Homo sapiens\"\n```\n\nNote that `species` and `createPerson` are *not* valid on the `tom` and `yehuda`\nvariables. They are only valid on `Person`.\n\nTo add functions and properties to instances of\na constructor by extending the constructor's prototype\nsee `reopen`",
|
|
13672
13713
|
"itemtype": "method",
|
|
13673
13714
|
"name": "reopenClass",
|
|
@@ -13679,7 +13720,7 @@
|
|
|
13679
13720
|
},
|
|
13680
13721
|
{
|
|
13681
13722
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13682
|
-
"line":
|
|
13723
|
+
"line": 925,
|
|
13683
13724
|
"description": "In some cases, you may want to annotate computed properties with additional\nmetadata about how they function or what values they operate on. For\nexample, computed property functions may close over variables that are then\nno longer available for introspection.\n\nYou can pass a hash of these values to a computed property like this:\n\n```javascript\nimport { computed } from '@ember/object';\n\nperson: computed(function() {\n let personId = this.get('personId');\n return Person.create({ id: personId });\n}).meta({ type: Person })\n```\n\nOnce you've done this, you can retrieve the values saved to the computed\nproperty from your class like this:\n\n```javascript\nMyClass.metaForProperty('person');\n```\n\nThis will return the original hash that was passed to `meta()`.",
|
|
13684
13725
|
"static": 1,
|
|
13685
13726
|
"itemtype": "method",
|
|
@@ -13698,7 +13739,7 @@
|
|
|
13698
13739
|
},
|
|
13699
13740
|
{
|
|
13700
13741
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13701
|
-
"line":
|
|
13742
|
+
"line": 968,
|
|
13702
13743
|
"description": "Iterate over each computed property for the class, passing its name\nand any associated metadata (see `metaForProperty`) to the callback.",
|
|
13703
13744
|
"static": 1,
|
|
13704
13745
|
"itemtype": "method",
|
|
@@ -13722,7 +13763,7 @@
|
|
|
13722
13763
|
},
|
|
13723
13764
|
{
|
|
13724
13765
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13725
|
-
"line":
|
|
13766
|
+
"line": 1060,
|
|
13726
13767
|
"description": "Provides lookup-time type validation for injected properties.",
|
|
13727
13768
|
"access": "private",
|
|
13728
13769
|
"tagname": "",
|
|
@@ -13733,7 +13774,7 @@
|
|
|
13733
13774
|
},
|
|
13734
13775
|
{
|
|
13735
13776
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.ts",
|
|
13736
|
-
"line":
|
|
13777
|
+
"line": 1081,
|
|
13737
13778
|
"description": "Returns a hash of property names and container names that injected\nproperties will lookup on the container lazily.",
|
|
13738
13779
|
"itemtype": "method",
|
|
13739
13780
|
"name": "_lazyInjections",
|
|
@@ -13748,7 +13789,7 @@
|
|
|
13748
13789
|
},
|
|
13749
13790
|
{
|
|
13750
13791
|
"file": "packages/@ember/-internals/runtime/lib/compare.ts",
|
|
13751
|
-
"line":
|
|
13792
|
+
"line": 51,
|
|
13752
13793
|
"description": "Compares two javascript values and returns:\n\n - -1 if the first is smaller than the second,\n - 0 if both are equal,\n - 1 if the first is greater than the second.\n\n ```javascript\n import { compare } from '@ember/utils';\n\n compare('hello', 'hello'); // 0\n compare('abc', 'dfg'); // -1\n compare(2, 1); // 1\n ```\n\nIf the types of the two objects are different precedence occurs in the\nfollowing order, with types earlier in the list considered `<` types\nlater in the list:\n\n - undefined\n - null\n - boolean\n - number\n - string\n - array\n - object\n - instance\n - function\n - class\n - date\n\n ```javascript\n import { compare } from '@ember/utils';\n\n compare('hello', 50); // 1\n compare(50, 'hello'); // -1\n ```",
|
|
13753
13794
|
"itemtype": "method",
|
|
13754
13795
|
"name": "compare",
|
|
@@ -14054,8 +14095,8 @@
|
|
|
14054
14095
|
"module": "@ember/array"
|
|
14055
14096
|
},
|
|
14056
14097
|
{
|
|
14057
|
-
"file": "packages/@ember/-internals/views/lib/mixins/child_views_support.
|
|
14058
|
-
"line":
|
|
14098
|
+
"file": "packages/@ember/-internals/views/lib/mixins/child_views_support.ts",
|
|
14099
|
+
"line": 13,
|
|
14059
14100
|
"description": "Array of child views. You should never edit this array directly.",
|
|
14060
14101
|
"itemtype": "property",
|
|
14061
14102
|
"name": "childViews",
|
|
@@ -14067,8 +14108,8 @@
|
|
|
14067
14108
|
"module": "ember"
|
|
14068
14109
|
},
|
|
14069
14110
|
{
|
|
14070
|
-
"file": "packages/@ember/-internals/views/lib/mixins/class_names_support.
|
|
14071
|
-
"line":
|
|
14111
|
+
"file": "packages/@ember/-internals/views/lib/mixins/class_names_support.ts",
|
|
14112
|
+
"line": 35,
|
|
14072
14113
|
"description": "Standard CSS class names to apply to the view's outer element. This\nproperty automatically inherits any class names defined by the view's\nsuperclasses as well.",
|
|
14073
14114
|
"itemtype": "property",
|
|
14074
14115
|
"name": "classNames",
|
|
@@ -14081,8 +14122,8 @@
|
|
|
14081
14122
|
"namespace": "Ember"
|
|
14082
14123
|
},
|
|
14083
14124
|
{
|
|
14084
|
-
"file": "packages/@ember/-internals/views/lib/mixins/class_names_support.
|
|
14085
|
-
"line":
|
|
14125
|
+
"file": "packages/@ember/-internals/views/lib/mixins/class_names_support.ts",
|
|
14126
|
+
"line": 47,
|
|
14086
14127
|
"description": "A list of properties of the view to apply as class names. If the property\nis a string value, the value of that string will be applied as a class\nname.\n\n```javascript\n// Applies the 'high' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['priority'],\n priority: 'high'\n});\n```\n\nIf the value of the property is a Boolean, the name of that property is\nadded as a dasherized class name.\n\n```javascript\n// Applies the 'is-urgent' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['isUrgent'],\n isUrgent: true\n});\n```\n\nIf you would prefer to use a custom value instead of the dasherized\nproperty name, you can pass a binding like this:\n\n```javascript\n// Applies the 'urgent' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['isUrgent:urgent'],\n isUrgent: true\n});\n```\n\nIf you would like to specify a class that should only be added when the\nproperty is false, you can declare a binding like this:\n\n```javascript\n// Applies the 'disabled' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['isEnabled::disabled'],\n isEnabled: false\n});\n```\n\nThis list of properties is inherited from the component's superclasses as well.",
|
|
14087
14128
|
"itemtype": "property",
|
|
14088
14129
|
"name": "classNameBindings",
|
|
@@ -14095,8 +14136,14 @@
|
|
|
14095
14136
|
"namespace": "Ember"
|
|
14096
14137
|
},
|
|
14097
14138
|
{
|
|
14098
|
-
"file": "packages/@ember/-internals/views/lib/mixins/
|
|
14099
|
-
"line":
|
|
14139
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_state_support.ts",
|
|
14140
|
+
"line": 9,
|
|
14141
|
+
"class": "Ember.ViewMixin",
|
|
14142
|
+
"module": "ember"
|
|
14143
|
+
},
|
|
14144
|
+
{
|
|
14145
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14146
|
+
"line": 34,
|
|
14100
14147
|
"description": "A list of properties of the view to apply as attributes. If the property\nis a string value, the value of that string will be applied as the value\nfor an attribute of the property's name.\n\nThe following example creates a tag like `<div priority=\"high\" />`.\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n attributeBindings: ['priority'],\n priority: 'high'\n });\n```\n\nIf the value of the property is a Boolean, the attribute is treated as\nan HTML Boolean attribute. It will be present if the property is `true`\nand omitted if the property is `false`.\n\nThe following example creates markup like `<div visible />`.\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n attributeBindings: ['visible'],\n visible: true\n });\n```\n\nIf you would prefer to use a custom value instead of the property name,\nyou can create the same markup as the last example with a binding like\nthis:\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n attributeBindings: ['isVisible:visible'],\n isVisible: true\n });\n```\n\nThis list of attributes is inherited from the component's superclasses,\nas well.",
|
|
14101
14148
|
"itemtype": "property",
|
|
14102
14149
|
"name": "attributeBindings",
|
|
@@ -14105,11 +14152,12 @@
|
|
|
14105
14152
|
"access": "public",
|
|
14106
14153
|
"tagname": "",
|
|
14107
14154
|
"class": "Ember.ViewMixin",
|
|
14108
|
-
"module": "ember"
|
|
14155
|
+
"module": "ember",
|
|
14156
|
+
"namespace": "Ember"
|
|
14109
14157
|
},
|
|
14110
14158
|
{
|
|
14111
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14112
|
-
"line":
|
|
14159
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14160
|
+
"line": 92,
|
|
14113
14161
|
"description": "Return the nearest ancestor that is an instance of the provided\nclass or mixin.",
|
|
14114
14162
|
"itemtype": "method",
|
|
14115
14163
|
"name": "nearestOfType",
|
|
@@ -14128,11 +14176,12 @@
|
|
|
14128
14176
|
"access": "private",
|
|
14129
14177
|
"tagname": "",
|
|
14130
14178
|
"class": "Ember.ViewMixin",
|
|
14131
|
-
"module": "ember"
|
|
14179
|
+
"module": "ember",
|
|
14180
|
+
"namespace": "Ember"
|
|
14132
14181
|
},
|
|
14133
14182
|
{
|
|
14134
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14135
|
-
"line":
|
|
14183
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14184
|
+
"line": 120,
|
|
14136
14185
|
"description": "Return the nearest ancestor that has a given property.",
|
|
14137
14186
|
"itemtype": "method",
|
|
14138
14187
|
"name": "nearestWithProperty",
|
|
@@ -14151,22 +14200,24 @@
|
|
|
14151
14200
|
"access": "private",
|
|
14152
14201
|
"tagname": "",
|
|
14153
14202
|
"class": "Ember.ViewMixin",
|
|
14154
|
-
"module": "ember"
|
|
14203
|
+
"module": "ember",
|
|
14204
|
+
"namespace": "Ember"
|
|
14155
14205
|
},
|
|
14156
14206
|
{
|
|
14157
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14158
|
-
"line":
|
|
14207
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14208
|
+
"line": 140,
|
|
14159
14209
|
"description": "Renders the view again. This will work regardless of whether the\nview is already in the DOM or not. If the view is in the DOM, the\nrendering process will be deferred to give bindings a chance\nto synchronize.\n\nIf children were added during the rendering process using `appendChild`,\n`rerender` will remove them, because they will be added again\nif needed by the next `render`.\n\nIn general, if the display of your view changes, you should modify\nthe DOM element directly instead of manually calling `rerender`, which can\nbe slow.",
|
|
14160
14210
|
"itemtype": "method",
|
|
14161
14211
|
"name": "rerender",
|
|
14162
14212
|
"access": "public",
|
|
14163
14213
|
"tagname": "",
|
|
14164
14214
|
"class": "Ember.ViewMixin",
|
|
14165
|
-
"module": "ember"
|
|
14215
|
+
"module": "ember",
|
|
14216
|
+
"namespace": "Ember"
|
|
14166
14217
|
},
|
|
14167
14218
|
{
|
|
14168
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14169
|
-
"line":
|
|
14219
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14220
|
+
"line": 165,
|
|
14170
14221
|
"description": "Returns the current DOM element for the view.",
|
|
14171
14222
|
"itemtype": "property",
|
|
14172
14223
|
"name": "element",
|
|
@@ -14174,11 +14225,12 @@
|
|
|
14174
14225
|
"access": "public",
|
|
14175
14226
|
"tagname": "",
|
|
14176
14227
|
"class": "Ember.ViewMixin",
|
|
14177
|
-
"module": "ember"
|
|
14228
|
+
"module": "ember",
|
|
14229
|
+
"namespace": "Ember"
|
|
14178
14230
|
},
|
|
14179
14231
|
{
|
|
14180
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14181
|
-
"line":
|
|
14232
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14233
|
+
"line": 180,
|
|
14182
14234
|
"description": "Appends the view's element to the specified parent element.\n\nNote that this method just schedules the view to be appended; the DOM\nelement will not be appended to the given element until all bindings have\nfinished synchronizing.\n\nThis is not typically a function that you will need to call directly when\nbuilding your application. If you do need to use `appendTo`, be sure that\nthe target element you are providing is associated with an `Application`\nand does not have an ancestor element that is associated with an Ember view.",
|
|
14183
14235
|
"itemtype": "method",
|
|
14184
14236
|
"name": "appendTo",
|
|
@@ -14196,11 +14248,12 @@
|
|
|
14196
14248
|
"access": "private",
|
|
14197
14249
|
"tagname": "",
|
|
14198
14250
|
"class": "Ember.ViewMixin",
|
|
14199
|
-
"module": "ember"
|
|
14251
|
+
"module": "ember",
|
|
14252
|
+
"namespace": "Ember"
|
|
14200
14253
|
},
|
|
14201
14254
|
{
|
|
14202
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14203
|
-
"line":
|
|
14255
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14256
|
+
"line": 245,
|
|
14204
14257
|
"description": "Appends the view's element to the document body. If the view does\nnot have an HTML representation yet\nthe element will be generated automatically.\n\nIf your application uses the `rootElement` property, you must append\nthe view within that element. Rendering views outside of the `rootElement`\nis not supported.\n\nNote that this method just schedules the view to be appended; the DOM\nelement will not be appended to the document body until all bindings have\nfinished synchronizing.",
|
|
14205
14258
|
"itemtype": "method",
|
|
14206
14259
|
"name": "append",
|
|
@@ -14211,11 +14264,12 @@
|
|
|
14211
14264
|
"access": "private",
|
|
14212
14265
|
"tagname": "",
|
|
14213
14266
|
"class": "Ember.ViewMixin",
|
|
14214
|
-
"module": "ember"
|
|
14267
|
+
"module": "ember",
|
|
14268
|
+
"namespace": "Ember"
|
|
14215
14269
|
},
|
|
14216
14270
|
{
|
|
14217
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14218
|
-
"line":
|
|
14271
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14272
|
+
"line": 266,
|
|
14219
14273
|
"description": "The HTML `id` of the view's element in the DOM. You can provide this\nvalue yourself but it must be unique (just as in HTML):\n\n```handlebars\n{{my-component elementId=\"a-really-cool-id\"}}\n```\n\nIf not manually set a default value will be provided by the framework.\n\nOnce rendered an element's `elementId` is considered immutable and you\nshould never change it. If you need to compute a dynamic value for the\n`elementId`, you should do this when the component or element is being\ninstantiated:\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n let index = this.get('index');\n this.set('elementId', 'component-id' + index);\n }\n });\n```",
|
|
14220
14274
|
"itemtype": "property",
|
|
14221
14275
|
"name": "elementId",
|
|
@@ -14223,88 +14277,96 @@
|
|
|
14223
14277
|
"access": "public",
|
|
14224
14278
|
"tagname": "",
|
|
14225
14279
|
"class": "Ember.ViewMixin",
|
|
14226
|
-
"module": "ember"
|
|
14280
|
+
"module": "ember",
|
|
14281
|
+
"namespace": "Ember"
|
|
14227
14282
|
},
|
|
14228
14283
|
{
|
|
14229
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14230
|
-
"line":
|
|
14284
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14285
|
+
"line": 299,
|
|
14231
14286
|
"description": "Called when a view is going to insert an element into the DOM.",
|
|
14232
14287
|
"itemtype": "event",
|
|
14233
14288
|
"name": "willInsertElement",
|
|
14234
14289
|
"access": "public",
|
|
14235
14290
|
"tagname": "",
|
|
14236
14291
|
"class": "Ember.ViewMixin",
|
|
14237
|
-
"module": "ember"
|
|
14292
|
+
"module": "ember",
|
|
14293
|
+
"namespace": "Ember"
|
|
14238
14294
|
},
|
|
14239
14295
|
{
|
|
14240
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14241
|
-
"line":
|
|
14296
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14297
|
+
"line": 307,
|
|
14242
14298
|
"description": "Called when the element of the view has been inserted into the DOM.\nOverride this function to do any set up that requires an element\nin the document body.\n\nWhen a view has children, didInsertElement will be called on the\nchild view(s) first and on itself afterwards.",
|
|
14243
14299
|
"itemtype": "event",
|
|
14244
14300
|
"name": "didInsertElement",
|
|
14245
14301
|
"access": "public",
|
|
14246
14302
|
"tagname": "",
|
|
14247
14303
|
"class": "Ember.ViewMixin",
|
|
14248
|
-
"module": "ember"
|
|
14304
|
+
"module": "ember",
|
|
14305
|
+
"namespace": "Ember"
|
|
14249
14306
|
},
|
|
14250
14307
|
{
|
|
14251
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14252
|
-
"line":
|
|
14308
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14309
|
+
"line": 320,
|
|
14253
14310
|
"description": "Called when the view is about to rerender, but before anything has\nbeen torn down. This is a good opportunity to tear down any manual\nobservers you have installed based on the DOM state",
|
|
14254
14311
|
"itemtype": "event",
|
|
14255
14312
|
"name": "willClearRender",
|
|
14256
14313
|
"access": "public",
|
|
14257
14314
|
"tagname": "",
|
|
14258
14315
|
"class": "Ember.ViewMixin",
|
|
14259
|
-
"module": "ember"
|
|
14316
|
+
"module": "ember",
|
|
14317
|
+
"namespace": "Ember"
|
|
14260
14318
|
},
|
|
14261
14319
|
{
|
|
14262
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14263
|
-
"line":
|
|
14320
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14321
|
+
"line": 330,
|
|
14264
14322
|
"description": "You must call `destroy` on a view to destroy the view (and all of its\nchild views). This will remove the view from any parent node, then make\nsure that the DOM element managed by the view can be released by the\nmemory manager.",
|
|
14265
14323
|
"itemtype": "method",
|
|
14266
14324
|
"name": "destroy",
|
|
14267
14325
|
"access": "private",
|
|
14268
14326
|
"tagname": "",
|
|
14269
14327
|
"class": "Ember.ViewMixin",
|
|
14270
|
-
"module": "ember"
|
|
14328
|
+
"module": "ember",
|
|
14329
|
+
"namespace": "Ember"
|
|
14271
14330
|
},
|
|
14272
14331
|
{
|
|
14273
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14274
|
-
"line":
|
|
14332
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14333
|
+
"line": 344,
|
|
14275
14334
|
"description": "Called when the element of the view is going to be destroyed. Override\nthis function to do any teardown that requires an element, like removing\nevent listeners.\n\nPlease note: any property changes made during this event will have no\neffect on object observers.",
|
|
14276
14335
|
"itemtype": "event",
|
|
14277
14336
|
"name": "willDestroyElement",
|
|
14278
14337
|
"access": "public",
|
|
14279
14338
|
"tagname": "",
|
|
14280
14339
|
"class": "Ember.ViewMixin",
|
|
14281
|
-
"module": "ember"
|
|
14340
|
+
"module": "ember",
|
|
14341
|
+
"namespace": "Ember"
|
|
14282
14342
|
},
|
|
14283
14343
|
{
|
|
14284
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14285
|
-
"line":
|
|
14344
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14345
|
+
"line": 357,
|
|
14286
14346
|
"description": "Called after the element of the view is destroyed.",
|
|
14287
14347
|
"itemtype": "event",
|
|
14288
14348
|
"name": "willDestroyElement",
|
|
14289
14349
|
"access": "public",
|
|
14290
14350
|
"tagname": "",
|
|
14291
14351
|
"class": "Ember.ViewMixin",
|
|
14292
|
-
"module": "ember"
|
|
14352
|
+
"module": "ember",
|
|
14353
|
+
"namespace": "Ember"
|
|
14293
14354
|
},
|
|
14294
14355
|
{
|
|
14295
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14296
|
-
"line":
|
|
14356
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14357
|
+
"line": 365,
|
|
14297
14358
|
"description": "Called when the parentView property has changed.",
|
|
14298
14359
|
"itemtype": "event",
|
|
14299
14360
|
"name": "parentViewDidChange",
|
|
14300
14361
|
"access": "private",
|
|
14301
14362
|
"tagname": "",
|
|
14302
14363
|
"class": "Ember.ViewMixin",
|
|
14303
|
-
"module": "ember"
|
|
14364
|
+
"module": "ember",
|
|
14365
|
+
"namespace": "Ember"
|
|
14304
14366
|
},
|
|
14305
14367
|
{
|
|
14306
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14307
|
-
"line":
|
|
14368
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14369
|
+
"line": 377,
|
|
14308
14370
|
"description": "Tag name for the view's outer element. The tag name is only used when an\nelement is first created. If you change the `tagName` for an element, you\nmust destroy and recreate the view element.\n\nBy default, the render buffer will use a `<div>` tag for views.\n\nIf the tagName is `''`, the view will be tagless, with no outer element.\nComponent properties that depend on the presence of an outer element, such\nas `classNameBindings` and `attributeBindings`, do not work with tagless\ncomponents. Tagless components cannot implement methods to handle events,\nand their `element` property has a `null` value.",
|
|
14309
14371
|
"itemtype": "property",
|
|
14310
14372
|
"name": "tagName",
|
|
@@ -14313,22 +14375,24 @@
|
|
|
14313
14375
|
"access": "public",
|
|
14314
14376
|
"tagname": "",
|
|
14315
14377
|
"class": "Ember.ViewMixin",
|
|
14316
|
-
"module": "ember"
|
|
14378
|
+
"module": "ember",
|
|
14379
|
+
"namespace": "Ember"
|
|
14317
14380
|
},
|
|
14318
14381
|
{
|
|
14319
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14320
|
-
"line":
|
|
14382
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14383
|
+
"line": 404,
|
|
14321
14384
|
"description": "Setup a view, but do not finish waking it up.\n\n* configure `childViews`\n* register the view with the global views hash, which is used for event\ndispatch",
|
|
14322
14385
|
"itemtype": "method",
|
|
14323
14386
|
"name": "init",
|
|
14324
14387
|
"access": "private",
|
|
14325
14388
|
"tagname": "",
|
|
14326
14389
|
"class": "Ember.ViewMixin",
|
|
14327
|
-
"module": "ember"
|
|
14390
|
+
"module": "ember",
|
|
14391
|
+
"namespace": "Ember"
|
|
14328
14392
|
},
|
|
14329
14393
|
{
|
|
14330
|
-
"file": "packages/@ember/-internals/views/lib/mixins/view_support.
|
|
14331
|
-
"line":
|
|
14394
|
+
"file": "packages/@ember/-internals/views/lib/mixins/view_support.ts",
|
|
14395
|
+
"line": 438,
|
|
14332
14396
|
"description": "Handle events from `EventDispatcher`",
|
|
14333
14397
|
"itemtype": "method",
|
|
14334
14398
|
"name": "handleEvent",
|
|
@@ -14347,11 +14411,12 @@
|
|
|
14347
14411
|
"access": "private",
|
|
14348
14412
|
"tagname": "",
|
|
14349
14413
|
"class": "Ember.ViewMixin",
|
|
14350
|
-
"module": "ember"
|
|
14414
|
+
"module": "ember",
|
|
14415
|
+
"namespace": "Ember"
|
|
14351
14416
|
},
|
|
14352
14417
|
{
|
|
14353
|
-
"file": "packages/@ember/-internals/views/lib/system/action_manager.
|
|
14354
|
-
"line":
|
|
14418
|
+
"file": "packages/@ember/-internals/views/lib/system/action_manager.ts",
|
|
14419
|
+
"line": 9,
|
|
14355
14420
|
"description": "Global action id hash.",
|
|
14356
14421
|
"access": "private",
|
|
14357
14422
|
"tagname": "",
|
|
@@ -14362,14 +14427,8 @@
|
|
|
14362
14427
|
"module": "ember"
|
|
14363
14428
|
},
|
|
14364
14429
|
{
|
|
14365
|
-
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.
|
|
14366
|
-
"line":
|
|
14367
|
-
"class": "Ember.EventDispatcher",
|
|
14368
|
-
"module": "ember"
|
|
14369
|
-
},
|
|
14370
|
-
{
|
|
14371
|
-
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.js",
|
|
14372
|
-
"line": 27,
|
|
14430
|
+
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts",
|
|
14431
|
+
"line": 31,
|
|
14373
14432
|
"description": "The set of events names (and associated handler function names) to be setup\nand dispatched by the `EventDispatcher`. Modifications to this list can be done\nat setup time, generally via the `Application.customEvents` hash.\n\nTo add new events to be listened to:\n\n```javascript\nimport Application from '@ember/application';\n\nlet App = Application.create({\n customEvents: {\n paste: 'paste'\n }\n});\n```\n\nTo prevent default events from being listened to:\n\n```javascript\nimport Application from '@ember/application';\n\nlet App = Application.create({\n customEvents: {\n mouseenter: null,\n mouseleave: null\n }\n});\n```",
|
|
14374
14433
|
"itemtype": "property",
|
|
14375
14434
|
"name": "events",
|
|
@@ -14381,8 +14440,8 @@
|
|
|
14381
14440
|
"namespace": "Ember"
|
|
14382
14441
|
},
|
|
14383
14442
|
{
|
|
14384
|
-
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.
|
|
14385
|
-
"line":
|
|
14443
|
+
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts",
|
|
14444
|
+
"line": 91,
|
|
14386
14445
|
"description": "The root DOM element to which event listeners should be attached. Event\nlisteners will be attached to the document unless this is overridden.\n\nCan be specified as a DOMElement or a selector string.\n\nThe default body is a string since this may be evaluated before document.body\nexists in the DOM.",
|
|
14387
14446
|
"access": "private",
|
|
14388
14447
|
"tagname": "",
|
|
@@ -14395,8 +14454,8 @@
|
|
|
14395
14454
|
"namespace": "Ember"
|
|
14396
14455
|
},
|
|
14397
14456
|
{
|
|
14398
|
-
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.
|
|
14399
|
-
"line":
|
|
14457
|
+
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts",
|
|
14458
|
+
"line": 114,
|
|
14400
14459
|
"description": "Sets up event listeners for standard browser events.\n\nThis will be called after the browser sends a `DOMContentReady` event. By\ndefault, it will set up all of the listeners on the document body. If you\nwould like to register the listeners on a different element, set the event\ndispatcher's `root` property.",
|
|
14401
14460
|
"access": "private",
|
|
14402
14461
|
"tagname": "",
|
|
@@ -14414,8 +14473,8 @@
|
|
|
14414
14473
|
"namespace": "Ember"
|
|
14415
14474
|
},
|
|
14416
14475
|
{
|
|
14417
|
-
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.
|
|
14418
|
-
"line":
|
|
14476
|
+
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts",
|
|
14477
|
+
"line": 208,
|
|
14419
14478
|
"description": "Setup event listeners for the given browser event name",
|
|
14420
14479
|
"access": "private",
|
|
14421
14480
|
"tagname": "",
|
|
@@ -14432,8 +14491,8 @@
|
|
|
14432
14491
|
"namespace": "Ember"
|
|
14433
14492
|
},
|
|
14434
14493
|
{
|
|
14435
|
-
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.
|
|
14436
|
-
"line":
|
|
14494
|
+
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts",
|
|
14495
|
+
"line": 221,
|
|
14437
14496
|
"description": "Setup event listeners for the given Ember event name (camel case)",
|
|
14438
14497
|
"access": "private",
|
|
14439
14498
|
"tagname": "",
|
|
@@ -14450,8 +14509,8 @@
|
|
|
14450
14509
|
"namespace": "Ember"
|
|
14451
14510
|
},
|
|
14452
14511
|
{
|
|
14453
|
-
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.
|
|
14454
|
-
"line":
|
|
14512
|
+
"file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts",
|
|
14513
|
+
"line": 238,
|
|
14455
14514
|
"description": "Registers an event listener on the rootElement. If the given event is\ntriggered, the provided event handler will be triggered on the target view.\n\nIf the target view does not implement the event handler, or if the handler\nreturns `false`, the parent view will be called. The event will continue to\nbubble to each successive parent view until it reaches the top.",
|
|
14456
14515
|
"access": "private",
|
|
14457
14516
|
"tagname": "",
|
|
@@ -14674,7 +14733,7 @@
|
|
|
14674
14733
|
},
|
|
14675
14734
|
{
|
|
14676
14735
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14677
|
-
"line":
|
|
14736
|
+
"line": 186,
|
|
14678
14737
|
"description": "This creates a registry with the default Ember naming conventions.\n\nIt also configures the registry:\n\n* registered views are created every time they are looked up (they are\n not singletons)\n* registered templates are not factories; the registered value is\n returned directly.\n* the router receives the application as its `namespace` property\n* all controllers receive the router as their `target` and `controllers`\n properties\n* all controllers receive the application as their `namespace` property\n* the application view receives the application controller as its\n `controller` property\n* the application view receives the application template as its\n `defaultTemplate` property",
|
|
14679
14738
|
"itemtype": "method",
|
|
14680
14739
|
"name": "buildRegistry",
|
|
@@ -14697,7 +14756,7 @@
|
|
|
14697
14756
|
},
|
|
14698
14757
|
{
|
|
14699
14758
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14700
|
-
"line":
|
|
14759
|
+
"line": 221,
|
|
14701
14760
|
"description": "The root DOM element of the Application. This can be specified as an\nelement or a [selector string](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors#reference_table_of_selectors).\n\nThis is the element that will be passed to the Application's,\n`eventDispatcher`, which sets up the listeners for event delegation. Every\nview in your application should be a child of the element you specify here.",
|
|
14702
14761
|
"itemtype": "property",
|
|
14703
14762
|
"name": "rootElement",
|
|
@@ -14710,7 +14769,7 @@
|
|
|
14710
14769
|
},
|
|
14711
14770
|
{
|
|
14712
14771
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14713
|
-
"line":
|
|
14772
|
+
"line": 236,
|
|
14714
14773
|
"itemtype": "property",
|
|
14715
14774
|
"name": "_document",
|
|
14716
14775
|
"type": "Document | null",
|
|
@@ -14722,7 +14781,7 @@
|
|
|
14722
14781
|
},
|
|
14723
14782
|
{
|
|
14724
14783
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14725
|
-
"line":
|
|
14784
|
+
"line": 245,
|
|
14726
14785
|
"description": "The `Ember.EventDispatcher` responsible for delegating events to this\napplication's views.\n\nThe event dispatcher is created by the application at initialization time\nand sets up event listeners on the DOM element described by the\napplication's `rootElement` property.\n\nSee the documentation for `Ember.EventDispatcher` for more information.",
|
|
14727
14786
|
"itemtype": "property",
|
|
14728
14787
|
"name": "eventDispatcher",
|
|
@@ -14735,7 +14794,7 @@
|
|
|
14735
14794
|
},
|
|
14736
14795
|
{
|
|
14737
14796
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14738
|
-
"line":
|
|
14797
|
+
"line": 262,
|
|
14739
14798
|
"description": "The DOM events for which the event dispatcher should listen.\n\nBy default, the application's `Ember.EventDispatcher` listens\nfor a set of standard DOM events, such as `mousedown` and\n`keyup`, and delegates them to your application's `Ember.View`\ninstances.\n\nIf you would like additional bubbling events to be delegated to your\nviews, set your `Application`'s `customEvents` property\nto a hash containing the DOM event name as the key and the\ncorresponding view method name as the value. Setting an event to\na value of `null` will prevent a default event listener from being\nadded for that event.\n\nTo add new events to be listened to:\n\n```app/app.js\nimport Application from '@ember/application';\n\nlet App = Application.extend({\n customEvents: {\n // add support for the paste event\n paste: 'paste'\n }\n});\n```\n\nTo prevent default events from being listened to:\n\n```app/app.js\nimport Application from '@ember/application';\n\nlet App = Application.extend({\n customEvents: {\n // remove support for mouseenter / mouseleave events\n mouseenter: null,\n mouseleave: null\n }\n});\n```",
|
|
14740
14799
|
"itemtype": "property",
|
|
14741
14800
|
"name": "customEvents",
|
|
@@ -14748,7 +14807,7 @@
|
|
|
14748
14807
|
},
|
|
14749
14808
|
{
|
|
14750
14809
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14751
|
-
"line":
|
|
14810
|
+
"line": 310,
|
|
14752
14811
|
"description": "Whether the application should automatically start routing and render\ntemplates to the `rootElement` on DOM ready. While default by true,\nother environments such as FastBoot or a testing harness can set this\nproperty to `false` and control the precise timing and behavior of the boot\nprocess.",
|
|
14753
14812
|
"itemtype": "property",
|
|
14754
14813
|
"name": "autoboot",
|
|
@@ -14761,7 +14820,7 @@
|
|
|
14761
14820
|
},
|
|
14762
14821
|
{
|
|
14763
14822
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14764
|
-
"line":
|
|
14823
|
+
"line": 324,
|
|
14765
14824
|
"description": "Whether the application should be configured for the legacy \"globals mode\".\nUnder this mode, the Application object serves as a global namespace for all\nclasses.\n\n```javascript\nimport Application from '@ember/application';\nimport Component from '@ember/component';\n\nlet App = Application.create({\n ...\n});\n\nApp.Router.reopen({\n location: 'none'\n});\n\nApp.Router.map({\n ...\n});\n\nApp.MyComponent = Component.extend({\n ...\n});\n```\n\nThis flag also exposes other internal APIs that assumes the existence of\na special \"default instance\", like `App.__container__.lookup(...)`.\n\nThis option is currently not configurable, its value is derived from\nthe `autoboot` flag – disabling `autoboot` also implies opting-out of\nglobals mode support, although they are ultimately orthogonal concerns.\n\nSome of the global modes features are already deprecated in 1.x. The\nexistence of this flag is to untangle the globals mode code paths from\nthe autoboot code paths, so that these legacy features can be reviewed\nfor deprecation/removal separately.\n\nForcing the (autoboot=true, _globalsMode=false) here and running the tests\nwould reveal all the places where we are still relying on these legacy\nbehavior internally (mostly just tests).",
|
|
14766
14825
|
"itemtype": "property",
|
|
14767
14826
|
"name": "_globalsMode",
|
|
@@ -14774,7 +14833,7 @@
|
|
|
14774
14833
|
},
|
|
14775
14834
|
{
|
|
14776
14835
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14777
|
-
"line":
|
|
14836
|
+
"line": 373,
|
|
14778
14837
|
"description": "An array of application instances created by `buildInstance()`. Used\ninternally to ensure that all instances get destroyed.",
|
|
14779
14838
|
"itemtype": "property",
|
|
14780
14839
|
"name": "_applicationInstances",
|
|
@@ -14786,7 +14845,7 @@
|
|
|
14786
14845
|
},
|
|
14787
14846
|
{
|
|
14788
14847
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14789
|
-
"line":
|
|
14848
|
+
"line": 423,
|
|
14790
14849
|
"description": "Create an ApplicationInstance for this application.",
|
|
14791
14850
|
"access": "public",
|
|
14792
14851
|
"tagname": "",
|
|
@@ -14801,7 +14860,7 @@
|
|
|
14801
14860
|
},
|
|
14802
14861
|
{
|
|
14803
14862
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14804
|
-
"line":
|
|
14863
|
+
"line": 448,
|
|
14805
14864
|
"description": "Start tracking an ApplicationInstance for this application.\nUsed when the ApplicationInstance is created.",
|
|
14806
14865
|
"access": "private",
|
|
14807
14866
|
"tagname": "",
|
|
@@ -14812,7 +14871,7 @@
|
|
|
14812
14871
|
},
|
|
14813
14872
|
{
|
|
14814
14873
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14815
|
-
"line":
|
|
14874
|
+
"line": 459,
|
|
14816
14875
|
"description": "Stop tracking an ApplicationInstance for this application.\nUsed when the ApplicationInstance is about to be destroyed.",
|
|
14817
14876
|
"access": "private",
|
|
14818
14877
|
"tagname": "",
|
|
@@ -14823,7 +14882,7 @@
|
|
|
14823
14882
|
},
|
|
14824
14883
|
{
|
|
14825
14884
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14826
|
-
"line":
|
|
14885
|
+
"line": 472,
|
|
14827
14886
|
"description": "Enable the legacy globals mode by allowing this application to act\nas a global namespace. See the docs on the `_globalsMode` property\nfor details.\n\nMost of these features are already deprecated in 1.x, so we can\nstop using them internally and try to remove them.",
|
|
14828
14887
|
"access": "private",
|
|
14829
14888
|
"tagname": "",
|
|
@@ -14834,7 +14893,7 @@
|
|
|
14834
14893
|
},
|
|
14835
14894
|
{
|
|
14836
14895
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14837
|
-
"line":
|
|
14896
|
+
"line": 519,
|
|
14838
14897
|
"description": "Automatically kick-off the boot process for the application once the\nDOM has become ready.\n\nThe initialization itself is scheduled on the actions queue which\nensures that code-loading finishes before booting.\n\nIf you are asynchronously loading code, you should call `deferReadiness()`\nto defer booting, and then call `advanceReadiness()` once all of your code\nhas finished loading.",
|
|
14839
14898
|
"access": "private",
|
|
14840
14899
|
"tagname": "",
|
|
@@ -14845,7 +14904,7 @@
|
|
|
14845
14904
|
},
|
|
14846
14905
|
{
|
|
14847
14906
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14848
|
-
"line":
|
|
14907
|
+
"line": 559,
|
|
14849
14908
|
"description": "This is the autoboot flow:\n\n1. Boot the app by calling `this.boot()`\n2. Create an instance (or use the `__deprecatedInstance__` in globals mode)\n3. Boot the instance by calling `instance.boot()`\n4. Invoke the `App.ready()` callback\n5. Kick-off routing on the instance\n\nIdeally, this is all we would need to do:\n\n```javascript\n_autoBoot() {\n this.boot().then(() => {\n let instance = (this._globalsMode) ? this.__deprecatedInstance__ : this.buildInstance();\n return instance.boot();\n }).then((instance) => {\n App.ready();\n instance.startRouting();\n });\n}\n```\n\nUnfortunately, we cannot actually write this because we need to participate\nin the \"synchronous\" boot process. While the code above would work fine on\nthe initial boot (i.e. DOM ready), when `App.reset()` is called, we need to\nboot a new instance synchronously (see the documentation on `_bootSync()`\nfor details).\n\nBecause of this restriction, the actual logic of this method is located\ninside `didBecomeReady()`.",
|
|
14850
14909
|
"access": "private",
|
|
14851
14910
|
"tagname": "",
|
|
@@ -14856,7 +14915,7 @@
|
|
|
14856
14915
|
},
|
|
14857
14916
|
{
|
|
14858
14917
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14859
|
-
"line":
|
|
14918
|
+
"line": 604,
|
|
14860
14919
|
"description": "Use this to defer readiness until some condition is true.\n\nExample:\n\n```javascript\nimport Application from '@ember/application';\n\nlet App = Application.create();\n\nApp.deferReadiness();\n\nfetch('/auth-token')\n.then(response => response.json())\n.then(data => {\n App.token = data.token;\n App.advanceReadiness();\n});\n```\n\nThis allows you to perform asynchronous setup logic and defer\nbooting your application until the setup has finished.\n\nHowever, if the setup requires a loading UI, it might be better\nto use the router for this purpose.",
|
|
14861
14920
|
"itemtype": "method",
|
|
14862
14921
|
"name": "deferReadiness",
|
|
@@ -14867,7 +14926,7 @@
|
|
|
14867
14926
|
},
|
|
14868
14927
|
{
|
|
14869
14928
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14870
|
-
"line":
|
|
14929
|
+
"line": 654,
|
|
14871
14930
|
"description": "Call `advanceReadiness` after any asynchronous setup logic has completed.\nEach call to `deferReadiness` must be matched by a call to `advanceReadiness`\nor the application will never become ready and routing will not begin.",
|
|
14872
14931
|
"itemtype": "method",
|
|
14873
14932
|
"name": "advanceReadiness",
|
|
@@ -14881,7 +14940,7 @@
|
|
|
14881
14940
|
},
|
|
14882
14941
|
{
|
|
14883
14942
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14884
|
-
"line":
|
|
14943
|
+
"line": 693,
|
|
14885
14944
|
"description": "Initialize the application and return a promise that resolves with the `Application`\nobject when the boot process is complete.\n\nRun any application initializers and run the application load hook. These hooks may\nchoose to defer readiness. For example, an authentication hook might want to defer\nreadiness until the auth token has been retrieved.\n\nBy default, this method is called automatically on \"DOM ready\"; however, if autoboot\nis disabled, this is automatically called when the first application instance is\ncreated via `visit`.",
|
|
14886
14945
|
"access": "public",
|
|
14887
14946
|
"tagname": "",
|
|
@@ -14896,7 +14955,7 @@
|
|
|
14896
14955
|
},
|
|
14897
14956
|
{
|
|
14898
14957
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14899
|
-
"line":
|
|
14958
|
+
"line": 735,
|
|
14900
14959
|
"description": "Unfortunately, a lot of existing code assumes the booting process is\n\"synchronous\". Specifically, a lot of tests assumes the last call to\n`app.advanceReadiness()` or `app.reset()` will result in the app being\nfully-booted when the current runloop completes.\n\nWe would like new code (like the `visit` API) to stop making this assumption,\nso we created the asynchronous version above that returns a promise. But until\nwe have migrated all the code, we would have to expose this method for use\n*internally* in places where we need to boot an app \"synchronously\".",
|
|
14901
14960
|
"access": "private",
|
|
14902
14961
|
"tagname": "",
|
|
@@ -14905,7 +14964,7 @@
|
|
|
14905
14964
|
},
|
|
14906
14965
|
{
|
|
14907
14966
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14908
|
-
"line":
|
|
14967
|
+
"line": 774,
|
|
14909
14968
|
"description": "Reset the application. This is typically used only in tests. It cleans up\nthe application in the following order:\n\n1. Deactivate existing routes\n2. Destroy all objects in the container\n3. Create a new application container\n4. Re-route to the existing url\n\nTypical Example:\n\n```javascript\nimport Application from '@ember/application';\nlet App;\n\nrun(function() {\n App = Application.create();\n});\n\nmodule('acceptance test', {\n setup: function() {\n App.reset();\n }\n});\n\ntest('first test', function() {\n // App is freshly reset\n});\n\ntest('second test', function() {\n // App is again freshly reset\n});\n```\n\nAdvanced Example:\n\nOccasionally you may want to prevent the app from initializing during\nsetup. This could enable extra configuration, or enable asserting prior\nto the app becoming ready.\n\n```javascript\nimport Application from '@ember/application';\nlet App;\n\nrun(function() {\n App = Application.create();\n});\n\nmodule('acceptance test', {\n setup: function() {\n run(function() {\n App.reset();\n App.deferReadiness();\n });\n }\n});\n\ntest('first test', function() {\n ok(true, 'something before app is initialized');\n\n run(function() {\n App.advanceReadiness();\n });\n\n ok(true, 'something after app is initialized');\n});\n```",
|
|
14910
14969
|
"itemtype": "method",
|
|
14911
14970
|
"name": "reset",
|
|
@@ -14916,7 +14975,7 @@
|
|
|
14916
14975
|
},
|
|
14917
14976
|
{
|
|
14918
14977
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14919
|
-
"line":
|
|
14978
|
+
"line": 878,
|
|
14920
14979
|
"access": "private",
|
|
14921
14980
|
"tagname": "",
|
|
14922
14981
|
"itemtype": "method",
|
|
@@ -14926,7 +14985,7 @@
|
|
|
14926
14985
|
},
|
|
14927
14986
|
{
|
|
14928
14987
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14929
|
-
"line":
|
|
14988
|
+
"line": 931,
|
|
14930
14989
|
"description": "Called when the Application has become ready, immediately before routing\nbegins. The call will be delayed until the DOM has become ready.",
|
|
14931
14990
|
"itemtype": "event",
|
|
14932
14991
|
"name": "ready",
|
|
@@ -14937,7 +14996,7 @@
|
|
|
14937
14996
|
},
|
|
14938
14997
|
{
|
|
14939
14998
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14940
|
-
"line":
|
|
14999
|
+
"line": 956,
|
|
14941
15000
|
"description": "Boot a new instance of `ApplicationInstance` for the current\napplication and navigate it to the given `url`. Returns a `Promise` that\nresolves with the instance when the initial routing and rendering is\ncomplete, or rejects with any error that occurred during the boot process.\n\nWhen `autoboot` is disabled, calling `visit` would first cause the\napplication to boot, which runs the application initializers.\n\nThis method also takes a hash of boot-time configuration options for\ncustomizing the instance's behavior. See the documentation on\n`ApplicationInstance.BootOptions` for details.\n\n`ApplicationInstance.BootOptions` is an interface class that exists\npurely to document the available options; you do not need to construct it\nmanually. Simply pass a regular JavaScript object containing of the\ndesired options:\n\n```javascript\nMyApp.visit(\"/\", { location: \"none\", rootElement: \"#container\" });\n```\n\n### Supported Scenarios\n\nWhile the `BootOptions` class exposes a large number of knobs, not all\ncombinations of them are valid; certain incompatible combinations might\nresult in unexpected behavior.\n\nFor example, booting the instance in the full browser environment\nwhile specifying a foreign `document` object (e.g. `{ isBrowser: true,\ndocument: iframe.contentDocument }`) does not work correctly today,\nlargely due to Ember's jQuery dependency.\n\nCurrently, there are three officially supported scenarios/configurations.\nUsages outside of these scenarios are not guaranteed to work, but please\nfeel free to file bug reports documenting your experience and any issues\nyou encountered to help expand support.\n\n#### Browser Applications (Manual Boot)\n\nThe setup is largely similar to how Ember works out-of-the-box. Normally,\nEmber will boot a default instance for your Application on \"DOM ready\".\nHowever, you can customize this behavior by disabling `autoboot`.\n\nFor example, this allows you to render a miniture demo of your application\ninto a specific area on your marketing website:\n\n```javascript\nimport MyApp from 'my-app';\n\n$(function() {\n let App = MyApp.create({ autoboot: false });\n\n let options = {\n // Override the router's location adapter to prevent it from updating\n // the URL in the address bar\n location: 'none',\n\n // Override the default `rootElement` on the app to render into a\n // specific `div` on the page\n rootElement: '#demo'\n };\n\n // Start the app at the special demo URL\n App.visit('/demo', options);\n});\n```\n\nOr perhaps you might want to boot two instances of your app on the same\npage for a split-screen multiplayer experience:\n\n```javascript\nimport MyApp from 'my-app';\n\n$(function() {\n let App = MyApp.create({ autoboot: false });\n\n let sessionId = MyApp.generateSessionID();\n\n let player1 = App.visit(`/matches/join?name=Player+1&session=${sessionId}`, { rootElement: '#left', location: 'none' });\n let player2 = App.visit(`/matches/join?name=Player+2&session=${sessionId}`, { rootElement: '#right', location: 'none' });\n\n Promise.all([player1, player2]).then(() => {\n // Both apps have completed the initial render\n $('#loading').fadeOut();\n });\n});\n```\n\nDo note that each app instance maintains their own registry/container, so\nthey will run in complete isolation by default.\n\n#### Server-Side Rendering (also known as FastBoot)\n\nThis setup allows you to run your Ember app in a server environment using\nNode.js and render its content into static HTML for SEO purposes.\n\n```javascript\nconst HTMLSerializer = new SimpleDOM.HTMLSerializer(SimpleDOM.voidMap);\n\nfunction renderURL(url) {\n let dom = new SimpleDOM.Document();\n let rootElement = dom.body;\n let options = { isBrowser: false, document: dom, rootElement: rootElement };\n\n return MyApp.visit(options).then(instance => {\n try {\n return HTMLSerializer.serialize(rootElement.firstChild);\n } finally {\n instance.destroy();\n }\n });\n}\n```\n\nIn this scenario, because Ember does not have access to a global `document`\nobject in the Node.js environment, you must provide one explicitly. In practice,\nin the non-browser environment, the stand-in `document` object only needs to\nimplement a limited subset of the full DOM API. The `SimpleDOM` library is known\nto work.\n\nSince there is no DOM access in the non-browser environment, you must also\nspecify a DOM `Element` object in the same `document` for the `rootElement` option\n(as opposed to a selector string like `\"body\"`).\n\nSee the documentation on the `isBrowser`, `document` and `rootElement` properties\non `ApplicationInstance.BootOptions` for details.\n\n#### Server-Side Resource Discovery\n\nThis setup allows you to run the routing layer of your Ember app in a server\nenvironment using Node.js and completely disable rendering. This allows you\nto simulate and discover the resources (i.e. AJAX requests) needed to fulfill\na given request and eagerly \"push\" these resources to the client.\n\n```app/initializers/network-service.js\nimport BrowserNetworkService from 'app/services/network/browser';\nimport NodeNetworkService from 'app/services/network/node';\n\n// Inject a (hypothetical) service for abstracting all AJAX calls and use\n// the appropriate implementation on the client/server. This also allows the\n// server to log all the AJAX calls made during a particular request and use\n// that for resource-discovery purpose.\n\nexport function initialize(application) {\n if (window) { // browser\n application.register('service:network', BrowserNetworkService);\n } else { // node\n application.register('service:network', NodeNetworkService);\n }\n};\n\nexport default {\n name: 'network-service',\n initialize: initialize\n};\n```\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\nimport { service } from '@ember/service';\n\n// An example of how the (hypothetical) service is used in routes.\n\nexport default class IndexRoute extends Route {\n @service network;\n\n model(params) {\n return this.network.fetch(`/api/posts/${params.post_id}.json`);\n }\n\n afterModel(post) {\n if (post.isExternalContent) {\n return this.network.fetch(`/api/external/?url=${post.externalURL}`);\n } else {\n return post;\n }\n }\n}\n```\n\n```javascript\n// Finally, put all the pieces together\n\nfunction discoverResourcesFor(url) {\n return MyApp.visit(url, { isBrowser: false, shouldRender: false }).then(instance => {\n let networkService = instance.lookup('service:network');\n return networkService.requests; // => { \"/api/posts/123.json\": \"...\" }\n });\n}\n```",
|
|
14942
15001
|
"access": "public",
|
|
14943
15002
|
"tagname": "",
|
|
@@ -15012,7 +15071,7 @@
|
|
|
15012
15071
|
},
|
|
15013
15072
|
{
|
|
15014
15073
|
"file": "packages/@ember/application/instance.ts",
|
|
15015
|
-
"line":
|
|
15074
|
+
"line": 54,
|
|
15016
15075
|
"description": "The `Application` for which this is an instance.",
|
|
15017
15076
|
"itemtype": "property",
|
|
15018
15077
|
"name": "application",
|
|
@@ -15024,7 +15083,7 @@
|
|
|
15024
15083
|
},
|
|
15025
15084
|
{
|
|
15026
15085
|
"file": "packages/@ember/application/instance.ts",
|
|
15027
|
-
"line":
|
|
15086
|
+
"line": 62,
|
|
15028
15087
|
"description": "The root DOM element of the Application as an element or a\nCSS selector.",
|
|
15029
15088
|
"access": "private",
|
|
15030
15089
|
"tagname": "",
|
|
@@ -15036,7 +15095,7 @@
|
|
|
15036
15095
|
},
|
|
15037
15096
|
{
|
|
15038
15097
|
"file": "packages/@ember/application/instance.ts",
|
|
15039
|
-
"line":
|
|
15098
|
+
"line": 88,
|
|
15040
15099
|
"description": "Overrides the base `EngineInstance._bootSync` method with concerns relevant\nto booting application (instead of engine) instances.\n\nThis method should only contain synchronous boot concerns. Asynchronous\nboot concerns should eventually be moved to the `boot` method, which\nreturns a promise.\n\nUntil all boot code has been made asynchronous, we need to continue to\nexpose this method for use *internally* in places where we need to boot an\ninstance synchronously.",
|
|
15041
15100
|
"access": "private",
|
|
15042
15101
|
"tagname": "",
|
|
@@ -15045,7 +15104,7 @@
|
|
|
15045
15104
|
},
|
|
15046
15105
|
{
|
|
15047
15106
|
"file": "packages/@ember/application/instance.ts",
|
|
15048
|
-
"line":
|
|
15107
|
+
"line": 148,
|
|
15049
15108
|
"description": "This hook is called by the root-most Route (a.k.a. the ApplicationRoute)\nwhen it has finished creating the root View. By default, we simply take the\nview and append it to the `rootElement` specified on the Application.\n\nIn cases like FastBoot and testing, we can override this hook and implement\ncustom behavior, such as serializing to a string and sending over an HTTP\nsocket rather than appending to DOM.",
|
|
15050
15109
|
"params": [
|
|
15051
15110
|
{
|
|
@@ -15062,7 +15121,7 @@
|
|
|
15062
15121
|
},
|
|
15063
15122
|
{
|
|
15064
15123
|
"file": "packages/@ember/application/instance.ts",
|
|
15065
|
-
"line":
|
|
15124
|
+
"line": 165,
|
|
15066
15125
|
"description": "Tells the router to start routing. The router will ask the location for the\ncurrent URL of the page to determine the initial URL to start routing to.\nTo start the app at a specific URL, call `handleURL` instead.",
|
|
15067
15126
|
"access": "private",
|
|
15068
15127
|
"tagname": "",
|
|
@@ -15071,7 +15130,7 @@
|
|
|
15071
15130
|
},
|
|
15072
15131
|
{
|
|
15073
15132
|
"file": "packages/@ember/application/instance.ts",
|
|
15074
|
-
"line":
|
|
15133
|
+
"line": 176,
|
|
15075
15134
|
"description": "Sets up the router, initializing the child router and configuring the\nlocation before routing begins.\n\nBecause setup should only occur once, multiple calls to `setupRouter`\nbeyond the first call have no effect.\n\nThis is commonly used in order to confirm things that rely on the router\nare functioning properly from tests that are primarily rendering related.\n\nFor example, from within [ember-qunit](https://github.com/emberjs/ember-qunit)'s\n`setupRenderingTest` calling `this.owner.setupRouter()` would allow that\nrendering test to confirm that any `<LinkTo></LinkTo>`'s that are rendered\nhave the correct URL.",
|
|
15076
15135
|
"access": "public",
|
|
15077
15136
|
"tagname": "",
|
|
@@ -15080,7 +15139,7 @@
|
|
|
15080
15139
|
},
|
|
15081
15140
|
{
|
|
15082
15141
|
"file": "packages/@ember/application/instance.ts",
|
|
15083
|
-
"line":
|
|
15142
|
+
"line": 197,
|
|
15084
15143
|
"description": "Directs the router to route to a particular URL. This is useful in tests,\nfor example, to tell the app to start at a particular URL.",
|
|
15085
15144
|
"params": [
|
|
15086
15145
|
{
|
|
@@ -15096,7 +15155,7 @@
|
|
|
15096
15155
|
},
|
|
15097
15156
|
{
|
|
15098
15157
|
"file": "packages/@ember/application/instance.ts",
|
|
15099
|
-
"line":
|
|
15158
|
+
"line": 209,
|
|
15100
15159
|
"access": "private",
|
|
15101
15160
|
"tagname": "",
|
|
15102
15161
|
"class": "ApplicationInstance",
|
|
@@ -15104,7 +15163,7 @@
|
|
|
15104
15163
|
},
|
|
15105
15164
|
{
|
|
15106
15165
|
"file": "packages/@ember/application/instance.ts",
|
|
15107
|
-
"line":
|
|
15166
|
+
"line": 231,
|
|
15108
15167
|
"description": "Returns the current URL of the app instance. This is useful when your\napp does not update the browsers URL bar (i.e. it uses the `'none'`\nlocation adapter).",
|
|
15109
15168
|
"access": "public",
|
|
15110
15169
|
"tagname": "",
|
|
@@ -15117,7 +15176,7 @@
|
|
|
15117
15176
|
},
|
|
15118
15177
|
{
|
|
15119
15178
|
"file": "packages/@ember/application/instance.ts",
|
|
15120
|
-
"line":
|
|
15179
|
+
"line": 246,
|
|
15121
15180
|
"description": "Navigate the instance to a particular URL. This is useful in tests, for\nexample, or to tell the app to start at a particular URL. This method\nreturns a promise that resolves with the app instance when the transition\nis complete, or rejects if the transion was aborted due to an error.",
|
|
15122
15181
|
"access": "public",
|
|
15123
15182
|
"tagname": "",
|
|
@@ -15137,7 +15196,7 @@
|
|
|
15137
15196
|
},
|
|
15138
15197
|
{
|
|
15139
15198
|
"file": "packages/@ember/application/instance.ts",
|
|
15140
|
-
"line":
|
|
15199
|
+
"line": 305,
|
|
15141
15200
|
"access": "private",
|
|
15142
15201
|
"tagname": "",
|
|
15143
15202
|
"itemtype": "method",
|
|
@@ -15159,7 +15218,7 @@
|
|
|
15159
15218
|
},
|
|
15160
15219
|
{
|
|
15161
15220
|
"file": "packages/@ember/application/instance.ts",
|
|
15162
|
-
"line":
|
|
15221
|
+
"line": 348,
|
|
15163
15222
|
"description": "Interactive mode: whether we need to set up event delegation and invoke\nlifecycle callbacks on Components.",
|
|
15164
15223
|
"itemtype": "property",
|
|
15165
15224
|
"name": "isInteractive",
|
|
@@ -15173,7 +15232,7 @@
|
|
|
15173
15232
|
},
|
|
15174
15233
|
{
|
|
15175
15234
|
"file": "packages/@ember/application/instance.ts",
|
|
15176
|
-
"line":
|
|
15235
|
+
"line": 359,
|
|
15177
15236
|
"itemtype": "property",
|
|
15178
15237
|
"name": "_renderMode",
|
|
15179
15238
|
"type": "string",
|
|
@@ -15186,7 +15245,7 @@
|
|
|
15186
15245
|
},
|
|
15187
15246
|
{
|
|
15188
15247
|
"file": "packages/@ember/application/instance.ts",
|
|
15189
|
-
"line":
|
|
15248
|
+
"line": 367,
|
|
15190
15249
|
"description": "Run in a full browser environment.\n\nWhen this flag is set to `false`, it will disable most browser-specific\nand interactive features. Specifically:\n\n* It does not use `jQuery` to append the root view; the `rootElement`\n (either specified as a subsequent option or on the application itself)\n must already be an `Element` in the given `document` (as opposed to a\n string selector).\n\n* It does not set up an `EventDispatcher`.\n\n* It does not run any `Component` lifecycle hooks (such as `didInsertElement`).\n\n* It sets the `location` option to `\"none\"`. (If you would like to use\n the location adapter specified in the app's router instead, you can also\n specify `{ location: null }` to specifically opt-out.)",
|
|
15191
15250
|
"itemtype": "property",
|
|
15192
15251
|
"name": "isBrowser",
|
|
@@ -15200,7 +15259,7 @@
|
|
|
15200
15259
|
},
|
|
15201
15260
|
{
|
|
15202
15261
|
"file": "packages/@ember/application/instance.ts",
|
|
15203
|
-
"line":
|
|
15262
|
+
"line": 393,
|
|
15204
15263
|
"description": "If present, overrides the router's `location` property with this\nvalue. This is useful for environments where trying to modify the\nURL would be inappropriate.",
|
|
15205
15264
|
"itemtype": "property",
|
|
15206
15265
|
"name": "location",
|
|
@@ -15214,7 +15273,7 @@
|
|
|
15214
15273
|
},
|
|
15215
15274
|
{
|
|
15216
15275
|
"file": "packages/@ember/application/instance.ts",
|
|
15217
|
-
"line":
|
|
15276
|
+
"line": 405,
|
|
15218
15277
|
"description": "Disable rendering completely.\n\nWhen this flag is set to `false`, it will disable the entire rendering\npipeline. Essentially, this puts the app into \"routing-only\" mode. No\ntemplates will be rendered, and no Components will be created.",
|
|
15219
15278
|
"itemtype": "property",
|
|
15220
15279
|
"name": "shouldRender",
|
|
@@ -15228,7 +15287,7 @@
|
|
|
15228
15287
|
},
|
|
15229
15288
|
{
|
|
15230
15289
|
"file": "packages/@ember/application/instance.ts",
|
|
15231
|
-
"line":
|
|
15290
|
+
"line": 419,
|
|
15232
15291
|
"description": "If present, render into the given `Document` object instead of the\nglobal `window.document` object.\n\nIn practice, this is only useful in non-browser environment or in\nnon-interactive mode, because Ember's `jQuery` dependency is\nimplicitly bound to the current document, causing event delegation\nto not work properly when the app is rendered into a foreign\ndocument object (such as an iframe's `contentDocument`).\n\nIn non-browser mode, this could be a \"`Document`-like\" object as\nEmber only interact with a small subset of the DOM API in non-\ninteractive mode. While the exact requirements have not yet been\nformalized, the `SimpleDOM` library's implementation is known to\nwork.",
|
|
15233
15292
|
"itemtype": "property",
|
|
15234
15293
|
"name": "document",
|
|
@@ -15242,7 +15301,7 @@
|
|
|
15242
15301
|
},
|
|
15243
15302
|
{
|
|
15244
15303
|
"file": "packages/@ember/application/instance.ts",
|
|
15245
|
-
"line":
|
|
15304
|
+
"line": 442,
|
|
15246
15305
|
"description": "If present, overrides the application's `rootElement` property on\nthe instance. This is useful for testing environment, where you\nmight want to append the root view to a fixture area.\n\nIn non-browser mode, because Ember does not have access to jQuery,\nthis options must be specified as a DOM `Element` object instead of\na selector string.\n\nSee the documentation on `Application`'s `rootElement` for\ndetails.",
|
|
15247
15306
|
"itemtype": "property",
|
|
15248
15307
|
"name": "rootElement",
|
|
@@ -15256,7 +15315,7 @@
|
|
|
15256
15315
|
},
|
|
15257
15316
|
{
|
|
15258
15317
|
"file": "packages/@ember/canary-features/index.ts",
|
|
15259
|
-
"line":
|
|
15318
|
+
"line": 32,
|
|
15260
15319
|
"description": "Determine whether the specified `feature` is enabled. Used by Ember's\nbuild tools to exclude experimental features from beta/stable builds.\n\nYou can define the following configuration options:\n\n* `EmberENV.ENABLE_OPTIONAL_FEATURES` - enable any features that have not been explicitly\n enabled/disabled.",
|
|
15261
15320
|
"itemtype": "method",
|
|
15262
15321
|
"name": "isEnabled",
|
|
@@ -15304,7 +15363,7 @@
|
|
|
15304
15363
|
},
|
|
15305
15364
|
{
|
|
15306
15365
|
"file": "packages/@ember/controller/lib/controller_mixin.d.ts",
|
|
15307
|
-
"line":
|
|
15366
|
+
"line": 11,
|
|
15308
15367
|
"class": "Ember.ControllerMixin",
|
|
15309
15368
|
"module": "@ember/component/template-only"
|
|
15310
15369
|
},
|
|
@@ -15507,7 +15566,7 @@
|
|
|
15507
15566
|
},
|
|
15508
15567
|
{
|
|
15509
15568
|
"file": "packages/@ember/debug/index.ts",
|
|
15510
|
-
"line":
|
|
15569
|
+
"line": 134,
|
|
15511
15570
|
"description": "Verify that a certain expectation is met, or throw a exception otherwise.\n\nThis is useful for communicating assumptions in the code to other human\nreaders as well as catching bugs that accidentally violates these\nexpectations.\n\nAssertions are removed from production builds, so they can be freely added\nfor documentation and debugging purposes without worries of incuring any\nperformance penalty. However, because of that, they should not be used for\nchecks that could reasonably fail during normal usage. Furthermore, care\nshould be taken to avoid accidentally relying on side-effects produced from\nevaluating the condition itself, since the code will not run in production.\n\n```javascript\nimport { assert } from '@ember/debug';\n\n// Test for truthiness\nassert('Must pass a string', typeof str === 'string');\n\n// Fail unconditionally\nassert('This code path should never be run');\n```",
|
|
15512
15571
|
"itemtype": "method",
|
|
15513
15572
|
"name": "assert",
|
|
@@ -15532,7 +15591,7 @@
|
|
|
15532
15591
|
},
|
|
15533
15592
|
{
|
|
15534
15593
|
"file": "packages/@ember/debug/index.ts",
|
|
15535
|
-
"line":
|
|
15594
|
+
"line": 174,
|
|
15536
15595
|
"description": "Display a debug notice.\n\nCalls to this function are not invoked in production builds.\n\n```javascript\nimport { debug } from '@ember/debug';\n\ndebug('I\\'m a debug notice!');\n```",
|
|
15537
15596
|
"itemtype": "method",
|
|
15538
15597
|
"name": "debug",
|
|
@@ -15551,7 +15610,7 @@
|
|
|
15551
15610
|
},
|
|
15552
15611
|
{
|
|
15553
15612
|
"file": "packages/@ember/debug/index.ts",
|
|
15554
|
-
"line":
|
|
15613
|
+
"line": 201,
|
|
15555
15614
|
"description": "Display an info notice.\n\nCalls to this function are removed from production builds, so they can be\nfreely added for documentation and debugging purposes without worries of\nincuring any performance penalty.",
|
|
15556
15615
|
"itemtype": "method",
|
|
15557
15616
|
"name": "info",
|
|
@@ -15562,7 +15621,7 @@
|
|
|
15562
15621
|
},
|
|
15563
15622
|
{
|
|
15564
15623
|
"file": "packages/@ember/debug/index.ts",
|
|
15565
|
-
"line":
|
|
15624
|
+
"line": 220,
|
|
15566
15625
|
"description": "Alias an old, deprecated method with its new counterpart.\n\nDisplay a deprecation warning with the provided message and a stack trace\n(Chrome and Firefox only) when the assigned method is called.\n\nCalls to this function are removed from production builds, so they can be\nfreely added for documentation and debugging purposes without worries of\nincuring any performance penalty.\n\n```javascript\nimport { deprecateFunc } from '@ember/debug';\n\nEmber.oldMethod = deprecateFunc('Please use the new, updated method', options, Ember.newMethod);\n```",
|
|
15567
15626
|
"itemtype": "method",
|
|
15568
15627
|
"name": "deprecateFunc",
|
|
@@ -15596,7 +15655,7 @@
|
|
|
15596
15655
|
},
|
|
15597
15656
|
{
|
|
15598
15657
|
"file": "packages/@ember/debug/index.ts",
|
|
15599
|
-
"line":
|
|
15658
|
+
"line": 265,
|
|
15600
15659
|
"description": "Run a function meant for debugging.\n\nCalls to this function are removed from production builds, so they can be\nfreely added for documentation and debugging purposes without worries of\nincuring any performance penalty.\n\n```javascript\nimport Component from '@ember/component';\nimport { runInDebug } from '@ember/debug';\n\nrunInDebug(() => {\n Component.reopen({\n didInsertElement() {\n console.log(\"I'm happy\");\n }\n });\n});\n```",
|
|
15601
15660
|
"itemtype": "method",
|
|
15602
15661
|
"name": "runInDebug",
|
|
@@ -15781,7 +15840,7 @@
|
|
|
15781
15840
|
},
|
|
15782
15841
|
{
|
|
15783
15842
|
"file": "packages/@ember/engine/lib/engine-parent.ts",
|
|
15784
|
-
"line":
|
|
15843
|
+
"line": 8,
|
|
15785
15844
|
"description": "`getEngineParent` retrieves an engine instance's parent instance.",
|
|
15786
15845
|
"itemtype": "method",
|
|
15787
15846
|
"name": "getEngineParent",
|
|
@@ -15804,7 +15863,7 @@
|
|
|
15804
15863
|
},
|
|
15805
15864
|
{
|
|
15806
15865
|
"file": "packages/@ember/engine/lib/engine-parent.ts",
|
|
15807
|
-
"line":
|
|
15866
|
+
"line": 22,
|
|
15808
15867
|
"description": "`setEngineParent` sets an engine instance's parent instance.",
|
|
15809
15868
|
"itemtype": "method",
|
|
15810
15869
|
"name": "setEngineParent",
|
|
@@ -16045,7 +16104,7 @@
|
|
|
16045
16104
|
},
|
|
16046
16105
|
{
|
|
16047
16106
|
"file": "packages/@ember/engine/instance.ts",
|
|
16048
|
-
"line":
|
|
16107
|
+
"line": 86,
|
|
16049
16108
|
"description": "Initialize the `EngineInstance` and return a promise that resolves\nwith the instance itself when the boot process is complete.\n\nThe primary task here is to run any registered instance initializers.\n\nSee the documentation on `BootOptions` for the options it takes.",
|
|
16050
16109
|
"access": "public",
|
|
16051
16110
|
"tagname": "",
|
|
@@ -16067,7 +16126,7 @@
|
|
|
16067
16126
|
},
|
|
16068
16127
|
{
|
|
16069
16128
|
"file": "packages/@ember/engine/instance.ts",
|
|
16070
|
-
"line":
|
|
16129
|
+
"line": 111,
|
|
16071
16130
|
"description": "Unfortunately, a lot of existing code assumes booting an instance is\nsynchronous – specifically, a lot of tests assume the last call to\n`app.advanceReadiness()` or `app.reset()` will result in a new instance\nbeing fully-booted when the current runloop completes.\n\nWe would like new code (like the `visit` API) to stop making this\nassumption, so we created the asynchronous version above that returns a\npromise. But until we have migrated all the code, we would have to expose\nthis method for use *internally* in places where we need to boot an instance\nsynchronously.",
|
|
16072
16131
|
"access": "private",
|
|
16073
16132
|
"tagname": "",
|
|
@@ -16076,7 +16135,7 @@
|
|
|
16076
16135
|
},
|
|
16077
16136
|
{
|
|
16078
16137
|
"file": "packages/@ember/engine/instance.ts",
|
|
16079
|
-
"line":
|
|
16138
|
+
"line": 152,
|
|
16080
16139
|
"description": "Unregister a factory.\n\nOverrides `RegistryProxy#unregister` in order to clear any cached instances\nof the unregistered factory.",
|
|
16081
16140
|
"access": "public",
|
|
16082
16141
|
"tagname": "",
|
|
@@ -16094,7 +16153,7 @@
|
|
|
16094
16153
|
},
|
|
16095
16154
|
{
|
|
16096
16155
|
"file": "packages/@ember/engine/instance.ts",
|
|
16097
|
-
"line":
|
|
16156
|
+
"line": 169,
|
|
16098
16157
|
"description": "Build a new `EngineInstance` that's a child of this instance.\n\nEngines must be registered by name with their parent engine\n(or application).",
|
|
16099
16158
|
"access": "private",
|
|
16100
16159
|
"tagname": "",
|
|
@@ -16121,7 +16180,7 @@
|
|
|
16121
16180
|
},
|
|
16122
16181
|
{
|
|
16123
16182
|
"file": "packages/@ember/engine/instance.ts",
|
|
16124
|
-
"line":
|
|
16183
|
+
"line": 199,
|
|
16125
16184
|
"description": "Clone dependencies shared between an engine instance and its parent.",
|
|
16126
16185
|
"access": "private",
|
|
16127
16186
|
"tagname": "",
|
|
@@ -17259,9 +17318,24 @@
|
|
|
17259
17318
|
"class": "@ember/polyfills",
|
|
17260
17319
|
"module": "@ember/polyfills"
|
|
17261
17320
|
},
|
|
17321
|
+
{
|
|
17322
|
+
"file": "packages/@ember/renderer/index.ts",
|
|
17323
|
+
"line": 11,
|
|
17324
|
+
"description": "Returns a promise which will resolve when rendering has completed. In\nthis context, rendering is completed when all auto-tracked state that is\nconsumed in the template (including any tracked state in models, services,\n etc. that are then used in a template) has been updated in the DOM.\n\n For example, in a test you might want to update some tracked state and\n then run some assertions after rendering has completed. You _could_ use\n `await settled()` in that location, but in some contexts you don't want to\n wait for full settledness (which includes test waiters, pending AJAX/fetch,\n run loops, etc) but instead only want to know when that updated value has\n been rendered in the DOM. **THAT** is what `await rerender()` is _perfect_\n for.",
|
|
17325
|
+
"itemtype": "method",
|
|
17326
|
+
"name": "renderSettled",
|
|
17327
|
+
"return": {
|
|
17328
|
+
"description": "a promise which fulfills when rendering has completed",
|
|
17329
|
+
"type": "Promise<void>"
|
|
17330
|
+
},
|
|
17331
|
+
"access": "public",
|
|
17332
|
+
"tagname": "",
|
|
17333
|
+
"class": "Renderer",
|
|
17334
|
+
"module": "@ember/renderer"
|
|
17335
|
+
},
|
|
17262
17336
|
{
|
|
17263
17337
|
"file": "packages/@ember/runloop/index.ts",
|
|
17264
|
-
"line":
|
|
17338
|
+
"line": 61,
|
|
17265
17339
|
"description": "Array of named queues. This array determines the order in which queues\nare flushed at the end of the RunLoop. You can define your own queues by\nsimply adding the queue name to this array. Normally you should not need\nto inspect or modify this property.",
|
|
17266
17340
|
"itemtype": "property",
|
|
17267
17341
|
"name": "queues",
|
|
@@ -17270,11 +17344,11 @@
|
|
|
17270
17344
|
"access": "private",
|
|
17271
17345
|
"tagname": "",
|
|
17272
17346
|
"class": "@ember/runloop",
|
|
17273
|
-
"module": "@ember/
|
|
17347
|
+
"module": "@ember/renderer"
|
|
17274
17348
|
},
|
|
17275
17349
|
{
|
|
17276
17350
|
"file": "packages/@ember/runloop/index.ts",
|
|
17277
|
-
"line":
|
|
17351
|
+
"line": 104,
|
|
17278
17352
|
"description": "Runs the passed target and method inside of a RunLoop, ensuring any\ndeferred actions including bindings and views updates are flushed at the\nend.\n\nNormally you should not need to invoke this method yourself. However if\nyou are implementing raw event handlers when interfacing with other\nlibraries or plugins, you should probably wrap all of your code inside this\ncall.\n\n```javascript\nimport { run } from '@ember/runloop';\n\nrun(function() {\n // code to be executed within a RunLoop\n});\n```",
|
|
17279
17353
|
"itemtype": "method",
|
|
17280
17354
|
"name": "run",
|
|
@@ -17309,7 +17383,7 @@
|
|
|
17309
17383
|
},
|
|
17310
17384
|
{
|
|
17311
17385
|
"file": "packages/@ember/runloop/index.ts",
|
|
17312
|
-
"line":
|
|
17386
|
+
"line": 149,
|
|
17313
17387
|
"description": "If no run-loop is present, it creates a new one. If a run loop is\npresent it will queue itself to run on the existing run-loops action\nqueue.\n\nPlease note: This is not for normal usage, and should be used sparingly.\n\nIf invoked when not within a run loop:\n\n```javascript\nimport { join } from '@ember/runloop';\n\njoin(function() {\n // creates a new run-loop\n});\n```\n\nAlternatively, if called within an existing run loop:\n\n```javascript\nimport { run, join } from '@ember/runloop';\n\nrun(function() {\n // creates a new run-loop\n\n join(function() {\n // joins with the existing run-loop, and queues for invocation on\n // the existing run-loops action queue.\n });\n});\n```",
|
|
17314
17388
|
"itemtype": "method",
|
|
17315
17389
|
"name": "join",
|
|
@@ -17344,7 +17418,7 @@
|
|
|
17344
17418
|
},
|
|
17345
17419
|
{
|
|
17346
17420
|
"file": "packages/@ember/runloop/index.ts",
|
|
17347
|
-
"line":
|
|
17421
|
+
"line": 208,
|
|
17348
17422
|
"description": "Allows you to specify which context to call the specified function in while\nadding the execution of that function to the Ember run loop. This ability\nmakes this method a great way to asynchronously integrate third-party libraries\ninto your Ember application.\n\n`bind` takes two main arguments, the desired context and the function to\ninvoke in that context. Any additional arguments will be supplied as arguments\nto the function that is passed in.\n\nLet's use the creation of a TinyMCE component as an example. Currently,\nTinyMCE provides a setup configuration option we can use to do some processing\nafter the TinyMCE instance is initialized but before it is actually rendered.\nWe can use that setup option to do some additional setup for our component.\nThe component itself could look something like the following:\n\n```app/components/rich-text-editor.js\nimport Component from '@ember/component';\nimport { on } from '@ember/object/evented';\nimport { bind } from '@ember/runloop';\n\nexport default Component.extend({\n initializeTinyMCE: on('didInsertElement', function() {\n tinymce.init({\n selector: '#' + this.$().prop('id'),\n setup: bind(this, this.setupEditor)\n });\n }),\n\n didInsertElement() {\n tinymce.init({\n selector: '#' + this.$().prop('id'),\n setup: bind(this, this.setupEditor)\n });\n }\n\n setupEditor(editor) {\n this.set('editor', editor);\n\n editor.on('change', function() {\n console.log('content changed!');\n });\n }\n});\n```\n\nIn this example, we use `bind` to bind the setupEditor method to the\ncontext of the RichTextEditor component and to have the invocation of that\nmethod be safely handled and executed by the Ember run loop.",
|
|
17349
17423
|
"itemtype": "method",
|
|
17350
17424
|
"name": "bind",
|
|
@@ -17380,7 +17454,7 @@
|
|
|
17380
17454
|
},
|
|
17381
17455
|
{
|
|
17382
17456
|
"file": "packages/@ember/runloop/index.ts",
|
|
17383
|
-
"line":
|
|
17457
|
+
"line": 322,
|
|
17384
17458
|
"description": "Begins a new RunLoop. Any deferred actions invoked after the begin will\nbe buffered until you invoke a matching call to `end()`. This is\na lower-level way to use a RunLoop instead of using `run()`.\n\n```javascript\nimport { begin, end } from '@ember/runloop';\n\nbegin();\n// code to be executed within a RunLoop\nend();\n```",
|
|
17385
17459
|
"itemtype": "method",
|
|
17386
17460
|
"name": "begin",
|
|
@@ -17396,7 +17470,7 @@
|
|
|
17396
17470
|
},
|
|
17397
17471
|
{
|
|
17398
17472
|
"file": "packages/@ember/runloop/index.ts",
|
|
17399
|
-
"line":
|
|
17473
|
+
"line": 345,
|
|
17400
17474
|
"description": "Ends a RunLoop. This must be called sometime after you call\n`begin()` to flush any deferred actions. This is a lower-level way\nto use a RunLoop instead of using `run()`.\n\n```javascript\nimport { begin, end } from '@ember/runloop';\n\nbegin();\n// code to be executed within a RunLoop\nend();\n```",
|
|
17401
17475
|
"itemtype": "method",
|
|
17402
17476
|
"name": "end",
|
|
@@ -17412,7 +17486,7 @@
|
|
|
17412
17486
|
},
|
|
17413
17487
|
{
|
|
17414
17488
|
"file": "packages/@ember/runloop/index.ts",
|
|
17415
|
-
"line":
|
|
17489
|
+
"line": 368,
|
|
17416
17490
|
"description": "Adds the passed target/method and any optional arguments to the named\nqueue to be executed at the end of the RunLoop. If you have not already\nstarted a RunLoop when calling this method one will be started for you\nautomatically.\n\nAt the end of a RunLoop, any methods scheduled in this way will be invoked.\nMethods will be invoked in an order matching the named queues defined in\nthe `queues` property.\n\n```javascript\nimport { schedule } from '@ember/runloop';\n\nschedule('afterRender', this, function() {\n // this will be executed in the 'afterRender' queue\n console.log('scheduled on afterRender queue');\n});\n\nschedule('actions', this, function() {\n // this will be executed in the 'actions' queue\n console.log('scheduled on actions queue');\n});\n\n// Note the functions will be run in order based on the run queues order.\n// Output would be:\n// scheduled on actions queue\n// scheduled on afterRender queue\n```",
|
|
17417
17491
|
"itemtype": "method",
|
|
17418
17492
|
"name": "schedule",
|
|
@@ -17452,7 +17526,7 @@
|
|
|
17452
17526
|
},
|
|
17453
17527
|
{
|
|
17454
17528
|
"file": "packages/@ember/runloop/index.ts",
|
|
17455
|
-
"line":
|
|
17529
|
+
"line": 441,
|
|
17456
17530
|
"description": "Invokes the passed target/method and optional arguments after a specified\nperiod of time. The last parameter of this method must always be a number\nof milliseconds.\n\nYou should use this method whenever you need to run some action after a\nperiod of time instead of using `setTimeout()`. This method will ensure that\nitems that expire during the same script execution cycle all execute\ntogether, which is often more efficient than using a real setTimeout.\n\n```javascript\nimport { later } from '@ember/runloop';\n\nlater(myContext, function() {\n // code here will execute within a RunLoop in about 500ms with this == myContext\n}, 500);\n```",
|
|
17457
17531
|
"itemtype": "method",
|
|
17458
17532
|
"name": "later",
|
|
@@ -17492,7 +17566,7 @@
|
|
|
17492
17566
|
},
|
|
17493
17567
|
{
|
|
17494
17568
|
"file": "packages/@ember/runloop/index.ts",
|
|
17495
|
-
"line":
|
|
17569
|
+
"line": 489,
|
|
17496
17570
|
"description": "Schedule a function to run one time during the current RunLoop. This is equivalent\n to calling `scheduleOnce` with the \"actions\" queue.",
|
|
17497
17571
|
"itemtype": "method",
|
|
17498
17572
|
"name": "once",
|
|
@@ -17527,7 +17601,7 @@
|
|
|
17527
17601
|
},
|
|
17528
17602
|
{
|
|
17529
17603
|
"file": "packages/@ember/runloop/index.ts",
|
|
17530
|
-
"line":
|
|
17604
|
+
"line": 520,
|
|
17531
17605
|
"description": "Schedules a function to run one time in a given queue of the current RunLoop.\nCalling this method with the same queue/target/method combination will have\nno effect (past the initial call).\n\nNote that although you can pass optional arguments these will not be\nconsidered when looking for duplicates. New arguments will replace previous\ncalls.\n\n```javascript\nimport { run, scheduleOnce } from '@ember/runloop';\n\nfunction sayHi() {\n console.log('hi');\n}\n\nrun(function() {\n scheduleOnce('afterRender', myContext, sayHi);\n scheduleOnce('afterRender', myContext, sayHi);\n // sayHi will only be executed once, in the afterRender queue of the RunLoop\n});\n```\n\nAlso note that for `scheduleOnce` to prevent additional calls, you need to\npass the same function instance. The following case works as expected:\n\n```javascript\nfunction log() {\n console.log('Logging only once');\n}\n\nfunction scheduleIt() {\n scheduleOnce('actions', myContext, log);\n}\n\nscheduleIt();\nscheduleIt();\n```\n\nBut this other case will schedule the function multiple times:\n\n```javascript\nimport { scheduleOnce } from '@ember/runloop';\n\nfunction scheduleIt() {\n scheduleOnce('actions', myContext, function() {\n console.log('Closure');\n });\n}\n\nscheduleIt();\nscheduleIt();\n\n// \"Closure\" will print twice, even though we're using `scheduleOnce`,\n// because the function we pass to it won't match the\n// previously scheduled operation.\n```\n\nAvailable queues, and their order, can be found at `queues`",
|
|
17532
17606
|
"itemtype": "method",
|
|
17533
17607
|
"name": "scheduleOnce",
|
|
@@ -17568,7 +17642,7 @@
|
|
|
17568
17642
|
},
|
|
17569
17643
|
{
|
|
17570
17644
|
"file": "packages/@ember/runloop/index.ts",
|
|
17571
|
-
"line":
|
|
17645
|
+
"line": 614,
|
|
17572
17646
|
"description": "Schedules an item to run from within a separate run loop, after\ncontrol has been returned to the system. This is equivalent to calling\n`later` with a wait time of 1ms.\n\n```javascript\nimport { next } from '@ember/runloop';\n\nnext(myContext, function() {\n // code to be executed in the next run loop,\n // which will be scheduled after the current one\n});\n```\n\nMultiple operations scheduled with `next` will coalesce\ninto the same later run loop, along with any other operations\nscheduled by `later` that expire right around the same\ntime that `next` operations will fire.\n\nNote that there are often alternatives to using `next`.\nFor instance, if you'd like to schedule an operation to happen\nafter all DOM element operations have completed within the current\nrun loop, you can make use of the `afterRender` run loop queue (added\nby the `ember-views` package, along with the preceding `render` queue\nwhere all the DOM element operations happen).\n\nExample:\n\n```app/components/my-component.js\nimport Component from '@ember/component';\nimport { scheduleOnce } from '@ember/runloop';\n\nexport Component.extend({\n didInsertElement() {\n this._super(...arguments);\n scheduleOnce('afterRender', this, 'processChildElements');\n },\n\n processChildElements() {\n // ... do something with component's child component\n // elements after they've finished rendering, which\n // can't be done within this component's\n // `didInsertElement` hook because that gets run\n // before the child elements have been added to the DOM.\n }\n});\n```\n\nOne benefit of the above approach compared to using `next` is\nthat you will be able to perform DOM/CSS operations before unprocessed\nelements are rendered to the screen, which may prevent flickering or\nother artifacts caused by delaying processing until after rendering.\n\nThe other major benefit to the above approach is that `next`\nintroduces an element of non-determinism, which can make things much\nharder to test, due to its reliance on `setTimeout`; it's much harder\nto guarantee the order of scheduled operations when they are scheduled\noutside of the current run loop, i.e. with `next`.",
|
|
17573
17647
|
"itemtype": "method",
|
|
17574
17648
|
"name": "next",
|
|
@@ -17603,7 +17677,7 @@
|
|
|
17603
17677
|
},
|
|
17604
17678
|
{
|
|
17605
17679
|
"file": "packages/@ember/runloop/index.ts",
|
|
17606
|
-
"line":
|
|
17680
|
+
"line": 699,
|
|
17607
17681
|
"description": "Cancels a scheduled item. Must be a value returned by `later()`,\n`once()`, `scheduleOnce()`, `next()`, `debounce()`, or\n`throttle()`.\n\n```javascript\nimport {\n next,\n cancel,\n later,\n scheduleOnce,\n once,\n throttle,\n debounce\n} from '@ember/runloop';\n\nlet runNext = next(myContext, function() {\n // will not be executed\n});\n\ncancel(runNext);\n\nlet runLater = later(myContext, function() {\n // will not be executed\n}, 500);\n\ncancel(runLater);\n\nlet runScheduleOnce = scheduleOnce('afterRender', myContext, function() {\n // will not be executed\n});\n\ncancel(runScheduleOnce);\n\nlet runOnce = once(myContext, function() {\n // will not be executed\n});\n\ncancel(runOnce);\n\nlet throttle = throttle(myContext, function() {\n // will not be executed\n}, 1, false);\n\ncancel(throttle);\n\nlet debounce = debounce(myContext, function() {\n // will not be executed\n}, 1);\n\ncancel(debounce);\n\nlet debounceImmediate = debounce(myContext, function() {\n // will be executed since we passed in true (immediate)\n}, 100, true);\n\n// the 100ms delay until this method can be called again will be canceled\ncancel(debounceImmediate);\n```",
|
|
17608
17682
|
"itemtype": "method",
|
|
17609
17683
|
"name": "cancel",
|
|
@@ -17626,7 +17700,7 @@
|
|
|
17626
17700
|
},
|
|
17627
17701
|
{
|
|
17628
17702
|
"file": "packages/@ember/runloop/index.ts",
|
|
17629
|
-
"line":
|
|
17703
|
+
"line": 770,
|
|
17630
17704
|
"description": "Delay calling the target method until the debounce period has elapsed\nwith no additional debounce calls. If `debounce` is called again before\nthe specified time has elapsed, the timer is reset and the entire period\nmust pass again before the target method is called.\n\nThis method should be used when an event may be called multiple times\nbut the action should only be called once when the event is done firing.\nA common example is for scroll events where you only want updates to\nhappen once scrolling has ceased.\n\n```javascript\nimport { debounce } from '@ember/runloop';\n\nfunction whoRan() {\n console.log(this.name + ' ran.');\n}\n\nlet myContext = { name: 'debounce' };\n\ndebounce(myContext, whoRan, 150);\n\n// less than 150ms passes\ndebounce(myContext, whoRan, 150);\n\n// 150ms passes\n// whoRan is invoked with context myContext\n// console logs 'debounce ran.' one time.\n```\n\nImmediate allows you to run the function immediately, but debounce\nother calls for this function until the wait time has elapsed. If\n`debounce` is called again before the specified time has elapsed,\nthe timer is reset and the entire period must pass again before\nthe method can be called again.\n\n```javascript\nimport { debounce } from '@ember/runloop';\n\nfunction whoRan() {\n console.log(this.name + ' ran.');\n}\n\nlet myContext = { name: 'debounce' };\n\ndebounce(myContext, whoRan, 150, true);\n\n// console logs 'debounce ran.' one time immediately.\n// 100ms passes\ndebounce(myContext, whoRan, 150, true);\n\n// 150ms passes and nothing else is logged to the console and\n// the debouncee is no longer being watched\ndebounce(myContext, whoRan, 150, true);\n\n// console logs 'debounce ran.' one time immediately.\n// 150ms passes and nothing else is logged to the console and\n// the debouncee is no longer being watched\n```",
|
|
17631
17705
|
"itemtype": "method",
|
|
17632
17706
|
"name": "debounce",
|
|
@@ -17671,7 +17745,7 @@
|
|
|
17671
17745
|
},
|
|
17672
17746
|
{
|
|
17673
17747
|
"file": "packages/@ember/runloop/index.ts",
|
|
17674
|
-
"line":
|
|
17748
|
+
"line": 867,
|
|
17675
17749
|
"description": "Ensure that the target method is never called more frequently than\nthe specified spacing period. The target method is called immediately.\n\n```javascript\nimport { throttle } from '@ember/runloop';\n\nfunction whoRan() {\n console.log(this.name + ' ran.');\n}\n\nlet myContext = { name: 'throttle' };\n\nthrottle(myContext, whoRan, 150);\n// whoRan is invoked with context myContext\n// console logs 'throttle ran.'\n\n// 50ms passes\nthrottle(myContext, whoRan, 150);\n\n// 50ms passes\nthrottle(myContext, whoRan, 150);\n\n// 150ms passes\nthrottle(myContext, whoRan, 150);\n// whoRan is invoked with context myContext\n// console logs 'throttle ran.'\n```",
|
|
17676
17750
|
"itemtype": "method",
|
|
17677
17751
|
"name": "throttle",
|
|
@@ -18416,15 +18490,15 @@
|
|
|
18416
18490
|
},
|
|
18417
18491
|
{
|
|
18418
18492
|
"message": "unknown tag: internal",
|
|
18419
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18493
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:604"
|
|
18420
18494
|
},
|
|
18421
18495
|
{
|
|
18422
18496
|
"message": "unknown tag: internal",
|
|
18423
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18497
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:627"
|
|
18424
18498
|
},
|
|
18425
18499
|
{
|
|
18426
18500
|
"message": "unknown tag: internal",
|
|
18427
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18501
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:648"
|
|
18428
18502
|
},
|
|
18429
18503
|
{
|
|
18430
18504
|
"message": "unknown tag: decorator",
|
|
@@ -18440,7 +18514,7 @@
|
|
|
18440
18514
|
},
|
|
18441
18515
|
{
|
|
18442
18516
|
"message": "replacing incorrect tag: returns with return",
|
|
18443
|
-
"line": " packages/@ember/-internals/routing/lib/system/route.ts:
|
|
18517
|
+
"line": " packages/@ember/-internals/routing/lib/system/route.ts:2437"
|
|
18444
18518
|
},
|
|
18445
18519
|
{
|
|
18446
18520
|
"message": "replacing incorrect tag: function with method",
|
|
@@ -18462,6 +18536,10 @@
|
|
|
18462
18536
|
"message": "replacing incorrect tag: returns with return",
|
|
18463
18537
|
"line": " packages/@ember/helper/index.ts:251"
|
|
18464
18538
|
},
|
|
18539
|
+
{
|
|
18540
|
+
"message": "replacing incorrect tag: returns with return",
|
|
18541
|
+
"line": " packages/@ember/renderer/index.ts:11"
|
|
18542
|
+
},
|
|
18465
18543
|
{
|
|
18466
18544
|
"message": "Missing item type\nThis is deprecated in favor of explicit injection of dependencies.\n\nReference: https://deprecations.emberjs.com/v3.x#toc_implicit-injections\n```\n\n@private\n@method injection\n@param {String} factoryName\n@param {String} property\n@param {String} injectionName\n@deprecated",
|
|
18467
18545
|
"line": " packages/@ember/-internals/container/lib/registry.ts:440"
|
|
@@ -18536,7 +18614,7 @@
|
|
|
18536
18614
|
},
|
|
18537
18615
|
{
|
|
18538
18616
|
"message": "Missing item type",
|
|
18539
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
18617
|
+
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:298"
|
|
18540
18618
|
},
|
|
18541
18619
|
{
|
|
18542
18620
|
"message": "Missing item type\nThe template-compiler does not support strict mode at this time.\nprecompile from ember-template-compiler returns a string and\nnot a template-factory, so it doesn't help with strict-mode testing.\n\nWe also can't import from `@ember/template-compiler` because it\ndoesn't exist to this kind of test, otherwise we'd be able to use\nprecompileTemplate, which would be perfect :D\n\nCopied(ish) from https://github.com/NullVoxPopuli/ember-repl/blob/main/addon/hbs.ts#L51",
|
|
@@ -18704,55 +18782,55 @@
|
|
|
18704
18782
|
},
|
|
18705
18783
|
{
|
|
18706
18784
|
"message": "Missing item type",
|
|
18707
|
-
"line": " packages/@ember/-internals/metal/lib/computed.ts:
|
|
18785
|
+
"line": " packages/@ember/-internals/metal/lib/computed.ts:713"
|
|
18708
18786
|
},
|
|
18709
18787
|
{
|
|
18710
18788
|
"message": "Missing item type",
|
|
18711
|
-
"line": " packages/@ember/-internals/metal/lib/computed.ts:
|
|
18789
|
+
"line": " packages/@ember/-internals/metal/lib/computed.ts:719"
|
|
18712
18790
|
},
|
|
18713
18791
|
{
|
|
18714
18792
|
"message": "Missing item type",
|
|
18715
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18793
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:528"
|
|
18716
18794
|
},
|
|
18717
18795
|
{
|
|
18718
18796
|
"message": "Missing item type",
|
|
18719
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18797
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:531"
|
|
18720
18798
|
},
|
|
18721
18799
|
{
|
|
18722
18800
|
"message": "Missing item type",
|
|
18723
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18801
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:534"
|
|
18724
18802
|
},
|
|
18725
18803
|
{
|
|
18726
18804
|
"message": "Missing item type",
|
|
18727
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18805
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:537"
|
|
18728
18806
|
},
|
|
18729
18807
|
{
|
|
18730
18808
|
"message": "Missing item type",
|
|
18731
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18809
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:540"
|
|
18732
18810
|
},
|
|
18733
18811
|
{
|
|
18734
18812
|
"message": "Missing item type",
|
|
18735
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18813
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:545"
|
|
18736
18814
|
},
|
|
18737
18815
|
{
|
|
18738
18816
|
"message": "Missing item type",
|
|
18739
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18817
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:586"
|
|
18740
18818
|
},
|
|
18741
18819
|
{
|
|
18742
18820
|
"message": "Missing item type",
|
|
18743
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18821
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:643"
|
|
18744
18822
|
},
|
|
18745
18823
|
{
|
|
18746
18824
|
"message": "Missing item type",
|
|
18747
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18825
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:669"
|
|
18748
18826
|
},
|
|
18749
18827
|
{
|
|
18750
18828
|
"message": "Missing item type",
|
|
18751
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18829
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:676"
|
|
18752
18830
|
},
|
|
18753
18831
|
{
|
|
18754
18832
|
"message": "Missing item type",
|
|
18755
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18833
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:681"
|
|
18756
18834
|
},
|
|
18757
18835
|
{
|
|
18758
18836
|
"message": "Missing item type\nPrimarily used for cases where we are redefining a class, e.g. mixins/reopen\nbeing applied later. Revalidates all the observers, resetting their tags.",
|
|
@@ -18764,15 +18842,15 @@
|
|
|
18764
18842
|
},
|
|
18765
18843
|
{
|
|
18766
18844
|
"message": "Missing item type",
|
|
18767
|
-
"line": " packages/@ember/-internals/routing/lib/location/auto_location.ts:
|
|
18845
|
+
"line": " packages/@ember/-internals/routing/lib/location/auto_location.ts:77"
|
|
18768
18846
|
},
|
|
18769
18847
|
{
|
|
18770
18848
|
"message": "Missing item type\nCalled by the router to instruct the location to do any feature detection\nnecessary. In the case of AutoLocation, we detect whether to use history\nor hash concrete implementations.",
|
|
18771
|
-
"line": " packages/@ember/-internals/routing/lib/location/auto_location.ts:
|
|
18849
|
+
"line": " packages/@ember/-internals/routing/lib/location/auto_location.ts:155"
|
|
18772
18850
|
},
|
|
18773
18851
|
{
|
|
18774
18852
|
"message": "Missing item type",
|
|
18775
|
-
"line": " packages/@ember/-internals/routing/lib/location/auto_location.ts:
|
|
18853
|
+
"line": " packages/@ember/-internals/routing/lib/location/auto_location.ts:308"
|
|
18776
18854
|
},
|
|
18777
18855
|
{
|
|
18778
18856
|
"message": "Missing item type",
|
|
@@ -18792,95 +18870,131 @@
|
|
|
18792
18870
|
},
|
|
18793
18871
|
{
|
|
18794
18872
|
"message": "Missing item type\nFinds the name of the substate route if it exists for the given route. A\nsubstate route is of the form `route_state`, such as `foo_loading`.",
|
|
18795
|
-
"line": " packages/@ember/-internals/routing/lib/system/router.ts:
|
|
18873
|
+
"line": " packages/@ember/-internals/routing/lib/system/router.ts:1650"
|
|
18796
18874
|
},
|
|
18797
18875
|
{
|
|
18798
18876
|
"message": "Missing item type\nFinds the name of the state route if it exists for the given route. A state\nroute is of the form `route.state`, such as `foo.loading`. Properly Handles\n`application` named routes.",
|
|
18799
|
-
"line": " packages/@ember/-internals/routing/lib/system/router.ts:
|
|
18877
|
+
"line": " packages/@ember/-internals/routing/lib/system/router.ts:1671"
|
|
18800
18878
|
},
|
|
18801
18879
|
{
|
|
18802
18880
|
"message": "Missing item type\nDetermines whether or not a route has been defined by checking that the route\nis in the Router's map and the owner has a registration for that route.",
|
|
18803
|
-
"line": " packages/@ember/-internals/routing/lib/system/router.ts:
|
|
18881
|
+
"line": " packages/@ember/-internals/routing/lib/system/router.ts:1693"
|
|
18804
18882
|
},
|
|
18805
18883
|
{
|
|
18806
18884
|
"message": "Missing item type",
|
|
18807
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/container_proxy.
|
|
18808
|
-
},
|
|
18809
|
-
{
|
|
18810
|
-
"message": "Missing item type\nThis mixin allows for Ember objects to subscribe to and emit events.",
|
|
18811
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/evented.d.ts:3"
|
|
18885
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/container_proxy.ts:26"
|
|
18812
18886
|
},
|
|
18813
18887
|
{
|
|
18814
18888
|
"message": "Missing item type\nSubscribes to a named event with given function.",
|
|
18815
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
18889
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/evented.ts:54"
|
|
18816
18890
|
},
|
|
18817
18891
|
{
|
|
18818
18892
|
"message": "Missing item type\nSubscribes a function to a named event and then cancels the subscription\nafter the first time the event is triggered. It is good to use ``one`` when\nyou only care about the first time an event has taken place.",
|
|
18819
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
18893
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/evented.ts:63"
|
|
18820
18894
|
},
|
|
18821
18895
|
{
|
|
18822
18896
|
"message": "Missing item type\nTriggers a named event for the object. Any additional arguments\nwill be passed as parameters to the functions that are subscribed to the\nevent.",
|
|
18823
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
18897
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/evented.ts:74"
|
|
18824
18898
|
},
|
|
18825
18899
|
{
|
|
18826
18900
|
"message": "Missing item type\nCancels subscription for given name, target, and method.",
|
|
18827
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
18901
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/evented.ts:80"
|
|
18828
18902
|
},
|
|
18829
18903
|
{
|
|
18830
18904
|
"message": "Missing item type\nChecks to see if object has any subscriptions for named event.",
|
|
18831
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/evented.
|
|
18832
|
-
},
|
|
18833
|
-
{
|
|
18834
|
-
"message": "Missing item type\nThis mixin provides properties and property observing functionality, core features of the Ember object model.",
|
|
18835
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.d.ts:7"
|
|
18905
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/evented.ts:89"
|
|
18836
18906
|
},
|
|
18837
18907
|
{
|
|
18838
18908
|
"message": "Missing item type\nRetrieves the value of a property from the object.",
|
|
18839
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
18909
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.ts:96"
|
|
18840
18910
|
},
|
|
18841
18911
|
{
|
|
18842
18912
|
"message": "Missing item type\nTo get the values of multiple properties at once, call `getProperties`\nwith a list of strings or an array:",
|
|
18843
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
18913
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.ts:101"
|
|
18844
18914
|
},
|
|
18845
18915
|
{
|
|
18846
18916
|
"message": "Missing item type\nSets the provided key or path to the value.",
|
|
18847
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
18917
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.ts:109"
|
|
18848
18918
|
},
|
|
18849
18919
|
{
|
|
18850
18920
|
"message": "Missing item type\nSets a list of properties at once. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.",
|
|
18851
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
18921
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.ts:115"
|
|
18852
18922
|
},
|
|
18853
18923
|
{
|
|
18854
18924
|
"message": "Missing item type\nConvenience method to call `propertyWillChange` and `propertyDidChange` in\nsuccession.",
|
|
18855
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
18925
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.ts:122"
|
|
18856
18926
|
},
|
|
18857
18927
|
{
|
|
18858
18928
|
"message": "Missing item type\nAdds an observer on a property.",
|
|
18859
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
18929
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.ts:128"
|
|
18860
18930
|
},
|
|
18861
18931
|
{
|
|
18862
18932
|
"message": "Missing item type\nRemove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.",
|
|
18863
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
18933
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.ts:134"
|
|
18864
18934
|
},
|
|
18865
18935
|
{
|
|
18866
18936
|
"message": "Missing item type\nSet the value of a property to the current value plus some amount.",
|
|
18867
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
18937
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.ts:147"
|
|
18868
18938
|
},
|
|
18869
18939
|
{
|
|
18870
18940
|
"message": "Missing item type\nSet the value of a property to the current value minus some amount.",
|
|
18871
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
18941
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.ts:153"
|
|
18872
18942
|
},
|
|
18873
18943
|
{
|
|
18874
18944
|
"message": "Missing item type\nSet the value of a boolean property to the opposite of its\ncurrent value.",
|
|
18875
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
18945
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.ts:159"
|
|
18876
18946
|
},
|
|
18877
18947
|
{
|
|
18878
18948
|
"message": "Missing item type\nReturns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.",
|
|
18879
|
-
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.
|
|
18949
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.ts:165"
|
|
18950
|
+
},
|
|
18951
|
+
{
|
|
18952
|
+
"message": "Missing item type",
|
|
18953
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/registry_proxy.ts:45"
|
|
18954
|
+
},
|
|
18955
|
+
{
|
|
18956
|
+
"message": "Missing item type",
|
|
18957
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/target_action_support.ts:29"
|
|
18958
|
+
},
|
|
18959
|
+
{
|
|
18960
|
+
"message": "Missing item type",
|
|
18961
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:134"
|
|
18962
|
+
},
|
|
18963
|
+
{
|
|
18964
|
+
"message": "Missing item type",
|
|
18965
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:136"
|
|
18966
|
+
},
|
|
18967
|
+
{
|
|
18968
|
+
"message": "Missing item type",
|
|
18969
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:139"
|
|
18970
|
+
},
|
|
18971
|
+
{
|
|
18972
|
+
"message": "Missing item type",
|
|
18973
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:141"
|
|
18974
|
+
},
|
|
18975
|
+
{
|
|
18976
|
+
"message": "Missing item type",
|
|
18977
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:144"
|
|
18978
|
+
},
|
|
18979
|
+
{
|
|
18980
|
+
"message": "Missing item type",
|
|
18981
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:146"
|
|
18982
|
+
},
|
|
18983
|
+
{
|
|
18984
|
+
"message": "Missing item type",
|
|
18985
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:148"
|
|
18986
|
+
},
|
|
18987
|
+
{
|
|
18988
|
+
"message": "Missing item type",
|
|
18989
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:150"
|
|
18990
|
+
},
|
|
18991
|
+
{
|
|
18992
|
+
"message": "Missing item type",
|
|
18993
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:152"
|
|
18880
18994
|
},
|
|
18881
18995
|
{
|
|
18882
18996
|
"message": "Missing item type",
|
|
18883
|
-
"line": " packages/@ember/-internals/runtime/lib/
|
|
18997
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:154"
|
|
18884
18998
|
},
|
|
18885
18999
|
{
|
|
18886
19000
|
"message": "Missing item type",
|
|
@@ -18900,51 +19014,51 @@
|
|
|
18900
19014
|
},
|
|
18901
19015
|
{
|
|
18902
19016
|
"message": "Missing item type",
|
|
18903
|
-
"line": " packages/@ember/-internals/views/lib/
|
|
19017
|
+
"line": " packages/@ember/-internals/views/lib/mixins/view_state_support.ts:9"
|
|
18904
19018
|
},
|
|
18905
19019
|
{
|
|
18906
19020
|
"message": "Missing item type\nUnfortunately, a lot of existing code assumes the booting process is\n\"synchronous\". Specifically, a lot of tests assumes the last call to\n`app.advanceReadiness()` or `app.reset()` will result in the app being\nfully-booted when the current runloop completes.\n\nWe would like new code (like the `visit` API) to stop making this assumption,\nso we created the asynchronous version above that returns a promise. But until\nwe have migrated all the code, we would have to expose this method for use\n*internally* in places where we need to boot an app \"synchronously\".",
|
|
18907
|
-
"line": " packages/@ember/application/lib/application.ts:
|
|
19021
|
+
"line": " packages/@ember/application/lib/application.ts:735"
|
|
18908
19022
|
},
|
|
18909
19023
|
{
|
|
18910
19024
|
"message": "Missing item type\nOverrides the base `EngineInstance._bootSync` method with concerns relevant\nto booting application (instead of engine) instances.\n\nThis method should only contain synchronous boot concerns. Asynchronous\nboot concerns should eventually be moved to the `boot` method, which\nreturns a promise.\n\nUntil all boot code has been made asynchronous, we need to continue to\nexpose this method for use *internally* in places where we need to boot an\ninstance synchronously.",
|
|
18911
|
-
"line": " packages/@ember/application/instance.ts:
|
|
19025
|
+
"line": " packages/@ember/application/instance.ts:88"
|
|
18912
19026
|
},
|
|
18913
19027
|
{
|
|
18914
19028
|
"message": "Missing item type\nThis hook is called by the root-most Route (a.k.a. the ApplicationRoute)\nwhen it has finished creating the root View. By default, we simply take the\nview and append it to the `rootElement` specified on the Application.\n\nIn cases like FastBoot and testing, we can override this hook and implement\ncustom behavior, such as serializing to a string and sending over an HTTP\nsocket rather than appending to DOM.",
|
|
18915
|
-
"line": " packages/@ember/application/instance.ts:
|
|
19029
|
+
"line": " packages/@ember/application/instance.ts:148"
|
|
18916
19030
|
},
|
|
18917
19031
|
{
|
|
18918
19032
|
"message": "Missing item type\nTells the router to start routing. The router will ask the location for the\ncurrent URL of the page to determine the initial URL to start routing to.\nTo start the app at a specific URL, call `handleURL` instead.",
|
|
18919
|
-
"line": " packages/@ember/application/instance.ts:
|
|
19033
|
+
"line": " packages/@ember/application/instance.ts:165"
|
|
18920
19034
|
},
|
|
18921
19035
|
{
|
|
18922
19036
|
"message": "Missing item type\nSets up the router, initializing the child router and configuring the\nlocation before routing begins.\n\nBecause setup should only occur once, multiple calls to `setupRouter`\nbeyond the first call have no effect.\n\nThis is commonly used in order to confirm things that rely on the router\nare functioning properly from tests that are primarily rendering related.\n\nFor example, from within [ember-qunit](https://github.com/emberjs/ember-qunit)'s\n`setupRenderingTest` calling `this.owner.setupRouter()` would allow that\nrendering test to confirm that any `<LinkTo></LinkTo>`'s that are rendered\nhave the correct URL.",
|
|
18923
|
-
"line": " packages/@ember/application/instance.ts:
|
|
19037
|
+
"line": " packages/@ember/application/instance.ts:176"
|
|
18924
19038
|
},
|
|
18925
19039
|
{
|
|
18926
19040
|
"message": "Missing item type\nDirects the router to route to a particular URL. This is useful in tests,\nfor example, to tell the app to start at a particular URL.",
|
|
18927
|
-
"line": " packages/@ember/application/instance.ts:
|
|
19041
|
+
"line": " packages/@ember/application/instance.ts:197"
|
|
18928
19042
|
},
|
|
18929
19043
|
{
|
|
18930
19044
|
"message": "Missing item type",
|
|
18931
|
-
"line": " packages/@ember/application/instance.ts:
|
|
19045
|
+
"line": " packages/@ember/application/instance.ts:209"
|
|
18932
19046
|
},
|
|
18933
19047
|
{
|
|
18934
19048
|
"message": "Missing item type\nReturns the current URL of the app instance. This is useful when your\napp does not update the browsers URL bar (i.e. it uses the `'none'`\nlocation adapter).",
|
|
18935
|
-
"line": " packages/@ember/application/instance.ts:
|
|
19049
|
+
"line": " packages/@ember/application/instance.ts:231"
|
|
18936
19050
|
},
|
|
18937
19051
|
{
|
|
18938
19052
|
"message": "Missing item type\nNavigate the instance to a particular URL. This is useful in tests, for\nexample, or to tell the app to start at a particular URL. This method\nreturns a promise that resolves with the app instance when the transition\nis complete, or rejects if the transion was aborted due to an error.",
|
|
18939
|
-
"line": " packages/@ember/application/instance.ts:
|
|
19053
|
+
"line": " packages/@ember/application/instance.ts:246"
|
|
18940
19054
|
},
|
|
18941
19055
|
{
|
|
18942
19056
|
"message": "Missing item type",
|
|
18943
|
-
"line": " packages/@ember/controller/lib/controller_mixin.d.ts:
|
|
19057
|
+
"line": " packages/@ember/controller/lib/controller_mixin.d.ts:11"
|
|
18944
19058
|
},
|
|
18945
19059
|
{
|
|
18946
19060
|
"message": "Missing item type\nUnfortunately, a lot of existing code assumes booting an instance is\nsynchronous – specifically, a lot of tests assume the last call to\n`app.advanceReadiness()` or `app.reset()` will result in a new instance\nbeing fully-booted when the current runloop completes.\n\nWe would like new code (like the `visit` API) to stop making this\nassumption, so we created the asynchronous version above that returns a\npromise. But until we have migrated all the code, we would have to expose\nthis method for use *internally* in places where we need to boot an instance\nsynchronously.",
|
|
18947
|
-
"line": " packages/@ember/engine/instance.ts:
|
|
19061
|
+
"line": " packages/@ember/engine/instance.ts:111"
|
|
18948
19062
|
},
|
|
18949
19063
|
{
|
|
18950
19064
|
"message": "Missing item type",
|