mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
Add missing configuration options & tests to angular-bootstrap-ui
This commit is contained in:
@@ -7,6 +7,7 @@ testApp.config((
|
||||
$buttonConfig: ng.ui.bootstrap.IButtonConfig,
|
||||
$datepickerConfig: ng.ui.bootstrap.IDatepickerConfig,
|
||||
$datepickerPopupConfig: ng.ui.bootstrap.IDatepickerPopupConfig,
|
||||
$dropdownConfig: ng.ui.bootstrap.IDropdownConfig,
|
||||
$modalProvider: ng.ui.bootstrap.IModalProvider,
|
||||
$paginationConfig: ng.ui.bootstrap.IPaginationConfig,
|
||||
$pagerConfig: ng.ui.bootstrap.IPagerConfig,
|
||||
@@ -47,13 +48,18 @@ testApp.config((
|
||||
$datepickerConfig.showWeeks = false;
|
||||
$datepickerConfig.startingDay = 1;
|
||||
$datepickerConfig.yearRange = 10;
|
||||
|
||||
|
||||
$datepickerConfig.monthColumns = 3;
|
||||
$datepickerConfig.yearColumns = 9;
|
||||
$datepickerConfig.yearRows = 6;
|
||||
$datepickerConfig.ngModelOptions.allowInvalid = false;
|
||||
$datepickerConfig.ngModelOptions.timezone = "EST";
|
||||
$datepickerConfig.ngModelOptions.updateOn = "click";
|
||||
|
||||
|
||||
/**
|
||||
* $datepickerPopupConfig tests
|
||||
*/
|
||||
$datepickerPopupConfig.altInputFormats = ["mm/dd/YYYY", "mm-dd-YY"];
|
||||
$datepickerPopupConfig.appendToBody = true;
|
||||
$datepickerPopupConfig.currentText = 'Select Today';
|
||||
$datepickerPopupConfig.clearText = 'Reset Selection';
|
||||
@@ -63,8 +69,18 @@ testApp.config((
|
||||
$datepickerPopupConfig.datepickerPopupTemplateUrl = 'template.html';
|
||||
$datepickerPopupConfig.datepickerTemplateUrl = 'template.html';
|
||||
$datepickerPopupConfig.html5Types.date = 'MM-dd-yyyy';
|
||||
$datepickerPopupConfig.html5Types['datetime-local'] = 'yyyy-MM-ddTHH:mm:ss.sss';
|
||||
$datepickerPopupConfig.html5Types.month = 'yyyy-MM';
|
||||
$datepickerPopupConfig.onOpenFocus = false;
|
||||
$datepickerPopupConfig.showButtonBar = false;
|
||||
$datepickerPopupConfig.placement = "auto bottom left";
|
||||
|
||||
|
||||
/**
|
||||
* $dropdownConfig tests
|
||||
*/
|
||||
$dropdownConfig.appendToOpenClass = "some-thing";
|
||||
$dropdownConfig.openClass = "show";
|
||||
|
||||
|
||||
/**
|
||||
@@ -77,6 +93,7 @@ testApp.config((
|
||||
* $paginationConfig tests
|
||||
*/
|
||||
$paginationConfig.boundaryLinks = true;
|
||||
$paginationConfig.boundaryLinkNumbers = true;
|
||||
$paginationConfig.directionLinks = false;
|
||||
$paginationConfig.firstText = 'First Page';
|
||||
$paginationConfig.itemsPerPage = 25;
|
||||
@@ -88,6 +105,7 @@ testApp.config((
|
||||
$paginationConfig.rotate = false;
|
||||
$paginationConfig.templateUrl = 'template.html';
|
||||
$paginationConfig.totalItems = 13;
|
||||
$paginationConfig.forceEllipses = true;
|
||||
|
||||
|
||||
/**
|
||||
@@ -121,11 +139,14 @@ testApp.config((
|
||||
$timepickerConfig.hourStep = 2;
|
||||
$timepickerConfig.meridians = ['-AM-', '-PM-'];
|
||||
$timepickerConfig.minuteStep = 5;
|
||||
$timepickerConfig.secondStep = 5;
|
||||
$timepickerConfig.mousewheel = false;
|
||||
$timepickerConfig.readonlyInput = true;
|
||||
$timepickerConfig.showMeridian = false;
|
||||
$timepickerConfig.arrowkeys = false;
|
||||
$timepickerConfig.showSpinners = false;
|
||||
$timepickerConfig.showSeconds = true;
|
||||
$timepickerConfig.templateUrl = "template.html";
|
||||
|
||||
/**
|
||||
* $tooltipProvider tests
|
||||
|
||||
95
angular-ui-bootstrap/index.d.ts
vendored
95
angular-ui-bootstrap/index.d.ts
vendored
@@ -11,6 +11,7 @@ export type IAccordionConfig = angular.ui.bootstrap.IAccordionConfig;
|
||||
export type IButtonConfig = angular.ui.bootstrap.IButtonConfig;
|
||||
export type IDatepickerConfig = angular.ui.bootstrap.IDatepickerConfig;
|
||||
export type IDatepickerPopupConfig = angular.ui.bootstrap.IDatepickerPopupConfig;
|
||||
export type IDropdownConfig = angular.ui.bootstrap.IDropdownConfig;
|
||||
export type IModalProvider = angular.ui.bootstrap.IModalProvider;
|
||||
export type IModalService = angular.ui.bootstrap.IModalService;
|
||||
export type IModalServiceInstance = angular.ui.bootstrap.IModalServiceInstance;
|
||||
@@ -54,6 +55,11 @@ declare module 'angular' {
|
||||
toggleEvent?: string;
|
||||
}
|
||||
|
||||
interface IDropdownConfigNgOptions extends angular.INgModelOptions {
|
||||
allowInvalid?: boolean;
|
||||
timezone?: string;
|
||||
}
|
||||
|
||||
interface IDatepickerConfig {
|
||||
/**
|
||||
* Format of day in month.
|
||||
@@ -166,9 +172,45 @@ declare module 'angular' {
|
||||
* @default false
|
||||
*/
|
||||
shortcutPropagation?: boolean;
|
||||
|
||||
/**
|
||||
* The number of columns displayed in month selection.
|
||||
*
|
||||
* @default 3
|
||||
*/
|
||||
monthColumns?: number;
|
||||
|
||||
/**
|
||||
* The number of columns displayed in year selection.
|
||||
*
|
||||
* @default 5
|
||||
*/
|
||||
yearColumns?: number;
|
||||
|
||||
/**
|
||||
* The number of rows displayed in year selection
|
||||
*
|
||||
* @default 4
|
||||
*/
|
||||
yearRows?: number;
|
||||
|
||||
/**
|
||||
* All supported angular ngModelOptions plus some
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
ngModelOptions?: IDropdownConfigNgOptions
|
||||
}
|
||||
|
||||
interface IDatepickerPopupConfig {
|
||||
|
||||
/**
|
||||
* A list of alternate formats acceptable for manual entry.
|
||||
*
|
||||
* @default []
|
||||
*/
|
||||
altInputFormats?: string[];
|
||||
|
||||
/**
|
||||
* The format for displayed dates.
|
||||
*
|
||||
@@ -247,8 +289,26 @@ declare module 'angular' {
|
||||
* @default true
|
||||
*/
|
||||
onOpenFocus?: boolean;
|
||||
|
||||
/**
|
||||
* Passing in 'auto' separated by a space before the placement will enable auto positioning, e.g: "auto bottom-left". The popup will attempt to position where it fits in the closest scrollable ancestor.
|
||||
*
|
||||
* @default 'auto bottom-left'
|
||||
*/
|
||||
placement?: string;
|
||||
}
|
||||
|
||||
interface IDropdownConfig {
|
||||
/**
|
||||
* @default: 'uib-dropdown-open'
|
||||
*/
|
||||
appendToOpenClass?: string;
|
||||
|
||||
/**
|
||||
* @default: 'open'
|
||||
*/
|
||||
openClass?: string;
|
||||
}
|
||||
|
||||
interface IModalProvider {
|
||||
/**
|
||||
@@ -543,6 +603,13 @@ declare module 'angular' {
|
||||
*/
|
||||
boundaryLinks?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to always display the first and last page numbers. If max-size is smaller than the number of pages, then the first and last page numbers are still shown with ellipses in-between as necessary. NOTE: max-size refers to the center of the range. This option may add up to 2 more numbers on each side of the displayed range for the end value and what would be an ellipsis but is replaced by a number because it is sequential.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
boundaryLinkNumbers?: boolean;
|
||||
|
||||
/**
|
||||
* Text for First button.
|
||||
*
|
||||
@@ -563,6 +630,13 @@ declare module 'angular' {
|
||||
* @default 'template/pagination/pagination.html'
|
||||
*/
|
||||
templateUrl?: string;
|
||||
|
||||
/**
|
||||
* Also displays ellipses when rotate is true and max-size is smaller than the number of pages.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
forceEllipses?: boolean;
|
||||
}
|
||||
|
||||
interface IPagerConfig {
|
||||
@@ -679,6 +753,13 @@ declare module 'angular' {
|
||||
*/
|
||||
minuteStep?: number;
|
||||
|
||||
/**
|
||||
* Number of seconds to increase or decrease when using a button.
|
||||
*
|
||||
* @default 1
|
||||
*/
|
||||
secondStep?: number;
|
||||
|
||||
/**
|
||||
* Whether to display 12H or 24H mode.
|
||||
*
|
||||
@@ -720,6 +801,20 @@ declare module 'angular' {
|
||||
* @default true
|
||||
*/
|
||||
showSpinners?: boolean;
|
||||
|
||||
/**
|
||||
* Show seconds input.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
showSeconds?: boolean;
|
||||
|
||||
/**
|
||||
* Add the ability to override the template used on the component.
|
||||
*
|
||||
* @default 'uib/template/timepicker/timepicker.html'
|
||||
*/
|
||||
templateUrl?: string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user