forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chui.d.ts
1548 lines (1361 loc) · 49.4 KB
/
chui.d.ts
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
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Type definitions for chui v3.9.1
// Project: https://github.com/chocolatechipui/chocolatechip-ui
// Definitions by: Robert Biggs <http://chocolatechip-ui.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// ChocolateChip-UI 3.9.1
/**
These TypeScript delcarations for ChocolateChip-UI contain interfaces for both ChocolateChipJS and jQuery. Depending on which library you are using, you will get the type interfaces appropriate for it.
*/
/**
* Interface for ChocolateChipJS.
*/
interface ChocolateChipStatic {
/**
* This method will concatenate strings or values as a cleaner alternative to using the '+' operator.
*
* @param string or number A comma separated series of strings to concatenate.
* @return string
*/
concat(...string: string[]): string;
/**
* The method will iterate over an array.
*
* @param obj An iterable object.
* @param callback A callback to execute on each loop.
* @param args Any arguments you need to pass to the callback.
*/
forEach(obj: Array<any>, callback: Function, args?: any): any;
/**
* Alias for cross-platform events: pointerdown, MSPointerDown, touchstart and mousedown.
*/
eventStart: ChUIEventInterface;
/**
* Alias for cross-platform events: pointerup, MSPointerUp, touchend and mouseup.
*/
eventEnd: ChUIEventInterface;
/**
* Alias for cross-platform events: pointermove, MSPointerMove, touchmove and mousemove.
*/
eventMove: ChUIEventInterface;
/**
* Alias for cross-platform events: pointercancel, MSPointerCancel, touchcancel and mouseout.
*/
eventCancel: ChUIEventInterface;
/**
* Whether browser is Microsoft Edge or not.
*/
isIEEdge: boolean;
/**
* Whether screen is at least 960 pixels wide.
*/
isWideScreen: boolean;
/**
* Whether screen is at least 960 pixels wide and in portrait orientation.
*/
isWideScreenPortrait: boolean;
/**
* Return the version of the current browser.
*
* @return number Returns the current browser's version.
*/
browserVersion(): number;
/**
* Hide the navigation bar, raising up the content below it.
*
* @return void
*/
UIHideNavBar(): void;
/**
* If the navigation bar is hidden, show it, pushing down the content to make room.
*
* @return void
*/
UIShowNavBar(): void;
/**
* Determine whether navigation is in progress or not.
*/
isNavigating: boolean;
/**
* Tell ChocolateChip-UI to not modify window hash during navigation.
* The default value is false.
*/
UIBrowserHashModification: boolean;
/**
* Method to tell ChocolateChip-UI to register navigation history on Window hash.
*/
UIEnableBrowserHashModification(): void;
/**
* Navigate to the article indicated by the provided destination ID. This enters the destination into the navigation history array.
*
* param destination An id for the article to navigate to.
* @return void
*/
UIGoToArticle(destination: string): void;
/**
* Go back to the previous article from whence you came. This resets the navigation history array.
*
* @return void
*/
UIGoBack(): void;
/**
* Go back to the article indicated by the provided ID. This is for non-linear back navigation. This will reset the navigation history array to match the current state.
*/
UIGoBackToArticle(articleID: string): void;
/**
* Display a transparent screen over the UI.
*
* @param opacity The percentage of opacity for the screen.
* @return void
*/
UIBlock(opacity?: number): void;
/**
* Remove the transparent screen covering the UI.
*
* @return void
*/
UIUnblock(): void;
/**
* Create and show a Popup with title and message. Possible options: {id: "#myPopup", title: "My Popup",
* message: "Woohoo!", cancelButton: "Forget It!", contiueButton: "Whatever", callback: function() {console.log('Blah!');}, empty: false }.
*
* param options UIPopupOptions
*/
UIPopup(options?: {
id?: string;
title?: string;
message?: string;
cancelButton?: string;
continueButton?: string;
callback?: Function;
empty?: boolean;
}): void;
/**
* Create and show a Popover. Options: {id: "#myPopover", title: "Whatever", callback: function() {console.log('Blah!');}}.
*
* param options UIPopoverOptions
* @return void
*/
UIPopover(options?: {
id?: string;
callback?: Function;
title?: string;
}): void;
/**
* Close any currently visible popovers.
*
* @return void
*/
UIPopoverClose(): void;
/**
* Create a segmented control: {id: "mySegments", className: "seggie", labels: ["one", "two","three"], selected: 1}
*
* param: options UICreateSegmentedOptions
*/
UICreateSegmented(options?: {
id?: string;
className?: string;
labels?: string[];
selected?: number
}): ChocolateChipElementArray;
/**
* Initialize a horiontal or vertical paging control. This uses a segmented control in the navigation bar with a class
* like "segmented paging horizontal" or "segmented paging vertical". It uses a single article with multiple sections to paginate.
*
* @return void
*/
UIPaging(): void;
/**
* Creates a sheet. Minimum option is an id: {id : 'starTrek', listClass :'enterprise', background: 'transparent', handle: false }
*
* @return void
*/
UISheet(options: {
id: string;
listClass?: string;
background?: string;
handle?: boolean;
}): void;
/**
* Show a sheet by passing this its ID.
*
* @return void
*/
UIShowSheet(id: string): void;
/**
* Hide any currently displayed sheets.
*
* @return void
*/
UIHideSheet(): void;
/**
* The body tag wrapped and ready to use: $.body.css('background-color','orange')
*/
body: ChocolateChipElementArray;
/**
* An array of the navigation history. Do not manipulate this. For examination only. This is used by navigation lists, etc.
*/
UINavigationHistory: string[];
/**
* Creates and initializes a slide out menu. Possible options: {dynamic: true, callback: function() { alert("Woohoo!");}}
*/
UISlideout: {
/**
* Creates and initializes a slide out menu. Possible options: {dynamic: true, callback: function() { alert("Woohoo!");}}
*
* @return void
*/
(options?: {
dynamic?: boolean;
callback?: (args?: any) => any;
}): any;
/**
* Populates a slideout menu.
*
* @return void
*/
populate(array: Object[]): void;
};
/**
* Reset the value of the stepper to its defaults at initialization. Pass it a reference to the stepper to reset.
*
* @return void
*/
UIResetStepper(stepper: HTMLElement[]): void;
/**
* Create a switch control. Possible options: { id: '#myId', name: 'fruit.mango', state: 'on', value: 'Mango', checked: 'on', style: 'traditional', callback: function() { alert('hi');}}
*
* @return void
*/
UICreateSwitch(options?: {
id?: string;
name?: string;
state?: string;
value?: string | number;
checked?: string;
style?: string;
callback?: () => any;
}): void;
/**
* Creates a tabbar. On iOS this is at the bottom of the screen. On Android and Windows, it is at the top.
* Options: {id: 'mySpecialTabbar', tabs: 4, labels: ["Refresh", "Add", "Info", "Downloads", "Favorite"], icons: ["refresh", "add", "info", "downloads", "favorite"], selected: 2 }
*
* @return void
*/
UITabbar(options?: {
id?: string;
tabs: number;
labels: string[];
icons?: string[];
selected?: number;
}): void;
/**
* Create a search bar for an article. Options: { articleId: '#products', id: 'productSearch', placeholder: 'Find a product', results: 5 }
*
* @return void
*/
UISearch(options?: {
articleId?: any;
id?: string;
placeholder?: string;
results?: number;
}): void;
/**
* Create and initialize a swipable carousel. Options: {target : '#myCarousel', panels: ['<p>stuff</p>','<p>more</p>'], loop: true, pagination: true }
*
* @return void
*/
UISetupCarousel(options: {
target: any;
panels: ChocolateChipElementArray;
loop?: boolean;
pagination?: boolean;
}): void;
/**
* Bind the values of data-models to elements with data-controllers: <input id='myText' data-controller='input-value' type='text'></li><h3 data-model='input-value'></h3>.
* You can bind a single model to its controller by providing its name as the argument: $.UIBindData('input-value');
*
* @param controller A string indicating the controller whose value a model is bound to.
* @return void
*/
UIBindData(controller?: string): void;
/**
* Unbind the values of data-models from their data-controllers.
* If you provide a controller name as the argument, only that controller will be unbound.
*
* @param controller A controller to unbind.
* @return void
*/
UIUnBindData(controller?: string): void;
}
/**
* Interface for ChocolateChipJS HTMLElement Array.
*/
interface ChocolateChipElementArray {
/**
* Iterate over an Array object, executing a function for each matched element.
*
* @return void
*/
forEach(func: (ctx: any, idx: number) => void): void;
/**
* Check the current matched set of elements against a selector or element and return it
* if it matches the given arguments.
*
* @param selector A string containing a selector expression to match elements against.
* @return HTMLElement[]
*/
iz(selector: string): ChocolateChipElementArray;
/**
* Check the current matched set of elements against a selector or element and return it
* if it matches the given arguments.
*
* @param elements One or more elements to match the current set of elements against.
* @return HTMLElement[]
*/
iz(element: any): ChocolateChipElementArray;
/**
* Check the current matched set of elements against a selector or element and return it
* if it does not match the given arguments.
*
* @param selector A string containing a selector expression to match elements against.
* @return HTMLElement[]
*/
iznt(selector: string): ChocolateChipElementArray;
/**
* Check the current matched set of elements against a selector or element and return it
* if it does not match the given arguments.
*
* @param elements One or more elements to match the current set of elements against.
* @return HTMLElement[]
*/
iznt(element: any): ChocolateChipElementArray;
/**
* Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
*
* @param selector A string containing a selector expression to match elements against.
* @return HTMLElement[]
*/
haz(selector: string): ChocolateChipElementArray;
/**
* Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
*
* @param contained A DOM element to match elements against.
* @return HTMLElement[]
*/
haz(contained: HTMLElement): ChocolateChipElementArray;
/**
* Reduce the set of matched elements to those that have a descendant that does not match the selector or DOM element.
*
* @param selector A string containing a selector expression to match elements against.
* @return HTMLElement[]
*/
haznt(selector: string): ChocolateChipElementArray;
/**
* Reduce the set of matched elements to those that have a descendant that does not match the selector or DOM element.
*
* @param contained A DOM element to match elements against.
* @return HTMLElement[]
*/
haznt(contained: HTMLElement): ChocolateChipElementArray;
/**
* Return any of the matched elements that have the given class.
*
* @param className The class name to search for.
* @return HTMLElement[]
*/
hazClass(className: string): ChocolateChipElementArray;
/**
* Return any of the matched elements that do not have the given class.
*
* @param className The class name to search for.
* @return HTMLElement[]
*/
hazntClass(className: string): ChocolateChipElementArray;
/**
* Return any of the matched elements that have the given attribute.
*
* @param className The class name to search for.
* @return HTMLElement[]
*/
hazAttr(attributeName: string): ChocolateChipElementArray;
/**
* Return any of the matched elements that do not have the given attribute.
*
* @param className The class name to search for.
* @return HTMLElement[]
*/
hazntAttr(attributeName: string): ChocolateChipElementArray;
/**
* Attach a handler to an event for the elements.
*
* @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
* @param handler A function to execute each time the event is triggered.
* @param useCapture Setting the third argument to true will trigger event bubbling. The default is false.
* @return ChocolateChipStatic
*/
bind(eventType: string | ChUIEventInterface, handler: (eventObject: Event) => any, useCapture?: boolean): ChocolateChipStatic;
/**
* Remove a handler for an event from the elements.
*
* @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
* @param handler A function to execute each time the event is triggered.
* @param useCapture Setting the third argument to true will trigger event bubbling. The default is false.
* @return ChocolateChipStatic
*/
unbind(eventType: string | ChUIEventInterface, handler: (eventObject: Event) => any, useCapture?: boolean): ChocolateChipStatic;
/**
* Add a delegated event to listen for the provided event on the descendant elements.
*
* @param selector A string defining the descendant elements to listen on for the designated event.
* @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
* @param handler A function to execute each time the event is triggered. The keyword "this" will refer
* to the element receiving the event.
* @param useCapture Setting the third argument to true will trigger event bubbling. The default is false.
* @return ChocolateChipStatic
*/
delegate(selector: any, eventType: string | ChUIEventInterface, handler: (eventObject: Event) => any, useCapture?: boolean): ChocolateChipStatic;
/**
* Add a delegated event to listen for the provided event on the descendant elements.
*
* @param selector A string defining the descendant elements are listening for the event.
* @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
* @param handler A function handler assigned to this event.
* @param useCapture Setting the third argument to true will trigger event bubbling. The default is false.
* @return ChocolateChipStatic
*/
undelegate(selector: any, eventType: string | ChUIEventInterface, handler: (eventObject: Event) => any, useCapture?: boolean): ChocolateChipStatic;
/**
* Add a handler to an event for elements. If a selector is provided as the second argument, this implements a delegated event.
*
* @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
* @param selector A string defining the descendant elements are listening for the event.
* @param handler A function handler assigned to this event.
* @param useCapture Setting the third argument to true will trigger event bubbling. The default is false.
* @return ChocolateChipStatic
*/
on( eventType: string | ChUIEventInterface, selector: any, handler?: (eventObject: Event) => any, capturePhase?: boolean): ChocolateChipStatic;
/**
* Remove a handler for an event from the elements. If the second argument is a selector, it tries to undelegate the event.
* If no arugments are provided, it removes all events from the element(s).
*
* @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
* @param selector A string defining the descendant elements are listening for the event.
* @param handler A function handler assigned to this event.
* @param useCapture Setting the third argument to true will trigger event bubbling. The default is false.
* @return ChocolateChipStatic
*/
off( eventType?: string | ChUIEventInterface, selector?: any, handler?: (eventObject: Event) => any, capturePhase?: boolean): ChocolateChipStatic;
/**
*
*/
trigger(eventType: string | ChUIEventInterface): void;
/**
* Center an element to the screen.
*/
UICenter(): void;
/**
* Display a busy indicator. Posible options: {size: "100px", color: "#ff0000", position: "align-flush", duration: "2s"}.
*
* @param size The size as a string with length identifier: "40px".
* @param color The color for the busy indicator: "#ff0000".
* @param position Optional positioning, such as "align-flush".
* @param duration The time for the busy indicator to display: "500ms".
* @return void
*/
UIBusy(options?: {
size?: string;
color?: string;
position?: string | boolean;
duration?: string;
}): void;
/**
* Close the currently displayed Popup. This is executed on the popup: $('#myPopup').UIPopupClose().
*
* @return void
*/
UIPopupClose(): void;
/**
* Initialize a segmented control. Options: {selected: 2, callback: function() {console.log('Blah');}}
*
* @return void
*/
UISegmented(options?: {
selected?: number;
callback?: Function;
}): void;
/**
* This method allows the user to use a segmented control to toggle a set of panels. It is executed on the segmented control.
* The options id is the contain of the panels. The options callback is to execute when the user toggles a panel.
*
* @return void
*/
UIPanelToggle(panelsContainer: string, callback: () => any): void;
/**
* Make a list editable. This can be enabling changing the order of list items, or deleting them, or both. Options: {editLabel: "Edit", doneLabel: "Done",
* deleteLabel: "Delete", callback: function() {alert('Bye bye!');}, deletable: true, movable: true}.
*
* @return void
*/
UIEditList(options?: {
editLabel?: string;
doneLabel?: string;
deleteLabel?: string;
callback?: Function;
deletable?: boolean;
movable?: boolean;
}): void;
/**
* Convert a simple list into a selection list. This converts the list into a radio button group, meaning only one can be selected at any time.
* You can name the radios buttons using the options name. Options: {name: "selectedNamesGroup", selected: 2, callback: function() {alert('hi');}}
*
* @return void
*/
UISelectList(options?: {
name?: string;
selected?: number;
callback?: Function;
}): void;
/**
* Create a stepper control by executing it on a span with the class "stepper". Possible options: {start: 0, end: 10, defaultValue: 3}.
*
* @return void
*/
UIStepper(options: {
start: number;
end: number;
defaultValue: number;
}): void;
/**
* Initialize any existing switch controls: $('.switch').UISwitch();
*
* @return void
*/
UISwitch(): void;
/**
* Execute this on a range control to initialize it.
*
* @return void
*/
UIRange(): void;
}
/**
* Interface for jQuery
*/
interface JQueryStatic {
/**
* This method will concatenate strings or values as a cleaner alternative to using the '+' operator.
*
* @param string or number A comma separated series of strings to concatenate.
* @return string
*/
concat(...string: string[]): string;
/**
* The method will iterate over an array.
*
* @param obj An iterable object.
* @param callback A callback to execute on each loop.
* @param args Any arguments you need to pass to the callback.
*/
forEach(obj: Array<any>, callback: Function, args?: any): any;
/**
* Alias for cross-platform events: pointerdown, MSPointerDown, touchstart and mousedown.
*/
eventStart: ChUIEventInterface;
/**
* Alias for cross-platform events: pointerup, MSPointerUp, touchend and mouseup.
*/
eventEnd: ChUIEventInterface;
/**
* Alias for cross-platform events: pointermove, MSPointerMove, touchmove and mousemove.
*/
eventMove: ChUIEventInterface;
/**
* Alias for cross-platform events: pointercancel, MSPointerCancel, touchcancel and mouseout.
*/
eventCancel: ChUIEventInterface;
/**
* Whether device is iPhone.
*/
isiPhone: boolean;
/**
* Whether device is iPad.
*/
isiPad: boolean;
/**
* Whether device is iPod.
*/
isiPod: boolean;
/**
* Whether OS is iOS.
*/
isiOS: boolean;
/**
* Whether OS is Android
*/
isAndroid: boolean;
/**
* Whether OS is WebOS.
*/
isWebOS: boolean;
/**
* Whether OS is Blackberry.
*/
isBlackberry: boolean;
/**
* Whether OS supports touch events.
*/
isTouchEnabled: boolean;
/**
* Whether there is a network connection.
*/
isOnline: boolean;
/**
* Whether app is running in stanalone mode.
*/
isStandalone: boolean;
/**
* Whether OS is iOS 6.
*/
isiOS6: boolean;
/**
* Whether OS i iOS 7.
*/
isiOS7: boolean;
/**
* Whether OS is Windows.
*/
isWin: boolean;
/**
* Whether device is Windows Phone.
*/
isWinPhone: boolean;
/**
* Whether browser is IE10.
*/
isIE10: boolean;
/**
* Whether browser is IE11.
*/
isIE11: boolean;
/**
* Whether browser is Microsoft Edge or not.
*/
isIEEdge: boolean;
/**
* Whether browser is Webkit based.
*/
isWebkit: boolean;
/**
* Whether browser is running on mobile device.
*/
isMobile: boolean;
/**
* Whether browser is running on desktop.
*/
isDesktop: boolean;
/**
* Whether browser is Safari.
*/
isSafari: boolean;
/**
* Whether browser is Chrome.
*/
isChrome: boolean;
/**
* Is native Android browser (not mobile Chrome).
*/
isNativeAndroid: boolean;
/**
* Whether screen is at least 960 pixels wide.
*/
isWideScreen: boolean;
/**
* Whether screen is at least 960 pixels wide and in portrait orientation.
*/
isWideScreenPortrait: boolean;
/**
* Return the version of the current browser.
*/
browserVersion(): number;
/**
* Hide the navigation bar, raising up the content below it.
*/
UIHideNavBar(): void;
/**
* If the navigation bar is hidden, show it, pushing down the content to make room.
*/
UIShowNavBar(): void;
/**
* Determine whether navigation is in progress or not.
*/
isNavigating: boolean;
/**
* Tell ChocolateChip-UI to not modify window hash during navigation.
* The default value is false.
*/
UIBrowserHashModification: boolean;
/**
* Method to tell ChocolateChip-UI to register navigation history on Window hash.
*/
UIEnableBrowserHashModification(): void;
/**
* Navigate to the article indicated by the provided destination ID. This enters the destination into the navigation history array.
*
* @param destination An id for the article to navigate to.
* @return void
*/
UIGoToArticle(destination: string): void;
/**
* Go back to the previous article from whence you came. This resets the navigation history array.
*
* @return void
*/
UIGoBack(): void;
/**
* Go back to the article indicated by the provided ID. This is for non-linear back navigation. This will reset the navigation history array to match the current state.
*
* @return void
*/
UIGoBackToArticle(articleID: string): void;
/**
* Display a transparent screen over the UI.
*
* @param opacity The percentage of opacity for the screen.
* @return void
*/
UIBlock(opacity?: number): void;
/**
* Remove the transparent screen covering the UI.
*
* @return void
*/
UIUnblock(): void;
/**
* Create and show a Popup with title and message. Possible options: {id: "#myPopup", title: "My Popup",
* message: "Woohoo!", cancelButton: "Forget It!", contiueButton: "Whatever", callback: function() {console.log('Blah!');}, empty: false }.
*
* @param options UIPopupOptions
* @return void
*/
UIPopup(options?: {
id?: string;
title?: string;
message?: string;
cancelButton?: string;
continueButton?: string;
callback?: Function;
empty?: boolean;
}): void;
/**
* Create and show a Popover. Options: {id: "#myPopover", title: "Whatever", callback: function() {console.log('Blah!');}}.
*
* @param options UIPopoverOptions
* @return void
*/
UIPopover(options?: {
id?: string;
callback?: Function;
title?: string;
}): void;
/**
* Close any currently visible popovers.
*
* @return void
*/
UIPopoverClose(): void;
/**
* Create a segmented control: {id: "mySegments", className: "seggie", labels: ["one", "two","three"], selected: 1}
*
* @param: options UICreateSegmentedOptions
* @return JQuery
*/
UICreateSegmented(options: {
id?: string;
className?: string;
labels?: string[];
selected?: number
}): JQuery;
/**
* Initialize a horiontal or vertical paging control. This uses a segmented control in the navigation bar with a class
* like "segmented paging horizontal" or "segmented paging vertical". It uses a single article with multiple sections to paginate.
*
* @return void
*/
UIPaging(): void;
/**
* Creates a sheet. Minimum option is an id: {id : 'starTrek', listClass :'enterprise', background: 'transparent', handle: false }
*
* @return void
*/
UISheet(options: {
id: string;
listClass?: string;
background?: string;
handle?: boolean;
}): void;
/**
* Show a sheet by passing this its ID.
*
* @return void
*/
UIShowSheet(id: string): void;
/**
* Hide any currently displayed sheets.
*
* @return void
*/
UIHideSheet(): void;
/**
* The body tag wrapped and ready to use: $.body.css('background-color','orange')
*/
body: JQuery;
/**
* An array of the navigation history. Do not manipulate this. For examination only. This is used by navigation lists, etc.
*/
UINavigationHistory: string[];
/**
* Creates and initializes a slide out menu. Possible options: {dynamic: true, callback: function() { alert("Woohoo!");}}
*/
UISlideout: {
/**
* Creates and initializes a slide out menu. Possible options: {dynamic: true, callback: function() { alert("Woohoo!");}}
*
* @return void
*/
(options?: {
dynamic?: boolean;
callback?: (args?: any) => any;
}): any;
/**
* Populates a slideout menu.
*
* @return void
*/
populate(array: Object[]): void;
};
/**
* Reset the value of the stepper to its defaults at initialization. Pass it a reference to the stepper to reset.
*
* @return void
*/
UIResetStepper(stepper: JQuery): void;
/**
* Create a switch control. Possible options: { id: '#myId', name: 'fruit.mango', state: 'on', value: 'Mango', checked: 'on', style: 'traditional', callback: function() { alert('hi');}}
*
* @return void
*/
UICreateSwitch(options?: {
id?: string;
name?: string;
state?: string;
value?: string | number;
checked?: string;
style?: string;
callback?: () => any;
}): void;
/**
* Creates a tabbar. On iOS this is at the bottom of the screen. On Android and Windows, it is at the top.
* Options: {id: 'mySpecialTabbar', tabs: 4, labels: ["Refresh", "Add", "Info", "Downloads", "Favorite"], icons: ["refresh", "add", "info", "downloads", "favorite"], selected: 2 }
*
* @return void
*/
UITabbar(options?: {
id?: string;
tabs: number;
labels: string[];
icons?: string[];
selected?: number;
}): void;
/**
* Create a search bar for an article. Options: { articleId: '#products', id: 'productSearch', placeholder: 'Find a product', results: 5 }
*
* @return void