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,101 +1,101 @@
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 JoeUserCube =
30
- /*#__PURE__*/
31
- function (_HTMLElement) {
32
- _inherits(JoeUserCube, _HTMLElement);
33
-
34
- function JoeUserCube() {
35
- _classCallCheck(this, JoeUserCube);
36
-
37
- return _possibleConstructorReturn(this, _getPrototypeOf(JoeUserCube).call(this));
38
- }
39
-
40
- _createClass(JoeUserCube, [{
41
- key: "connectedCallback",
42
- value: function connectedCallback() {
43
- var atts = _joe.Components.getAttributes(this);
44
-
45
- this.classList.add("joe-initials");
46
-
47
- if (atts.user) {
48
- this.User = atts.user;
49
-
50
- if (typeof this.User == "string") {
51
- this.User = _joe.Indexes._id[this.User];
52
- }
53
-
54
- this.render();
55
- this.classList.add("generated");
56
- }
57
-
58
- this.container = this.parentElement;
59
- }
60
- }, {
61
- key: "render",
62
- value: function render() {
63
- var atts = _joe.Components.getAttributes(this);
64
-
65
- var title, initials;
66
- var color = this.User.color || '#cbcbcb';
67
- var u = this.User;
68
-
69
- if (u.first && u.last) {
70
- title = u.first + ' ' + u.last;
71
- initials = u.first[0] + u.last[0];
72
- } else {
73
- var name = u.fullname || u.name;
74
- title = name;
75
- initials = name[0] + (name.indexOf(' ') > 0 && name[name.indexOf(' ') + 1] || '');
76
- }
77
-
78
- this.title = title;
79
- this.style.backgroundColor = color;
80
- this.innerHTML = initials + "<span>" + title + "</span>";
81
- }
82
- }, {
83
- key: "attributeChangedCallback",
84
- value: function attributeChangedCallback(attr, oldValue, newValue) {
85
- this.render();
86
- }
87
- }, {
88
- key: "disconnectedCallback",
89
- value: function disconnectedCallback() {}
90
- }], [{
91
- key: "observedAttributes",
92
- get: function get() {
93
- return [];
94
- }
95
- }]);
96
-
97
- return JoeUserCube;
98
- }(_wrapNativeSuper(HTMLElement)); // window.addEventListener('load', function(){
99
-
100
-
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 JoeUserCube =
30
+ /*#__PURE__*/
31
+ function (_HTMLElement) {
32
+ _inherits(JoeUserCube, _HTMLElement);
33
+
34
+ function JoeUserCube() {
35
+ _classCallCheck(this, JoeUserCube);
36
+
37
+ return _possibleConstructorReturn(this, _getPrototypeOf(JoeUserCube).call(this));
38
+ }
39
+
40
+ _createClass(JoeUserCube, [{
41
+ key: "connectedCallback",
42
+ value: function connectedCallback() {
43
+ var atts = _joe.Components.getAttributes(this);
44
+
45
+ this.classList.add("joe-initials");
46
+
47
+ if (atts.user) {
48
+ this.User = atts.user;
49
+
50
+ if (typeof this.User == "string") {
51
+ this.User = _joe.Indexes._id[this.User];
52
+ }
53
+
54
+ this.render();
55
+ this.classList.add("generated");
56
+ }
57
+
58
+ this.container = this.parentElement;
59
+ }
60
+ }, {
61
+ key: "render",
62
+ value: function render() {
63
+ var atts = _joe.Components.getAttributes(this);
64
+
65
+ var title, initials;
66
+ var color = this.User.color || '#cbcbcb';
67
+ var u = this.User;
68
+
69
+ if (u.first && u.last) {
70
+ title = u.first + ' ' + u.last;
71
+ initials = u.first[0] + u.last[0];
72
+ } else {
73
+ var name = u.fullname || u.name;
74
+ title = name;
75
+ initials = name[0] + (name.indexOf(' ') > 0 && name[name.indexOf(' ') + 1] || '');
76
+ }
77
+
78
+ this.title = title;
79
+ this.style.backgroundColor = color;
80
+ this.innerHTML = initials + "<span>" + title + "</span>";
81
+ }
82
+ }, {
83
+ key: "attributeChangedCallback",
84
+ value: function attributeChangedCallback(attr, oldValue, newValue) {
85
+ this.render();
86
+ }
87
+ }, {
88
+ key: "disconnectedCallback",
89
+ value: function disconnectedCallback() {}
90
+ }], [{
91
+ key: "observedAttributes",
92
+ get: function get() {
93
+ return [];
94
+ }
95
+ }]);
96
+
97
+ return JoeUserCube;
98
+ }(_wrapNativeSuper(HTMLElement)); // window.addEventListener('load', function(){
99
+
100
+
101
101
  window.customElements.define("joe-user-cube", JoeUserCube); // })
@@ -1,134 +1,134 @@
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
- function getComponentAttributes(comp) {
30
- var d = {};
31
-
32
- for (var a = 0; a < comp.attributes.length; a++) {
33
- d[comp.attributes[a].name] = comp.attributes[a].value;
34
- }
35
-
36
- return d;
37
- }
38
-
39
- function getCookie(cname) {
40
- var name = cname + "=";
41
- var decodedCookie = decodeURIComponent(document.cookie);
42
- var ca = decodedCookie.split(';');
43
-
44
- for (var i = 0; i < ca.length; i++) {
45
- var c = ca[i];
46
-
47
- while (c.charAt(0) == ' ') {
48
- c = c.substring(1);
49
- }
50
-
51
- if (c.indexOf(name) == 0) {
52
- return c.substring(name.length, c.length);
53
- }
54
- }
55
-
56
- return "";
57
- }
58
-
59
- function setCookie(cname, cvalue, exdays) {
60
- var d = new Date();
61
- d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
62
- var expires = "expires=" + d.toUTCString();
63
- var cookie_string = cname + "=" + cvalue + ";" + expires + ";path=" + location.pathname + location.search; //var cookie_string = cname + "=" + cvalue + ";" + expires + ";";
64
-
65
- document.cookie = cookie_string;
66
- }
67
-
68
- var ReportListItem =
69
- /*#__PURE__*/
70
- function (_HTMLElement) {
71
- _inherits(ReportListItem, _HTMLElement);
72
-
73
- function ReportListItem() {
74
- _classCallCheck(this, ReportListItem);
75
-
76
- return _possibleConstructorReturn(this, _getPrototypeOf(ReportListItem).call(this));
77
- }
78
-
79
- _createClass(ReportListItem, [{
80
- key: "connectedCallback",
81
- value: function connectedCallback() {
82
- this.classList.add('report-list-item');
83
- this.container = this.parentElement;
84
- this.render();
85
- }
86
- }, {
87
- key: "render",
88
- value: function render() {
89
- var atts = getComponentAttributes(this);
90
-
91
- if (this.hasAttribute('toggleable')) {
92
- this.onclick = this.toggleItem;
93
-
94
- if (window && window.localStorage) {
95
- var completed = (window.localStorage.getItem('completeItems') || '').split(',');
96
-
97
- if (completed.indexOf(this.id) != -1) {
98
- this.classList.add('strikethrough');
99
- }
100
- }
101
- }
102
- }
103
- }, {
104
- key: "toggleItem",
105
- value: function toggleItem() {
106
- this.classList.toggle('strikethrough');
107
- var completed = [];
108
- document.querySelectorAll('report-list-item.strikethrough').map(function (dom) {
109
- completed.push(dom.id);
110
- }); // Create or update the cookie:
111
-
112
- if (window && window.localStorage) {
113
- window.localStorage.setItem('completeItems', completed.join(','));
114
- }
115
- }
116
- }, {
117
- key: "attributeChangedCallback",
118
- value: function attributeChangedCallback(attr, oldValue, newValue) {
119
- this.render();
120
- }
121
- }, {
122
- key: "disconnectedCallback",
123
- value: function disconnectedCallback() {}
124
- }], [{
125
- key: "observedAttributes",
126
- get: function get() {
127
- return [];
128
- }
129
- }]);
130
-
131
- return ReportListItem;
132
- }(_wrapNativeSuper(HTMLElement));
133
-
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
+ function getComponentAttributes(comp) {
30
+ var d = {};
31
+
32
+ for (var a = 0; a < comp.attributes.length; a++) {
33
+ d[comp.attributes[a].name] = comp.attributes[a].value;
34
+ }
35
+
36
+ return d;
37
+ }
38
+
39
+ function getCookie(cname) {
40
+ var name = cname + "=";
41
+ var decodedCookie = decodeURIComponent(document.cookie);
42
+ var ca = decodedCookie.split(';');
43
+
44
+ for (var i = 0; i < ca.length; i++) {
45
+ var c = ca[i];
46
+
47
+ while (c.charAt(0) == ' ') {
48
+ c = c.substring(1);
49
+ }
50
+
51
+ if (c.indexOf(name) == 0) {
52
+ return c.substring(name.length, c.length);
53
+ }
54
+ }
55
+
56
+ return "";
57
+ }
58
+
59
+ function setCookie(cname, cvalue, exdays) {
60
+ var d = new Date();
61
+ d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
62
+ var expires = "expires=" + d.toUTCString();
63
+ var cookie_string = cname + "=" + cvalue + ";" + expires + ";path=" + location.pathname + location.search; //var cookie_string = cname + "=" + cvalue + ";" + expires + ";";
64
+
65
+ document.cookie = cookie_string;
66
+ }
67
+
68
+ var ReportListItem =
69
+ /*#__PURE__*/
70
+ function (_HTMLElement) {
71
+ _inherits(ReportListItem, _HTMLElement);
72
+
73
+ function ReportListItem() {
74
+ _classCallCheck(this, ReportListItem);
75
+
76
+ return _possibleConstructorReturn(this, _getPrototypeOf(ReportListItem).call(this));
77
+ }
78
+
79
+ _createClass(ReportListItem, [{
80
+ key: "connectedCallback",
81
+ value: function connectedCallback() {
82
+ this.classList.add('report-list-item');
83
+ this.container = this.parentElement;
84
+ this.render();
85
+ }
86
+ }, {
87
+ key: "render",
88
+ value: function render() {
89
+ var atts = getComponentAttributes(this);
90
+
91
+ if (this.hasAttribute('toggleable')) {
92
+ this.onclick = this.toggleItem;
93
+
94
+ if (window && window.localStorage) {
95
+ var completed = (window.localStorage.getItem('completeItems') || '').split(',');
96
+
97
+ if (completed.indexOf(this.id) != -1) {
98
+ this.classList.add('strikethrough');
99
+ }
100
+ }
101
+ }
102
+ }
103
+ }, {
104
+ key: "toggleItem",
105
+ value: function toggleItem() {
106
+ this.classList.toggle('strikethrough');
107
+ var completed = [];
108
+ document.querySelectorAll('report-list-item.strikethrough').map(function (dom) {
109
+ completed.push(dom.id);
110
+ }); // Create or update the cookie:
111
+
112
+ if (window && window.localStorage) {
113
+ window.localStorage.setItem('completeItems', completed.join(','));
114
+ }
115
+ }
116
+ }, {
117
+ key: "attributeChangedCallback",
118
+ value: function attributeChangedCallback(attr, oldValue, newValue) {
119
+ this.render();
120
+ }
121
+ }, {
122
+ key: "disconnectedCallback",
123
+ value: function disconnectedCallback() {}
124
+ }], [{
125
+ key: "observedAttributes",
126
+ get: function get() {
127
+ return [];
128
+ }
129
+ }]);
130
+
131
+ return ReportListItem;
132
+ }(_wrapNativeSuper(HTMLElement));
133
+
134
134
  window.customElements.define("report-list-item", ReportListItem);