UNPKG

3.73 kBJavaScriptView Raw
1import {DateType} from './modules/dateType';
2import {Help} from './modules/help';
3import {State} from './modules/state';
4import {GridLayout} from './modules/gridLayout';
5import {Loader} from './modules/loader';
6import {HighlightKeyword} from './modules/highlightKeywords';
7import {PopupFilter} from './modules/popupFilter';
8import {MarkActiveColumns} from './modules/markActiveColumns';
9import {RowsCounter} from './modules/rowsCounter';
10import {StatusBar} from './modules/statusBar';
11import {ClearButton} from './modules/clearButton';
12import {AlternateRows} from './modules/alternateRows';
13import {NoResults} from './modules/noResults';
14import {Paging} from './modules/paging';
15
16/**
17 * Filter types
18 */
19
20/**
21 * Input filter type
22 * @type {String}
23 */
24export const INPUT = 'input';
25/**
26 * Select filter type
27 * @type {String}
28 */
29export const SELECT = 'select';
30/**
31 * Multiple select filter type
32 * @type {String}
33 */
34export const MULTIPLE = 'multiple';
35/**
36 * Checklist filter type
37 * @type {String}
38 */
39export const CHECKLIST = 'checklist';
40/**
41 * None filter type
42 * @type {String}
43 */
44export const NONE = 'none';
45
46/**
47 * Key codes
48 */
49
50/**
51 * Enter key code
52 * @type {Number}
53 */
54export const ENTER_KEY = 13;
55/**
56 * Tab key code
57 * @type {Number}
58 */
59export const TAB_KEY = 9;
60/**
61 * Escape key code
62 * @type {Number}
63 */
64export const ESC_KEY = 27;
65/**
66 * Up arrow key code
67 * @type {Number}
68 */
69export const UP_ARROW_KEY = 38;
70/**
71 * Down arrow key code
72 * @type {Number}
73 */
74export const DOWN_ARROW_KEY = 40;
75
76/**
77 * HTML tags
78 */
79
80/**
81 * Header cell tag
82 * @type {String}
83 */
84export const HEADER_TAG = 'TH';
85/**
86 * Cell tag
87 * @type {String}
88 */
89export const CELL_TAG = 'TD';
90
91/**
92 * Data types
93 */
94
95/**
96 * String
97 * @type {String}
98 */
99export const STRING = 'string';
100
101/**
102 * Number
103 * @type {String}
104 */
105export const NUMBER = 'number';
106
107/**
108 * Formatted number
109 * @type {String}
110 */
111export const FORMATTED_NUMBER = 'formatted-number';
112
113/**
114 * Date
115 * @type {String}
116 */
117export const DATE = 'date';
118
119/**
120 * IP address
121 * @type {String}
122 */
123export const IP_ADDRESS = 'ipaddress';
124
125/**
126 * Default values
127 */
128
129/**
130 * Auto filter delay in milliseconds
131 * @type {Number}
132 */
133export const AUTO_FILTER_DELAY = 750;
134
135/**
136 * TableFilter features definitions
137 * @type {Object}
138 */
139export const FEATURES = {
140 dateType: {
141 class: DateType,
142 name: 'dateType'
143 },
144 help: {
145 class: Help,
146 name: 'help',
147 enforce: true
148 },
149 state: {
150 class: State,
151 name: 'state'
152 },
153 markActiveColumns: {
154 class: MarkActiveColumns,
155 name: 'markActiveColumns'
156 },
157 gridLayout: {
158 class: GridLayout,
159 name: 'gridLayout'
160 },
161 loader: {
162 class: Loader,
163 name: 'loader'
164 },
165 highlightKeyword: {
166 class: HighlightKeyword,
167 name: 'highlightKeyword',
168 property: 'highlightKeywords'
169 },
170 popupFilter: {
171 class: PopupFilter,
172 name: 'popupFilter',
173 property: 'popupFilters'
174 },
175 rowsCounter: {
176 class: RowsCounter,
177 name: 'rowsCounter'
178 },
179 statusBar: {
180 class: StatusBar,
181 name: 'statusBar'
182 },
183 clearButton: {
184 class: ClearButton,
185 name: 'clearButton',
186 property: 'btnReset'
187 },
188 alternateRows: {
189 class: AlternateRows,
190 name: 'alternateRows'
191 },
192 noResults: {
193 class: NoResults,
194 name: 'noResults'
195 },
196 paging: {
197 class: Paging,
198 name: 'paging'
199 }
200};