Giter Club home page Giter Club logo

ui-bootstrap4's Introduction

UI Bootstrap 4

AngularJS directives specific to Bootstrap

Join the chat at https://gitter.im/ui-bootstrap4/Lobby Build Status devDependency Status

Fork

This is a fork of the original ui-bootstrap4 project. It has been modified to work with Bootstrap 4. The reason this repository exists is because some applications are choosing (or are forced to chose) to stap with Angular 1, but would like to move to Bootstrap 4. (Especially considering the fact that bootstrap 3 is EoL.)

This for makes as few changes as possible to the original source code, so that upstream changes can be merged in with minimal issues. Some work has been used from other attempts to do the same thing, such as the fork from dietergeerts.

๐Ÿšจ Help Wanted ๐Ÿšจ

As of this Aug. 2019, my company no longer has any maintained Angular 1.x code, so I have lost the last of my incentive to work on this. Still happy to click buttons and make releases, but I'm pretty much done writing any code for this.

I did this for a work project, and, frankly, we've gotten what we needed out of it. I'd love to see this cleaned up and maybe even maintained... but I just don't have the time myself. I'll accept merge requests, and fight with the build system... but that's basically it. If someone would like to step in, just let me know and I'll add you to the project. Just open an issue, and I'll respond.

๐Ÿ’ต Incentivising ๐Ÿ’ต

If you really want your issue fixed and you feel you can't fix it on your own, or your don't want to, I've setup IssueHunt for this project:

Make an item, and then add some funding, and either myself or someone in the community will likely pick it up. No promises, but it seems worth the experiment.

Contributing

Wanting to contribute, but not take over the reigns? The things that are really holding this project back are, as I can see it:

  • Undocumented/confusing build system.
    • The whole SNAPSHOT thing seems like it adds a lot of complexity, for very little gain.
    • Making a release should be a single npm command
    • Getting started with development should be very simple
  • Switch to ES2015
    • The code should be cleaned up, and better formatted

If you can think of more, feel free to make issues.


Quick links

Demo

Do you want to see directives in action? Visit https://morgul.github.io/ui-bootstrap4/!

Installation

Installation is easy as UI Bootstrap has minimal dependencies - only the AngularJS and Twitter Bootstrap's CSS are required. Notes:

  • Since version 0.13.0, UI Bootstrap depends on ngAnimate for transitions and animations, such as the accordion, carousel, etc. Include ngAnimate in the module dependencies for your app in order to enable animation.
  • UI Bootstrap depends on ngTouch for swipe actions. Include ngTouch in the module dependencies for your app in order to enable swiping.

Angular Requirements

  • UI Bootstrap 1.0 and higher requires Angular 1.4.x or higher and it has been tested with Angular 1.4.8.
  • UI Bootstrap 0.14.3 is the last version that supports Angular 1.3.x.
  • UI Bootstrap 0.12.0 is the last version that supports Angular 1.2.x.

Bootstrap Requirements

  • UI Bootstrap 3.0 and higher requires Bootstrap CSS version 4.x or higher and it has been tested with Bootstrap CSS 4.0.0-beta.
  • UI Bootstrap 2.x requires Bootstrap CSS version 3.x or higher and it has been tested with Bootstrap CSS 3.3.6.
  • UI Bootstrap 0.8 is the last version that supports Bootstrap CSS 2.3.x.

Install with NPM

$ npm install ui-bootstrap4

Install with Yarn

$ yarn add ui-bootstrap4

This will install AngularJS and Bootstrap NPM packages.

Custom build

Head over to https://morgul.github.io/ui-bootstrap4/ and hit the Custom build button to create your own custom UI Bootstrap build, just the way you like it.

Manual download

After downloading dependencies (or better yet, referencing them from your favorite CDN) you need to download build version of this project. All the files and their purposes are described here: https://github.com/morgul/ui-bootstrap4/tree/gh-pages#build-files Don't worry, if you are not sure which file to take, opt for ui-bootstrap-tpls-[version].min.js.

Adding dependency to your project

When you are done downloading all the dependencies and project files the only remaining part is to add dependencies on the ui.bootstrap AngularJS module:

angular.module('myModule', ['ui.bootstrap']);

Webpack / JSPM

To use this project with webpack, follow the NPM instructions. Now, if you want to use only the accordion, you can do:

import accordion from 'ui-bootstrap4/src/accordion';

angular.module('myModule', [accordion]);

You can import all the pieces you need in the same way:

import accordion from 'ui-bootstrap4/src/accordion';
import datepicker from 'ui-bootstrap4/src/datepicker';

angular.module('myModule', [accordion, datepicker]);

This will load all the dependencies (if any) and also the templates (if any).

Be sure to have a loader able to process css files like css-loader.

If you would prefer not to load your css through your JavaScript file loader/bundler, you can choose to import the index-nocss.js file instead, which is available for the modules:

  • carousel
  • datepicker
  • datepickerPopup
  • dropdown
  • modal
  • popover
  • position
  • timepicker
  • tooltip
  • typeahead

The other modules, such as accordion in the example below, do not have CSS resources to load, so you should continue to import them as normal:

import accordion from 'ui-bootstrap4/src/accordion';
import typeahead from 'ui-bootstrap4/src/typeahead/index-nocss.js';

angular.module('myModule', [accordion, typeahead]);

Versioning

Pre-2.0.0 does not follow a particular versioning system. 2.0.0 and onwards follows semantic versioning. All release changes can be viewed on our changelog.

Support

FAQ

https://github.com/morgul/ui-bootstrap4/wiki/FAQ

Code of Conduct

Take a moment to read our Code of Conduct

Supported browsers

Directives from this repository are automatically tested with the following browsers:

  • Chrome (stable and canary channel)
  • Firefox
  • IE 9 and 10
  • Opera
  • Safari

Modern mobile browsers should work without problems.

Need help?

Need help using UI Bootstrap?

  • Live help in the IRC (#angularjs channel at the freenode network). Use this webchat or your own IRC client.
  • Ask a question in StackOverflow under the ui-bootstrap4 tag.

For now, please create new issues in this repository to ask questions about using UI Bootstrap 4

Found a bug?

Please take a look at CONTRIBUTING.md and submit your issue here.


Contributing to the project

We are always looking for the quality contributions! Please check the CONTRIBUTING.md for the contribution guidelines.

## Development, meeting minutes, roadmap and more.

Head over to the Wiki for notes on development for UI Bootstrap, meeting minutes from the UI Bootstrap team, roadmap plans, project philosophy and more.


Building a Release

I've currently hacked out a solution, but the whole thing's very messy. For now, to build a release, just do:

$ grunt release:3.0.0

(Obviously, replace 3.0.0 with the version you're releasing.) That should build a correct release, and update the docs, and everything.

ui-bootstrap4's People

Contributors

ajoslin avatar bekos avatar blah238 avatar bobbiebarker avatar chenyuzhcy avatar chrisirhc avatar davious avatar deeg avatar ericzou avatar foxandxss avatar haricot avatar icfantv avatar inukshuk avatar joshdmiller avatar karianna avatar lazychino avatar morgul avatar mvhecke avatar navarroaxel avatar ozzieorca avatar paulorbpacheco avatar petebacondarwin avatar phazei avatar pkozlowski-opensource avatar robjacobs avatar sidhnor avatar trask avatar wesleycho avatar yuradubensky avatar zachlysobey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ui-bootstrap4's Issues

[Question] how do I get a compiled version in a fork?

Maybe you could help me, I'm not incredibly familiar with this. Most repos I've forked had a compiled file that I'd just use.
I use bower.
I was using:
"ui-bootstrap4": "^3.0.5"
now I'm using:
"ui-bootstrap4": "git://github.com/MEEEEEE/ui-bootstrap4#master"

And I just include: "bower_components/ui-bootstrap4/docs/ui-bootstrap-tpls.js"

Do you just manually run the grunt docs task and commit it? Any reason not including the dist task in the repo?

missing template on version 3.0.1

Hello,

first of all many thanks for your work. Then a few words to describe the issue.

Bug description:

It seems the 'accordion-group.html' is missing from 'ui-bootstrap.tpls'. However the version '3.0.0' works like a charm.

Steps to reproduce the issue:

The AngularJS app does not work at all, and throws error during start.

Version of Angular, UIBS, and Bootstrap

Angular: 1.6.8

UIBS: 3.0.1

Bootstrap: 4.0.0

Have a nice day.

SRC file

Hi. May i know what can i do if i am only interested in pagination? what files should i take and what files should i take in my project. Thanks a lot man. Im sorry this is the only way i can get to you.

Document use of additional modal classes in `size` property.

There are some Bootstrap 4 classes one might want to include in dialogs, such as "modal-dialog-centered" and "modal-dialog-scrollable" - short of rewriting the template code, those can be easily injected by including them in the "size" parameter for $uibModal.open. Like "size: 'md modal-dialog-centered'". So include this in the documentation as well?

Demo for dropdown with template-url doesn't work

Bug description:

The "Dropdown using template" demo doesn't show the dropdown menu when clicked. It appears that the Bootstrap show class is not being applied when the dropdown is toggled and the template-url attribute is set. Manually applying the show class in the browser's dev tools causes the menu to appear.

Link to minimally-working plunker that reproduces the issue:

https://morgul.github.io/ui-bootstrap4/#!#dropdown

Steps to reproduce the issue:

  1. Click the "Dropdown using template" button -- the dropdown menu is not displayed

Version of Angular, UIBS, and Bootstrap

Angular: 1.6.1

UIBS: 3.0.3

Bootstrap: 4.0.0

"Dropdown with keyboard nav example" yields "Uncaught TypeError: Cannot read properties of undefined (reading 'focus')"

Bug description:

Can't use keyboard for navigating dropdown menu. Attempting to do so will yield Uncaught TypeError: Cannot read properties of undefined (reading 'focus').

Link to minimally-working plunker that reproduces the issue:

https://morgul.github.io/ui-bootstrap4 (Dropdown with keyboard nav example)

Steps to reproduce the issue:

Click on dropdown and use arrow keys

Version of Angular, UIBS, and Bootstrap

Angular: 1.8.2

UIBS: 3.0.7

Bootstrap: 4

No Accordion animation

Bug description:

I am using the latest versions of Angular 1, Bootstrap CSS and ui-bootstrap4. I have no glue why, but there is no animation when opening/closing the accordion, see https://codepen.io/anon/pen/XPoqPq

I tried to find out why.. it seems like uibCollapse is not initialized at all.

Version of Angular, UIBS, and Bootstrap

Angular: 1.7.4

UIBS: 3.0.4

Bootstrap: 4.1.3

Requiring ui-bootstrap4 returns module name

I have a quick question:

require ('ui-bootstrap4')

returns 'ui.bootstrap' instead of the actual module. My experience with AngularJS is insufficient to speak with confidence, but isn't the convention to return a module instead, and allow accessing module name via .name?

I'm asking, because one of the possible conventions for module loading is:

angular.module ('app, [
    require ('angular-hotkeys').name, // most modules are cool with this
    ...
    require ('ui-bootstrap4').name, // oops! could not load module undefined
])

...and returning name breaks this convention. If the convention exists, this should be a quick fix, I think I should be able to make a PR.

Datepicker Popup appears huge and out of screen

Bug description:

When I open the datepicker (I use a button next to the text input) it appears but everything is really huge (icons, buttons, etc.) and I can see only small part of it and everything else is out of screen.

Link to minimally-working plunker that reproduces the issue:

The plunker given on the very official UIBS page produces the same issue

Steps to reproduce the issue:

Set up an text input with the basic options for a working popup datepicker. Create a button with a ng-click function to set the opened state of the datepicker to true.

Version of Angular, UIBS, and Bootstrap

AngularJS: 1.6.9
UIBS: 3.0.3
Bootstrap: 4.0.0 (final)

Time picker showing wrong time for Safari Browser

The issues forum is NOT for support requests. It is for bugs and feature requests only.
Please read https://github.com/angular-ui/bootstrap/blob/master/CONTRIBUTING.md and search
existing issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.

Bug description:

It is working on Chrome and Firefox properly
I am using this date = "2020-04-20T09:00:26" in India Timezone (+5:30)
This should display time as 9:00 AM but displaying time as 14:30 PM
Chrome and Firefox displays it correctly, but failed for Safari

Link to minimally-working plunker that reproduces the issue:

Steps to reproduce the issue:

Version of Angular, UIBS, and Bootstrap

Angular: 1.7.8
UIBS: UIB4 (3.0.6)

Bootstrap: 4

Datepicker popup does not focus back to input on date selection

Basically, if you select any date from the calendar, the focus leaves the input. This is very painful if you're in the middle of a form and are trying to tab through it. Focus starts at the beginning of the document. The "today", "clear", and "done" buttons all reset the focus to the input properly.

Here's the issue and fix for the original ui-bootstrap:
angular-ui#4243

Pagination does not work when hidden ("ngIf" directive)

Here is a live code showing to you that the pagination component does not work correctly. The trouble exists when the directive is firstly hidden (by "ngIf" native directive).

For achieve to view this issue, it is necessary watch console logs; clicking visibility checkbox and changing page positions. It is not refreshing scope.

Dropdown

hello, congratulations for the work you did.
I'm working on my theme and I found a small bug about the dropdowns, if I insert a div element inside the button that opens the dropdown, the dropdown itself does not work, because it adds the show class to the internal div at the button, there are solutions for this bug? this is my code:

<li class="nav-item dropdown" uib-dropdown ng-controller="InboxCtrl" on-toggle="toggled(open)" >
	<a href="javascript:void(0)" uib-dropdown-toggle id="inbox-messages-dropdown">
		<div notify count='scopeVariable'>
			<i class="ti-comment"></i>
		</div>
		<span translate="topbar.messages.MAIN">MESSAGES</span>
	</a>
	<div class="dropdown-menu dropdown-menu-right dropdown-light dropdown-messages dropdown-large" uib-dropdown-menu aria-labelledby="inbox-messages-dropdown">
		<div class="dropdown-header" translate="topbar.messages.HEADER"> Unread messages</div>
		<div class="drop-down-wrapper ps-container">
			<ul>
				<li class="unread" ng-repeat="message in messages | orderBy: 'date':true | limitTo:3 ">
					<a href="javascript:;" ng-class="{ unread: !message.read }">
						<div class="clearfix">
							<div class="thread-image">
								<img ng-src="{{ message.avatar && message.avatar || noAvatarImg }}" alt="" class="img-responsive img-rounded">
							</div>
							<div class="thread-content">
								<span class="author">{{message.from}}</span>
								<span class="preview">{{ message.content | htmlToPlaintext | words:15:true }}</span>
								<span class="time"> {{ message.date | date: "MM/dd/yyyy 'at' h:mma" }}</span>
							</div>
						</div>
					</a>
				</li>
			</ul>
		</div>
		<div class="dropdown-divider"></div>
		<div class="view-all">
			<a href="#" translate="topbar.messages.SEEALL"> See All </a>
		</div>
	</div>
</li>

thank you for your support.

Plunker script source change

All examples shown on website leads to a Plunker page.
The ui-bootstrap javascript code on those pages is 404. So they should be changed from:

From:

<script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-3.0.6.js"></script>

To:

<script src="https://morgul.github.io/ui-bootstrap4/ui-bootstrap-tpls-3.0.6.min.js"></script>

Rating state-on/off icon is not correct

Bug description:

Right on your online demo , as well as on my project, state-on/off icon does not take effect, which make the icon always a solid/empty star.

BTW, is there someone working on this project ?

Pagination styling not working

Bug description:

When using the Pagination directive, it appears the Bootstrap styling is not applied. Easy to reproduce, just try using the directive as outlined.

Angular: 1.6.X

Tooltip wrong position causes tootlip flickering

Bug description:

When using tooltip-placement="left", tooltip tip occasionally is placed wrongly and overlaps toggle element element. So if mouse is placed close to the left border of toggle element - it causes tip to disappear immediately after show. This produces inifinite loop of show/hide tooltip while mouse is steady.

Root cause is that class 'placementClassPrefix-' is added to tip element after position is calculated.
Boostrap defines padding on ".bs-tooltip-left"so it affects tip element's width. And since tip position is calculated taking into account tip's width it result in tip being placed to much to the right and so overlapping toggle element.

Link to minimally-working plunker that reproduces the issue:

No need for a plunker - it is easily reproducible on demo page:
https://morgul.github.io/ui-bootstrap4/#!#tooltip

Steps to reproduce the issue:

Select tooltip placement as 'left' and place mouse close to the left edge of tooltip button.

Version of Angular, UIBS, and Bootstrap

Angular: 1.5.9

UIBS: 3.0.2

Bootstrap: 4.0.0

Progressbar

Hello, your branch is being of great help for my project. Thank you for your support.
There are a simple bug that we have found.

Bug description:

The type property not works properly and is writing .progress-bar-{{type}} at .progress-bar element instead of .bg-{{type}}

Steps to reproduce the issue:

<uib-progressbar value="50" type="danger" class="mb-2"><b>50%</b></uib-progressbar>

A simple workaround

<uib-progressbar value="50" class="mb-2"><b class="bg-danger">50%</b></uib-progressbar>

Version of Angular, UIBS, and Bootstrap

Angular: 1.6.7

UIBS: 3.0.2

Bootstrap: 4.0.0

Vertical tabs not working

Bug description:

The following code will render tabs as horizontal:

<uib-tabset active="active" vertical="true">

Link to minimally-working plunker that reproduces the issue:

https://morgul.github.io/ui-bootstrap4/#!#tabs
Not actually a plunker, but the sample in the demo page is enough.

Version of Angular, UIBS, and Bootstrap

Angular: 1.6.4

UIBS: 3.0.3

Bootstrap: 4.0.0

I understand no one is really maintaining this...

The issues forum is NOT for support requests. It is for bugs and feature requests only.
Please read https://github.com/angular-ui/bootstrap/blob/master/CONTRIBUTING.md and search
existing issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.

Bug description:

I uiboostrap for bs 3 if you created a modal and didn't pass it a new controller, it would use the controller for the page you were on. I believe you could also pass in the controller and controllerAs for the current controller, into your modal, and it would use the current object.

This version always creates a new controller object. There is no way to pass in anything remotely useful for the johnpapa standard of using vm=this;

I have tested in all way shapes and forms, and short of passing in a service to hold the data to be edited, there is no real way to connect the current page data.

I found this to be true because modalInstance was null whenever the break point was hit to close the modal. Because using the current pages controller, instantiated a new copy of the controller.

Is there a way to get your current page viewmodel/controller into the modal?

Thanks

Link to minimally-working plunker that reproduces the issue:

Steps to reproduce the issue:

Version of Angular, UIBS, and Bootstrap

Angular:

UIBS:

Bootstrap:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.