Update to angular ui bootstrap v0.13.3

This commit is contained in:
Brian Surowiec
2015-08-10 04:06:13 -04:00
parent 3b0f362204
commit 9adacf6790
2 changed files with 97 additions and 61 deletions

View File

@@ -31,18 +31,23 @@ testApp.config((
/**
* $datepickerConfig tests
*/
$datepickerConfig.dayFormat = 'd';
$datepickerConfig.dayHeaderFormat = 'E';
$datepickerConfig.dayTitleFormat = 'dd-MM-yyyy';
$datepickerConfig.datepickerMode = 'month';
$datepickerConfig.formatDay = 'd';
$datepickerConfig.formatDayHeader = 'E';
$datepickerConfig.formatDayTitle = 'dd-MM-yyyy';
$datepickerConfig.formatMonth = 'M';
$datepickerConfig.formatMonthTitle = 'yy';
$datepickerConfig.formatYear = 'y';
$datepickerConfig.maxDate = '1389586124979';
$datepickerConfig.maxMode = 'month';
$datepickerConfig.minDate = '1389586124979';
$datepickerConfig.monthFormat = 'M';
$datepickerConfig.monthTitleFormat = 'yy';
$datepickerConfig.minMode = 'month';
$datepickerConfig.shortcutPropagation = true;
$datepickerConfig.showWeeks = false;
$datepickerConfig.startingDay = 1;
$datepickerConfig.yearFormat = 'y';
$datepickerConfig.yearRange = 10;
$datepickerConfig.shortcutPropagation = true;
/**
@@ -53,9 +58,12 @@ testApp.config((
$datepickerPopupConfig.clearText = 'Reset Selection';
$datepickerPopupConfig.closeOnDateSelection = false;
$datepickerPopupConfig.closeText = 'Finished';
$datepickerPopupConfig.dateFormat = 'dd-MM-yyyy';
$datepickerPopupConfig.datepickerPopup = 'dd-MM-yyyy';
$datepickerPopupConfig.datepickerPopupTemplateUrl = 'template.html';
$datepickerPopupConfig.datepickerTemplateUrl = 'template.html';
$datepickerPopupConfig.html5Types.date = 'MM-dd-yyyy';
$datepickerPopupConfig.onOpenFocus = false;
$datepickerPopupConfig.showButtonBar = false;
$datepickerPopupConfig.toggleWeeksText = 'Show Weeks';
/**
@@ -72,9 +80,13 @@ testApp.config((
$paginationConfig.firstText = 'First Page';
$paginationConfig.itemsPerPage = 25;
$paginationConfig.lastText = 'Last Page';
$paginationConfig.maxSize = 13;
$paginationConfig.numPages = 13;
$paginationConfig.nextText = 'Next Page';
$paginationConfig.previousText = 'Previous Page';
$paginationConfig.rotate = false;
$paginationConfig.templateUrl = 'template.html';
$paginationConfig.totalItems = 13;
/**
@@ -122,6 +134,7 @@ testApp.config((
animation: false,
popupDelay: 1000,
appendToBody: true,
trigger: 'mouseenter hover',
useContentExp: true
});
$tooltipProvider.setTriggers({
@@ -148,6 +161,7 @@ testApp.controller('TestCtrl', (
controller: 'ModalTestCtrl',
controllerAs: 'vm',
keyboard: true,
openedClass: 'modal-open my-modal',
resolve: {
items: ()=> {
return [1, 2, 3, 4, 5];

View File

@@ -1,4 +1,4 @@
// Type definitions for Angular UI Bootstrap 0.13.2
// Type definitions for Angular UI Bootstrap 0.13.3
// Project: https://github.com/angular-ui/bootstrap
// Definitions by: Brian Surowiec <https://github.com/xt0rted>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -36,42 +36,63 @@ declare module angular.ui.bootstrap {
*
* @default 'dd'
*/
dayFormat?: string;
formatDay?: string;
/**
* Format of month in year.
*
* @default 'MMM'
*/
monthFormat?: string;
formatMonth?: string;
/**
* Format of year in year range.
*
* @default 'yyyy'
*/
yearFormat?: string;
formatYear?: string;
/**
* Format of day in week header.
*
* @default 'EEE'
*/
dayHeaderFormat?: string;
formatDayHeader?: string;
/**
* Format of title when selecting day.
*
* @default 'MMM yyyy'
*/
dayTitleFormat?: string;
formatDayTitle?: string;
/**
* Format of title when selecting month.
*
* @default 'yyyy'
*/
monthTitleFormat?: string;
formatMonthTitle?: string;
/**
* Current mode of the datepicker (day|month|year). Can be used to initialize datepicker to specific mode.
*
* @default 'day'
*/
datepickerMode?: string;
/**
* Set a lower limit for mode.
*
* @default 'day'
*/
minMode?: string;
/**
* Set an upper limit for mode.
*
* @default 'year'
*/
maxMode?: string;
/**
* Whether to display week numbers.
@@ -122,7 +143,30 @@ declare module angular.ui.bootstrap {
*
* @default 'yyyy-MM-dd'
*/
dateFormat?: string;
datepickerPopup?: string;
/**
* Allows overriding of default template of the popup.
*
* @default 'template/datepicker/popup.html'
*/
datepickerPopupTemplateUrl?: string;
/**
* Allows overriding of default template of the datepicker used in popup.
*
* @default 'template/datepicker/popup.html'
*/
datepickerTemplateUrl?: string;
/**
* Allows overriding of the default format for html5 date inputs.
*/
html5Types?: {
date?: string;
'datetime-local'?: string;
month?: string;
};
/**
* The text to display for the current day button.
@@ -131,13 +175,6 @@ declare module angular.ui.bootstrap {
*/
currentText?: string;
/**
* The text to display for the toggling week numbers button.
*
* @default 'Weeks'
*/
toggleWeeksText?: string;
/**
* The text to display for the clear button.
*
@@ -172,6 +209,13 @@ declare module angular.ui.bootstrap {
* @default true
*/
showButtonBar?: boolean;
/**
* Whether to focus the datepicker popup upon opening.
*
* @default true
*/
onOpenFocus?: boolean;
}
@@ -318,6 +362,13 @@ declare module angular.ui.bootstrap {
* a path to a template overriding modal's window template
*/
windowTemplateUrl?: string;
/**
* The class added to the body element when the modal is opened.
*
* @default 'model-open'
*/
openedClass?: string;
}
interface IModalStackService {
@@ -354,11 +405,6 @@ declare module angular.ui.bootstrap {
interface IPaginationConfig {
/**
* Current page number. First page is 1.
*/
page?: number;
/**
* Total number of items in all pages.
*/
@@ -392,13 +438,6 @@ declare module angular.ui.bootstrap {
*/
rotate?: boolean;
/**
* An optional expression called when a page is selected having the page number as argument.
*
* @default null
*/
onSelectPage?(page: number): void;
/**
* Whether to display Previous / Next buttons.
*
@@ -440,6 +479,13 @@ declare module angular.ui.bootstrap {
* @default 'Last'
*/
lastText?: string;
/**
* Override the template for the component with a custom provided template.
*
* @default 'template/pagination/pagination.html'
*/
templateUrl?: string;
}
interface IPagerConfig {
@@ -450,16 +496,6 @@ declare module angular.ui.bootstrap {
*/
align?: boolean;
/**
* Current page number. First page is 1.
*/
page?: number;
/**
* Total number of items in all pages.
*/
totalItems?: number;
/**
* Maximum number of items per page. A value less than one indicates all items on one page.
*
@@ -467,20 +503,6 @@ declare module angular.ui.bootstrap {
*/
itemsPerPage?: number;
/**
* An optional expression assigned the total number of pages to display.
*
* @default angular.noop
*/
numPages?: number;
/**
* An optional expression called when a page is selected having the page number as argument.
*
* @default null
*/
onSelectPage?(page: number): void;
/**
* Text for Previous button.
*
@@ -654,7 +676,7 @@ declare module angular.ui.bootstrap {
appendToBody?: boolean;
/**
* Determines the default open triggers for tooltips and popovers
* What should trigger a show of the tooltip? Supports a space separated list of event names.
*
* @default 'mouseenter' for tooltip, 'click' for popover
*/