json-object-editor 0.9.89 → 0.10.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/app.js +5 -4
  3. package/css/jif/Read Me.txt +5 -5
  4. package/css/jif/demo-files/demo.css +153 -153
  5. package/css/jif/demo-files/demo.js +30 -30
  6. package/css/jif/demo.html +285 -285
  7. package/css/jif/fonts/joeiconfont.svg +24 -24
  8. package/css/jif/ie7/ie7.css +45 -45
  9. package/css/jif/ie7/ie7.js +46 -46
  10. package/css/jif/selection.json +573 -573
  11. package/css/joe-styles.css +5 -1
  12. package/css/joe.css +11 -7
  13. package/css/jquery-ui-1.10.4.custom.min.css +5 -5
  14. package/css/jquery-ui.min.css +6 -6
  15. package/css/jquery.timepicker.css +72 -72
  16. package/es5-build/capp/capp.js +1083 -1083
  17. package/es5-build/js/JsonObjectEditor_es5.jquery.craydent.js +11047 -11047
  18. package/es5-build/web-components/account-info.js +136 -136
  19. package/es5-build/web-components/capp-components.js +160 -160
  20. package/es5-build/web-components/capp-panel.js +85 -85
  21. package/es5-build/web-components/capp-view.js +73 -73
  22. package/es5-build/web-components/joe-autocomplete.js +149 -149
  23. package/es5-build/web-components/joe-button.js +132 -132
  24. package/es5-build/web-components/joe-card.js +92 -92
  25. package/es5-build/web-components/joe-component.js +74 -74
  26. package/es5-build/web-components/joe-field.js +70 -70
  27. package/es5-build/web-components/joe-list-item.js +176 -176
  28. package/es5-build/web-components/joe-user-cube.js +100 -100
  29. package/es5-build/web-components/report-components.js +133 -133
  30. package/grunt/build +86 -86
  31. package/grunt/package-lock.json +6301 -2489
  32. package/grunt/package.json +47 -47
  33. package/grunt/src +86 -86
  34. package/js/JsonObjectEditor.jquery.craydent.js +3 -2
  35. package/js/joe-full.js +11 -10
  36. package/js/joe.js +12 -11
  37. package/js/joe_es5.js +11056 -11056
  38. package/js/jquery.timepicker.min.js +1 -1
  39. package/js/leaflet.js +8 -8
  40. package/js/libs/adapter-latest.js +4400 -4400
  41. package/js/libs/craydent-1.9.2.js +11741 -11741
  42. package/js/libs/craydent-upload-2.0.0.js +394 -394
  43. package/js/libs/hammer.min.208.js +6 -6
  44. package/js/libs/jquery-3.5.1.min.js +2 -2
  45. package/js/libs/moment.min.js +6 -6
  46. package/js/native-shim.js +46 -46
  47. package/js/plugins/c3/c3.min.js +5 -5
  48. package/js/plugins/c3/d3.v3.min.js +4 -4
  49. package/js/plugins/threejs/Detector.js +78 -78
  50. package/js/plugins/threejs/LICENSE +21 -21
  51. package/js/plugins/threejs/MTLLoader.js +417 -417
  52. package/js/plugins/threejs/OBJLoader.js +564 -564
  53. package/js/plugins/threejs/OrbitControls.js +1037 -1037
  54. package/js/plugins/threejs/README.md +9 -9
  55. package/js/plugins/threejs/assets/female-croupier-2013-03-26.mtl +3 -3
  56. package/js/plugins/threejs/index.html +178 -178
  57. package/js/plugins/threejs/three.js +41507 -41507
  58. package/package copy.json +62 -0
  59. package/package.json +12 -13
  60. package/server/schemas/ledger.js +52 -16
  61. package/web-components/joe-card.js +5 -0
  62. package/projectFilesBackup/.idea/workspace.xml +0 -424
@@ -1,71 +1,71 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
-
7
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
8
-
9
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10
-
11
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
12
-
13
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
14
-
15
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
16
-
17
- function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
18
-
19
- function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
20
-
21
- function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
22
-
23
- function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
24
-
25
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
26
-
27
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
28
-
29
- var JoeField =
30
- /*#__PURE__*/
31
- function (_HTMLElement) {
32
- _inherits(JoeField, _HTMLElement);
33
-
34
- function JoeField() {
35
- _classCallCheck(this, JoeField);
36
-
37
- return _possibleConstructorReturn(this, _getPrototypeOf(JoeField).call(this));
38
- }
39
-
40
- _createClass(JoeField, [{
41
- key: "connectedCallback",
42
- value: function connectedCallback() {
43
- this.classList.add('joe-object-field');
44
- this.container = this.parentElement;
45
- this.render();
46
- }
47
- }, {
48
- key: "render",
49
- value: function render() {
50
- var atts = _joe.Components.getAttributes(this);
51
- }
52
- }, {
53
- key: "attributeChangedCallback",
54
- value: function attributeChangedCallback(attr, oldValue, newValue) {
55
- this.render();
56
- }
57
- }, {
58
- key: "disconnectedCallback",
59
- value: function disconnectedCallback() {}
60
- }], [{
61
- key: "observedAttributes",
62
- get: function get() {
63
- return [];
64
- }
65
- }]);
66
-
67
- return JoeField;
68
- }(_wrapNativeSuper(HTMLElement)); // window.addEventListener('load', function(){
69
-
70
-
1
+ "use strict";
2
+
3
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
+
7
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
8
+
9
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10
+
11
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
12
+
13
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
14
+
15
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
16
+
17
+ function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
18
+
19
+ function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
20
+
21
+ function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
22
+
23
+ function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
24
+
25
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
26
+
27
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
28
+
29
+ var JoeField =
30
+ /*#__PURE__*/
31
+ function (_HTMLElement) {
32
+ _inherits(JoeField, _HTMLElement);
33
+
34
+ function JoeField() {
35
+ _classCallCheck(this, JoeField);
36
+
37
+ return _possibleConstructorReturn(this, _getPrototypeOf(JoeField).call(this));
38
+ }
39
+
40
+ _createClass(JoeField, [{
41
+ key: "connectedCallback",
42
+ value: function connectedCallback() {
43
+ this.classList.add('joe-object-field');
44
+ this.container = this.parentElement;
45
+ this.render();
46
+ }
47
+ }, {
48
+ key: "render",
49
+ value: function render() {
50
+ var atts = _joe.Components.getAttributes(this);
51
+ }
52
+ }, {
53
+ key: "attributeChangedCallback",
54
+ value: function attributeChangedCallback(attr, oldValue, newValue) {
55
+ this.render();
56
+ }
57
+ }, {
58
+ key: "disconnectedCallback",
59
+ value: function disconnectedCallback() {}
60
+ }], [{
61
+ key: "observedAttributes",
62
+ get: function get() {
63
+ return [];
64
+ }
65
+ }]);
66
+
67
+ return JoeField;
68
+ }(_wrapNativeSuper(HTMLElement)); // window.addEventListener('load', function(){
69
+
70
+
71
71
  window.customElements.define("joe-field", JoeField); // })
@@ -1,177 +1,177 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
-
7
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
8
-
9
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10
-
11
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
12
-
13
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
14
-
15
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
16
-
17
- function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
18
-
19
- function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
20
-
21
- function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
22
-
23
- function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
24
-
25
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
26
-
27
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
28
-
29
- var JoeListItem =
30
- /*#__PURE__*/
31
- function (_HTMLElement) {
32
- _inherits(JoeListItem, _HTMLElement);
33
-
34
- function JoeListItem() {
35
- _classCallCheck(this, JoeListItem);
36
-
37
- return _possibleConstructorReturn(this, _getPrototypeOf(JoeListItem).call(this)); // var styles = `
38
- // swipe-option{
39
- // position:absolute;
40
- // top:0;
41
- // width:100px;
42
- // bottom:0;
43
- // backgorund:#ccc;
44
- // display:none;
45
- // }
46
- // .ui-draggable-dragging swipe-option{
47
- // display:block;
48
- // }
49
- // `;
50
- // document.getElementById(_joe.Components.styleTag).innerHTML+=styles;
51
- }
52
-
53
- _createClass(JoeListItem, [{
54
- key: "renderIcon",
55
- value: function renderIcon() {
56
- this.icon = this.getAttribute('icon');
57
-
58
- if (_joe.schemas[this.icon] && _joe.schemas[this.icon].menuicon) {
59
- this.content.innerHTML = _joe.schemas[this.icon].menuicon + this.content.innerHTML; //return _joe.schemas[this.icon].menuicon;
60
- }
61
- }
62
- }, {
63
- key: "connectedCallback",
64
- value: function connectedCallback() {
65
- var self = this;
66
- this.schemaObj = _joe.schemas[this.getAttribute('schema')];
67
- this.itemId = this.getAttribute('itemId');
68
- this.idprop = this.getAttribute('idprop');
69
- this.content = this.querySelector('.joe-field-item-content');
70
- this.initial_onclick = this.content.getAttribute('onclick');
71
- this.checkbox = this.querySelector('joe-checkbox');
72
- this.renderIcon();
73
-
74
- if (this.schemaObj && this.schemaObj.onswipe) {
75
- var rightOption = this.schemaObj.onswipe.left;
76
- var leftOption = this.schemaObj.onswipe.right;
77
- var l, r;
78
-
79
- if (leftOption) {
80
- l = document.createElement("swipe-option");
81
- l.className = "left-side";
82
- l.innerText = leftOption.name;
83
- l.style.backgroundColor = leftOption.color || '#ccc';
84
- this.appendChild(l);
85
- }
86
-
87
- if (rightOption) {
88
- r = document.createElement("swipe-option");
89
- r.className = "right-side";
90
- r.innerText = rightOption.name;
91
- r.style.backgroundColor = rightOption.color || '#ccc';
92
- this.appendChild(r);
93
- } // this.innerHTML+=`
94
- // <swipe-option class="left"></swipe-option>
95
- // <swipe-option class="left"></swipe-option>
96
- // `;
97
-
98
-
99
- $(this).draggable({
100
- axis: 'x',
101
- revert: true,
102
- scroll: false,
103
- start: function start(e, t) {
104
- self.content.removeAttribute('onclick'); //self.content.removeEventListener('click',this.initial_onclick)
105
- },
106
- drag: function drag(e, t) {
107
- var drag = t.position.left;
108
- var threshold = this.schemaObj.onswipe.threshold || .6;
109
-
110
- if (Math.abs(drag) > 20) {
111
- self.beingSwiped = true;
112
- }
113
-
114
- if (Math.abs(drag) > e.target.width() * threshold) {
115
- self.classList.add('swiping');
116
- } else {
117
- self.classList.remove('swiping');
118
- }
119
-
120
- console.log(drag); //self.content.removeEventListener('click',this.initial_onclick)
121
- },
122
- stop: function stop(e, t) {
123
- var drag = t.position.left;
124
- var dir = '';
125
- var threshold = this.schemaObj.onswipe.threshold || .6;
126
-
127
- if (Math.abs(drag) < 20 && !self.beingSwiped) {
128
- switch (_typeof(this.initial_onclick)) {
129
- case "string":
130
- eval(this.initial_onclick);
131
- break;
132
-
133
- case "function":
134
- this.initial_onclick(e.target);
135
- break;
136
- }
137
- } else if (Math.abs(drag) > e.target.width() * threshold) {
138
- dir = drag > 0 ? 'right' : 'left';
139
- this.schemaObj.onswipe[dir] && this.schemaObj.onswipe[dir].action && this.schemaObj.onswipe[dir].action(_joe.Indexes[self.idprop][self.itemId], self);
140
- logit(dir + ' ' + drag);
141
- }
142
-
143
- self.content.setAttribute('onclick', this.initial_onclick);
144
- self.beingSwiped = false;
145
- self.classList.remove('swiping'); //self.content.addEventListener('click',this.initial_onclick);
146
- }
147
- });
148
- }
149
-
150
- this.container = this.parentElement;
151
- this.render();
152
- }
153
- }, {
154
- key: "render",
155
- value: function render() {
156
- var atts = _joe.Components.getAttributes(this);
157
- }
158
- }, {
159
- key: "attributeChangedCallback",
160
- value: function attributeChangedCallback(attr, oldValue, newValue) {
161
- this.render();
162
- }
163
- }, {
164
- key: "disconnectedCallback",
165
- value: function disconnectedCallback() {}
166
- }], [{
167
- key: "observedAttributes",
168
- get: function get() {
169
- return [];
170
- }
171
- }]);
172
-
173
- return JoeListItem;
174
- }(_wrapNativeSuper(HTMLElement)); // window.addEventListener('load', function(){
175
-
176
-
1
+ "use strict";
2
+
3
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
+
7
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
8
+
9
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10
+
11
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
12
+
13
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
14
+
15
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
16
+
17
+ function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
18
+
19
+ function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
20
+
21
+ function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
22
+
23
+ function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
24
+
25
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
26
+
27
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
28
+
29
+ var JoeListItem =
30
+ /*#__PURE__*/
31
+ function (_HTMLElement) {
32
+ _inherits(JoeListItem, _HTMLElement);
33
+
34
+ function JoeListItem() {
35
+ _classCallCheck(this, JoeListItem);
36
+
37
+ return _possibleConstructorReturn(this, _getPrototypeOf(JoeListItem).call(this)); // var styles = `
38
+ // swipe-option{
39
+ // position:absolute;
40
+ // top:0;
41
+ // width:100px;
42
+ // bottom:0;
43
+ // backgorund:#ccc;
44
+ // display:none;
45
+ // }
46
+ // .ui-draggable-dragging swipe-option{
47
+ // display:block;
48
+ // }
49
+ // `;
50
+ // document.getElementById(_joe.Components.styleTag).innerHTML+=styles;
51
+ }
52
+
53
+ _createClass(JoeListItem, [{
54
+ key: "renderIcon",
55
+ value: function renderIcon() {
56
+ this.icon = this.getAttribute('icon');
57
+
58
+ if (_joe.schemas[this.icon] && _joe.schemas[this.icon].menuicon) {
59
+ this.content.innerHTML = _joe.schemas[this.icon].menuicon + this.content.innerHTML; //return _joe.schemas[this.icon].menuicon;
60
+ }
61
+ }
62
+ }, {
63
+ key: "connectedCallback",
64
+ value: function connectedCallback() {
65
+ var self = this;
66
+ this.schemaObj = _joe.schemas[this.getAttribute('schema')];
67
+ this.itemId = this.getAttribute('itemId');
68
+ this.idprop = this.getAttribute('idprop');
69
+ this.content = this.querySelector('.joe-field-item-content');
70
+ this.initial_onclick = this.content.getAttribute('onclick');
71
+ this.checkbox = this.querySelector('joe-checkbox');
72
+ this.renderIcon();
73
+
74
+ if (this.schemaObj && this.schemaObj.onswipe) {
75
+ var rightOption = this.schemaObj.onswipe.left;
76
+ var leftOption = this.schemaObj.onswipe.right;
77
+ var l, r;
78
+
79
+ if (leftOption) {
80
+ l = document.createElement("swipe-option");
81
+ l.className = "left-side";
82
+ l.innerText = leftOption.name;
83
+ l.style.backgroundColor = leftOption.color || '#ccc';
84
+ this.appendChild(l);
85
+ }
86
+
87
+ if (rightOption) {
88
+ r = document.createElement("swipe-option");
89
+ r.className = "right-side";
90
+ r.innerText = rightOption.name;
91
+ r.style.backgroundColor = rightOption.color || '#ccc';
92
+ this.appendChild(r);
93
+ } // this.innerHTML+=`
94
+ // <swipe-option class="left"></swipe-option>
95
+ // <swipe-option class="left"></swipe-option>
96
+ // `;
97
+
98
+
99
+ $(this).draggable({
100
+ axis: 'x',
101
+ revert: true,
102
+ scroll: false,
103
+ start: function start(e, t) {
104
+ self.content.removeAttribute('onclick'); //self.content.removeEventListener('click',this.initial_onclick)
105
+ },
106
+ drag: function drag(e, t) {
107
+ var drag = t.position.left;
108
+ var threshold = this.schemaObj.onswipe.threshold || .6;
109
+
110
+ if (Math.abs(drag) > 20) {
111
+ self.beingSwiped = true;
112
+ }
113
+
114
+ if (Math.abs(drag) > e.target.width() * threshold) {
115
+ self.classList.add('swiping');
116
+ } else {
117
+ self.classList.remove('swiping');
118
+ }
119
+
120
+ console.log(drag); //self.content.removeEventListener('click',this.initial_onclick)
121
+ },
122
+ stop: function stop(e, t) {
123
+ var drag = t.position.left;
124
+ var dir = '';
125
+ var threshold = this.schemaObj.onswipe.threshold || .6;
126
+
127
+ if (Math.abs(drag) < 20 && !self.beingSwiped) {
128
+ switch (_typeof(this.initial_onclick)) {
129
+ case "string":
130
+ eval(this.initial_onclick);
131
+ break;
132
+
133
+ case "function":
134
+ this.initial_onclick(e.target);
135
+ break;
136
+ }
137
+ } else if (Math.abs(drag) > e.target.width() * threshold) {
138
+ dir = drag > 0 ? 'right' : 'left';
139
+ this.schemaObj.onswipe[dir] && this.schemaObj.onswipe[dir].action && this.schemaObj.onswipe[dir].action(_joe.Indexes[self.idprop][self.itemId], self);
140
+ logit(dir + ' ' + drag);
141
+ }
142
+
143
+ self.content.setAttribute('onclick', this.initial_onclick);
144
+ self.beingSwiped = false;
145
+ self.classList.remove('swiping'); //self.content.addEventListener('click',this.initial_onclick);
146
+ }
147
+ });
148
+ }
149
+
150
+ this.container = this.parentElement;
151
+ this.render();
152
+ }
153
+ }, {
154
+ key: "render",
155
+ value: function render() {
156
+ var atts = _joe.Components.getAttributes(this);
157
+ }
158
+ }, {
159
+ key: "attributeChangedCallback",
160
+ value: function attributeChangedCallback(attr, oldValue, newValue) {
161
+ this.render();
162
+ }
163
+ }, {
164
+ key: "disconnectedCallback",
165
+ value: function disconnectedCallback() {}
166
+ }], [{
167
+ key: "observedAttributes",
168
+ get: function get() {
169
+ return [];
170
+ }
171
+ }]);
172
+
173
+ return JoeListItem;
174
+ }(_wrapNativeSuper(HTMLElement)); // window.addEventListener('load', function(){
175
+
176
+
177
177
  window.customElements.define("joe-list-item", JoeListItem); // })