datatables.net-autofill 2.3.9 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,10 +2,13 @@
2
2
  "name": "datatables.net-autofill",
3
3
  "description": "AutoFill for DataTables",
4
4
  "main": "js/dataTables.autoFill.js",
5
+ "module": "js/dataTables.autoFill.mjs",
5
6
  "types": "./types/types.d.ts",
6
- "version": "2.3.9",
7
+ "version": "2.5.0",
7
8
  "files": [
8
- "js/**/*.js"
9
+ "js/**/*.js",
10
+ "js/**/*.mjs",
11
+ "types/**/*.d.ts"
9
12
  ],
10
13
  "keywords": [
11
14
  "AutoFill",
@@ -17,7 +20,7 @@
17
20
  "sort"
18
21
  ],
19
22
  "dependencies": {
20
- "datatables.net": ">=1.10.25",
23
+ "datatables.net": ">=1.12.1",
21
24
  "jquery": ">=1.7"
22
25
  },
23
26
  "moduleType": [
@@ -0,0 +1,182 @@
1
+ // Type definitions for DataTables AutoFill
2
+ //
3
+ // Project: https://datatables.net/extensions/autofill/, https://datatables.net
4
+ // Definitions by:
5
+ // SpryMedia
6
+ // Andy Ma <https://github.com/andy-maca>
7
+
8
+ /// <reference types="jquery" />
9
+
10
+ import DataTables, {Api} from 'datatables.net';
11
+
12
+ export default DataTables;
13
+
14
+
15
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
16
+ * DataTables' types integration
17
+ */
18
+ declare module 'datatables.net' {
19
+ interface Config {
20
+ /**
21
+ * autoFill extension options
22
+ */
23
+ autoFill?: boolean | ConfigAutoFill;
24
+ }
25
+
26
+ interface ConfigLanguage {
27
+ /**
28
+ * AutoFill language options
29
+ */
30
+ autoFill?: ConfigAutoFillLanguage;
31
+ }
32
+
33
+ interface Api<T> {
34
+ /**
35
+ * AutoFill methods container
36
+ *
37
+ * @returns Api for chaining with the additional autoFill methods
38
+ */
39
+ autoFill: ApiAutoFill<T>;
40
+ }
41
+
42
+ interface ApiStatic {
43
+ /**
44
+ * AutoFill class
45
+ */
46
+ AutoFill: {
47
+ /**
48
+ * Create a new AutoFill instance for the target DataTable
49
+ */
50
+ new (dt: Api<any>, settings: boolean | ConfigAutoFill);
51
+
52
+ /**
53
+ * AutoFill version
54
+ */
55
+ version: string;
56
+
57
+ /**
58
+ * Default configuration values
59
+ */
60
+ defaults: ConfigAutoFill;
61
+ }
62
+ }
63
+ }
64
+
65
+
66
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
67
+ * Options
68
+ */
69
+
70
+ interface ConfigAutoFill {
71
+ /**
72
+ * Always ask the end user if an action should be taken or not
73
+ */
74
+ alwaysAsk?: boolean;
75
+
76
+ /**
77
+ * Select the columns that can be auto filled
78
+ */
79
+ columns?: string | number[];
80
+
81
+ /**
82
+ *
83
+ * Attach an Editor instance for database updating
84
+ */
85
+ editor?: any;
86
+
87
+ /**
88
+ *
89
+ * Initial enablement state of AutoFill
90
+ */
91
+ enable?: boolean;
92
+
93
+ /**
94
+ * Action that will cause the auto fill drag handle to appear in a cell
95
+ */
96
+ focus?: 'click' | 'focus' | 'hover' | null;
97
+
98
+ /**
99
+ * Enable / disable user ability to horizontally drag and fill
100
+ */
101
+ horizontal?: boolean;
102
+
103
+ /**
104
+ * Control automatic update of data when a fill drag is completed
105
+ */
106
+ update?: boolean;
107
+
108
+ /**
109
+ * Enable / disable user ability to vertically drag and fill
110
+ */
111
+ vertical?: boolean;
112
+ }
113
+
114
+ interface ConfigAutoFillLanguage {
115
+ /**
116
+ * Multi-fill selector button text
117
+ */
118
+ button?: string;
119
+
120
+ /**
121
+ * Multi-fill selector cancel option message
122
+ */
123
+ cancel?: string;
124
+
125
+ /**
126
+ * Multi-fill selector message for the _full fill_ fill type
127
+ */
128
+ fill?: string;
129
+
130
+ /**
131
+ * Multi-fill selector message for the _horizontal fill_ fill type
132
+ */
133
+ fillHorizontal?: string;
134
+
135
+ /**
136
+ * Multi-fill selector message for the _vertical fill_ fill type
137
+ */
138
+ fillVertical?: string;
139
+
140
+ /**
141
+ * Multi-fill selector message for the _increment_ fill type
142
+ */
143
+ increment?: string;
144
+
145
+ /**
146
+ * Information message shown at the top of the fill type selector
147
+ */
148
+ info?: string;
149
+ }
150
+
151
+
152
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
153
+ * API
154
+ */
155
+
156
+ interface ApiAutoFill<T> {
157
+ (): ApiAutoFillMethods<T>;
158
+ }
159
+
160
+ interface ApiAutoFillMethods<T> extends Api<T> {
161
+ /**
162
+ * Disable AutoFill. Please note that this disallows future interactions with the table (until re-enabled).
163
+ *
164
+ * @returns DataTables Api instance
165
+ */
166
+ disable(): Api<T>;
167
+
168
+ /**
169
+ * Enable end user and API modification of the focused cells in the DataTable. Differing levels of enablement are available via the optional parameter.
170
+ *
171
+ * @param flag can be true or false to signify whether to enable or disable
172
+ * @returns DataTables Api instance
173
+ */
174
+ enable(flag?: string | boolean): Api<T>;
175
+
176
+ /**
177
+ * This method will return a boolean value indicating if AutoFill is enabled or not on the selected table.
178
+ *
179
+ * @returns boolean signifying if autofill is enables
180
+ */
181
+ enabled(): boolean;
182
+ }