ember-infinity
Advanced tools
Comparing version 1.0.0-alpha.4 to 1.0.0-alpha.5
@@ -1,6 +0,6 @@ | ||
import Ember from 'ember'; | ||
import { alias } from '@ember/object/computed'; | ||
import InfinityPromiseArray from 'ember-infinity/lib/infinity-promise-array'; | ||
import InViewportMixin from 'ember-in-viewport'; | ||
import { run } from '@ember/runloop'; | ||
import { computed, observer } from '@ember/object'; | ||
import { computed, observer, defineProperty } from '@ember/object'; | ||
import Component from '@ember/component'; | ||
@@ -23,5 +23,5 @@ | ||
if (this.get('_isInfinityPromiseArray')) { | ||
Ember.defineProperty(this, 'infinityModelContent', computed.alias('infinityModel.content')); | ||
defineProperty(this, 'infinityModelContent', alias('infinityModel.content')); | ||
} else { | ||
Ember.defineProperty(this, 'infinityModelContent', computed.alias('infinityModel')); | ||
defineProperty(this, 'infinityModelContent', alias('infinityModel')); | ||
} | ||
@@ -28,0 +28,0 @@ }, |
@@ -1,2 +0,3 @@ | ||
import Ember from 'ember'; | ||
export default Ember.ArrayProxy.extend(Ember.PromiseProxyMixin); | ||
import PromiseProxyMixin from '@ember/object/promise-proxy-mixin'; | ||
import ArrayProxy from '@ember/array/proxy'; | ||
export default ArrayProxy.extend(PromiseProxyMixin); |
@@ -12,3 +12,3 @@ import Mixin from '@ember/object/mixin'; | ||
get bound param off of route and include in params | ||
@method buildParams | ||
@@ -18,5 +18,10 @@ @return {Object} | ||
buildParams() { | ||
deprecate("Ember Infinity: Bound params are now deprecated. Please pass explicitly as second param to the infinityModel method", { | ||
id: 'ember-infinity' | ||
}); | ||
deprecate( | ||
"Ember Infinity: Bound params are now deprecated. Please pass explicitly as second param to the infinityModel method", | ||
false, | ||
{ | ||
id: 'ember-infinity', | ||
until: '1.0.0' | ||
} | ||
); | ||
@@ -23,0 +28,0 @@ let params = this._super(...arguments); |
@@ -1,2 +0,3 @@ | ||
import Ember from 'ember'; | ||
import { alias } from '@ember/object/computed'; | ||
import EmberError from '@ember/error'; | ||
import InfinityModel from 'ember-infinity/lib/infinity-model'; | ||
@@ -29,3 +30,3 @@ import InfinityPromiseArray from 'ember-infinity/lib/infinity-promise-array'; | ||
}).readOnly(), | ||
currentPage: computed.alias('_infinityModel.currentPage').readOnly(), | ||
currentPage: alias('_infinityModel.currentPage').readOnly(), | ||
@@ -77,3 +78,3 @@ actions: { | ||
if (isEmpty(this.get(this._store)) || isEmpty(this.get(this._store)[this._storeFindMethod])){ | ||
throw new Ember.Error("Ember Infinity: Store is not available to infinityModel"); | ||
throw new EmberError("Ember Infinity: Store is not available to infinityModel"); | ||
} | ||
@@ -91,3 +92,3 @@ }, | ||
if (typeof options.store !== 'string') { | ||
throw new Ember.Error("Ember Infinity: Must pass custom data store as a string"); | ||
throw new EmberError("Ember Infinity: Must pass custom data store as a string"); | ||
} | ||
@@ -97,3 +98,3 @@ | ||
if (!store[this.get('_storeFindMethod')]) { | ||
throw new Ember.Error("Ember Infinity: Custom data store must specify query method"); | ||
throw new EmberError("Ember Infinity: Custom data store must specify query method"); | ||
} | ||
@@ -119,3 +120,3 @@ }, | ||
if (!(boundParamsOrInfinityModel instanceof InfinityModel)) { | ||
throw new Ember.Error("Ember Infinity: You must pass an Infinity Model instance as the third argument"); | ||
throw new EmberError("Ember Infinity: You must pass an Infinity Model instance as the third argument"); | ||
} | ||
@@ -128,3 +129,3 @@ ExtendedInfinityModel = boundParamsOrInfinityModel; | ||
if (modelName === undefined) { | ||
throw new Ember.Error("Ember Infinity: You must pass a Model Name to infinityModel"); | ||
throw new EmberError("Ember Infinity: You must pass a Model Name to infinityModel"); | ||
} | ||
@@ -211,4 +212,5 @@ | ||
updateInfinityModel(newObjects) { | ||
deprecate('Ember Infinity: this method will be deprecated in the future.', { | ||
id: 'ember-infinity' | ||
deprecate('Ember Infinity: this method will be deprecated in the future.', false, { | ||
id: 'ember-infinity', | ||
until: '1.0.0' | ||
}); | ||
@@ -321,4 +323,5 @@ return this._doUpdate(newObjects); | ||
deprecate('Ember Infinity: infinityModelUpdated will be deprecated in the future.', { | ||
id: 'ember-infinity' | ||
deprecate('Ember Infinity: infinityModelUpdated will be deprecated in the future.', false, { | ||
id: 'ember-infinity', | ||
until: '1.0.0' | ||
}); | ||
@@ -325,0 +328,0 @@ run.scheduleOnce('afterRender', this, 'infinityModelUpdated', { |
@@ -1,3 +0,3 @@ | ||
import Ember from 'ember'; | ||
const { typeOf, deprecate } = Ember; | ||
import { typeOf } from '@ember/utils'; | ||
import { deprecate } from '@ember/application/deprecations'; | ||
@@ -33,3 +33,3 @@ export let objectAssign = Object.assign || function objectAssign(target) { | ||
@param {String} - default | ||
@return {String} | ||
@return {String} | ||
*/ | ||
@@ -45,5 +45,10 @@ export function paramsCheck(optionParam, routeParam, defaultParam) { | ||
} else if (routeParam) { | ||
deprecate(`Ember Infinity: Please migrate route param - ${routeParam} - to be explicitly passed as second argument to infinityModel`, { | ||
id: 'ember-infinity' | ||
}); | ||
deprecate( | ||
`Ember Infinity: Please migrate route param - ${routeParam} - to be explicitly passed as second argument to infinityModel`, | ||
false, | ||
{ | ||
id: 'ember-infinity', | ||
until: '1.0.0' | ||
} | ||
); | ||
return routeParam; | ||
@@ -50,0 +55,0 @@ |
@@ -1,2 +0,1 @@ | ||
/* eslint-env node */ | ||
'use strict'; | ||
@@ -3,0 +2,0 @@ |
@@ -1,2 +0,1 @@ | ||
/* eslint-env node */ | ||
'use strict'; | ||
@@ -3,0 +2,0 @@ |
{ | ||
"name": "ember-infinity", | ||
"version": "1.0.0-alpha.4", | ||
"version": "1.0.0-alpha.5", | ||
"description": "Simple, flexible infinite scroll for Ember CLI Apps.", | ||
@@ -28,5 +28,5 @@ "keywords": [ | ||
"broccoli-asset-rev": "^2.4.5", | ||
"ember-cli": "~2.16.2", | ||
"ember-cli": "~2.18.2", | ||
"ember-cli-dependency-checker": "^2.0.0", | ||
"ember-cli-eslint": "^4.0.0", | ||
"ember-cli-eslint": "^4.2.1", | ||
"ember-cli-htmlbars": "^2.0.1", | ||
@@ -36,8 +36,8 @@ "ember-cli-htmlbars-inline-precompile": "^1.0.0", | ||
"ember-cli-pretender": "^1.0.1", | ||
"ember-cli-qunit": "^4.0.0", | ||
"ember-cli-shims": "^1.1.0", | ||
"ember-cli-qunit": "^4.1.1", | ||
"ember-cli-shims": "^1.2.0", | ||
"ember-cli-sri": "^2.1.0", | ||
"ember-cli-test-loader": "^1.1.0", | ||
"ember-cli-uglify": "^2.0.0", | ||
"ember-data": "2.16.0", | ||
"ember-data": "2.18.0", | ||
"ember-disable-prototype-extensions": "^1.1.2", | ||
@@ -49,3 +49,4 @@ "ember-export-application-global": "^2.0.0", | ||
"ember-resolver": "^4.0.0", | ||
"ember-source": "~2.16.0", | ||
"ember-route-action-helper": "^2.0.6", | ||
"ember-source": "~2.18.0", | ||
"loader.js": "^4.2.3" | ||
@@ -52,0 +53,0 @@ }, |
@@ -12,7 +12,4 @@ # Ember Infinity | ||
***Note: We are moving towards a 1-0 release that will allow for the use of multiple infinity models, provide extensibility to the InfinityModel, and generally make the addon easier to reason about. | ||
Check it out here [1-0](https://github.com/ember-infinity/ember-infinity/tree/1-0)*** | ||
Demo: [ember-infinity.github.io/ember-infinity/](https://ember-infinity.github.io/ember-infinity/) | ||
Demo: [hhff.github.io/ember-infinity/](http://hhff.github.io/ember-infinity/) | ||
Simple, flexible infinite scrolling for Ember CLI Apps. Works out of the box | ||
@@ -19,0 +16,0 @@ with the [Kaminari Gem](https://github.com/amatsuda/kaminari.git). |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
300709
603
0
23
479