Skip to content
Open
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
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,26 @@
[![Ember Observer Score](http://emberobserver.com/badges/ember-bootstrap.svg)](http://emberobserver.com/addons/ember-bootstrap)
[![npm version](https://badge.fury.io/js/ember-bootstrap.svg)](https://badge.fury.io/js/ember-bootstrap)

An [ember-cli](http://www.ember-cli.com) addon for using [Bootstrap](http://getbootstrap.com/) 3 or 4 in Ember applications.
An [ember-cli](http://www.ember-cli.com) addon for using [Bootstrap](http://getbootstrap.com/) 3, 4 or 5 in Ember applications.

The addon includes the Bootstrap CSS (or Sass, Less) in your project (can be disabled). On top of that, it provides a set of native Ember components (no use of Bootstrap JavaScript!).</p>

*See [www.ember-bootstrap.com](http://www.ember-bootstrap.com/) for full documentation.*

## About this fork

This is SeeClickFix's fork of ember-bootstrap. It is installed from its git tags (for example
`"ember-bootstrap": "SeeClickFix/ember-bootstrap#v5.0.0"`), not from npm, and its version numbers are
independent of upstream's npm releases.

This fork keeps supporting two things that upstream deprecated:

* **Bootstrap 3.** Upstream deprecated it in 4.9.0 and removed it in 5.0.0. Here it stays supported
and tested, with no deprecation warning.
* **Subclassing the component classes.** Upstream deprecated extending from ember-bootstrap's
components in 4.0.0 (and dropped that deprecation again in 6.2.0). Here subclassing is supported
and raises no deprecation.

## Installation

In your application's directory:
Expand Down
4 changes: 1 addition & 3 deletions addon/components/bs-accordion.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { action } from '@ember/object';
import Component from '@glimmer/component';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
import { tracked } from '@glimmer/tracking';

/**
Expand Down Expand Up @@ -31,14 +30,13 @@ import { tracked } from '@glimmer/tracking';

In the example above the first accordion item utilizes the yielded `change` action to add some custom behaviour.

*Note that only invoking the component in a template as shown above is considered part of its public API. Extending from it (subclassing) is generally not supported, and may break at any time.*
*Besides invoking the component in a template as shown above, extending from it (subclassing) is supported as well.*

@class Accordion
@namespace Components
@extends Glimmer.Component
@public
*/
@deprecateSubclassing
export default class Accordion extends Component {
/**
* The value of the currently selected accordion item. Set this to change selection programmatically.
Expand Down
2 changes: 0 additions & 2 deletions addon/components/bs-accordion/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Component from '@glimmer/component';
import typeClass from 'ember-bootstrap/utils/cp/type-class';
import { getOwnConfig, macroCondition } from '@embroider/macros';
import { guidFor } from '@ember/object/internals';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
import arg from '../../utils/decorators/arg';

/**
Expand All @@ -15,7 +14,6 @@ import arg from '../../utils/decorators/arg';
@extends Ember.Component
@public
*/
@deprecateSubclassing
export default class AccordionItem extends Component {
/**
* The title of the accordion item, displayed as a .panel-title element
Expand Down
2 changes: 0 additions & 2 deletions addon/components/bs-accordion/item/title.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { action } from '@ember/object';
import Component from '@glimmer/component';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';

/**
Component for an accordion item title.
Expand All @@ -12,7 +11,6 @@ import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
@extends Glimmer.Component
@public
*/
@deprecateSubclassing
export default class AccordionItemTitle extends Component {
/**
* @property collapsed
Expand Down
4 changes: 1 addition & 3 deletions addon/components/bs-alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { later, schedule } from '@ember/runloop';
import usesTransition from 'ember-bootstrap/utils/decorators/uses-transition';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
import arg from 'ember-bootstrap/utils/decorators/arg';

/**
Expand Down Expand Up @@ -36,14 +35,13 @@ import arg from 'ember-bootstrap/utils/decorators/arg';
The header is rendered using a `<h4>` element by default. You can customize
that one by setting `@headerTag` argument of `<BsAlert>`.

*Note that only invoking the component in a template as shown above is considered part of its public API. Extending from it (subclassing) is generally not supported, and may break at any time.*
*Besides invoking the component in a template as shown above, extending from it (subclassing) is supported as well.*

@class Alert
@namespace Components
@extends Glimmer.Component
@public
*/
@deprecateSubclassing
export default class Alert extends Component {
/**
* A dismissible alert will have a close button in the upper right corner, that the user can click to dismiss
Expand Down
4 changes: 1 addition & 3 deletions addon/components/bs-button-group.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { action } from '@ember/object';
import Component from '@glimmer/component';
import { A, isArray } from '@ember/array';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';

/**
Bootstrap-style button group, that visually groups buttons, and optionally adds radio/checkbox like behaviour.
Expand Down Expand Up @@ -54,14 +53,13 @@ import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
</ul>
```

*Note that only invoking the component in a template as shown above is considered part of its public API. Extending from it (subclassing) is generally not supported, and may break at any time.*
*Besides invoking the component in a template as shown above, extending from it (subclassing) is supported as well.*

@class ButtonGroup
@namespace Components
@extends Glimmer.Component
@public
*/
@deprecateSubclassing
export default class ButtonGroup extends Component {
/**
* @property buttonComponent
Expand Down
2 changes: 0 additions & 2 deletions addon/components/bs-button-group/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import Button from 'ember-bootstrap/components/bs-button';
@private
*/
export default class ButtonGroupButton extends Button {
'__ember-bootstrap_subclass' = true;

/**
* @property groupValue
* @private
Expand Down
4 changes: 1 addition & 3 deletions addon/components/bs-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { action } from '@ember/object';
import { warn } from '@ember/debug';
import Component from '@glimmer/component';
import arg from 'ember-bootstrap/utils/decorators/arg';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
import { DEBUG } from '@glimmer/env';

/**
Expand Down Expand Up @@ -91,14 +90,13 @@ import { DEBUG } from '@glimmer/env';
You can `reset` the state represented by these properties and used for button's text by setting `reset` property to
`true`.

*Note that only invoking the component in a template as shown above is considered part of its public API. Extending from it (subclassing) is generally not supported, and may break at any time.*
*Besides invoking the component in a template as shown above, extending from it (subclassing) is supported as well.*

@class Button
@namespace Components
@extends Glimmer.Component
@public
*/
@deprecateSubclassing
export default class Button extends Component {
/**
* Default label of the button. Not need if used as a block component
Expand Down
4 changes: 1 addition & 3 deletions addon/components/bs-carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { task, timeout } from 'ember-concurrency';
import RSVP from 'rsvp';
import defaultValue from 'ember-bootstrap/utils/default-decorator';
import { equal } from '@ember/object/computed';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';

/**
Ember implementation of Bootstrap's Carousel. Supports all original features but API is partially different:
Expand Down Expand Up @@ -55,15 +54,14 @@ import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
| Wrap | wrap slides, cycles without stopping at first or last slide. |
```

*Note that only invoking the component in a template as shown above is considered part of its public API. Extending from it (subclassing) is generally not supported, and may break at any time.*
*Besides invoking the component in a template as shown above, extending from it (subclassing) is supported as well.*

@class Carousel
@namespace Components
@extends Ember.Component
@public
*/
@tagName('')
@deprecateSubclassing
export default class Carousel extends Component.extend(ComponentParent) {
tabindex = '1';

Expand Down
2 changes: 0 additions & 2 deletions addon/components/bs-carousel/slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import ComponentChild from 'ember-bootstrap/mixins/component-child';
import { next } from '@ember/runloop';
import overrideableCP from 'ember-bootstrap/utils/cp/overrideable';
import { addObserver } from '@ember/object/observers';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
import trackElement from 'ember-bootstrap/utils/track-element';

/**
Expand All @@ -19,7 +18,6 @@ import trackElement from 'ember-bootstrap/utils/track-element';
@public
*/
@tagName('')
@deprecateSubclassing
export default class CarouselSlide extends Component.extend(ComponentChild) {
/**
* @property _element
Expand Down
4 changes: 1 addition & 3 deletions addon/components/bs-collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Component from '@glimmer/component';
import { isNone } from '@ember/utils';
import { next } from '@ember/runloop';
import transitionEnd from 'ember-bootstrap/utils/transition-end';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
import trackElement from 'ember-bootstrap/utils/track-element';
import arg from '../utils/decorators/arg';
import { tracked } from '@glimmer/tracking';
Expand All @@ -22,14 +21,13 @@ import { tracked } from '@glimmer/tracking';
</BsCollapse>
```

*Note that only invoking the component in a template as shown above is considered part of its public API. Extending from it (subclassing) is generally not supported, and may break at any time.*
*Besides invoking the component in a template as shown above, extending from it (subclassing) is supported as well.*

@class Collapse
@namespace Components
@extends Glimmer.Component
@public
*/
@deprecateSubclassing
export default class Collapse extends Component {
/**
* @property _element
Expand Down
4 changes: 1 addition & 3 deletions addon/components/bs-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { action, computed } from '@ember/object';
import Component from '@ember/component';
import defaultValue from 'ember-bootstrap/utils/default-decorator';
import { assert } from '@ember/debug';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';

const ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
const SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
Expand Down Expand Up @@ -164,15 +163,14 @@ const SUPPORTED_KEYCODES = [ESCAPE_KEYCODE, ARROW_DOWN_KEYCODE, ARROW_UP_KEYCODE
version does. This also allows you to set `renderInPlace=false` on the menu component to render it in a wormhole,
which you might want to do if you experience clipping issues by an outer `overflow: hidden` element.

*Note that only invoking the component in a template as shown above is considered part of its public API. Extending from it (subclassing) is generally not supported, and may break at any time.*
*Besides invoking the component in a template as shown above, extending from it (subclassing) is supported as well.*

@class Dropdown
@namespace Components
@extends Ember.Component
@public
s*/
@tagName('')
@deprecateSubclassing
export default class Dropdown extends Component {
/**
* The tag name used for the dropdown element.
Expand Down
4 changes: 1 addition & 3 deletions addon/components/bs-dropdown/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ import Button from 'ember-bootstrap/components/bs-button';
@extends Components.Button
@public
*/
export default class DropdownButton extends Button {
'__ember-bootstrap_subclass' = true;
}
export default class DropdownButton extends Button {}
2 changes: 0 additions & 2 deletions addon/components/bs-dropdown/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Component from '@ember/component';
import { next } from '@ember/runloop';
import { getDestinationElement } from 'ember-bootstrap/utils/dom';
import defaultValue from 'ember-bootstrap/utils/default-decorator';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
import trackElement from 'ember-bootstrap/utils/track-element';

/**
Expand All @@ -18,7 +17,6 @@ import trackElement from 'ember-bootstrap/utils/track-element';
@public
*/
@tagName('')
@deprecateSubclassing
export default class DropdownMenu extends Component {
/**
* @property _element
Expand Down
2 changes: 0 additions & 2 deletions addon/components/bs-dropdown/menu/divider.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Component from '@ember/component';
import { tagName } from '@ember-decorators/component';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';

/**
Component for a dropdown menu divider.
Expand All @@ -13,5 +12,4 @@ import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
@public
*/
@tagName('')
@deprecateSubclassing
export default class DropdownMenuDivider extends Component {}
2 changes: 0 additions & 2 deletions addon/components/bs-dropdown/menu/item.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Component from '@ember/component';
import { tagName } from '@ember-decorators/component';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';

/**
Component for a dropdown menu item.
Expand All @@ -13,5 +12,4 @@ import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
@public
*/
@tagName('')
@deprecateSubclassing
export default class DropdownMenuItem extends Component {}
2 changes: 0 additions & 2 deletions addon/components/bs-dropdown/toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { tagName } from '@ember-decorators/component';
import Component from '@ember/component';
import defaultValue from 'ember-bootstrap/utils/default-decorator';
import { computed, action } from '@ember/object';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';

/**
Anchor element that triggers the parent dropdown to open.
Expand All @@ -16,7 +15,6 @@ import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
@publicø
*/
@tagName('')
@deprecateSubclassing
export default class DropdownToggle extends Component {
/**
* @property inNav
Expand Down
4 changes: 1 addition & 3 deletions addon/components/bs-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import RSVP from 'rsvp';
import defaultValue from 'ember-bootstrap/utils/default-decorator';
import { macroCondition, getOwnConfig } from '@embroider/macros';
import { DEBUG } from '@glimmer/env';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';

/**
Render a form with the appropriate Bootstrap layout class (see `formLayout`).
Expand Down Expand Up @@ -120,15 +119,14 @@ import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
The submission state is reset as soon as any value of a form element changes. Additionally it can be reset programatically by
calling the yielded `resetSubmissionState` function.

*Note that only invoking the component in a template as shown above is considered part of its public API. Extending from it (subclassing) is generally not supported, and may break at any time.*
*Besides invoking the component in a template as shown above, extending from it (subclassing) is supported as well.*

@class Form
@namespace Components
@extends Ember.Component
@public
*/
@tagName('')
@deprecateSubclassing
export default class Form extends Component {
/**
* Bootstrap form class name (computed)
Expand Down
2 changes: 0 additions & 2 deletions addon/components/bs-form/element/control/checkbox.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { action } from '@ember/object';
import { tagName } from '@ember-decorators/component';
import Control from '../control';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';

/**

Expand All @@ -11,7 +10,6 @@ import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
@private
*/
@tagName('')
@deprecateSubclassing
export default class FormElementControlCheckbox extends Control {
@action
handleClick(event) {
Expand Down
2 changes: 0 additions & 2 deletions addon/components/bs-form/element/control/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { action } from '@ember/object';
import Control from '../control';
import sizeClass from 'ember-bootstrap/utils/cp/size-class';
import defaultValue from 'ember-bootstrap/utils/default-decorator';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';

/**

Expand All @@ -13,7 +12,6 @@ import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
@private
*/
@tagName('')
@deprecateSubclassing
export default class FormElementControlInput extends Control {
/**
* @property type
Expand Down
2 changes: 0 additions & 2 deletions addon/components/bs-form/element/control/radio.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { tagName } from '@ember-decorators/component';
import Control from '../control';
import defaultValue from 'ember-bootstrap/utils/default-decorator';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';

/**

Expand All @@ -11,7 +10,6 @@ import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
@private
*/
@tagName('')
@deprecateSubclassing
export default class FormElementControlRadio extends Control {
/**
* @property inline
Expand Down
Loading
Loading