Skip to content

Commit

Permalink
⬆️ v3.14.0...v3.15.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nadnoslen committed Apr 15, 2022
1 parent a8c7389 commit 2ef5337
Show file tree
Hide file tree
Showing 17 changed files with 418 additions and 230 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# misc
/.bowerrc
/.editorconfig
/.ember-cli.js
/.ember-cli
/.env*
/.eslintignore
/.eslintrc.js
Expand Down
2 changes: 1 addition & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

module.exports = {
extends: "recommended",
extends: "octane",
rules: {
"no-inline-styles": false,
},
Expand Down
20 changes: 11 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,36 @@ jobs:

include:
# runs linting and tests with current locked deps

- stage: "Tests"
name: "Tests"
install:
- yarn install --non-interactive
script:
- yarn lint:hbs
- yarn lint:js
- yarn test

- name: "Floating Dependencies"
- stage: "Additional Tests"
name: "Floating Dependencies"
install:
- yarn install --no-lockfile --non-interactive
script:
- yarn 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.4
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
- 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
- env: EMBER_TRY_SCENARIO=ember-classic

before_install:
- npm config set spin false
- npm install -g npm@4
- npm --version
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

install:
- yarn install --non-interactive

script:
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Components for managing Boostrap 3 clearfix as well as a Viewport mixin for dete

## Compatibility

- Ember.js v3.4 or above
- Ember.js v3.8 or above
- Ember CLI v2.13 or above
- Node.js v8 or above

Expand Down
66 changes: 35 additions & 31 deletions addon/components/twbs-clearfix.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Component from '@ember/component';
import { computed } from '@ember/object';
import { alias, and, or } from '@ember/object/computed';
import Component from "@ember/component";
import { computed } from "@ember/object";
import { and, not, or } from "@ember/object/computed";

// noinspection JSFileReferences
import layout from '../templates/components/twbs-clearfix';
import layout from "../templates/components/twbs-clearfix";

/**
* A convenience component for rendering _Responsive Column Resets_ as described in the Bootstrap documentation. This
Expand All @@ -11,21 +12,27 @@ import layout from '../templates/components/twbs-clearfix';
* @see http://getbootstrap.com/css/#grid-responsive-resets
*/
export default Component.extend({
attributeBindings: ["_isHidden:hidden"],
/**
* The class bindings based on the computed properties within.
*/
classNameBindings: [
'clearfix',
'visibleLgBlock',
'visibleMdBlock',
'visibleSmBlock',
'visibleXsBlock'
"clearfix",
"visibleLgBlock",
"visibleMdBlock",
"visibleSmBlock",
"visibleXsBlock",
],
classNames: ['twbs-clearfix'],
classNames: ["twbs-clearfix"],
/**
* Used in the classNameBinding.
*/
clearfix: or('visibleLgBlock', 'visibleMdBlock', 'visibleSmBlock', 'visibleXsBlock'),
clearfix: or(
"visibleLgBlock",
"visibleMdBlock",
"visibleSmBlock",
"visibleXsBlock"
),
/**
* REQUIRED. Specify the positive-non-zero column count that you expect the responsive column reset to be applied to.
*/
Expand All @@ -34,54 +41,51 @@ export default Component.extend({
* REQUIRED. Supply the index from the each loop.
*/
index: undefined,
/**
* If the index has not been supplied, then don't render anything.
*/
isVisible: alias('_isRender'),
layout,
tagName: 'div',
tagName: "div",
/**
* OPTIONAL.
* Used to specify that you'd like a clearfix for ALL sizes.
*/
'visible-all': false,
"visible-all": false,
/**
* OPTIONAL.
*/
'visible-lg': false,
"visible-lg": false,
/**
* OPTIONAL.
*/
'visible-md': false,
"visible-md": false,
/**
* OPTIONAL.
*/
'visible-sm': false,
"visible-sm": false,
/**
* OPTIONAL.
*/
'visible-xs': false,
"visible-xs": false,
/**
* Used in the classNameBinding.
*/
visibleLgBlock: and('_isRender', '_visibleLg'),
visibleLgBlock: and("_isRender", "_visibleLg"),
/**
* Used in the classNameBinding.
*/
visibleMdBlock: and('_isRender', '_visibleMd'),
visibleMdBlock: and("_isRender", "_visibleMd"),
/**
* Used in the classNameBinding.
*/
visibleSmBlock: and('_isRender', '_visibleSm'),
visibleSmBlock: and("_isRender", "_visibleSm"),
/**
* Used in the classNameBinding.
*/
visibleXsBlock: and('_isRender', '_visibleXs'),
_isRender: computed('columnCount', 'index', function() {
return this.index > 0 && ((this.index + 1) % this.columnCount) === 0;
visibleXsBlock: and("_isRender", "_visibleXs"),
_isRender: computed("columnCount", "index", function () {
return this.index > 0 && (this.index + 1) % this.columnCount === 0;
}),
_visibleLg: or('visible-lg', 'visible-all'),
_visibleMd: or('visible-md', 'visible-all'),
_visibleSm: or('visible-sm', 'visible-all'),
_visibleXs: or('visible-xs', 'visible-all')
_isHidden: not("_isRender"),
_visibleLg: or("visible-lg", "visible-all"),
_visibleMd: or("visible-md", "visible-all"),
_visibleSm: or("visible-sm", "visible-all"),
_visibleXs: or("visible-xs", "visible-all"),
});
23 changes: 19 additions & 4 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ module.exports = async function () {
useYarn: true,
scenarios: [
{
name: "ember-lts-3.4",
name: "ember-lts-3.8",
npm: {
devDependencies: {
"ember-source": "~3.4.0",
"ember-source": "~3.8.0",
},
},
},
{
name: "ember-lts-3.8",
name: "ember-lts-3.12",
npm: {
devDependencies: {
"ember-source": "~3.8.0",
"ember-source": "~3.12.0",
},
},
},
Expand Down Expand Up @@ -69,6 +69,21 @@ module.exports = async function () {
},
},
},
{
name: "ember-classic",
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
"application-template-wrapper": true,
"default-async-observers": false,
"template-only-glimmer-components": false,
}),
},
npm: {
ember: {
edition: "classic",
},
},
},
],
};
};
22 changes: 13 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@
"devDependencies": {
"@ember/jquery": "^2.0.0",
"@ember/optional-features": "^2.0.0",
"@glimmer/component": "^1.0.0",
"babel-eslint": "^10.0.3",
"bootstrap": "^3.4.1",
"bootstrap-sass": "^3.4.1",
"broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^1.5.2",
"ember-cli": "~3.14.0",
"ember-cli-dependency-checker": "^3.1.0",
"ember-auto-import": "^1.5.3",
"ember-cli": "~3.15.2",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-eslint": "^5.1.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sass": "^10.0.1",
Expand All @@ -51,15 +52,15 @@
"ember-cli-uglify": "^3.0.0",
"ember-cli-update": "1.0.1",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^2.1.0",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.1",
"ember-maybe-import-regenerator": "^1.0.0",
"ember-qunit": "^4.5.1",
"ember-qunit": "^4.6.0",
"ember-resolver": "^8.0.3",
"ember-source": "~3.14.1",
"ember-source": "~3.15.0",
"ember-source-channel-url": "^3.0.0",
"ember-try": "^2.0.0",
"eslint-plugin-ember": "^7.1.0",
"eslint-plugin-ember": "^7.7.1",
"eslint-plugin-node": "^11.1.0",
"loader.js": "^4.7.0",
"qunit-dom": "^2.0.0",
Expand All @@ -80,9 +81,12 @@
"url": "https://github.com/cybertoothca/ember-cli-bootstrap3-grid.git"
},
"dependencies": {
"ember-cli-babel": "^7.11.1",
"ember-cli-babel": "^7.13.0",
"ember-cli-htmlbars": "^6.0.1"
},
"ember": {
"edition": "octane"
},
"ember-addon": {
"configPath": "tests/dummy/config"
}
Expand Down
10 changes: 6 additions & 4 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Application from '@ember/application';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
import Resolver from './resolver';
import loadInitializers from "ember-load-initializers";
import Resolver from "ember-resolver";

import Application from "@ember/application";

import config from "./config/environment";

export default class App extends Application {
modulePrefix = config.modulePrefix;
Expand Down
15 changes: 7 additions & 8 deletions tests/dummy/app/controllers/twbs-clearfix.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import Controller from "@ember/controller";
import { action } from "@ember/object";

export default Controller.extend({
actions: {
toggleClearFix() {
this.set("isClearFixEnabled", !this.isClearFixEnabled);
},
},
export default class TwbsClearfixController extends Controller {
isClearFixEnabled = true;

isClearFixEnabled: true,
});
@action toggleClearFix() {
this.set("isClearFixEnabled", !this.isClearFixEnabled);
}
}
3 changes: 0 additions & 3 deletions tests/dummy/app/resolver.js

This file was deleted.

Empty file.
26 changes: 19 additions & 7 deletions tests/dummy/app/templates/twbs-clearfix.hbs
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
<div class="container">
<button
class="btn btn-primary"
onclick={{action "toggleClearFix"}}
type="button"
{{on "click" (fn this.toggleClearFix)}}
>
{{if isClearFixEnabled "Turn Clearfix OFF" "Turn Clearfix ON"}}
{{if this.isClearFixEnabled "Turn Clearfix OFF" "Turn Clearfix ON"}}
</button>
<div class="row">
{{#each model as |item index|}}
{{#each @model as |item index|}}
<div class="col-sm-6 col-md-4 col-lg-2" style="padding: 5px">
<RandomHeightBlock>
{{index}}
</RandomHeightBlock>
</div>
{{#if isClearFixEnabled}}
<TwbsClearfix @columnCount={{2}} @index={{index}} @visible-sm={{true}} />
<TwbsClearfix @columnCount={{3}} @index={{index}} @visible-md={{true}} />
<TwbsClearfix @columnCount={{4}} @index={{index}} @visible-lg={{true}} />
{{#if this.isClearFixEnabled}}
<TwbsClearfix
@columnCount={{2}}
@index={{index}}
@visible-sm={{true}}
/>
<TwbsClearfix
@columnCount={{3}}
@index={{index}}
@visible-md={{true}}
/>
<TwbsClearfix
@columnCount={{4}}
@index={{index}}
@visible-lg={{true}}
/>
{{/if}}
{{/each}}
</div>
Expand Down
8 changes: 4 additions & 4 deletions tests/dummy/app/templates/viewport-demo.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="container">
<h2>Viewport</h2>
<ul>
<li>Is XS {{xs?}}</li>
<li>Is SM {{sm?}}</li>
<li>Is MD {{md?}}</li>
<li>Is LG {{lg?}}</li>
<li>Is XS {{this.xs?}}</li>
<li>Is SM {{this.sm?}}</li>
<li>Is MD {{this.md?}}</li>
<li>Is LG {{this.lg?}}</li>
</ul>
</div>
2 changes: 1 addition & 1 deletion tests/dummy/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "3.14.0",
"version": "3.15.2",
"blueprints": [
{
"name": "addon",
Expand Down
Loading

0 comments on commit 2ef5337

Please sign in to comment.