ember-source 2.18.0.beta.3 → 2.18.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 2.18.0-beta.3
9
+ * @version 2.18.0-beta.4
10
10
  */
11
11
 
12
12
  /*global process */
@@ -21085,7 +21085,7 @@ enifed('ember-glimmer/utils/string', ['exports', 'ember-debug'], function (expor
21085
21085
  ```
21086
21086
 
21087
21087
  @method htmlSafe
21088
- @for @ember/string
21088
+ @for @ember/template
21089
21089
  @static
21090
21090
  @return {Handlebars.SafeString} A string that will not be HTML escaped by Handlebars.
21091
21091
  @public
@@ -21113,7 +21113,7 @@ enifed('ember-glimmer/utils/string', ['exports', 'ember-debug'], function (expor
21113
21113
  ```
21114
21114
 
21115
21115
  @method isHTMLSafe
21116
- @for @ember/string
21116
+ @for @ember/template
21117
21117
  @static
21118
21118
  @return {Boolean} `true` if the string was decorated with `htmlSafe`, `false` otherwise.
21119
21119
  @public
@@ -22668,7 +22668,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
22668
22668
 
22669
22669
  if (counter === 1) {
22670
22670
  m.writeWatching(keyPath, 0);
22671
- m.readableChains().remove(keyPath);
22671
+ m.writableChains(makeChainNode).remove(keyPath);
22672
22672
  } else if (counter > 1) {
22673
22673
  m.writeWatching(keyPath, counter - 1);
22674
22674
  }
@@ -22913,11 +22913,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
22913
22913
  if (paths === undefined) {
22914
22914
  return;
22915
22915
  }
22916
-
22917
22916
  if (paths[path] > 0) {
22918
22917
  paths[path]--;
22919
- } else {
22920
- return;
22921
22918
  }
22922
22919
 
22923
22920
  var key = firstKey(path);
@@ -25172,14 +25169,15 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25172
25169
  call.
25173
25170
 
25174
25171
  ```javascript
25172
+ import { run } from '@ember/runloop';
25173
+
25175
25174
  run(function() {
25176
25175
  // code to be executed within a RunLoop
25177
25176
  });
25178
25177
  ```
25179
-
25180
- @class @ember/runloop
25178
+ @method run
25179
+ @for @ember/runloop
25181
25180
  @static
25182
- @constructor
25183
25181
  @param {Object} [target] target of method to call
25184
25182
  @param {Function|String} method Method to invoke.
25185
25183
  May be a function or a string. If you pass a string
@@ -25202,7 +25200,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25202
25200
  If invoked when not within a run loop:
25203
25201
 
25204
25202
  ```javascript
25205
- run.join(function() {
25203
+ import { join } from '@ember/runloop';
25204
+
25205
+ join(function() {
25206
25206
  // creates a new run-loop
25207
25207
  });
25208
25208
  ```
@@ -25210,9 +25210,12 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25210
25210
  Alternatively, if called within an existing run loop:
25211
25211
 
25212
25212
  ```javascript
25213
+ import { run, join } from '@ember/runloop';
25214
+
25213
25215
  run(function() {
25214
25216
  // creates a new run-loop
25215
- run.join(function() {
25217
+
25218
+ join(function() {
25216
25219
  // joins with the existing run-loop, and queues for invocation on
25217
25220
  // the existing run-loops action queue.
25218
25221
  });
@@ -25241,7 +25244,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25241
25244
  makes this method a great way to asynchronously integrate third-party libraries
25242
25245
  into your Ember application.
25243
25246
 
25244
- `run.bind` takes two main arguments, the desired context and the function to
25247
+ `bind` takes two main arguments, the desired context and the function to
25245
25248
  invoke in that context. Any additional arguments will be supplied as arguments
25246
25249
  to the function that is passed in.
25247
25250
 
@@ -25253,10 +25256,11 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25253
25256
 
25254
25257
  ```app/components/rich-text-editor.js
25255
25258
  import Component from '@ember/component';
25259
+ import { on } from '@ember/object/evented';
25256
25260
  import { bind } from '@ember/runloop';
25257
25261
 
25258
25262
  export default Component.extend({
25259
- initializeTinyMCE: Ember.on('didInsertElement', function() {
25263
+ initializeTinyMCE: on('didInsertElement', function() {
25260
25264
  tinymce.init({
25261
25265
  selector: '#' + this.$().prop('id'),
25262
25266
  setup: Ember.run.bind(this, this.setupEditor)
@@ -25324,9 +25328,11 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25324
25328
  a lower-level way to use a RunLoop instead of using `run()`.
25325
25329
 
25326
25330
  ```javascript
25327
- run.begin();
25331
+ import { begin, end } from '@ember/runloop';
25332
+
25333
+ begin();
25328
25334
  // code to be executed within a RunLoop
25329
- run.end();
25335
+ end();
25330
25336
  ```
25331
25337
 
25332
25338
  @method begin
@@ -25345,9 +25351,11 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25345
25351
  to use a RunLoop instead of using `run()`.
25346
25352
 
25347
25353
  ```javascript
25348
- run.begin();
25354
+ import { begin, end } from '@ember/runloop';
25355
+
25356
+ begin();
25349
25357
  // code to be executed within a RunLoop
25350
- run.end();
25358
+ end();
25351
25359
  ```
25352
25360
 
25353
25361
  @method end
@@ -25383,12 +25391,14 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25383
25391
  the `run.queues` property.
25384
25392
 
25385
25393
  ```javascript
25386
- run.schedule('sync', this, function() {
25394
+ import { schedule } from '@ember/runloop';
25395
+
25396
+ schedule('sync', this, function() {
25387
25397
  // this will be executed in the first RunLoop queue, when bindings are synced
25388
25398
  console.log('scheduled on sync queue');
25389
25399
  });
25390
25400
 
25391
- run.schedule('actions', this, function() {
25401
+ schedule('actions', this, function() {
25392
25402
  // this will be executed in the 'actions' queue, after bindings have synced.
25393
25403
  console.log('scheduled on actions queue');
25394
25404
  });
@@ -25464,7 +25474,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25464
25474
  together, which is often more efficient than using a real setTimeout.
25465
25475
 
25466
25476
  ```javascript
25467
- run.later(myContext, function() {
25477
+ import { later } from '@ember/runloop';
25478
+
25479
+ later(myContext, function() {
25468
25480
  // code here will execute within a RunLoop in about 500ms with this == myContext
25469
25481
  }, 500);
25470
25482
  ```
@@ -25523,13 +25535,15 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25523
25535
  calls.
25524
25536
 
25525
25537
  ```javascript
25538
+ import { run, scheduleOnce } from '@ember/runloop';
25539
+
25526
25540
  function sayHi() {
25527
25541
  console.log('hi');
25528
25542
  }
25529
25543
 
25530
25544
  run(function() {
25531
- run.scheduleOnce('afterRender', myContext, sayHi);
25532
- run.scheduleOnce('afterRender', myContext, sayHi);
25545
+ scheduleOnce('afterRender', myContext, sayHi);
25546
+ scheduleOnce('afterRender', myContext, sayHi);
25533
25547
  // sayHi will only be executed once, in the afterRender queue of the RunLoop
25534
25548
  });
25535
25549
  ```
@@ -25543,7 +25557,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25543
25557
  }
25544
25558
 
25545
25559
  function scheduleIt() {
25546
- run.scheduleOnce('actions', myContext, log);
25560
+ scheduleOnce('actions', myContext, log);
25547
25561
  }
25548
25562
 
25549
25563
  scheduleIt();
@@ -25553,8 +25567,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25553
25567
  But this other case will schedule the function multiple times:
25554
25568
 
25555
25569
  ```javascript
25570
+ import { scheduleOnce } from '@ember/runloop';
25571
+
25556
25572
  function scheduleIt() {
25557
- run.scheduleOnce('actions', myContext, function() {
25573
+ scheduleOnce('actions', myContext, function() {
25558
25574
  console.log('Closure');
25559
25575
  });
25560
25576
  }
@@ -25593,7 +25609,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25593
25609
  `run.later` with a wait time of 1ms.
25594
25610
 
25595
25611
  ```javascript
25596
- run.next(myContext, function() {
25612
+ import { next } from '@ember/runloop';
25613
+
25614
+ next(myContext, function() {
25597
25615
  // code to be executed in the next run loop,
25598
25616
  // which will be scheduled after the current one
25599
25617
  });
@@ -25615,11 +25633,12 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25615
25633
 
25616
25634
  ```app/components/my-component.js
25617
25635
  import Component from '@ember/component';
25636
+ import { scheduleOnce } from '@ember/runloop';
25618
25637
 
25619
25638
  export Component.extend({
25620
25639
  didInsertElement() {
25621
25640
  this._super(...arguments);
25622
- run.scheduleOnce('afterRender', this, 'processChildElements');
25641
+ scheduleOnce('afterRender', this, 'processChildElements');
25623
25642
  },
25624
25643
 
25625
25644
  processChildElements() {
@@ -25666,53 +25685,63 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25666
25685
  };
25667
25686
 
25668
25687
  /**
25669
- Cancels a scheduled item. Must be a value returned by `run.later()`,
25670
- `run.once()`, `run.scheduleOnce()`, `run.next()`, `run.debounce()`, or
25671
- `run.throttle()`.
25688
+ Cancels a scheduled item. Must be a value returned by `later()`,
25689
+ `once()`, `scheduleOnce()`, `next()`, `debounce()`, or
25690
+ `throttle()`.
25672
25691
 
25673
25692
  ```javascript
25674
- let runNext = run.next(myContext, function() {
25693
+ import {
25694
+ next,
25695
+ cancel,
25696
+ later,
25697
+ scheduleOnce,
25698
+ once,
25699
+ throttle,
25700
+ debounce
25701
+ } from '@ember/runloop';
25702
+
25703
+ let runNext = next(myContext, function() {
25675
25704
  // will not be executed
25676
25705
  });
25677
25706
 
25678
- run.cancel(runNext);
25707
+ cancel(runNext);
25679
25708
 
25680
- let runLater = run.later(myContext, function() {
25709
+ let runLater = later(myContext, function() {
25681
25710
  // will not be executed
25682
25711
  }, 500);
25683
25712
 
25684
- run.cancel(runLater);
25713
+ cancel(runLater);
25685
25714
 
25686
- let runScheduleOnce = run.scheduleOnce('afterRender', myContext, function() {
25715
+ let runScheduleOnce = scheduleOnce('afterRender', myContext, function() {
25687
25716
  // will not be executed
25688
25717
  });
25689
25718
 
25690
- run.cancel(runScheduleOnce);
25719
+ cancel(runScheduleOnce);
25691
25720
 
25692
- let runOnce = run.once(myContext, function() {
25721
+ let runOnce = once(myContext, function() {
25693
25722
  // will not be executed
25694
25723
  });
25695
25724
 
25696
- run.cancel(runOnce);
25725
+ cancel(runOnce);
25697
25726
 
25698
- let throttle = run.throttle(myContext, function() {
25727
+ let throttle = throttle(myContext, function() {
25699
25728
  // will not be executed
25700
25729
  }, 1, false);
25701
25730
 
25702
- run.cancel(throttle);
25731
+ cancel(throttle);
25703
25732
 
25704
- let debounce = run.debounce(myContext, function() {
25733
+ let debounce = debounce(myContext, function() {
25705
25734
  // will not be executed
25706
25735
  }, 1);
25707
25736
 
25708
- run.cancel(debounce);
25737
+ cancel(debounce);
25709
25738
 
25710
- let debounceImmediate = run.debounce(myContext, function() {
25739
+ let debounceImmediate = debounce(myContext, function() {
25711
25740
  // will be executed since we passed in true (immediate)
25712
25741
  }, 100, true);
25713
25742
 
25714
25743
  // the 100ms delay until this method can be called again will be canceled
25715
- run.cancel(debounceImmediate);
25744
+ cancel(debounceImmediate);
25716
25745
  ```
25717
25746
 
25718
25747
  @method cancel
@@ -25738,16 +25767,18 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25738
25767
  happen once scrolling has ceased.
25739
25768
 
25740
25769
  ```javascript
25770
+ import { debounce } from '@ember/runloop';
25771
+
25741
25772
  function whoRan() {
25742
25773
  console.log(this.name + ' ran.');
25743
25774
  }
25744
25775
 
25745
25776
  let myContext = { name: 'debounce' };
25746
25777
 
25747
- run.debounce(myContext, whoRan, 150);
25778
+ debounce(myContext, whoRan, 150);
25748
25779
 
25749
25780
  // less than 150ms passes
25750
- run.debounce(myContext, whoRan, 150);
25781
+ debounce(myContext, whoRan, 150);
25751
25782
 
25752
25783
  // 150ms passes
25753
25784
  // whoRan is invoked with context myContext
@@ -25761,26 +25792,27 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25761
25792
  the method can be called again.
25762
25793
 
25763
25794
  ```javascript
25795
+ import { debounce } from '@ember/runloop';
25796
+
25764
25797
  function whoRan() {
25765
25798
  console.log(this.name + ' ran.');
25766
25799
  }
25767
25800
 
25768
25801
  let myContext = { name: 'debounce' };
25769
25802
 
25770
- run.debounce(myContext, whoRan, 150, true);
25803
+ debounce(myContext, whoRan, 150, true);
25771
25804
 
25772
25805
  // console logs 'debounce ran.' one time immediately.
25773
25806
  // 100ms passes
25774
- run.debounce(myContext, whoRan, 150, true);
25807
+ debounce(myContext, whoRan, 150, true);
25775
25808
 
25776
25809
  // 150ms passes and nothing else is logged to the console and
25777
25810
  // the debouncee is no longer being watched
25778
- run.debounce(myContext, whoRan, 150, true);
25811
+ debounce(myContext, whoRan, 150, true);
25779
25812
 
25780
25813
  // console logs 'debounce ran.' one time immediately.
25781
25814
  // 150ms passes and nothing else is logged to the console and
25782
25815
  // the debouncee is no longer being watched
25783
-
25784
25816
  ```
25785
25817
 
25786
25818
  @method debounce
@@ -25806,24 +25838,26 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25806
25838
  the specified spacing period. The target method is called immediately.
25807
25839
 
25808
25840
  ```javascript
25841
+ import { throttle } from '@ember/runloop';
25842
+
25809
25843
  function whoRan() {
25810
25844
  console.log(this.name + ' ran.');
25811
25845
  }
25812
25846
 
25813
25847
  let myContext = { name: 'throttle' };
25814
25848
 
25815
- run.throttle(myContext, whoRan, 150);
25849
+ throttle(myContext, whoRan, 150);
25816
25850
  // whoRan is invoked with context myContext
25817
25851
  // console logs 'throttle ran.'
25818
25852
 
25819
25853
  // 50ms passes
25820
- run.throttle(myContext, whoRan, 150);
25854
+ throttle(myContext, whoRan, 150);
25821
25855
 
25822
25856
  // 50ms passes
25823
- run.throttle(myContext, whoRan, 150);
25857
+ throttle(myContext, whoRan, 150);
25824
25858
 
25825
25859
  // 150ms passes
25826
- run.throttle(myContext, whoRan, 150);
25860
+ throttle(myContext, whoRan, 150);
25827
25861
  // whoRan is invoked with context myContext
25828
25862
  // console logs 'throttle ran.'
25829
25863
  ```
@@ -43842,7 +43876,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'node-module',
43842
43876
  enifed("ember/version", ["exports"], function (exports) {
43843
43877
  "use strict";
43844
43878
 
43845
- exports.default = "2.18.0-beta.3";
43879
+ exports.default = "2.18.0-beta.4";
43846
43880
  });
43847
43881
  /*global enifed */
43848
43882
  enifed('node-module', ['exports'], function(_exports) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-source",
3
- "version": "2.18.0-beta.3",
3
+ "version": "2.18.0-beta.4",
4
4
  "description": "A JavaScript framework for creating ambitious web applications",
5
5
  "keywords": [
6
6
  "ember-addon"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.18.0.beta.3
4
+ version: 2.18.0.beta.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehuda Katz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-12 00:00:00.000000000 Z
11
+ date: 2017-12-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ember.js source code wrapper for use with Ruby libs.
14
14
  email: