Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Ember CLI to 3.8 and update other dependencies #695

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
/blueprints/*/files/**/*.js
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
21 changes: 19 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,71 @@
module.exports = {
root: true,

parserOptions: {
ecmaVersion: 2017,

sourceType: 'module'
},

plugins: [
'ember'
'ember',
'ember-suave'
],

extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:ember-suave/recommended'
],

env: {
browser: true
},

rules: {
'generator-star-spacing': ['error', { before: false, after: false }],
'ember/closure-actions': 'off',
'ember/no-observers': 'off',
'ember-suave/require-access-in-comments': 'off',
'ember-suave/no-const-outside-module-scope': 'off'
},

overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],

excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],

parserOptions: {
sourceType: 'script',

ecmaVersion: 2015
},

env: {
browser: false,
node: true
},

plugins: ['node'],

rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
'ember-suave/lines-between-object-properties': 'off'
})
}
]
Expand Down
24 changes: 13 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/dist/
/tmp/

# dependencies
/node_modules
/bower_components
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try

# VS Code
.vscodeignore
Expand Down
47 changes: 29 additions & 18 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
/bower_components
# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
/.eslintignore
/.eslintrc.js
/.gitignore
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/config/release.js
/dist
/tests
/tmp
**/.gitkeep
.bowerrc
.editorconfig
.ember-cli
.eslintrc.js
.gitignore
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js

/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
/tests/
/yarn.lock
.gitkeep

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
10 changes: 10 additions & 0 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';

module.exports = {
extends: 'recommended',
rules: {
'no-inline-styles': {
allowDynamicStyles: true
}
}
};
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ env:
- EMBER_TRY_SCENARIO=ember-lts-2.16
- EMBER_TRY_SCENARIO=ember-lts-2.18
- EMBER_TRY_SCENARIO=ember-lts-3.4
- EMBER_TRY_SCENARIO=ember-lts-3.8
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
Expand Down
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# How To Contribute

## Installation

* `git clone https://github.com/offirgolan/ember-light-table`
* `cd ember-light-table`
* `yarn install`

## Linting

* `yarn run lint:hbs`
* `yarn run lint:js`
* `yarn run lint:js -- --fix`

## Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

## Running the dummy application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 – 2018
Copyright (c) 2016 - 2019

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
- Contextual component for header, body, and footer, as well as loading, no data, and expanded row
- **EXPERIMENTAL** Occlusion rendering leveraging [vertical-collection](https://github.com/html-next/vertical-collection). See [Demo](http://offirgolan.github.io/ember-light-table/#/cookbook/occlusion-rendering).


Compatibility
------------------------------------------------------------------------------

* Ember.js v2.18 or above
* Ember CLI v2.13 or above


Installation
------------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions addon/classes/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export default class Table extends EmberObject.extend({
if (c.get('isVisibleGroupColumn') || (!c.get('isGroupColumn') && !c.get('isHidden'))) {
arr.pushObject(c);
}

return arr;
}, emberArray([]));
}).readOnly(),
Expand Down
1 change: 1 addition & 0 deletions addon/components/cells/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const Cell = Component.extend({
if (format && typeof format === 'function') {
return format.call(this, rawValue);
}

return rawValue;
})
});
Expand Down
28 changes: 23 additions & 5 deletions addon/components/lt-body.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Component from '@ember/component';
import { deprecate } from '@ember/application/deprecations';
import { computed, observer } from '@ember/object';
import layout from 'ember-light-table/templates/components/lt-body';
import { run } from '@ember/runloop';
Expand Down Expand Up @@ -186,7 +187,7 @@ export default Component.extend({
enableScaffolding: false,

/**
* ID of main table component. Used to generate divs for ember-wormhole
* ID of main table component. Used to generate divs for ember-wormhole and set scope for scroll observers
*
* @property tableId
* @type {String}
Expand Down Expand Up @@ -320,7 +321,7 @@ export default Component.extend({
* fills the screen with row items until lt-infinity component has exited the viewport
* @property scheduleScrolledToBottom
*/
scheduleScrolledToBottom: observer('rows.[]', 'isInViewport', function() {
scheduleScrolledToBottom: observer('isInViewport', function() {
if (this.get('isInViewport')) {
/*
Continue scheduling onScrolledToBottom until no longer in viewport
Expand Down Expand Up @@ -528,12 +529,29 @@ export default Component.extend({
},

/**
* lt-infinity action to determine if component is still in viewport
* lt-infinity action to determine if component is still in viewport. Deprecated - please use enterViewport
* @event inViewport
* @deprecated Use `enterViewport` instead.
*/
inViewport: null,

/**
* lt-infinity action to determine if component is still in viewport
* @event enterViewport
*/
inViewport() {
this.set('isInViewport', true);
enterViewport() {
const inViewport = this.get('inViewport');
if (inViewport) {
deprecate('lt-infinity inViewport event is deprecated please use enterViewport instead', false, {
id: 'ember-light-table.inViewport',
until: '2.0.0'
});
inViewport();
} else {
this.set('isInViewport', true);
}
},

/**
* lt-infinity action to determine if component has exited the viewport
* @event exitViewport
Expand Down
2 changes: 1 addition & 1 deletion addon/components/lt-column-resizer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Component from '@ember/component';
import { computed } from '@ember/object';
import closest from 'ember-light-table/utils/closest';
import layout from '../templates/components/lt-column-resizer';
import closest from '../utils/closest';

const TOP_LEVEL_CLASS = '.ember-light-table';

Expand Down
38 changes: 21 additions & 17 deletions addon/components/lt-infinity.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
import Component from '@ember/component';
import layout from '../templates/components/lt-infinity';
import InViewportMixin from 'ember-in-viewport';
import { get } from '@ember/object';
import { inject as service } from '@ember/service';

export default Component.extend(InViewportMixin, {
classNames: ['lt-infinity'],
classNameBindings: ['viewportEntered:in-viewport'],
export default Component.extend({
layout,

rows: null,
inViewport: service(),

classNames: ['lt-infinity'],
scrollableContent: null,
scrollBuffer: 50,

didInsertElement() {
this._super(...arguments);

let scrollBuffer = this.get('scrollBuffer');
let width = this.element.offsetWidth;
let scrollableContent = this.get('scrollableContent');

this.setProperties({
const options = {
viewportSpy: true,

viewportTolerance: {
left: width,
right: width,
bottom: scrollBuffer,
top: 0
bottom: this.get('scrollBuffer')
},
scrollableArea: scrollableContent
});

scrollableArea: this.get('scrollableContent')
};

const { onEnter, onExit } = this.get('inViewport').watchElement(get(this, 'element'), options);

onEnter(this.didEnterViewport.bind(this));
onExit(this.didExitViewport.bind(this));
},

willDestroyElement() {
this.get('inViewport').stopWatching(this.get('element'));
},

didEnterViewport() {
get(this, 'inViewport')();
get(this, 'enterViewport')();
},

didExitViewport() {
Expand Down
Loading