ember-source 4.0.0-beta.5 → 4.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -1
- package/blueprints/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +1 -1
- package/blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +1 -1
- package/blueprints/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +3 -3
- package/blueprints/helper-test/index.js +4 -22
- package/blueprints/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +1 -13
- package/blueprints/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +0 -13
- package/blueprints/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -12
- package/blueprints/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +2 -13
- package/blueprints/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -14
- package/build-metadata.json +3 -3
- package/dist/dependencies/@glimmer/manager.js +19 -98
- package/dist/dependencies/@glimmer/opcode-compiler.js +9 -146
- package/dist/dependencies/@glimmer/runtime.js +1 -55
- package/dist/dependencies/@glimmer/validator.js +19 -51
- package/dist/ember-template-compiler.js +377 -695
- 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 +3090 -6029
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +1 -1
- package/dist/packages/@ember/-internals/environment/index.js +0 -15
- package/dist/packages/@ember/-internals/glimmer/index.js +4816 -6761
- package/dist/packages/@ember/-internals/metal/index.js +4 -14
- package/dist/packages/@ember/-internals/routing/lib/services/routing.js +1 -1
- package/dist/packages/@ember/-internals/routing/lib/system/route.js +1 -41
- package/dist/packages/@ember/-internals/routing/lib/system/router.js +13 -47
- package/dist/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -43
- package/dist/packages/@ember/-internals/utils/index.js +0 -3
- package/dist/packages/@ember/-internals/views/index.js +0 -1
- package/dist/packages/@ember/-internals/views/lib/mixins/view_support.js +4 -4
- package/dist/packages/@ember/application/lib/application.js +7 -8
- package/dist/packages/@ember/canary-features/index.js +0 -2
- package/dist/packages/@ember/component/index.js +1 -1
- package/dist/packages/@ember/deprecated-features/index.js +0 -1
- package/dist/packages/@ember/engine/index.js +1 -2
- package/dist/packages/@ember/routing/index.js +1 -1
- package/dist/packages/ember/index.js +9 -61
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +317 -1111
- package/lib/index.js +11 -48
- package/package.json +16 -17
- package/dist/packages/@ember/-internals/views/lib/mixins/text_support.js +0 -345
- package/dist/packages/@ember/component/checkbox.js +0 -17
- package/dist/packages/@ember/component/text-area.js +0 -17
- package/dist/packages/@ember/component/text-field.js +0 -17
- package/dist/packages/@ember/routing/link-component.js +0 -17
- package/dist/packages/jquery/index.js +0 -2
package/lib/index.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
const MergeTrees = require('broccoli-merge-trees');
|
|
4
4
|
const Funnel = require('broccoli-funnel');
|
|
5
5
|
const path = require('path');
|
|
6
|
-
const resolve = require('resolve');
|
|
7
6
|
const concatBundle = require('./concat-bundle');
|
|
8
7
|
const buildDebugMacroPlugin = require('./build-debug-macro-plugin');
|
|
9
8
|
const buildStripClassCallcheckPlugin = require('./build-strip-class-callcheck-plugin');
|
|
@@ -33,7 +32,6 @@ function add(paths, name, path) {
|
|
|
33
32
|
add(paths, 'prod', 'vendor/ember/ember.js');
|
|
34
33
|
add(paths, 'debug', 'vendor/ember/ember.js');
|
|
35
34
|
add(paths, 'testing', 'vendor/ember/ember-testing.js');
|
|
36
|
-
add(paths, 'jquery', 'vendor/ember/jquery/jquery.js');
|
|
37
35
|
|
|
38
36
|
add(
|
|
39
37
|
absolutePaths,
|
|
@@ -65,7 +63,6 @@ module.exports = {
|
|
|
65
63
|
name: 'ember-source',
|
|
66
64
|
paths,
|
|
67
65
|
absolutePaths,
|
|
68
|
-
_jqueryIntegrationEnabled: true,
|
|
69
66
|
_overrideTree: undefined,
|
|
70
67
|
|
|
71
68
|
included() {
|
|
@@ -95,25 +92,6 @@ module.exports = {
|
|
|
95
92
|
);
|
|
96
93
|
}
|
|
97
94
|
|
|
98
|
-
if (
|
|
99
|
-
optionalFeaturesMissing ||
|
|
100
|
-
typeof optionalFeatures.isFeatureExplicitlySet !== 'function'
|
|
101
|
-
) {
|
|
102
|
-
message.push(
|
|
103
|
-
'* Unable to detect if jquery-integration is explicitly set to a value, please update `@ember/optional-features` to the latest version'
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (
|
|
108
|
-
optionalFeaturesMissing ||
|
|
109
|
-
(typeof optionalFeatures.isFeatureExplicitlySet === 'function' &&
|
|
110
|
-
!optionalFeatures.isFeatureExplicitlySet('jquery-integration'))
|
|
111
|
-
) {
|
|
112
|
-
message.push(
|
|
113
|
-
`* The jquery-integration optional feature should be explicitly set to a value under Octane, run \`ember feature:disable jquery-integration\` to disable it, or \`ember feature:enable jquery-integration\` to explicitly enable it`
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
95
|
if (
|
|
118
96
|
optionalFeaturesMissing ||
|
|
119
97
|
optionalFeatures.isFeatureEnabled('application-template-wrapper')
|
|
@@ -164,12 +142,15 @@ module.exports = {
|
|
|
164
142
|
}
|
|
165
143
|
}
|
|
166
144
|
|
|
167
|
-
|
|
168
|
-
optionalFeaturesMissing
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
145
|
+
if (
|
|
146
|
+
!optionalFeaturesMissing &&
|
|
147
|
+
optionalFeatures.isFeatureEnabled('jquery-integration') &&
|
|
148
|
+
typeof optionalFeatures.isFeatureExplicitlySet === 'function' &&
|
|
149
|
+
optionalFeatures.isFeatureExplicitlySet('jquery-integration')
|
|
150
|
+
) {
|
|
151
|
+
const SilentError = require('silent-error');
|
|
152
|
+
throw new SilentError(
|
|
153
|
+
'Setting the `jquery-integration` optional feature flag to `true` was deprecated in Ember 3.x and removed in Ember 4.0.0. You must add the `@ember/optional-features` addon and set this feature to `false`.\n\nFor more information, see the deprecation guide: https://deprecations.emberjs.com/v3.x/#toc_optional-feature-jquery-integration'
|
|
173
154
|
);
|
|
174
155
|
}
|
|
175
156
|
},
|
|
@@ -237,10 +218,7 @@ module.exports = {
|
|
|
237
218
|
false
|
|
238
219
|
);
|
|
239
220
|
|
|
240
|
-
let exclude = [
|
|
241
|
-
isProduction ? 'ember-testing/**' : null,
|
|
242
|
-
!this._jqueryIntegrationEnabled ? 'jquery' : null,
|
|
243
|
-
].filter((value) => value !== null);
|
|
221
|
+
let exclude = isProduction ? ['ember-testing/**'] : [];
|
|
244
222
|
|
|
245
223
|
let emberFiles = new MergeTrees([new Funnel(packages, { exclude }), dependencies, headerFiles]);
|
|
246
224
|
|
|
@@ -270,21 +248,6 @@ module.exports = {
|
|
|
270
248
|
},
|
|
271
249
|
|
|
272
250
|
treeForVendor(tree) {
|
|
273
|
-
let jqueryPath;
|
|
274
|
-
|
|
275
|
-
try {
|
|
276
|
-
jqueryPath = path.dirname(
|
|
277
|
-
resolve.sync('jquery/package.json', { basedir: this.project.root })
|
|
278
|
-
);
|
|
279
|
-
} catch (error) {
|
|
280
|
-
jqueryPath = path.dirname(require.resolve('jquery/package.json'));
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
let jquery = new Funnel(jqueryPath + '/dist', {
|
|
284
|
-
destDir: 'ember/jquery',
|
|
285
|
-
files: ['jquery.js'],
|
|
286
|
-
});
|
|
287
|
-
|
|
288
251
|
let templateCompiler = new Funnel(tree, {
|
|
289
252
|
destDir: 'ember',
|
|
290
253
|
include: ['ember-template-compiler.js', 'ember-template-compiler.map'],
|
|
@@ -319,6 +282,6 @@ module.exports = {
|
|
|
319
282
|
});
|
|
320
283
|
}
|
|
321
284
|
|
|
322
|
-
return debugTree(new MergeTrees([ember, templateCompiler
|
|
285
|
+
return debugTree(new MergeTrees([ember, templateCompiler]), 'vendor:final');
|
|
323
286
|
},
|
|
324
287
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-source",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.9",
|
|
4
4
|
"description": "A JavaScript framework for creating ambitious web applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"@babel/helper-module-imports": "^7.8.3",
|
|
51
51
|
"@babel/plugin-transform-block-scoping": "^7.8.3",
|
|
52
52
|
"@ember/edition-utils": "^1.2.0",
|
|
53
|
-
"@glimmer/vm-babel-plugins": "0.
|
|
54
|
-
"babel-plugin-debug-macros": "^0.3.
|
|
53
|
+
"@glimmer/vm-babel-plugins": "0.83.1",
|
|
54
|
+
"babel-plugin-debug-macros": "^0.3.4",
|
|
55
55
|
"babel-plugin-filter-imports": "^4.0.0",
|
|
56
56
|
"broccoli-concat": "^4.2.4",
|
|
57
57
|
"broccoli-debug": "^0.6.4",
|
|
@@ -69,26 +69,25 @@
|
|
|
69
69
|
"ember-cli-version-checker": "^5.1.1",
|
|
70
70
|
"ember-router-generator": "^2.0.0",
|
|
71
71
|
"inflection": "^1.12.0",
|
|
72
|
-
"jquery": "^3.5.1",
|
|
73
72
|
"resolve": "^1.17.0",
|
|
74
73
|
"semver": "^7.3.4",
|
|
75
74
|
"silent-error": "^1.1.1"
|
|
76
75
|
},
|
|
77
76
|
"devDependencies": {
|
|
78
77
|
"@babel/preset-env": "^7.9.5",
|
|
79
|
-
"@glimmer/compiler": "0.
|
|
80
|
-
"@glimmer/destroyable": "0.
|
|
78
|
+
"@glimmer/compiler": "0.83.1",
|
|
79
|
+
"@glimmer/destroyable": "0.83.1",
|
|
81
80
|
"@glimmer/env": "^0.1.7",
|
|
82
|
-
"@glimmer/global-context": "0.
|
|
83
|
-
"@glimmer/interfaces": "0.
|
|
84
|
-
"@glimmer/manager": "0.
|
|
85
|
-
"@glimmer/node": "0.
|
|
86
|
-
"@glimmer/opcode-compiler": "0.
|
|
87
|
-
"@glimmer/owner": "0.
|
|
88
|
-
"@glimmer/program": "0.
|
|
89
|
-
"@glimmer/reference": "0.
|
|
90
|
-
"@glimmer/runtime": "0.
|
|
91
|
-
"@glimmer/validator": "0.
|
|
81
|
+
"@glimmer/global-context": "0.83.1",
|
|
82
|
+
"@glimmer/interfaces": "0.83.1",
|
|
83
|
+
"@glimmer/manager": "0.83.1",
|
|
84
|
+
"@glimmer/node": "0.83.1",
|
|
85
|
+
"@glimmer/opcode-compiler": "0.83.1",
|
|
86
|
+
"@glimmer/owner": "0.83.1",
|
|
87
|
+
"@glimmer/program": "0.83.1",
|
|
88
|
+
"@glimmer/reference": "0.83.1",
|
|
89
|
+
"@glimmer/runtime": "0.83.1",
|
|
90
|
+
"@glimmer/validator": "0.83.1",
|
|
92
91
|
"@simple-dom/document": "^1.4.0",
|
|
93
92
|
"@types/qunit": "^2.11.1",
|
|
94
93
|
"@types/rsvp": "^4.0.3",
|
|
@@ -157,7 +156,7 @@
|
|
|
157
156
|
"ember-addon": {
|
|
158
157
|
"after": "ember-cli-legacy-blueprints"
|
|
159
158
|
},
|
|
160
|
-
"_originalVersion": "4.0.0-beta.
|
|
159
|
+
"_originalVersion": "4.0.0-beta.9",
|
|
161
160
|
"_versionPreviouslyCalculated": true,
|
|
162
161
|
"publishConfig": {
|
|
163
162
|
"tag": "beta"
|
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
@module ember
|
|
3
|
-
*/
|
|
4
|
-
import { get, set, Mixin } from '@ember/-internals/metal';
|
|
5
|
-
import { deprecate } from '@ember/debug';
|
|
6
|
-
import { MUTABLE_CELL } from '@ember/-internals/views';
|
|
7
|
-
import { DEBUG } from '@glimmer/env';
|
|
8
|
-
|
|
9
|
-
if (DEBUG && true
|
|
10
|
-
/* EMBER_MODERNIZED_BUILT_IN_COMPONENTS */
|
|
11
|
-
) {
|
|
12
|
-
Mixin._disableDebugSeal = true;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const KEY_EVENTS = {
|
|
16
|
-
Enter: 'insertNewline',
|
|
17
|
-
Escape: 'cancel'
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
`TextSupport` is a shared mixin used by both `TextField` and
|
|
21
|
-
`TextArea`. `TextSupport` adds a number of methods that allow you to
|
|
22
|
-
specify a controller action to invoke when a certain event is fired on your
|
|
23
|
-
text field or textarea. The specified controller action would get the current
|
|
24
|
-
value of the field passed in as the only argument unless the value of
|
|
25
|
-
the field is empty. In that case, the instance of the field itself is passed
|
|
26
|
-
in as the only argument.
|
|
27
|
-
|
|
28
|
-
Let's use the pressing of the escape key as an example. If you wanted to
|
|
29
|
-
invoke a controller action when a user presses the escape key while on your
|
|
30
|
-
field, you would use the `escape-press` attribute on your field like so:
|
|
31
|
-
|
|
32
|
-
```handlebars
|
|
33
|
-
{{! application.hbs}}
|
|
34
|
-
|
|
35
|
-
{{input escape-press='alertUser'}}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
```javascript
|
|
39
|
-
import Application from '@ember/application';
|
|
40
|
-
import Controller from '@ember/controller';
|
|
41
|
-
App = Application.create();
|
|
42
|
-
|
|
43
|
-
App.ApplicationController = Controller.extend({
|
|
44
|
-
actions: {
|
|
45
|
-
alertUser: function ( currentValue ) {
|
|
46
|
-
alert( 'escape pressed, current value: ' + currentValue );
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
The following chart is a visual representation of what takes place when the
|
|
53
|
-
escape key is pressed in this scenario:
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
The Template
|
|
57
|
-
+---------------------------+
|
|
58
|
-
| |
|
|
59
|
-
| escape-press='alertUser' |
|
|
60
|
-
| | TextSupport Mixin
|
|
61
|
-
+----+----------------------+ +-------------------------------+
|
|
62
|
-
| | cancel method |
|
|
63
|
-
| escape button pressed | |
|
|
64
|
-
+-------------------------------> | checks for the `escape-press` |
|
|
65
|
-
| attribute and pulls out the |
|
|
66
|
-
+-------------------------------+ | `alertUser` value |
|
|
67
|
-
| action name 'alertUser' +-------------------------------+
|
|
68
|
-
| sent to controller
|
|
69
|
-
v
|
|
70
|
-
Controller
|
|
71
|
-
+------------------------------------------ +
|
|
72
|
-
| |
|
|
73
|
-
| actions: { |
|
|
74
|
-
| alertUser: function( currentValue ){ |
|
|
75
|
-
| alert( 'the esc key was pressed!' ) |
|
|
76
|
-
| } |
|
|
77
|
-
| } |
|
|
78
|
-
| |
|
|
79
|
-
+-------------------------------------------+
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Here are the events that we currently support along with the name of the
|
|
83
|
-
attribute you would need to use on your field. To reiterate, you would use the
|
|
84
|
-
attribute name like so:
|
|
85
|
-
|
|
86
|
-
```handlebars
|
|
87
|
-
{{input attribute-name='controllerAction'}}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
+--------------------+----------------+
|
|
92
|
-
| | |
|
|
93
|
-
| event | attribute name |
|
|
94
|
-
+--------------------+----------------+
|
|
95
|
-
| new line inserted | insert-newline |
|
|
96
|
-
| | |
|
|
97
|
-
| enter key pressed | enter |
|
|
98
|
-
| | |
|
|
99
|
-
| cancel key pressed | escape-press |
|
|
100
|
-
| | |
|
|
101
|
-
| focusin | focus-in |
|
|
102
|
-
| | |
|
|
103
|
-
| focusout | focus-out |
|
|
104
|
-
| | |
|
|
105
|
-
| keypress | key-press |
|
|
106
|
-
| | |
|
|
107
|
-
| keyup | key-up |
|
|
108
|
-
| | |
|
|
109
|
-
| keydown | key-down |
|
|
110
|
-
+--------------------+----------------+
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
@class TextSupport
|
|
114
|
-
@namespace Ember
|
|
115
|
-
@uses Ember.TargetActionSupport
|
|
116
|
-
@extends Mixin
|
|
117
|
-
@private
|
|
118
|
-
*/
|
|
119
|
-
|
|
120
|
-
const TextSupport = Mixin.create({
|
|
121
|
-
value: '',
|
|
122
|
-
attributeBindings: ['autocapitalize', 'autocorrect', 'autofocus', 'disabled', 'form', 'maxlength', 'minlength', 'placeholder', 'readonly', 'required', 'selectionDirection', 'spellcheck', 'tabindex', 'title'],
|
|
123
|
-
placeholder: null,
|
|
124
|
-
disabled: false,
|
|
125
|
-
maxlength: null,
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
Whether the `keyUp` event that triggers an `action` to be sent continues
|
|
129
|
-
propagating to other views.
|
|
130
|
-
By default, when the user presses the return key on their keyboard and
|
|
131
|
-
the text field has an `action` set, the action will be sent to the view's
|
|
132
|
-
controller and the key event will stop propagating.
|
|
133
|
-
If you would like parent views to receive the `keyUp` event even after an
|
|
134
|
-
action has been dispatched, set `bubbles` to true.
|
|
135
|
-
@property bubbles
|
|
136
|
-
@type Boolean
|
|
137
|
-
@default false
|
|
138
|
-
@private
|
|
139
|
-
*/
|
|
140
|
-
bubbles: false,
|
|
141
|
-
|
|
142
|
-
interpretKeyEvents(event) {
|
|
143
|
-
let method = KEY_EVENTS[event.key];
|
|
144
|
-
|
|
145
|
-
this._elementValueDidChange();
|
|
146
|
-
|
|
147
|
-
if (method) {
|
|
148
|
-
return this[method](event);
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
_elementValueDidChange() {
|
|
153
|
-
set(this, 'value', this.element.value);
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
change(event) {
|
|
157
|
-
this._elementValueDidChange(event);
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
paste(event) {
|
|
161
|
-
this._elementValueDidChange(event);
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
cut(event) {
|
|
165
|
-
this._elementValueDidChange(event);
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
input(event) {
|
|
169
|
-
this._elementValueDidChange(event);
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
Allows you to specify a controller action to invoke when either the `enter`
|
|
174
|
-
key is pressed or, in the case of the field being a textarea, when a newline
|
|
175
|
-
is inserted. To use this method, give your field an `insert-newline`
|
|
176
|
-
attribute. The value of that attribute should be the name of the action
|
|
177
|
-
in your controller that you wish to invoke.
|
|
178
|
-
For an example on how to use the `insert-newline` attribute, please
|
|
179
|
-
reference the example near the top of this file.
|
|
180
|
-
@method insertNewline
|
|
181
|
-
@param {Event} event
|
|
182
|
-
@private
|
|
183
|
-
*/
|
|
184
|
-
insertNewline(event) {
|
|
185
|
-
sendAction('enter', this, event);
|
|
186
|
-
sendAction('insert-newline', this, event);
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
Allows you to specify a controller action to invoke when the escape button
|
|
191
|
-
is pressed. To use this method, give your field an `escape-press`
|
|
192
|
-
attribute. The value of that attribute should be the name of the action
|
|
193
|
-
in your controller that you wish to invoke.
|
|
194
|
-
For an example on how to use the `escape-press` attribute, please reference
|
|
195
|
-
the example near the top of this file.
|
|
196
|
-
@method cancel
|
|
197
|
-
@param {Event} event
|
|
198
|
-
@private
|
|
199
|
-
*/
|
|
200
|
-
cancel(event) {
|
|
201
|
-
sendAction('escape-press', this, event);
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
Allows you to specify a controller action to invoke when a field receives
|
|
206
|
-
focus. To use this method, give your field a `focus-in` attribute. The value
|
|
207
|
-
of that attribute should be the name of the action in your controller
|
|
208
|
-
that you wish to invoke.
|
|
209
|
-
For an example on how to use the `focus-in` attribute, please reference the
|
|
210
|
-
example near the top of this file.
|
|
211
|
-
@method focusIn
|
|
212
|
-
@param {Event} event
|
|
213
|
-
@private
|
|
214
|
-
*/
|
|
215
|
-
focusIn(event) {
|
|
216
|
-
sendAction('focus-in', this, event);
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
Allows you to specify a controller action to invoke when a field loses
|
|
221
|
-
focus. To use this method, give your field a `focus-out` attribute. The value
|
|
222
|
-
of that attribute should be the name of the action in your controller
|
|
223
|
-
that you wish to invoke.
|
|
224
|
-
For an example on how to use the `focus-out` attribute, please reference the
|
|
225
|
-
example near the top of this file.
|
|
226
|
-
@method focusOut
|
|
227
|
-
@param {Event} event
|
|
228
|
-
@private
|
|
229
|
-
*/
|
|
230
|
-
focusOut(event) {
|
|
231
|
-
this._elementValueDidChange(event);
|
|
232
|
-
|
|
233
|
-
sendAction('focus-out', this, event);
|
|
234
|
-
},
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
Allows you to specify a controller action to invoke when a key is pressed.
|
|
238
|
-
To use this method, give your field a `key-press` attribute. The value of
|
|
239
|
-
that attribute should be the name of the action in your controller you
|
|
240
|
-
that wish to invoke.
|
|
241
|
-
For an example on how to use the `key-press` attribute, please reference the
|
|
242
|
-
example near the top of this file.
|
|
243
|
-
@method keyPress
|
|
244
|
-
@param {Event} event
|
|
245
|
-
@private
|
|
246
|
-
*/
|
|
247
|
-
keyPress(event) {
|
|
248
|
-
sendAction('key-press', this, event);
|
|
249
|
-
},
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
Allows you to specify a controller action to invoke when a key-up event is
|
|
253
|
-
fired. To use this method, give your field a `key-up` attribute. The value
|
|
254
|
-
of that attribute should be the name of the action in your controller
|
|
255
|
-
that you wish to invoke.
|
|
256
|
-
For an example on how to use the `key-up` attribute, please reference the
|
|
257
|
-
example near the top of this file.
|
|
258
|
-
@method keyUp
|
|
259
|
-
@param {Event} event
|
|
260
|
-
@private
|
|
261
|
-
*/
|
|
262
|
-
keyUp(event) {
|
|
263
|
-
this.interpretKeyEvents(event);
|
|
264
|
-
sendAction('key-up', this, event);
|
|
265
|
-
},
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
Allows you to specify a controller action to invoke when a key-down event is
|
|
269
|
-
fired. To use this method, give your field a `key-down` attribute. The value
|
|
270
|
-
of that attribute should be the name of the action in your controller that
|
|
271
|
-
you wish to invoke.
|
|
272
|
-
For an example on how to use the `key-down` attribute, please reference the
|
|
273
|
-
example near the top of this file.
|
|
274
|
-
@method keyDown
|
|
275
|
-
@param {Event} event
|
|
276
|
-
@private
|
|
277
|
-
*/
|
|
278
|
-
keyDown(event) {
|
|
279
|
-
sendAction('key-down', this, event);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
}); // In principle, this shouldn't be necessary, but the legacy
|
|
283
|
-
// sendAction semantics for TextField are different from
|
|
284
|
-
// the component semantics so this method normalizes them.
|
|
285
|
-
|
|
286
|
-
function sendAction(eventName, view, event) {
|
|
287
|
-
let action = get(view, `attrs.${eventName}`);
|
|
288
|
-
|
|
289
|
-
if (action !== null && typeof action === 'object' && action[MUTABLE_CELL] === true) {
|
|
290
|
-
action = action.value;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
if (action === undefined) {
|
|
294
|
-
action = get(view, eventName);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
let value = get(view, 'value');
|
|
298
|
-
|
|
299
|
-
if (typeof action === 'function') {
|
|
300
|
-
action(value, event);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
if (action && !get(view, 'bubbles')) {
|
|
304
|
-
event.stopPropagation();
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
if (true
|
|
309
|
-
/* EMBER_MODERNIZED_BUILT_IN_COMPONENTS */
|
|
310
|
-
) {
|
|
311
|
-
Object.defineProperty(TextSupport, '_wasReopened', {
|
|
312
|
-
configurable: true,
|
|
313
|
-
enumerable: false,
|
|
314
|
-
writable: true,
|
|
315
|
-
value: false
|
|
316
|
-
});
|
|
317
|
-
Object.defineProperty(TextSupport, 'reopen', {
|
|
318
|
-
configurable: true,
|
|
319
|
-
enumerable: false,
|
|
320
|
-
writable: true,
|
|
321
|
-
value: function reopen(...args) {
|
|
322
|
-
if (this === TextSupport) {
|
|
323
|
-
deprecate('Reopening Ember.TextSupport is deprecated.', false, {
|
|
324
|
-
id: 'ember.built-in-components.reopen',
|
|
325
|
-
for: 'ember-source',
|
|
326
|
-
since: {
|
|
327
|
-
enabled: '3.27.0'
|
|
328
|
-
},
|
|
329
|
-
until: '4.0.0',
|
|
330
|
-
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-reopen'
|
|
331
|
-
});
|
|
332
|
-
TextSupport._wasReopened = true;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
return Mixin.prototype.reopen.call(this, ...args);
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
if (DEBUG) {
|
|
340
|
-
Object.seal(TextSupport);
|
|
341
|
-
Mixin._disableDebugSeal = false;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export default TextSupport;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { deprecate } from '@ember/debug';
|
|
2
|
-
|
|
3
|
-
if (true
|
|
4
|
-
/* EMBER_MODERNIZED_BUILT_IN_COMPONENTS */
|
|
5
|
-
) {
|
|
6
|
-
deprecate(`Using Ember.Checkbox or importing from 'Checkbox' has been deprecated, install the ` + `\`@ember/legacy-built-in-components\` addon and use \`import { Checkbox } from ` + `'@ember/legacy-built-in-components';\` instead`, false, {
|
|
7
|
-
id: 'ember.built-in-components.import',
|
|
8
|
-
until: '4.0.0',
|
|
9
|
-
for: 'ember-source',
|
|
10
|
-
since: {
|
|
11
|
-
enabled: '3.27.0'
|
|
12
|
-
},
|
|
13
|
-
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-import'
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { Checkbox as default } from '@ember/-internals/glimmer';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { deprecate } from '@ember/debug';
|
|
2
|
-
|
|
3
|
-
if (true
|
|
4
|
-
/* EMBER_MODERNIZED_BUILT_IN_COMPONENTS */
|
|
5
|
-
) {
|
|
6
|
-
deprecate(`Using Ember.TextArea or importing from 'TextArea' has been deprecated, install the ` + `\`@ember/legacy-built-in-components\` addon and use \`import { TextArea } from ` + `'@ember/legacy-built-in-components';\` instead`, false, {
|
|
7
|
-
id: 'ember.built-in-components.import',
|
|
8
|
-
until: '4.0.0',
|
|
9
|
-
for: 'ember-source',
|
|
10
|
-
since: {
|
|
11
|
-
enabled: '3.27.0'
|
|
12
|
-
},
|
|
13
|
-
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-import'
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { TextArea as default } from '@ember/-internals/glimmer';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { deprecate } from '@ember/debug';
|
|
2
|
-
|
|
3
|
-
if (true
|
|
4
|
-
/* EMBER_MODERNIZED_BUILT_IN_COMPONENTS */
|
|
5
|
-
) {
|
|
6
|
-
deprecate(`Using Ember.TextField or importing from 'TextField' has been deprecated, install the ` + `\`@ember/legacy-built-in-components\` addon and use \`import { TextField } from ` + `'@ember/legacy-built-in-components';\` instead`, false, {
|
|
7
|
-
id: 'ember.built-in-components.import',
|
|
8
|
-
until: '4.0.0',
|
|
9
|
-
for: 'ember-source',
|
|
10
|
-
since: {
|
|
11
|
-
enabled: '3.27.0'
|
|
12
|
-
},
|
|
13
|
-
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-import'
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { TextField as default } from '@ember/-internals/glimmer';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { deprecate } from '@ember/debug';
|
|
2
|
-
|
|
3
|
-
if (true
|
|
4
|
-
/* EMBER_MODERNIZED_BUILT_IN_COMPONENTS */
|
|
5
|
-
) {
|
|
6
|
-
deprecate(`Using Ember.LinkComponent or importing from 'LinkComponent' has been deprecated, install the ` + `\`@ember/legacy-built-in-components\` addon and use \`import { LinkComponent } from ` + `'@ember/legacy-built-in-components';\` instead`, false, {
|
|
7
|
-
id: 'ember.built-in-components.import',
|
|
8
|
-
until: '4.0.0',
|
|
9
|
-
for: 'ember-source',
|
|
10
|
-
since: {
|
|
11
|
-
enabled: '3.27.0'
|
|
12
|
-
},
|
|
13
|
-
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-import'
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { LinkComponent as default } from '@ember/-internals/glimmer';
|