UNPKG

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