Browse code

Add tom select npm package

Benjamin Roth authored on02/02/2023 12:00:30
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,40 @@
1
+/**
2
+* Tom Select v2.2.2
3
+* Licensed under the Apache License, Version 2.0 (the "License");
4
+*/
5
+
6
+(function (global, factory) {
7
+	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
8
+	typeof define === 'function' && define.amd ? define(factory) :
9
+	(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.no_backspace_delete = factory());
10
+})(this, (function () { 'use strict';
11
+
12
+	/**
13
+	 * Plugin: "input_autogrow" (Tom Select)
14
+	 *
15
+	 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
16
+	 * file except in compliance with the License. You may obtain a copy of the License at:
17
+	 * http://www.apache.org/licenses/LICENSE-2.0
18
+	 *
19
+	 * Unless required by applicable law or agreed to in writing, software distributed under
20
+	 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
21
+	 * ANY KIND, either express or implied. See the License for the specific language
22
+	 * governing permissions and limitations under the License.
23
+	 *
24
+	 */
25
+	function plugin () {
26
+	  var self = this;
27
+	  var orig_deleteSelection = self.deleteSelection;
28
+	  this.hook('instead', 'deleteSelection', evt => {
29
+	    if (self.activeItems.length) {
30
+	      return orig_deleteSelection.call(self, evt);
31
+	    }
32
+
33
+	    return false;
34
+	  });
35
+	}
36
+
37
+	return plugin;
38
+
39
+}));
40
+//# sourceMappingURL=no_backspace_delete.js.map