summaryrefslogtreecommitdiffstats
path: root/catalog-ui/typings/angular-ui-bootstrap/angular-ui-bootstrap.d.ts
blob: 4062f141f14422409acd2bb3edadd7349a7514e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
/*-
 * ============LICENSE_START=======================================================
 * SDC
 * ================================================================================
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============LICENSE_END=========================================================
 */
// Type definitions for Angular UI Bootstrap 0.11.0
// Project: https://github.com/angular-ui/bootstrap
// Definitions by: Brian Surowiec <https://github.com/xt0rted>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

/// <reference path="../angularjs/angular.d.ts" />

declare module angular.ui.bootstrap {

    interface IAccordionConfig {
        /**
         * Controls whether expanding an item will cause the other items to close.
         *
         * @default true
         */
        closeOthers?: boolean;
    }


    interface IButtonConfig {
        /**
         * @default: 'active'
         */
        activeClass?: string;

        /**
         * @default: 'Click'
         */
        toggleEvent?: string;
    }


    interface IDatepickerConfig {
        /**
         * Format of day in month.
         *
         * @default 'dd'
         */
        dayFormat?: string;

        /**
         * Format of month in year.
         *
         * @default 'MMM'
         */
        monthFormat?: string;

        /**
         * Format of year in year range.
         *
         * @default 'yyyy'
         */
        yearFormat?: string;

        /**
         * Format of day in week header.
         *
         * @default 'EEE'
         */
        dayHeaderFormat?: string;

        /**
         * Format of title when selecting day.
         *
         * @default 'MMM yyyy'
         */
        dayTitleFormat?: string;

        /**
         * Format of title when selecting month.
         *
         * @default 'yyyy'
         */
        monthTitleFormat?: string;

        /**
         * Whether to display week numbers.
         *
         * @default true
         */
        showWeeks?: boolean;

        /**
         * Starting day of the week from 0-6 where 0=Sunday and 6=Saturday.
         *
         * @default 0
         */
        startingDay?: number;

        /**
         * Number of years displayed in year selection.
         *
         * @default 20
         */
        yearRange?: number;

        /**
         * Defines the minimum available date.
         *
         * @default null
         */
        minDate?: any;

        /**
         * Defines the maximum available date.
         *
         * @default null
         */
        maxDate?: any;
    }

    interface IDatepickerPopupConfig {
        /**
         * The format for displayed dates.
         *
         * @default 'yyyy-MM-dd'
         */
        dateFormat?: string;

        /**
         * The text to display for the current day button.
         *
         * @default 'Today'
         */
        currentText?: string;

        /**
         * The text to display for the toggling week numbers button.
         *
         * @default 'Weeks'
         */
        toggleWeeksText?: string;

        /**
         * The text to display for the clear button.
         *
         * @default 'Clear'
         */
        clearText?: string;

        /**
         * The text to display for the close button.
         *
         * @default 'Done'
         */
        closeText?: string;

        /**
         * Whether to close calendar when a date is chosen.
         *
         * @default true
         */
        closeOnDateSelection?: boolean;

        /**
         * Append the datepicker popup element to `body`, rather than inserting after `datepicker-popup`.
         *
         * @default false
         */
        appendToBody?: boolean;

        /**
         * Whether to display a button bar underneath the datepicker.
         *
         * @default true
         */
        showButtonBar?: boolean;
    }


    interface IModalService {
        /**
         * @param {IModalSettings} options
         * @returns {IModalServiceInstance}
         */
        open(options: IModalSettings): IModalServiceInstance;
    }

    interface IModalServiceInstance {
        /**
         * a method that can be used to close a modal, passing a result
         */
        close(result?: any): void;

        /**
         * a method that can be used to dismiss a modal, passing a reason
         */
        dismiss(reason?: any): void;

        /**
         * a promise that is resolved when a modal is closed and rejected when a modal is dismissed
         */
        result: angular.IPromise<any>;

        /**
         * a promise that is resolved when a modal gets opened after downloading content's template and resolving all variables
         */
        opened: angular.IPromise<any>;
    }

    interface IModalScope extends angular.IScope {
        /**
         * Those methods make it easy to close a modal window without a need to create a dedicated controller
         */

        /**
         * Dismiss the dialog without assigning a value to the promise output
         */
        $dismiss(reason?: any): void;

        /**
         * Close the dialog resolving the promise to the given value
         */
        $close(result?: any): void;
    }

    interface IModalSettings {
        /**
         * a path to a template representing modal's content
         */
        templateUrl?: string;

        /**
         * inline template representing the modal's content
         */
        template?: string;

        /**
         * a scope instance to be used for the modal's content (actually the $modal service is going to create a child scope of a provided scope).
         * Defaults to `$rootScope`.
         */
        scope?: angular.IScope|IModalScope;

        /**
         * a controller for a modal instance - it can initialize scope used by modal.
         * A controller can be injected with `$modalInstance`
         */
        controller?: any;

        /**
         *  an alternative to the controller-as syntax, matching the API of directive definitions.
         *  Requires the controller option to be provided as well
         */
        controllerAs?: string;

        /**
         * members that will be resolved and passed to the controller as locals; it is equivalent of the `resolve` property for AngularJS routes
         */
        resolve?: any;

        /**
         * controls the presence of a backdrop
         * Allowed values:
         *   - true (default)
         *   - false (no backdrop)
         *   - 'static' backdrop is present but modal window is not closed when clicking outside of the modal window
         *
         * @default true
         */
        backdrop?: any;

        /**
         * indicates whether the dialog should be closable by hitting the ESC key, defaults to true
         */
        keyboard?: boolean;

        /**
         * additional CSS class(es) to be added to a modal window template
         */
        windowClass?: string;

        /**
         * optional size of modal window. Allowed values: 'sm' (small) or 'lg' (large). Requires Bootstrap 3.1.0 or later
         */
        size?: string;

        /**
         * a path to a template overriding modal's window template
         */
        windowTemplateUrl?: string;
    }

    interface IModalStackService {
        /**
         * Opens a new modal instance.
         */
        open(modalInstance: IModalServiceInstance, modal: any): void;

        /**
         * Closes a modal instance with an optional result.
         */
        close(modalInstance: IModalServiceInstance, result?: any): void;

        /**
         * Dismisses a modal instance with an optional reason.
         */
        dismiss(modalInstance: IModalServiceInstance, reason?: any): void;

        /**
         * Dismiss all open modal instances with an optional reason that will be passed to each instance.
         */
        dismissAll(reason?: any): void;

        /**
         * Gets the topmost modal instance that is open.
         */
        getTop(): IModalStackedMapKeyValuePair;
    }

    interface IModalStackedMapKeyValuePair {
        key: IModalServiceInstance;
        value: any;
    }


    interface IPaginationConfig {
        /**
         * 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.
         *
         * @default 10
         */
        itemsPerPage?: number;

        /**
         * Limit number for pagination size.
         *
         * @default: null
         */
        maxSize?: number;

        /**
         * An optional expression assigned the total number of pages to display.
         *
         * @default angular.noop
         */
        numPages?: number;

        /**
         * Whether to keep current page in the middle of the visible ones.
         *
         * @default true
         */
        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.
         *
         * @default true
         */
        directionLinks?: boolean;

        /**
         * Text for Previous button.
         *
         * @default 'Previous'
         */
        previousText?: string;

        /**
         * Text for Next button.
         *
         * @default 'Next'
         */
        nextText?: string;

        /**
         * Whether to display First / Last buttons.
         *
         * @default false
         */
        boundaryLinks?: boolean;

        /**
         * Text for First button.
         *
         * @default 'First'
         */
        firstText?: string;

        /**
         * Text for Last button.
         *
         * @default 'Last'
         */
        lastText?: string;
    }

    interface IPagerConfig {
        /**
         * Whether to align each link to the sides.
         *
         * @default true
         */
        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.
         *
         * @default 10
         */
        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.
         *
         * @default '« Previous'
         */
        previousText?: string;

        /**
         * Text for Next button.
         *
         * @default 'Next »'
         */
        nextText?: string;
    }


    interface IPositionCoordinates {
        width?: number;
        height?: number;
        top?: number;
        left?: number;
    }

    interface IPositionService {
        /**
         * Provides a read-only equivalent of jQuery's position function.
         */
        position(element: JQuery): IPositionCoordinates;

        /**
         * Provides a read-only equivalent of jQuery's offset function.
         */
        offset(element: JQuery): IPositionCoordinates;
    }


    interface IProgressConfig {
        /**
         * Whether bars use transitions to achieve the width change.
         *
         * @default: true
         */
        animate?: boolean;

        /**
         * A number that specifies the total value of bars that is required.
         *
         * @default: 100
         */
        max?: number;
    }


    interface IRatingConfig {
        /**
         * Changes the number of icons.
         *
         * @default: 5
         */
        max?: number;

        /**
         * A variable used in the template to specify the state for selected icons.
         *
         * @default: null
         */
        stateOn?: string;

        /**
         * A variable used in the template to specify the state for unselected icons.
         *
         * @default: null
         */
        stateOff?: string;
    }


    interface ITimepickerConfig {
        /**
         * Number of hours to increase or decrease when using a button.
         *
         * @default 1
         */
        hourStep?: number;

        /**
         * Number of minutes to increase or decrease when using a button.
         *
         * @default 1
         */
        minuteStep?: number;

        /**
         * Whether to display 12H or 24H mode.
         *
         * @default true
         */
        showMeridian?: boolean;

        /**
         * Meridian labels based on locale. To override you must supply an array like ['AM', 'PM'].
         *
         * @default null
         */
        meridians?: Array<string>;

        /**
         * Whether the user can type inside the hours & minutes input.
         *
         * @default false
         */
        readonlyInput?: boolean;

        /**
         * Whether the user can scroll inside the hours & minutes input to increase or decrease it's values.
         *
         * @default true
         */
        mousewheel?: boolean;
    }


    interface ITooltipOptions {
        /**
         * Where to place it? Defaults to 'top', but also accepts 'right', 'bottom', or 'left'.
         *
         * @default 'top'
         */
        placement?: string;

        /**
         * Should it fade in and out?
         *
         * @default true
         */
        animation?: boolean;

        /**
         * For how long should the user have to have the mouse over the element before the tooltip shows (in milliseconds)?
         *
         * @default 0
         */
        popupDelay?: number;

        /**
         * Should the tooltip be appended to `$body` instead of the parent element?
         *
         * @default false
         */
        appendtoBody?: boolean;
    }

    interface ITooltipProvider {
        /**
         * Provide a set of defaults for certain tooltip and popover attributes.
         */
        options(value: ITooltipOptions): void;

        /**
         * Extends the default trigger mappings with mappings of your own. E.g. `{ 'openTrigger': 'closeTrigger' }`.
         */
        setTriggers(triggers: Object): void;
    }


    interface ITransitionService {
        /**
         * The browser specific animation event name.
         */
        animationEndEventName: string;

        /**
         * The browser specific transition event name.
         */
        transitionEndEventName: string;

        /**
         * Provides a consistent interface to trigger CSS 3 transitions and to be informed when they complete.
         *
         * @param element The DOMElement that will be animated
         * @param trigger The thing that will cause the transition to start:
         *   - As a string, it represents the css class to be added to the element.
         *   - As an object, it represents a hash of style attributes to be applied to the element.
         *   - As a function, it represents a function to be called that will cause the transition to occur.
         * @param options Optional settings for the transition.
         *
         * @return A promise that is resolved when the transition finishes.
         */
        (element: angular.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): angular.IPromise<angular.IAugmentedJQuery>;
    }

    interface ITransitionServiceOptions {
        animation?: boolean;
    }

}