Skip to content

Commit

Permalink
Merge pull request #32 from VertekCorp/upgrade
Browse files Browse the repository at this point in the history
Upgrade to 3.14
  • Loading branch information
franktcurran authored Dec 26, 2019
2 parents 384384d + 7883434 commit 5310231
Show file tree
Hide file tree
Showing 69 changed files with 20,037 additions and 478 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/package.json.ember-try
15 changes: 11 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: [
'ember'
Expand All @@ -15,11 +19,15 @@ module.exports = {
browser: true
},
rules: {
'ember/no-jquery': 'warn',
'no-triple-curlies': 'warn'
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
Expand All @@ -34,8 +42,7 @@ module.exports = {
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
sourceType: 'script'
},
env: {
browser: false,
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
/tmp/

# dependencies
/bower_components/
/node_modules/

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

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
/.idea/
44 changes: 25 additions & 19 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
/bower_components
# compiled output
/dist/
/tmp/

# dependencies

# misc
/.editorconfig
/.ember-cli.js
/.env*
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/config/ember-try.js
/dist
/tests
/tmp
**/.gitkeep
.bowerrc
.editorconfig
.ember-cli
.eslintrc.js
.gitignore
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js
yarn.lock
/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/
/package.json.ember-try
5 changes: 5 additions & 0 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended'
};
56 changes: 28 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "6"
- "8"

sudo: false
dist: trusty
Expand All @@ -19,36 +19,36 @@ env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1
matrix:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-lts-2.16
- EMBER_TRY_SCENARIO=ember-lts-2.18
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default

matrix:
fast_finish: true

branches:
only:
- master
# npm version tags
- /^v\d+\.\d+\.\d+/

jobs:
fail_fast: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
- npm config set spin false
- npm install -g npm@4
- npm --version
- npm install -g bower
- bower --version
include:
# runs linting and tests with current locked deps

install:
- npm install
- bower install
- stage: "Tests"
name: "Tests"
script:
- npm run lint:hbs
- npm run lint:js
- npm test

# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- stage: "Additional Tests"
env: EMBER_TRY_SCENARIO=ember-lts-3.12
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery

script:
- npm run lint:js
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
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 <repository-url>`
* `cd my-addon`
* `npm install`

## Linting

* `npm run lint:hbs`
* `npm run lint:js`
* `npm 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) 2018
Copyright (c) 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
11 changes: 4 additions & 7 deletions addon/components/g-selectize.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export default Component.extend({
return `${this.get('elementId')}-g-selectize`;
}),

lookupValues: computed('lookups', function() {
return this.lookups.map(lu => lu.value);
}),

init() {
this._super(...arguments);
Expand All @@ -26,11 +29,5 @@ export default Component.extend({
isValid: computed('validation.isValid', function() {
let validation = this.get('validation');
return (validation) ? validation.get('isValid') : true;
}),

actions: {
'select-item': function(item) {
this.sendAction('onChange', item);
}
}
})
});
6 changes: 6 additions & 0 deletions addon/components/g-sortable-group.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import SortableGroup from 'ember-sortable/components/sortable-group';
import layout from '../templates/components/g-sortable-group';

export default SortableGroup.extend({
layout
});
2 changes: 1 addition & 1 deletion addon/templates/components/g-date.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<label class="g-input-field-label">{{label}}</label>
{{g-pikaday value=value disabled=disabled class="g-date"}}
{{#if validation.message}}
{{g-invalid text="!" tooltipContent=validation.message tooltipPlace='right'}}
{{g-invalid text="!" tooltipContent=validation.message tooltipPlace="right"}}
{{else}}
<div class="g-valid"></div>
{{/if}}
2 changes: 0 additions & 2 deletions addon/templates/components/g-grid-col.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{{#if selector}}
{{input type="checkbox" checked=_selected disabled=disabled}}
{{!-- {{else if dragHandle}}
dragMe --}}
{{else}}
{{yield}}
{{/if}}
1 change: 1 addition & 0 deletions addon/templates/components/g-grid-heading.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{! template-lint-disable no-triple-curlies }}
{{{heading}}}
{{#if isSorted}}
{{#if isSortAsc}}
Expand Down
10 changes: 5 additions & 5 deletions addon/templates/components/g-grid.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

{{#if onDragAndDrop}}

{{#sortable-group tagName="tbody" onChange="reorderItems" as |group|}}
{{#each content as |row index|}}
{{#g-sortable-item tagName="tr" model=row group=group handle=".g-grid-col-drag-handle" rowIndex=index}}
{{#sortable-group model=content tagName="tbody" onChange="reorderItems" as |group|}}
{{#each group.model as |row index|}}
{{#group.item tagName="tr" model=row handle=".g-grid-col-drag-handle"}}
{{yield row index}}
{{/g-sortable-item}}
{{else}}
{{/group.item}}
{{else}}
<tr>
<td>No records found.</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion addon/templates/components/g-input.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<label for={{id}} class="g-input-field-label">{{label}}</label>
{{input id=id type=type value=value class="g-input-field" placeholder=placeholder readonly=readonly disabled=disabled}}
{{#if validation.message}}
{{g-invalid text="!" tooltipContent=validation.message tooltipPlace='right'}}
{{g-invalid text="!" tooltipContent=validation.message tooltipPlace="right"}}
{{else}}
<div class="g-valid"></div>
{{/if}}
4 changes: 2 additions & 2 deletions addon/templates/components/g-invalid.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{text}}
{{#attach-tooltip animation='fade' placement=tooltipPlace arrow=true}}
{{tooltipContent}}
{{#attach-tooltip animation="fade" placement=tooltipPlace arrow=true}}
{{tooltipContent}}
{{/attach-tooltip}}
4 changes: 2 additions & 2 deletions addon/templates/components/g-modal.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#modal-dialog renderInPlace=renderInPlace targetAttachment="center" translucentOverlay=true
container-class="g-modal-container" close="closeModal"}}
<div class="g-modal-title">{{title}}</div>
{{yield}}
<div class="g-modal-title">{{title}}</div>
{{yield}}
{{/modal-dialog}}
4 changes: 2 additions & 2 deletions addon/templates/components/g-paginator.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div {{action "previous"}} disabled={{_previousDisabled}} class="g-page left-arrow"></div>
<div {{action "previous"}} role="button" disabled={{_previousDisabled}} class="g-page left-arrow"></div>
<span class="vertical-center">{{start}} - {{end}} of {{total}}</span>
<div {{action "next"}} disabled={{_nextDisabled}} class="g-page right-arrow"></div>
<div {{action "next"}} role="button" disabled={{_nextDisabled}} class="g-page right-arrow"></div>
36 changes: 26 additions & 10 deletions addon/templates/components/g-selectize.hbs
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
<label for={{id}} class="g-input-field-label">{{label}}</label>
{{ember-selectize id=id
placeholder=placeholder
content=content
optionValuePath=optionValuePath
optionLabelPath=optionLabelPath
select-item="select-item"
selection=selection
value=value
disabled=disabled}}
{{#if lookups}}
<PowerSelect @options={{this.lookupValues}}
@selected={{this.selection}}
@disabled={{this.disabled}}
@placeholder={{this.placeholder}}
@onChange={{this.onChange}} as |item|>
{{#if optionLabelPath}}
{{get item this.optionLabelPath}}
{{else}}
{{item}}
{{/if}}
</PowerSelect>
{{else}}
<PowerSelect @options={{this.content}}
@selected={{this.selection}}
@disabled={{this.disabled}}
@placeholder={{this.placeholder}}
@onChange={{this.onChange}} as |item|>
{{#if optionLabelPath}}
{{get item this.optionLabelPath}}
{{else}}
{{item}}
{{/if}}
</PowerSelect>
{{/if}}
{{#if validation.message}}
{{g-invalid text="!" tooltipContent=validation.message tooltipPlace='right'}}
{{g-invalid text="!" tooltipContent=validation.message tooltipPlace="right"}}
{{else}}
<div class="g-valid"></div>
{{/if}}
Loading

0 comments on commit 5310231

Please sign in to comment.