index.d.ts 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. /// <reference types="jquery" />
  2. interface BootstrapTableIcons {
  3. toggleOff: string;
  4. clearSearch: string;
  5. detailOpen: string;
  6. search: string;
  7. fullscreen: string;
  8. columns: string;
  9. detailClose: string;
  10. refresh: string;
  11. paginationSwitchDown: string;
  12. paginationSwitchUp: string;
  13. toggleOn: string
  14. }
  15. interface BootstrapTableEvents {
  16. 'refresh.bs.table': string;
  17. 'load-error.bs.table': string;
  18. 'click-row.bs.table': string;
  19. 'dbl-click-row.bs.table': string;
  20. 'post-body.bs.table': string;
  21. 'collapse-row.bs.table': string;
  22. 'reset-view.bs.table': string;
  23. 'click-cell.bs.table': string;
  24. 'check-all.bs.table': string;
  25. 'post-footer.bs.table': string;
  26. 'uncheck.bs.table': string;
  27. 'check-some.bs.table': string;
  28. 'refresh-options.bs.table': string;
  29. 'pre-body.bs.table': string;
  30. 'uncheck-some.bs.table': string;
  31. 'expand-row.bs.table': string;
  32. 'all.bs.table': string;
  33. 'uncheck-all.bs.table': string;
  34. 'column-switch.bs.table': string;
  35. 'column-switch-all.bs.table': string;
  36. 'check.bs.table': string;
  37. 'search.bs.table': string;
  38. 'load-success.bs.table': string;
  39. 'dbl-click-cell.bs.table': string;
  40. 'page-change.bs.table': string;
  41. 'post-header.bs.table': string;
  42. 'toggle.bs.table': string;
  43. 'sort.bs.table': string;
  44. 'scroll-body.bs.table': string
  45. }
  46. export interface BootstrapTableColumn {
  47. sortName?: any;
  48. widthUnit?: string;
  49. sorter?: any;
  50. searchFormatter?: boolean;
  51. titleTooltip?: any;
  52. falign?: any;
  53. title?: any;
  54. align?: any;
  55. radio?: boolean;
  56. colspan?: any;
  57. showSelectTitle?: boolean;
  58. rowspan?: any;
  59. checkbox?: boolean;
  60. halign?: any;
  61. switchable?: boolean;
  62. class?: any;
  63. escape?: boolean;
  64. events?: BootstrapTableEvents;
  65. order?: string;
  66. visible?: boolean;
  67. detailFormatter?: any;
  68. valign?: any;
  69. sortable?: boolean;
  70. cellStyle?: any;
  71. searchable?: boolean;
  72. footerFormatter?: any;
  73. formatter?: any;
  74. checkboxEnabled?: boolean;
  75. field?: any;
  76. width?: any;
  77. clickToSelect?: boolean;
  78. searchHighlightFormatter?: boolean;
  79. cardVisible?: boolean
  80. }
  81. export interface BootstrapTableLocale {
  82. formatPaginationSwitchDown?: () => string;
  83. formatColumns?: () => string;
  84. formatAllRows?: () => string;
  85. formatLoadingMessage?: () => string;
  86. formatSRPaginationPreText?: () => string;
  87. formatPaginationSwitch?: () => string;
  88. formatDetailPagination?: (totalRows: number) => string;
  89. formatNoMatches?: () => string;
  90. formatSRPaginationNextText?: () => string;
  91. formatSearch?: () => string;
  92. formatFullscreen?: () => string;
  93. formatShowingRows?: (pageFrom: number, pageTo: number, totalRows: number, totalNotFiltered: number) => string;
  94. formatSRPaginationPageText?: (page: number) => string;
  95. formatClearSearch?: () => string;
  96. formatPaginationSwitchUp?: () => string;
  97. formatToggle?: () => string;
  98. formatToggleOff?: () => string;
  99. formatColumnsToggleAll?: () => string;
  100. formatRefresh?: () => string;
  101. formatToggleOn?: () => string;
  102. formatRecordsPerPage(pageNumber: number): string
  103. }
  104. export interface BootstrapAjaxParams {
  105. cache: boolean;
  106. data: {
  107. search: string;
  108. offset: number;
  109. limit: number;
  110. sort?: any;
  111. order?: any
  112. };
  113. dataType: string;
  114. type: string;
  115. contentType: string;
  116. error: (jqXHR: JQueryXHR) => any;
  117. success: (results: any, textStatus?: string, jqXHR?: JQueryXHR) => any;
  118. }
  119. export interface BootstrapTableOptions {
  120. onCheck?: (row: any, $element: JQuery<HTMLElement>) => boolean | undefined;
  121. loadingFontSize?: string;
  122. onDblClickCell?: (field: string, value: any, row: any, $element: JQuery<HTMLElement>) => boolean | undefined;
  123. rowStyle?: (row: any, index: number) => {};
  124. showColumnsToggleAll?: boolean;
  125. footerStyle?: (column: BootstrapTableColumn) => {};
  126. onUncheck?: (row: any, $element: JQuery<HTMLElement>) => boolean | undefined;
  127. pageSize?: number;
  128. footerField?: string;
  129. showFullscreen?: boolean;
  130. sortStable?: boolean;
  131. searchAlign?: string;
  132. ajax?: (params: BootstrapAjaxParams) => any;
  133. onAll?: (name: string, args: any) => boolean | undefined;
  134. onClickRow?: (row: any, $element: JQuery<HTMLElement>, field: string) => boolean | undefined;
  135. ajaxOptions?: {};
  136. onCheckSome?: (rows: any[]) => boolean | undefined;
  137. customSort?: any;
  138. iconSize?: any;
  139. onCollapseRow?: (index: number, row: any, detailView: any) => boolean | undefined;
  140. searchHighlight?: boolean;
  141. height?: any;
  142. onUncheckSome?: (rows: any[]) => boolean | undefined;
  143. onToggle?: (cardView: boolean) => boolean | undefined;
  144. ignoreClickToSelectOn?: ({tagName}?: {tagName: any}) => any;
  145. cache?: boolean;
  146. method?: string;
  147. onColumnSwitch?: (field: string, checked: boolean) => boolean | undefined;
  148. searchSelector?: boolean;
  149. strictSearch?: boolean;
  150. multipleSelectRow?: boolean;
  151. onLoadError?: (status: string, jqXHR: JQuery.jqXHR) => boolean | undefined;
  152. buttonsToolbar?: any;
  153. paginationVAlign?: string;
  154. showColumnsSearch?: boolean;
  155. queryParamsType?: string;
  156. sortOrder?: any;
  157. paginationDetailHAlign?: string;
  158. customSearch?: any;
  159. visibleSearch?: boolean;
  160. showButtonText?: boolean;
  161. sortName?: any;
  162. columns?: BootstrapTableColumn[];
  163. onScrollBody?: () => boolean | undefined;
  164. iconsPrefix?: string;
  165. onPostBody?: () => boolean | undefined;
  166. search?: boolean;
  167. searchOnEnterKey?: boolean;
  168. searchText?: string;
  169. responseHandler?: (res: any) => any;
  170. toolbarAlign?: string;
  171. paginationParts?: string[];
  172. cardView?: boolean;
  173. showSearchButton?: boolean;
  174. escape?: boolean;
  175. searchTimeOut?: number;
  176. buttonsAlign?: string;
  177. buttonsOrder?: string[];
  178. detailFormatter?: (index: number, row: any, $element: JQuery<HTMLElement>) => string;
  179. onDblClickRow?: (row: any, $element: JQuery<HTMLElement>, field: string) => boolean | undefined;
  180. paginationNextText?: string;
  181. buttonsPrefix?: string;
  182. loadingTemplate?: (loadingMessage: string) => string;
  183. theadClasses?: string;
  184. onLoadSuccess?: (data: any, status: string, jqXHR: JQuery.jqXHR) => boolean | undefined;
  185. url?: any;
  186. toolbar?: any;
  187. onPostHeader?: () => boolean | undefined;
  188. sidePagination?: string;
  189. clickToSelect?: boolean;
  190. virtualScrollItemHeight?: any;
  191. rowAttributes?: (row: any, index: number) => {};
  192. dataField?: string;
  193. idField?: string;
  194. onSort?: (name: string, order: number) => boolean | undefined;
  195. pageNumber?: number;
  196. data?: any[];
  197. totalNotFilteredField?: string;
  198. undefinedText?: string;
  199. onSearch?: (text: string) => boolean | undefined;
  200. onPageChange?: (number: number, size: number) => boolean | undefined;
  201. paginationUseIntermediate?: boolean;
  202. searchAccentNeutralise?: boolean;
  203. singleSelect?: boolean;
  204. showButtonIcons?: boolean;
  205. showPaginationSwitch?: boolean;
  206. onPreBody?: (data: any) => boolean | undefined;
  207. detailFilter?: (index: number, row: any) => boolean | undefined;
  208. detailViewByClick?: boolean;
  209. totalField?: string;
  210. contentType?: string;
  211. showColumns?: boolean;
  212. totalNotFiltered?: number;
  213. checkboxHeader?: boolean;
  214. onRefresh?: (params: any[]) => boolean | undefined;
  215. dataType?: string;
  216. paginationPreText?: string;
  217. showToggle?: boolean;
  218. detailView?: boolean;
  219. serverSort?: boolean;
  220. totalRows?: number;
  221. silentSort?: boolean;
  222. onPostFooter?: () => boolean | undefined;
  223. selectItemName?: string;
  224. detailViewIcon?: boolean;
  225. detailViewAlign?: string;
  226. minimumCountColumns?: number;
  227. uniqueId?: any;
  228. onResetView?: () => boolean | undefined;
  229. paginationHAlign?: string;
  230. sortClass?: any;
  231. pagination?: boolean;
  232. queryParams?: (params: any) => any;
  233. paginationSuccessivelySize?: number;
  234. classes?: string;
  235. rememberOrder?: boolean;
  236. paginationPagesBySide?: number;
  237. trimOnSearch?: boolean;
  238. showRefresh?: boolean;
  239. locale?: BootstrapTableLocale;
  240. onCheckAll?: (rowsAfter: any[], rowsBefore: any[]) => boolean | undefined;
  241. showFooter?: boolean;
  242. headerStyle?: (column: BootstrapTableColumn) => {};
  243. maintainMetaData?: boolean;
  244. onRefreshOptions?: (options: BootstrapTableOptions) => boolean | undefined;
  245. showExtendedPagination?: boolean;
  246. smartDisplay?: boolean;
  247. paginationLoop?: boolean;
  248. virtualScroll?: boolean;
  249. sortReset?: boolean;
  250. filterOptions?: {filterAlgorithm: string};
  251. onUncheckAll?: (rowsAfter: any[], rowsBefore: any[]) => boolean | undefined;
  252. showSearchClearButton?: boolean;
  253. buttons?: {};
  254. showHeader?: boolean;
  255. onClickCell?: (field: string, value: any, row: any, $element: JQuery<HTMLElement>) => boolean | undefined;
  256. sortable?: boolean;
  257. icons?: BootstrapTableIcons;
  258. onExpandRow?: (index: number, row: any, $detail: JQuery<HTMLElement>) => boolean | undefined;
  259. buttonsClass?: string;
  260. pageList?: number[];
  261. }
  262. interface JQuery{
  263. bootstrapTable(options: BootstrapTableOptions): JQuery;
  264. bootstrapTable(method: string, ...parameters: any[]): JQuery | any;
  265. }