Skip to content

Commit

Permalink
...uh, changes?
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgul committed Oct 4, 2018
1 parent f032bec commit 2d40031
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 28 deletions.
23 changes: 23 additions & 0 deletions docs/ui-bootstrap-csp.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@
-webkit-transition: 0s ease-in-out left;
transition: 0s ease-in-out left
}
.fa-svg-icon {
display: inline-block;
vertical-align: middle;
min-width: 1em;
min-height: 1em;
height: 100%;
position: relative;
top: -1px;
}

.fa-svg-icon svg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

.fa-svg-icon svg g,
.fa-svg-icon svg path {
fill: currentColor;
}

.uib-datepicker .uib-title {
width: 100%;
}
Expand Down
51 changes: 33 additions & 18 deletions docs/ui-bootstrap-tpls.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* ui-bootstrap4
* http://morgul.github.io/ui-bootstrap4/
* Version: 3.0.3 - 2018-03-12
* Version: 3.0.5 - 2018-10-03
* License: MIT
*/angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
*/angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.common","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
angular.module("ui.bootstrap.tpls", ["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]);
angular.module('ui.bootstrap.collapse', [])

Expand Down Expand Up @@ -699,7 +699,7 @@ angular.module('ui.bootstrap.carousel', [])
return attrs.templateUrl || 'uib/template/carousel/carousel.html';
},
scope: {
active: '=',
active: '=?',
interval: '=',
noTransition: '=',
noPause: '=',
Expand Down Expand Up @@ -786,6 +786,8 @@ function($animateCss) {
};
}]);

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

angular.module('ui.bootstrap.dateparser', [])

.service('uibDateParser', ['$log', '$locale', 'dateFilter', 'orderByFilter', 'filterFilter', function($log, $locale, dateFilter, orderByFilter, filterFilter) {
Expand Down Expand Up @@ -3420,7 +3422,6 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.
return;
}

openScope.focusToggleElement();
openScope.isOpen = false;

if (!$rootScope.$$phase) {
Expand Down Expand Up @@ -3510,7 +3511,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.

scope.focusDropdownEntry = function(keyCode) {
var elems = self.dropdownMenu ? //If append to body is used.
angular.element(self.dropdownMenu).find('a') :
angular.element(self.dropdownMenu).find('.dropdown-item') :
$element.find('div').eq(0).find('a.');

switch (keyCode) {
Expand Down Expand Up @@ -3629,7 +3630,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.

self.dropdownMenu.css(css);
}

// find openContainer by uib-dropdown-menu directive
var openContainer = appendTo ? appendTo : angular.element($element[0].querySelector("[uib-dropdown-menu]"));
var dropdownOpenClass = appendTo ? appendToOpenClass : openClass;
Expand All @@ -3643,10 +3644,10 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.
} else {
toggleClass = isOpen ? 'addClass' : 'removeClass';
}

// original Bootstrap 4 dropdown sets openClass on both dropdownMenu and element
$animate[toggleClass]($element, dropdownOpenClass);

$animate[toggleClass](openContainer, dropdownOpenClass).then(function() {
if (angular.isDefined(isOpen) && isOpen !== wasOpen) {
toggleInvoker($scope, { open: !!isOpen });
Expand All @@ -3662,6 +3663,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.
var newEl = dropdownElement;
self.dropdownMenu.replaceWith(newEl);
self.dropdownMenu = newEl;
$animate.addClass(self.dropdownMenu, dropdownOpenClass);
$document.on('keydown', uibDropdownService.keybindFilter);
});
});
Expand Down Expand Up @@ -3747,6 +3749,21 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.

element.on('click', toggleDropdown);

var openDropdown = function(event) {
if (event.which === 40 && !dropdownCtrl.isOpen()) {
event.preventDefault();
event.stopPropagation();

if (!element.hasClass('disabled') && !attrs.disabled) {
scope.$apply(function() {
dropdownCtrl.toggle();
});
}
}
};

element.on('keydown', openDropdown);

// WAI-ARIA
element.attr({ 'aria-haspopup': true, 'aria-expanded': false });
scope.$watch(dropdownCtrl.isOpen, function(isOpen) {
Expand All @@ -3755,6 +3772,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.

scope.$on('$destroy', function() {
element.off('click', toggleDropdown);
element.off('keydown', openDropdown);
});
}
};
Expand Down Expand Up @@ -7491,17 +7509,13 @@ angular.module("uib/template/alert/alert.html", []).run(["$templateCache", funct
angular.module("uib/template/carousel/carousel.html", []).run(["$templateCache", function ($templateCache) {
$templateCache.put("uib/template/carousel/carousel.html",
"<div class=\"carousel-inner\" ng-transclude></div>\n" +
"<a role=\"button\" href class=\"left carousel-control\" ng-click=\"prev()\" ng-class=\"{ disabled: isPrevDisabled() }\" ng-show=\"slides.length > 1\">\n" +
" <span aria-hidden=\"true\" class=\"fa-svg-icon\">\n" +
" <svg width=\"1792\" height=\"1792\" viewBox=\"0 0 1792 1792\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M1427 301l-531 531 531 531q19 19 19 45t-19 45l-166 166q-19 19-45 19t-45-19l-742-742q-19-19-19-45t19-45l742-742q19-19 45-19t45 19l166 166q19 19 19 45t-19 45z\"/></svg>\n" +
" </span>\n" +
" <span class=\"sr-only\">previous</span>\n" +
"<a role=\"button\" href class=\"carousel-control-prev\" ng-click=\"prev()\" ng-class=\"{ disabled: isPrevDisabled() }\" ng-show=\"slides.length > 1\">\n" +
" <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n" +
" <span class=\"sr-only\">Previous</span>\n" +
"</a>\n" +
"<a role=\"button\" href class=\"right carousel-control\" ng-click=\"next()\" ng-class=\"{ disabled: isNextDisabled() }\" ng-show=\"slides.length > 1\">\n" +
" <span aria-hidden=\"true\" class=\"fa-svg-icon\">\n" +
" <svg width=\"1792\" height=\"1792\" viewBox=\"0 0 1792 1792\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M1363 877l-742 742q-19 19-45 19t-45-19l-166-166q-19-19-19-45t19-45l531-531-531-531q-19-19-19-45t19-45l166-166q19-19 45-19t45 19l742 742q19 19 19 45t-19 45z\"/></svg>\n" +
" </span>\n" +
" <span class=\"sr-only\">next</span>\n" +
"<a role=\"button\" href class=\"carousel-control-next\" ng-click=\"next()\" ng-class=\"{ disabled: isNextDisabled() }\" ng-show=\"slides.length > 1\">\n" +
" <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n" +
" <span class=\"sr-only\">Next</span>\n" +
"</a>\n" +
"<ol class=\"carousel-indicators\" ng-show=\"slides.length > 1\">\n" +
" <li ng-repeat=\"slide in slides | orderBy:indexOfSlide track by $index\" ng-class=\"{ active: isActive(slide) }\" ng-click=\"select(slide)\">\n" +
Expand Down Expand Up @@ -7907,6 +7921,7 @@ angular.module("uib/template/typeahead/typeahead-popup.html", []).run(["$templat
"");
}]);
angular.module('ui.bootstrap.carousel').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibCarouselCss && angular.element(document).find('head').prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'); angular.$$uibCarouselCss = true; });
angular.module('ui.bootstrap.common').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibCommonCss && angular.element(document).find('head').prepend('<style type="text/css">.fa-svg-icon{display:inline-block;vertical-align:middle;min-width:1em;min-height:1em;height:100%;position:relative;top:-1px;}.fa-svg-icon svg{position:absolute;top:0;left:0;width:100%;height:100%;}.fa-svg-icon svg g,.fa-svg-icon svg path{fill:currentColor;}</style>'); angular.$$uibCommonCss = true; });
angular.module('ui.bootstrap.datepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'); angular.$$uibDatepickerCss = true; });
angular.module('ui.bootstrap.position').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibPositionCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'); angular.$$uibPositionCss = true; });
angular.module('ui.bootstrap.datepickerPopup').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerpopupCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px;}</style>'); angular.$$uibDatepickerpopupCss = true; });
Expand Down
35 changes: 27 additions & 8 deletions docs/ui-bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* ui-bootstrap4
* http://morgul.github.io/ui-bootstrap4/
* Version: 3.0.3 - 2018-03-12
* Version: 3.0.5 - 2018-10-03
* License: MIT
*/angular.module("ui.bootstrap", ["ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
*/angular.module("ui.bootstrap", ["ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.common","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
angular.module('ui.bootstrap.collapse', [])

.directive('uibCollapse', ['$animate', '$q', '$parse', '$injector', function($animate, $q, $parse, $injector) {
Expand Down Expand Up @@ -698,7 +698,7 @@ angular.module('ui.bootstrap.carousel', [])
return attrs.templateUrl || 'uib/template/carousel/carousel.html';
},
scope: {
active: '=',
active: '=?',
interval: '=',
noTransition: '=',
noPause: '=',
Expand Down Expand Up @@ -785,6 +785,8 @@ function($animateCss) {
};
}]);

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

angular.module('ui.bootstrap.dateparser', [])

.service('uibDateParser', ['$log', '$locale', 'dateFilter', 'orderByFilter', 'filterFilter', function($log, $locale, dateFilter, orderByFilter, filterFilter) {
Expand Down Expand Up @@ -3419,7 +3421,6 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.
return;
}

openScope.focusToggleElement();
openScope.isOpen = false;

if (!$rootScope.$$phase) {
Expand Down Expand Up @@ -3509,7 +3510,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.

scope.focusDropdownEntry = function(keyCode) {
var elems = self.dropdownMenu ? //If append to body is used.
angular.element(self.dropdownMenu).find('a') :
angular.element(self.dropdownMenu).find('.dropdown-item') :
$element.find('div').eq(0).find('a.');

switch (keyCode) {
Expand Down Expand Up @@ -3628,7 +3629,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.

self.dropdownMenu.css(css);
}

// find openContainer by uib-dropdown-menu directive
var openContainer = appendTo ? appendTo : angular.element($element[0].querySelector("[uib-dropdown-menu]"));
var dropdownOpenClass = appendTo ? appendToOpenClass : openClass;
Expand All @@ -3642,10 +3643,10 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.
} else {
toggleClass = isOpen ? 'addClass' : 'removeClass';
}

// original Bootstrap 4 dropdown sets openClass on both dropdownMenu and element
$animate[toggleClass]($element, dropdownOpenClass);

$animate[toggleClass](openContainer, dropdownOpenClass).then(function() {
if (angular.isDefined(isOpen) && isOpen !== wasOpen) {
toggleInvoker($scope, { open: !!isOpen });
Expand All @@ -3661,6 +3662,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.
var newEl = dropdownElement;
self.dropdownMenu.replaceWith(newEl);
self.dropdownMenu = newEl;
$animate.addClass(self.dropdownMenu, dropdownOpenClass);
$document.on('keydown', uibDropdownService.keybindFilter);
});
});
Expand Down Expand Up @@ -3746,6 +3748,21 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.

element.on('click', toggleDropdown);

var openDropdown = function(event) {
if (event.which === 40 && !dropdownCtrl.isOpen()) {
event.preventDefault();
event.stopPropagation();

if (!element.hasClass('disabled') && !attrs.disabled) {
scope.$apply(function() {
dropdownCtrl.toggle();
});
}
}
};

element.on('keydown', openDropdown);

// WAI-ARIA
element.attr({ 'aria-haspopup': true, 'aria-expanded': false });
scope.$watch(dropdownCtrl.isOpen, function(isOpen) {
Expand All @@ -3754,6 +3771,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.

scope.$on('$destroy', function() {
element.off('click', toggleDropdown);
element.off('keydown', openDropdown);
});
}
};
Expand Down Expand Up @@ -7458,6 +7476,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
};
}]);
angular.module('ui.bootstrap.carousel').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibCarouselCss && angular.element(document).find('head').prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'); angular.$$uibCarouselCss = true; });
angular.module('ui.bootstrap.common').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibCommonCss && angular.element(document).find('head').prepend('<style type="text/css">.fa-svg-icon{display:inline-block;vertical-align:middle;min-width:1em;min-height:1em;height:100%;position:relative;top:-1px;}.fa-svg-icon svg{position:absolute;top:0;left:0;width:100%;height:100%;}.fa-svg-icon svg g,.fa-svg-icon svg path{fill:currentColor;}</style>'); angular.$$uibCommonCss = true; });
angular.module('ui.bootstrap.datepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'); angular.$$uibDatepickerCss = true; });
angular.module('ui.bootstrap.position').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibPositionCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'); angular.$$uibPositionCss = true; });
angular.module('ui.bootstrap.datepickerPopup').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerpopupCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px;}</style>'); angular.$$uibDatepickerpopupCss = true; });
Expand Down
Loading

0 comments on commit 2d40031

Please sign in to comment.