easy 19.0.7 → 20.0.1

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.
Files changed (63) hide show
  1. package/README.md +18 -136
  2. package/example.js +535 -609
  3. package/lib/constants.js +1 -13
  4. package/lib/document.js +3 -5
  5. package/lib/element/button.js +3 -1
  6. package/lib/element/checkbox.js +6 -5
  7. package/lib/element/input.js +151 -0
  8. package/lib/element/link.js +3 -1
  9. package/lib/element/select.js +6 -41
  10. package/lib/element/textarea.js +151 -0
  11. package/lib/element.js +8 -26
  12. package/lib/example/view/div.js +184 -0
  13. package/lib/example/view.js +3 -66
  14. package/lib/index.js +5 -9
  15. package/lib/mixins/element.js +27 -4
  16. package/lib/mixins/event.js +19 -8
  17. package/lib/mixins/focus.js +45 -0
  18. package/lib/mixins/input.js +21 -13
  19. package/lib/mixins/mouse.js +1 -1
  20. package/lib/mixins/resize.js +2 -34
  21. package/lib/mixins/scroll.js +5 -5
  22. package/lib/mixins/selection.js +46 -2
  23. package/lib/mixins/textElement.js +20 -0
  24. package/lib/textElement.js +4 -5
  25. package/lib/utilities/string.js +2 -3
  26. package/lib/window.js +20 -11
  27. package/package.json +1 -1
  28. package/src/constants.js +0 -3
  29. package/src/document.js +2 -4
  30. package/src/element/button.js +3 -0
  31. package/src/element/checkbox.js +5 -5
  32. package/src/element/input.js +14 -0
  33. package/src/element/link.js +3 -0
  34. package/src/element/select.js +5 -13
  35. package/src/element/textarea.js +14 -0
  36. package/src/element.js +7 -17
  37. package/src/example/view/div.js +40 -0
  38. package/src/example/view.js +4 -66
  39. package/src/index.js +4 -8
  40. package/src/mixins/element.js +6 -6
  41. package/src/mixins/event.js +25 -10
  42. package/src/mixins/focus.js +33 -0
  43. package/src/mixins/input.js +15 -9
  44. package/src/mixins/mouse.js +1 -5
  45. package/src/mixins/resize.js +1 -58
  46. package/src/mixins/scroll.js +3 -3
  47. package/src/mixins/selection.js +35 -2
  48. package/src/mixins/textElement.js +12 -0
  49. package/src/textElement.js +3 -5
  50. package/src/utilities/string.js +1 -3
  51. package/src/window.js +19 -6
  52. package/lib/example/view/checkbox.js +0 -97
  53. package/lib/inputElement/input.js +0 -99
  54. package/lib/inputElement/textarea.js +0 -99
  55. package/lib/inputElement.js +0 -214
  56. package/lib/mixins/change.js +0 -24
  57. package/lib/mixins/window.js +0 -17
  58. package/src/example/view/checkbox.js +0 -10
  59. package/src/inputElement/input.js +0 -7
  60. package/src/inputElement/textarea.js +0 -7
  61. package/src/inputElement.js +0 -34
  62. package/src/mixins/change.js +0 -14
  63. package/src/mixins/window.js +0 -8
@@ -1,6 +1,18 @@
1
1
  "use strict";
2
2
 
3
- import { SELECTIONCHANGE_EVENT_TYPE } from "../eventTypes";
3
+ import { CUT_EVENT_TYPE, COPY_EVENT_TYPE, PASTE_EVENT_TYPE, SELECTIONCHANGE_EVENT_TYPE } from "../eventTypes";
4
+
5
+ function onCut(cutHandler, element) { this.onEvent(CUT_EVENT_TYPE, cutHandler, element); }
6
+
7
+ function offCut(cutHandler, element) { this.offEvent(CUT_EVENT_TYPE, cutHandler, element); }
8
+
9
+ function onCopy(copyHandler, element) { this.onEvent(COPY_EVENT_TYPE, copyHandler, element); }
10
+
11
+ function offCopy(copyHandler, element) { this.offEvent(COPY_EVENT_TYPE, copyHandler, element); }
12
+
13
+ function onPaste(pasteHandler, element) { this.onEvent(PASTE_EVENT_TYPE, pasteHandler, element); }
14
+
15
+ function offPaste(pasteHandler, element) { this.offEvent(PASTE_EVENT_TYPE, pasteHandler, element); }
4
16
 
5
17
  function onSelectionChange(selectionChangeHandler, element) { this.onEvent(SELECTIONCHANGE_EVENT_TYPE, selectionChangeHandler, element); }
6
18
 
@@ -36,10 +48,31 @@ function createEventListener(eventType, handler, element) {
36
48
  return eventListener;
37
49
  }
38
50
 
51
+ function getSelectionStart() { return this.domElement.selectionStart; }
52
+
53
+ function getSelectionEnd() { return this.domElement.selectionEnd; }
54
+
55
+ function setSelectionStart(selectionStart) { this.domElement.selectionStart = selectionStart; }
56
+
57
+ function setSelectionEnd(selectionEnd) { this.domElement.selectionEnd = selectionEnd; }
58
+
59
+ function select() { this.domElement.select(); }
60
+
39
61
  const selectionMixins = {
62
+ onCut,
63
+ offCut,
64
+ onCopy,
65
+ offCopy,
66
+ onPaste,
67
+ offPaste,
40
68
  onSelectionChange,
41
69
  offSelectionChange,
42
- createEventListener
70
+ createEventListener,
71
+ getSelectionStart,
72
+ getSelectionEnd,
73
+ setSelectionStart,
74
+ setSelectionEnd,
75
+ select
43
76
  };
44
77
 
45
78
  export default selectionMixins;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ import { getParentElement, getAscendantElements, getNextSiblingElement, getPreviousSiblingElement } from "../mixins/element";
4
+
5
+ const textElementMixins = {
6
+ getParentElement,
7
+ getAscendantElements,
8
+ getNextSiblingElement,
9
+ getPreviousSiblingElement
10
+ };
11
+
12
+ export default textElementMixins;
@@ -2,9 +2,9 @@
2
2
 
3
3
  import Offset from "./offset";
4
4
  import Bounds from "./bounds";
5
- import elementMixins from "./mixins/element";
5
+ import textElementMixins from "./mixins/textElement";
6
6
 
7
- class TextElement {
7
+ export default class TextElement {
8
8
  constructor(text) {
9
9
  this.domElement = document.createTextNode(text); ///
10
10
 
@@ -84,6 +84,4 @@ class TextElement {
84
84
  }
85
85
  }
86
86
 
87
- Object.assign(TextElement.prototype, elementMixins);
88
-
89
- export default TextElement;
87
+ Object.assign(TextElement.prototype, textElementMixins);
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- import { DASH } from "../constants";
4
-
5
3
  export function camelCaseToSnakeCase(string) {
6
4
  return string.replace(/([A-Z]+)/g, (match, characters) => {
7
5
  const upperCaseCharacters = characters.toLowerCase(),
8
- snakeCaseCharacters = `${DASH}${upperCaseCharacters}`;
6
+ snakeCaseCharacters = `-${upperCaseCharacters}`;
9
7
 
10
8
  return snakeCaseCharacters;
11
9
  });
package/src/window.js CHANGED
@@ -4,10 +4,12 @@ import keyMixins from "./mixins/key";
4
4
  import eventMixins from "./mixins/event";
5
5
  import mouseMixins from "./mixins/mouse";
6
6
  import clickMixins from "./mixins/click";
7
- import windowMixins from "./mixins/window";
7
+ import focusMixins from "./mixins/focus";
8
+ import scrollMixins from "./mixins/scroll";
8
9
  import customEventMixins from "./mixins/customEvent";
9
10
 
10
11
  import { UNDEFINED } from "./constants";
12
+ import { RESIZE_EVENT_TYPE } from "./eventTypes";
11
13
 
12
14
  class Window {
13
15
  constructor() {
@@ -24,10 +26,6 @@ class Window {
24
26
  Object.assign(target, ...sources);
25
27
  }
26
28
 
27
- addResizeObject() {} ///
28
-
29
- removeResizeObject() {} ///
30
-
31
29
  getWidth() { return this.domElement.innerWidth; } ///
32
30
 
33
31
  getHeight() { return this.domElement.innerHeight; } ///
@@ -37,13 +35,28 @@ class Window {
37
35
  getScrollLeft() { return this.domElement.pageXOffset; } ///
38
36
 
39
37
  getSelection() { return this.domElement.getSelection(); }
38
+
39
+ onResize(resizeHandler, element) {
40
+ const eventType = RESIZE_EVENT_TYPE,
41
+ eventListener = this.addEventListener(eventType, resizeHandler, element);
42
+
43
+ this.domElement.addEventListener(eventType, eventListener);
44
+ }
45
+
46
+ offResize(resizeHandler, element) {
47
+ const eventType = RESIZE_EVENT_TYPE,
48
+ eventListener = this.removeEventListener(eventType, resizeHandler, element);
49
+
50
+ this.domElement.removeEventListener(eventType, eventListener);
51
+ }
40
52
  }
41
53
 
42
54
  Object.assign(Window.prototype, keyMixins);
43
55
  Object.assign(Window.prototype, eventMixins);
44
56
  Object.assign(Window.prototype, mouseMixins);
45
57
  Object.assign(Window.prototype, clickMixins);
46
- Object.assign(Window.prototype, windowMixins);
58
+ Object.assign(Window.prototype, focusMixins);
59
+ Object.assign(Window.prototype, scrollMixins);
47
60
  Object.assign(Window.prototype, customEventMixins);
48
61
 
49
62
  export default (typeof window === UNDEFINED) ? undefined : new Window(); ///
@@ -1,97 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return _class;
9
- }
10
- });
11
- var _index = require("../../index");
12
- function _assert_this_initialized(self) {
13
- if (self === void 0) {
14
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
15
- }
16
- return self;
17
- }
18
- function _call_super(_this, derived, args) {
19
- derived = _get_prototype_of(derived);
20
- return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
21
- }
22
- function _class_call_check(instance, Constructor) {
23
- if (!(instance instanceof Constructor)) {
24
- throw new TypeError("Cannot call a class as a function");
25
- }
26
- }
27
- function _define_property(obj, key, value) {
28
- if (key in obj) {
29
- Object.defineProperty(obj, key, {
30
- value: value,
31
- enumerable: true,
32
- configurable: true,
33
- writable: true
34
- });
35
- } else {
36
- obj[key] = value;
37
- }
38
- return obj;
39
- }
40
- function _get_prototype_of(o) {
41
- _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
42
- return o.__proto__ || Object.getPrototypeOf(o);
43
- };
44
- return _get_prototype_of(o);
45
- }
46
- function _inherits(subClass, superClass) {
47
- if (typeof superClass !== "function" && superClass !== null) {
48
- throw new TypeError("Super expression must either be null or a function");
49
- }
50
- subClass.prototype = Object.create(superClass && superClass.prototype, {
51
- constructor: {
52
- value: subClass,
53
- writable: true,
54
- configurable: true
55
- }
56
- });
57
- if (superClass) _set_prototype_of(subClass, superClass);
58
- }
59
- function _possible_constructor_return(self, call) {
60
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
61
- return call;
62
- }
63
- return _assert_this_initialized(self);
64
- }
65
- function _set_prototype_of(o, p) {
66
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
67
- o.__proto__ = p;
68
- return o;
69
- };
70
- return _set_prototype_of(o, p);
71
- }
72
- function _type_of(obj) {
73
- "@swc/helpers - typeof";
74
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
75
- }
76
- function _is_native_reflect_construct() {
77
- try {
78
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
79
- } catch (_) {}
80
- return (_is_native_reflect_construct = function() {
81
- return !!result;
82
- })();
83
- }
84
- var _class = /*#__PURE__*/ function(Checkbox) {
85
- _inherits(_class, Checkbox);
86
- function _class() {
87
- _class_call_check(this, _class);
88
- return _call_super(this, _class, arguments);
89
- }
90
- return _class;
91
- }(_index.Checkbox);
92
- _define_property(_class, "defaultProperties", {
93
- className: "example",
94
- reference: "example"
95
- });
96
-
97
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvY2hlY2tib3guanMiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmltcG9ydCB7IENoZWNrYm94IH0gZnJvbSBcIi4uLy4uL2luZGV4XCI7ICAvLy9cblxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgZXh0ZW5kcyBDaGVja2JveCB7XG4gIHN0YXRpYyBkZWZhdWx0UHJvcGVydGllcyA9IHtcbiAgICBjbGFzc05hbWU6IFwiZXhhbXBsZVwiLFxuICAgIHJlZmVyZW5jZTogXCJleGFtcGxlXCJcbiAgfVxufVxuIl0sIm5hbWVzIjpbIkNoZWNrYm94IiwiZGVmYXVsdFByb3BlcnRpZXMiLCJjbGFzc05hbWUiLCJyZWZlcmVuY2UiXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7O3FCQUV5Qjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVWLElBQUEsdUJBQUE7Ozs7Ozs7RUFBY0EsZUFBUTtBQUNuQyx5QkFBT0MscUJBQW9CO0lBQ3pCQyxXQUFXO0lBQ1hDLFdBQVc7QUFDYiJ9
@@ -1,99 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return Input;
9
- }
10
- });
11
- var _inputElement = /*#__PURE__*/ _interop_require_default(require("../inputElement"));
12
- function _assert_this_initialized(self) {
13
- if (self === void 0) {
14
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
15
- }
16
- return self;
17
- }
18
- function _call_super(_this, derived, args) {
19
- derived = _get_prototype_of(derived);
20
- return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
21
- }
22
- function _class_call_check(instance, Constructor) {
23
- if (!(instance instanceof Constructor)) {
24
- throw new TypeError("Cannot call a class as a function");
25
- }
26
- }
27
- function _define_property(obj, key, value) {
28
- if (key in obj) {
29
- Object.defineProperty(obj, key, {
30
- value: value,
31
- enumerable: true,
32
- configurable: true,
33
- writable: true
34
- });
35
- } else {
36
- obj[key] = value;
37
- }
38
- return obj;
39
- }
40
- function _get_prototype_of(o) {
41
- _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
42
- return o.__proto__ || Object.getPrototypeOf(o);
43
- };
44
- return _get_prototype_of(o);
45
- }
46
- function _inherits(subClass, superClass) {
47
- if (typeof superClass !== "function" && superClass !== null) {
48
- throw new TypeError("Super expression must either be null or a function");
49
- }
50
- subClass.prototype = Object.create(superClass && superClass.prototype, {
51
- constructor: {
52
- value: subClass,
53
- writable: true,
54
- configurable: true
55
- }
56
- });
57
- if (superClass) _set_prototype_of(subClass, superClass);
58
- }
59
- function _interop_require_default(obj) {
60
- return obj && obj.__esModule ? obj : {
61
- default: obj
62
- };
63
- }
64
- function _possible_constructor_return(self, call) {
65
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
66
- return call;
67
- }
68
- return _assert_this_initialized(self);
69
- }
70
- function _set_prototype_of(o, p) {
71
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
72
- o.__proto__ = p;
73
- return o;
74
- };
75
- return _set_prototype_of(o, p);
76
- }
77
- function _type_of(obj) {
78
- "@swc/helpers - typeof";
79
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
80
- }
81
- function _is_native_reflect_construct() {
82
- try {
83
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
84
- } catch (_) {}
85
- return (_is_native_reflect_construct = function() {
86
- return !!result;
87
- })();
88
- }
89
- var Input = /*#__PURE__*/ function(InputElement) {
90
- _inherits(Input, InputElement);
91
- function Input() {
92
- _class_call_check(this, Input);
93
- return _call_super(this, Input, arguments);
94
- }
95
- return Input;
96
- }(_inputElement.default);
97
- _define_property(Input, "tagName", "input");
98
-
99
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbnB1dEVsZW1lbnQvaW5wdXQuanMiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmltcG9ydCBJbnB1dEVsZW1lbnQgZnJvbSBcIi4uL2lucHV0RWxlbWVudFwiO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBJbnB1dCBleHRlbmRzIElucHV0RWxlbWVudCB7XG4gIHN0YXRpYyB0YWdOYW1lID0gXCJpbnB1dFwiO1xufVxuIl0sIm5hbWVzIjpbIklucHV0IiwiSW5wdXRFbGVtZW50IiwidGFnTmFtZSJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7ZUFJcUJBOzs7bUVBRkk7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVWLElBQUEsQUFBTUEsc0JBQU47Y0FBTUE7YUFBQUE7Z0NBQUFBO2lDQUFBQTs7V0FBQUE7RUFBY0MscUJBQVk7QUFDN0MsaUJBRG1CRCxPQUNaRSxXQUFVIn0=
@@ -1,99 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return Textarea;
9
- }
10
- });
11
- var _inputElement = /*#__PURE__*/ _interop_require_default(require("../inputElement"));
12
- function _assert_this_initialized(self) {
13
- if (self === void 0) {
14
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
15
- }
16
- return self;
17
- }
18
- function _call_super(_this, derived, args) {
19
- derived = _get_prototype_of(derived);
20
- return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
21
- }
22
- function _class_call_check(instance, Constructor) {
23
- if (!(instance instanceof Constructor)) {
24
- throw new TypeError("Cannot call a class as a function");
25
- }
26
- }
27
- function _define_property(obj, key, value) {
28
- if (key in obj) {
29
- Object.defineProperty(obj, key, {
30
- value: value,
31
- enumerable: true,
32
- configurable: true,
33
- writable: true
34
- });
35
- } else {
36
- obj[key] = value;
37
- }
38
- return obj;
39
- }
40
- function _get_prototype_of(o) {
41
- _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
42
- return o.__proto__ || Object.getPrototypeOf(o);
43
- };
44
- return _get_prototype_of(o);
45
- }
46
- function _inherits(subClass, superClass) {
47
- if (typeof superClass !== "function" && superClass !== null) {
48
- throw new TypeError("Super expression must either be null or a function");
49
- }
50
- subClass.prototype = Object.create(superClass && superClass.prototype, {
51
- constructor: {
52
- value: subClass,
53
- writable: true,
54
- configurable: true
55
- }
56
- });
57
- if (superClass) _set_prototype_of(subClass, superClass);
58
- }
59
- function _interop_require_default(obj) {
60
- return obj && obj.__esModule ? obj : {
61
- default: obj
62
- };
63
- }
64
- function _possible_constructor_return(self, call) {
65
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
66
- return call;
67
- }
68
- return _assert_this_initialized(self);
69
- }
70
- function _set_prototype_of(o, p) {
71
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
72
- o.__proto__ = p;
73
- return o;
74
- };
75
- return _set_prototype_of(o, p);
76
- }
77
- function _type_of(obj) {
78
- "@swc/helpers - typeof";
79
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
80
- }
81
- function _is_native_reflect_construct() {
82
- try {
83
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
84
- } catch (_) {}
85
- return (_is_native_reflect_construct = function() {
86
- return !!result;
87
- })();
88
- }
89
- var Textarea = /*#__PURE__*/ function(InputElement) {
90
- _inherits(Textarea, InputElement);
91
- function Textarea() {
92
- _class_call_check(this, Textarea);
93
- return _call_super(this, Textarea, arguments);
94
- }
95
- return Textarea;
96
- }(_inputElement.default);
97
- _define_property(Textarea, "tagName", "textarea");
98
-
99
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbnB1dEVsZW1lbnQvdGV4dGFyZWEuanMiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmltcG9ydCBJbnB1dEVsZW1lbnQgZnJvbSBcIi4uL2lucHV0RWxlbWVudFwiO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBUZXh0YXJlYSBleHRlbmRzIElucHV0RWxlbWVudCB7XG4gIHN0YXRpYyB0YWdOYW1lID0gXCJ0ZXh0YXJlYVwiO1xufVxuIl0sIm5hbWVzIjpbIlRleHRhcmVhIiwiSW5wdXRFbGVtZW50IiwidGFnTmFtZSJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7ZUFJcUJBOzs7bUVBRkk7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVWLElBQUEsQUFBTUEseUJBQU47Y0FBTUE7YUFBQUE7Z0NBQUFBO2lDQUFBQTs7V0FBQUE7RUFBaUJDLHFCQUFZO0FBQ2hELGlCQURtQkQsVUFDWkUsV0FBVSJ9
@@ -1,214 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return _default;
9
- }
10
- });
11
- var _element = /*#__PURE__*/ _interop_require_default(require("./element"));
12
- var _input = /*#__PURE__*/ _interop_require_default(require("./mixins/input"));
13
- var _change = /*#__PURE__*/ _interop_require_default(require("./mixins/change"));
14
- function _assert_this_initialized(self) {
15
- if (self === void 0) {
16
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
17
- }
18
- return self;
19
- }
20
- function _call_super(_this, derived, args) {
21
- derived = _get_prototype_of(derived);
22
- return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
23
- }
24
- function _class_call_check(instance, Constructor) {
25
- if (!(instance instanceof Constructor)) {
26
- throw new TypeError("Cannot call a class as a function");
27
- }
28
- }
29
- function _construct(Parent, args, Class) {
30
- if (_is_native_reflect_construct()) {
31
- _construct = Reflect.construct;
32
- } else {
33
- _construct = function construct(Parent, args, Class) {
34
- var a = [
35
- null
36
- ];
37
- a.push.apply(a, args);
38
- var Constructor = Function.bind.apply(Parent, a);
39
- var instance = new Constructor();
40
- if (Class) _set_prototype_of(instance, Class.prototype);
41
- return instance;
42
- };
43
- }
44
- return _construct.apply(null, arguments);
45
- }
46
- function _defineProperties(target, props) {
47
- for(var i = 0; i < props.length; i++){
48
- var descriptor = props[i];
49
- descriptor.enumerable = descriptor.enumerable || false;
50
- descriptor.configurable = true;
51
- if ("value" in descriptor) descriptor.writable = true;
52
- Object.defineProperty(target, descriptor.key, descriptor);
53
- }
54
- }
55
- function _create_class(Constructor, protoProps, staticProps) {
56
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
57
- if (staticProps) _defineProperties(Constructor, staticProps);
58
- return Constructor;
59
- }
60
- function _get_prototype_of(o) {
61
- _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
62
- return o.__proto__ || Object.getPrototypeOf(o);
63
- };
64
- return _get_prototype_of(o);
65
- }
66
- function _inherits(subClass, superClass) {
67
- if (typeof superClass !== "function" && superClass !== null) {
68
- throw new TypeError("Super expression must either be null or a function");
69
- }
70
- subClass.prototype = Object.create(superClass && superClass.prototype, {
71
- constructor: {
72
- value: subClass,
73
- writable: true,
74
- configurable: true
75
- }
76
- });
77
- if (superClass) _set_prototype_of(subClass, superClass);
78
- }
79
- function _interop_require_default(obj) {
80
- return obj && obj.__esModule ? obj : {
81
- default: obj
82
- };
83
- }
84
- function _is_native_function(fn) {
85
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
86
- }
87
- function _possible_constructor_return(self, call) {
88
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
89
- return call;
90
- }
91
- return _assert_this_initialized(self);
92
- }
93
- function _set_prototype_of(o, p) {
94
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
95
- o.__proto__ = p;
96
- return o;
97
- };
98
- return _set_prototype_of(o, p);
99
- }
100
- function _type_of(obj) {
101
- "@swc/helpers - typeof";
102
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
103
- }
104
- function _wrap_native_super(Class) {
105
- var _cache = typeof Map === "function" ? new Map() : undefined;
106
- _wrap_native_super = function wrapNativeSuper(Class) {
107
- if (Class === null || !_is_native_function(Class)) return Class;
108
- if (typeof Class !== "function") {
109
- throw new TypeError("Super expression must either be null or a function");
110
- }
111
- if (typeof _cache !== "undefined") {
112
- if (_cache.has(Class)) return _cache.get(Class);
113
- _cache.set(Class, Wrapper);
114
- }
115
- function Wrapper() {
116
- return _construct(Class, arguments, _get_prototype_of(this).constructor);
117
- }
118
- Wrapper.prototype = Object.create(Class.prototype, {
119
- constructor: {
120
- value: Wrapper,
121
- enumerable: false,
122
- writable: true,
123
- configurable: true
124
- }
125
- });
126
- return _set_prototype_of(Wrapper, Class);
127
- };
128
- return _wrap_native_super(Class);
129
- }
130
- function _is_native_reflect_construct() {
131
- try {
132
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
133
- } catch (_) {}
134
- return (_is_native_reflect_construct = function() {
135
- return !!result;
136
- })();
137
- }
138
- var InputElement = /*#__PURE__*/ function(Element) {
139
- _inherits(InputElement, Element);
140
- function InputElement() {
141
- _class_call_check(this, InputElement);
142
- return _call_super(this, InputElement, arguments);
143
- }
144
- _create_class(InputElement, [
145
- {
146
- key: "onResize",
147
- value: function onResize(resizeHandler, element) {} ///
148
- },
149
- {
150
- key: "offResize",
151
- value: function offResize(resizeHandler, element) {} ///
152
- },
153
- {
154
- key: "getValue",
155
- value: function getValue() {
156
- return this.domElement.value;
157
- }
158
- },
159
- {
160
- key: "getSelectionStart",
161
- value: function getSelectionStart() {
162
- return this.domElement.selectionStart;
163
- }
164
- },
165
- {
166
- key: "getSelectionEnd",
167
- value: function getSelectionEnd() {
168
- return this.domElement.selectionEnd;
169
- }
170
- },
171
- {
172
- key: "isReadOnly",
173
- value: function isReadOnly() {
174
- return this.domElement.readOnly;
175
- }
176
- },
177
- {
178
- key: "setValue",
179
- value: function setValue(value) {
180
- this.domElement.value = value;
181
- }
182
- },
183
- {
184
- key: "setSelectionStart",
185
- value: function setSelectionStart(selectionStart) {
186
- this.domElement.selectionStart = selectionStart;
187
- }
188
- },
189
- {
190
- key: "setSelectionEnd",
191
- value: function setSelectionEnd(selectionEnd) {
192
- this.domElement.selectionEnd = selectionEnd;
193
- }
194
- },
195
- {
196
- key: "setReadOnly",
197
- value: function setReadOnly(readOnly) {
198
- this.domElement.readOnly = readOnly;
199
- }
200
- },
201
- {
202
- key: "select",
203
- value: function select() {
204
- this.domElement.select();
205
- }
206
- }
207
- ]);
208
- return InputElement;
209
- }(_wrap_native_super(_element.default));
210
- Object.assign(InputElement.prototype, _input.default);
211
- Object.assign(InputElement.prototype, _change.default);
212
- var _default = InputElement;
213
-
214
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbnB1dEVsZW1lbnQuanMiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmltcG9ydCBFbGVtZW50IGZyb20gXCIuL2VsZW1lbnRcIjtcbmltcG9ydCBpbnB1dE1peGlucyBmcm9tIFwiLi9taXhpbnMvaW5wdXRcIjtcbmltcG9ydCBjaGFuZ2VNaXhpbnMgZnJvbSBcIi4vbWl4aW5zL2NoYW5nZVwiO1xuXG5jbGFzcyBJbnB1dEVsZW1lbnQgZXh0ZW5kcyBFbGVtZW50IHtcbiAgb25SZXNpemUocmVzaXplSGFuZGxlciwgZWxlbWVudCkge30gLy8vXG5cbiAgb2ZmUmVzaXplKHJlc2l6ZUhhbmRsZXIsIGVsZW1lbnQpIHt9ICAvLy9cblxuICBnZXRWYWx1ZSgpIHsgcmV0dXJuIHRoaXMuZG9tRWxlbWVudC52YWx1ZTsgfVxuXG4gIGdldFNlbGVjdGlvblN0YXJ0KCkgeyByZXR1cm4gdGhpcy5kb21FbGVtZW50LnNlbGVjdGlvblN0YXJ0OyB9XG5cbiAgZ2V0U2VsZWN0aW9uRW5kKCkgeyByZXR1cm4gdGhpcy5kb21FbGVtZW50LnNlbGVjdGlvbkVuZDsgfVxuICBcbiAgaXNSZWFkT25seSgpIHsgcmV0dXJuIHRoa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