@websy/websy-designs 1.1.2 → 1.1.5
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/dist/websy-designs-es6.debug.js +8 -1
- package/dist/websy-designs-es6.js +9 -1
- package/dist/websy-designs-es6.min.js +1 -1
- package/dist/websy-designs.debug.js +11 -7
- package/dist/websy-designs.js +198 -678
- package/dist/websy-designs.min.css +1 -5
- package/dist/websy-designs.min.js +1 -5
- package/package.json +1 -1
package/dist/websy-designs.js
CHANGED
|
@@ -46,11 +46,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
46
46
|
APIService
|
|
47
47
|
ButtonGroup
|
|
48
48
|
WebsyUtils
|
|
49
|
-
<<<<<<< HEAD
|
|
50
49
|
WebsyCarousel
|
|
51
|
-
=======
|
|
52
50
|
Pager
|
|
53
|
-
>>>>>>> master
|
|
54
51
|
*/
|
|
55
52
|
|
|
56
53
|
/* global XMLHttpRequest fetch ENV */
|
|
@@ -349,8 +346,8 @@ var WebsyCarousel = /*#__PURE__*/function () {
|
|
|
349
346
|
this.options.currentFrame++;
|
|
350
347
|
}
|
|
351
348
|
|
|
352
|
-
this.showFrame(prevFrameIndex, this.options.currentFrame);
|
|
353
|
-
// document.getElementById(`${this.elementId}_frame_${this.options.currentFrame}`)
|
|
349
|
+
this.showFrame(prevFrameIndex, this.options.currentFrame);
|
|
350
|
+
this.play(); // document.getElementById(`${this.elementId}_frame_${this.options.currentFrame}`)
|
|
354
351
|
// .style.transform = `translateX(-100%)`
|
|
355
352
|
// if (`${this.options.currentFrame === this.options.frames.length - 1}`) {
|
|
356
353
|
// document.getElementById`${this.elementId}_frame_${this.options.currentFrame}`.style.transform = `translateX('-100%')`
|
|
@@ -394,8 +391,8 @@ var WebsyCarousel = /*#__PURE__*/function () {
|
|
|
394
391
|
this.options.currentFrame--;
|
|
395
392
|
}
|
|
396
393
|
|
|
397
|
-
this.showFrame(prevFrameIndex, this.options.currentFrame);
|
|
398
|
-
// document.getElementById(`${this.elementId}_frame_${this.options.currentFrame}`)
|
|
394
|
+
this.showFrame(prevFrameIndex, this.options.currentFrame);
|
|
395
|
+
this.play(); // document.getElementById(`${this.elementId}_frame_${this.options.currentFrame}`)
|
|
399
396
|
// .style.transform = `translateX(100%)`
|
|
400
397
|
}
|
|
401
398
|
}, {
|
|
@@ -438,9 +435,9 @@ var WebsyCarousel = /*#__PURE__*/function () {
|
|
|
438
435
|
|
|
439
436
|
html += "\n </div>\n ";
|
|
440
437
|
el.innerHTML = html;
|
|
441
|
-
}
|
|
442
|
-
// this.showFrameSelector()
|
|
438
|
+
}
|
|
443
439
|
|
|
440
|
+
this.play(); // this.showFrameSelector()
|
|
444
441
|
}
|
|
445
442
|
}, {
|
|
446
443
|
key: "showFrame",
|
|
@@ -682,7 +679,7 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
682
679
|
}, {
|
|
683
680
|
key: "highlightRange",
|
|
684
681
|
value: function highlightRange() {
|
|
685
|
-
var
|
|
682
|
+
var _this4 = this;
|
|
686
683
|
|
|
687
684
|
var el = document.getElementById("".concat(this.elementId, "_dateList"));
|
|
688
685
|
var dateEls = el.querySelectorAll('.websy-dp-date');
|
|
@@ -753,9 +750,9 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
753
750
|
this.currentselection.forEach(function (d) {
|
|
754
751
|
var dateEl;
|
|
755
752
|
|
|
756
|
-
if (
|
|
753
|
+
if (_this4.options.mode === 'date') {
|
|
757
754
|
dateEl = document.getElementById("".concat(d, "_date"));
|
|
758
|
-
} else if (
|
|
755
|
+
} else if (_this4.options.mode === 'year') {
|
|
759
756
|
dateEl = document.getElementById("".concat(d, "_year"));
|
|
760
757
|
}
|
|
761
758
|
|
|
@@ -804,7 +801,7 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
804
801
|
}, {
|
|
805
802
|
key: "renderDates",
|
|
806
803
|
value: function renderDates(disabledDates) {
|
|
807
|
-
var
|
|
804
|
+
var _this5 = this;
|
|
808
805
|
|
|
809
806
|
var disabled = [];
|
|
810
807
|
this.validDates = [];
|
|
@@ -812,9 +809,9 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
812
809
|
|
|
813
810
|
if (disabledDates) {
|
|
814
811
|
disabled = disabledDates.map(function (d) {
|
|
815
|
-
if (
|
|
812
|
+
if (_this5.options.mode === 'date') {
|
|
816
813
|
return d.getTime();
|
|
817
|
-
} else if (
|
|
814
|
+
} else if (_this5.options.mode === 'year') {
|
|
818
815
|
return d;
|
|
819
816
|
}
|
|
820
817
|
|
|
@@ -961,17 +958,11 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
961
958
|
}, {
|
|
962
959
|
key: "renderRanges",
|
|
963
960
|
value: function renderRanges() {
|
|
964
|
-
var
|
|
961
|
+
var _this6 = this;
|
|
965
962
|
|
|
966
|
-
<<<<<<< HEAD
|
|
967
|
-
return this.options.ranges.map(function (r, i) {
|
|
968
|
-
return "\n <li data-index='".concat(i, "' class='websy-date-picker-range ").concat(i === _this4.selectedRange ? 'active' : '', " ").concat(r.disabled === true ? 'websy-disabled-range' : '', "'>").concat(r.label, "</li>\n ");
|
|
969
|
-
}).join('');
|
|
970
|
-
=======
|
|
971
963
|
return this.options.ranges[this.options.mode].map(function (r, i) {
|
|
972
|
-
return "\n <li data-index='".concat(i, "' class='websy-date-picker-range ").concat(i ===
|
|
964
|
+
return "\n <li data-index='".concat(i, "' class='websy-date-picker-range ").concat(i === _this6.selectedRange ? 'active' : '', " ").concat(r.disabled === true ? 'websy-disabled-range' : '', "'>").concat(r.label, "</li>\n ");
|
|
973
965
|
}).join('') + "<li data-index='-1' class='websy-date-picker-range ".concat(this.selectedRange === -1 ? 'active' : '', "'>Custom</li>");
|
|
974
|
-
>>>>>>> master
|
|
975
966
|
}
|
|
976
967
|
}, {
|
|
977
968
|
key: "scrollRangeIntoView",
|
|
@@ -1085,15 +1076,15 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
1085
1076
|
}, {
|
|
1086
1077
|
key: "updateRange",
|
|
1087
1078
|
value: function updateRange() {
|
|
1088
|
-
var
|
|
1079
|
+
var _this7 = this;
|
|
1089
1080
|
|
|
1090
1081
|
var range;
|
|
1091
1082
|
|
|
1092
1083
|
if (this.selectedRange === -1) {
|
|
1093
1084
|
var list = (this.currentselection.length > 0 ? this.currentselection : this.selectedRangeDates).map(function (d) {
|
|
1094
|
-
if (
|
|
1085
|
+
if (_this7.options.mode === 'date') {
|
|
1095
1086
|
return d.toLocaleDateString();
|
|
1096
|
-
} else if (
|
|
1087
|
+
} else if (_this7.options.mode === 'year') {
|
|
1097
1088
|
return d;
|
|
1098
1089
|
}
|
|
1099
1090
|
});
|
|
@@ -1142,7 +1133,7 @@ Date.prototype.floor = function () {
|
|
|
1142
1133
|
|
|
1143
1134
|
var WebsyDropdown = /*#__PURE__*/function () {
|
|
1144
1135
|
function WebsyDropdown(elementId, options) {
|
|
1145
|
-
var
|
|
1136
|
+
var _this8 = this;
|
|
1146
1137
|
|
|
1147
1138
|
_classCallCheck(this, WebsyDropdown);
|
|
1148
1139
|
|
|
@@ -1177,10 +1168,10 @@ var WebsyDropdown = /*#__PURE__*/function () {
|
|
|
1177
1168
|
el.addEventListener('mouseout', this.handleMouseOut.bind(this));
|
|
1178
1169
|
el.addEventListener('mousemove', this.handleMouseMove.bind(this));
|
|
1179
1170
|
var headerLabel = this.selectedItems.map(function (s) {
|
|
1180
|
-
return
|
|
1171
|
+
return _this8.options.items[s].label || _this8.options.items[s].value;
|
|
1181
1172
|
}).join(this.options.multiValueDelimiter);
|
|
1182
1173
|
var headerValue = this.selectedItems.map(function (s) {
|
|
1183
|
-
return
|
|
1174
|
+
return _this8.options.items[s].value || _this8.options.items[s].label;
|
|
1184
1175
|
}).join(this.options.multiValueDelimiter);
|
|
1185
1176
|
var html = "\n <div id='".concat(this.elementId, "_container' class='websy-dropdown-container ").concat(this.options.disabled ? 'disabled' : '', " ").concat(this.options.disableSearch !== true ? 'with-search' : '', " ").concat(this.options.style, "'>\n <div id='").concat(this.elementId, "_header' class='websy-dropdown-header ").concat(this.selectedItems.length === 1 ? 'one-selected' : '', " ").concat(this.options.allowClear === true ? 'allow-clear' : '', "'>\n <svg class='search' width=\"20\" height=\"20\" viewBox=\"0 0 512 512\"><path d=\"M221.09,64A157.09,157.09,0,1,0,378.18,221.09,157.1,157.1,0,0,0,221.09,64Z\" style=\"fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px\"/><line x1=\"338.29\" y1=\"338.29\" x2=\"448\" y2=\"448\" style=\"fill:none;stroke:#000;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px\"/></svg>\n <span id='").concat(this.elementId, "_headerLabel' class='websy-dropdown-header-label'>").concat(this.options.label, "</span>\n <span data-info='").concat(headerLabel, "' class='websy-dropdown-header-value' id='").concat(this.elementId, "_selectedItems'>").concat(headerLabel, "</span>\n <input class='dropdown-input' id='").concat(this.elementId, "_input' name='").concat(this.options.field || this.options.label, "' value='").concat(headerValue, "'>\n <svg class='arrow' xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z\"/></svg> \n ");
|
|
1186
1177
|
|
|
@@ -1366,29 +1357,6 @@ var WebsyDropdown = /*#__PURE__*/function () {
|
|
|
1366
1357
|
}, {
|
|
1367
1358
|
key: "render",
|
|
1368
1359
|
value: function render() {
|
|
1369
|
-
<<<<<<< HEAD
|
|
1370
|
-
var _this5 = this;
|
|
1371
|
-
|
|
1372
|
-
if (!this.elementId) {
|
|
1373
|
-
console.log('No element Id provided for Websy Dropdown');
|
|
1374
|
-
return;
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
var el = document.getElementById(this.elementId);
|
|
1378
|
-
var headerLabel = this.selectedItems.map(function (s) {
|
|
1379
|
-
return _this5.options.items[s].label || _this5.options.items[s].value;
|
|
1380
|
-
}).join(this.options.multiValueDelimiter);
|
|
1381
|
-
var headerValue = this.selectedItems.map(function (s) {
|
|
1382
|
-
return _this5.options.items[s].value || _this5.options.items[s].label;
|
|
1383
|
-
}).join(this.options.multiValueDelimiter);
|
|
1384
|
-
var html = "\n <div class='websy-dropdown-container ".concat(this.options.disabled ? 'disabled' : '', " ").concat(this.options.disableSearch !== true ? 'with-search' : '', "'>\n <div id='").concat(this.elementId, "_header' class='websy-dropdown-header ").concat(this.selectedItems.length === 1 ? 'one-selected' : '', " ").concat(this.options.allowClear === true ? 'allow-clear' : '', "'>\n <span id='").concat(this.elementId, "_headerLabel' class='websy-dropdown-header-label'>").concat(this.options.label, "</span>\n <span data-info='").concat(headerLabel, "' class='websy-dropdown-header-value' id='").concat(this.elementId, "_selectedItems'>").concat(headerLabel, "</span>\n <input class='dropdown-input' id='").concat(this.elementId, "_input' name='").concat(this.options.field || this.options.label, "' value='").concat(headerValue, "'>\n <svg class='arrow' xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z\"/></svg>\n ");
|
|
1385
|
-
|
|
1386
|
-
if (this.options.allowClear === true) {
|
|
1387
|
-
html += "\n <svg class='clear' xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 512 512\"><title>ionicons-v5-l</title><line x1=\"368\" y1=\"368\" x2=\"144\" y2=\"144\" style=\"fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px\"/><line x1=\"368\" y1=\"144\" x2=\"144\" y2=\"368\" style=\"fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px\"/></svg>\n ";
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
html += " \n </div>\n <div id='".concat(this.elementId, "_mask' class='websy-dropdown-mask'></div>\n <div id='").concat(this.elementId, "_content' class='websy-dropdown-content'>\n ");
|
|
1391
|
-
=======
|
|
1392
1360
|
if (!this.elementId) {
|
|
1393
1361
|
console.log('No element Id provided for Websy Dropdown');
|
|
1394
1362
|
return;
|
|
@@ -1428,7 +1396,6 @@ var WebsyDropdown = /*#__PURE__*/function () {
|
|
|
1428
1396
|
// </div>
|
|
1429
1397
|
// `
|
|
1430
1398
|
// el.innerHTML = html
|
|
1431
|
-
>>>>>>> master
|
|
1432
1399
|
|
|
1433
1400
|
|
|
1434
1401
|
this.renderItems();
|
|
@@ -1436,17 +1403,10 @@ var WebsyDropdown = /*#__PURE__*/function () {
|
|
|
1436
1403
|
}, {
|
|
1437
1404
|
key: "renderItems",
|
|
1438
1405
|
value: function renderItems() {
|
|
1439
|
-
|
|
1440
|
-
var _this6 = this;
|
|
1441
|
-
|
|
1442
|
-
var html = this.options.items.map(function (r, i) {
|
|
1443
|
-
return "\n <li data-index='".concat(i, "' class='websy-dropdown-item ").concat((r.classes || []).join(' '), " ").concat(_this6.selectedItems.indexOf(i) !== -1 ? 'active' : '', "'>").concat(r.label, "</li>\n ");
|
|
1444
|
-
=======
|
|
1445
|
-
var _this7 = this;
|
|
1406
|
+
var _this9 = this;
|
|
1446
1407
|
|
|
1447
1408
|
var html = this.options.items.map(function (r, i) {
|
|
1448
|
-
return "\n <li data-index='".concat(i, "' class='websy-dropdown-item ").concat((r.classes || []).join(' '), " ").concat(
|
|
1449
|
-
>>>>>>> master
|
|
1409
|
+
return "\n <li data-index='".concat(i, "' class='websy-dropdown-item ").concat((r.classes || []).join(' '), " ").concat(_this9.selectedItems.indexOf(i) !== -1 ? 'active' : '', "'>").concat(r.label, "</li>\n ");
|
|
1450
1410
|
}).join('');
|
|
1451
1411
|
var el = document.getElementById("".concat(this.elementId, "_items"));
|
|
1452
1412
|
|
|
@@ -1465,11 +1425,7 @@ var WebsyDropdown = /*#__PURE__*/function () {
|
|
|
1465
1425
|
}, {
|
|
1466
1426
|
key: "updateHeader",
|
|
1467
1427
|
value: function updateHeader(item) {
|
|
1468
|
-
|
|
1469
|
-
var _this7 = this;
|
|
1470
|
-
=======
|
|
1471
|
-
var _this8 = this;
|
|
1472
|
-
>>>>>>> master
|
|
1428
|
+
var _this10 = this;
|
|
1473
1429
|
|
|
1474
1430
|
var el = document.getElementById(this.elementId);
|
|
1475
1431
|
var headerEl = document.getElementById("".concat(this.elementId, "_header"));
|
|
@@ -1515,28 +1471,17 @@ var WebsyDropdown = /*#__PURE__*/function () {
|
|
|
1515
1471
|
} else if (this.selectedItems.length > 1) {
|
|
1516
1472
|
if (this.options.showCompleteSelectedList === true) {
|
|
1517
1473
|
var selectedLabels = this.selectedItems.map(function (s) {
|
|
1518
|
-
|
|
1519
|
-
return _this7.options.items[s].label || _this7.options.items[s].value;
|
|
1520
|
-
}).join(this.options.multiValueDelimiter);
|
|
1521
|
-
var selectedValues = this.selectedItems.map(function (s) {
|
|
1522
|
-
return _this7.options.items[s].value || _this7.options.items[s].label;
|
|
1523
|
-
=======
|
|
1524
|
-
return _this8.options.items[s].label || _this8.options.items[s].value;
|
|
1474
|
+
return _this10.options.items[s].label || _this10.options.items[s].value;
|
|
1525
1475
|
}).join(this.options.multiValueDelimiter);
|
|
1526
1476
|
var selectedValues = this.selectedItems.map(function (s) {
|
|
1527
|
-
return
|
|
1528
|
-
>>>>>>> master
|
|
1477
|
+
return _this10.options.items[s].value || _this10.options.items[s].label;
|
|
1529
1478
|
}).join(this.options.multiValueDelimiter);
|
|
1530
1479
|
labelEl.innerHTML = selectedLabels;
|
|
1531
1480
|
labelEl.setAttribute('data-info', selectedLabels);
|
|
1532
1481
|
inputEl.value = selectedValues;
|
|
1533
1482
|
} else {
|
|
1534
1483
|
var _selectedValues = this.selectedItems.map(function (s) {
|
|
1535
|
-
|
|
1536
|
-
return _this7.options.items[s].value || _this7.options.items[s].label;
|
|
1537
|
-
=======
|
|
1538
|
-
return _this8.options.items[s].value || _this8.options.items[s].label;
|
|
1539
|
-
>>>>>>> master
|
|
1484
|
+
return _this10.options.items[s].value || _this10.options.items[s].label;
|
|
1540
1485
|
}).join(this.options.multiValueDelimiter);
|
|
1541
1486
|
|
|
1542
1487
|
labelEl.innerHTML = "".concat(this.selectedItems.length, " selected");
|
|
@@ -1665,23 +1610,13 @@ var WebsyForm = /*#__PURE__*/function () {
|
|
|
1665
1610
|
}, {
|
|
1666
1611
|
key: "checkRecaptcha",
|
|
1667
1612
|
value: function checkRecaptcha() {
|
|
1668
|
-
|
|
1669
|
-
var _this8 = this;
|
|
1670
|
-
|
|
1671
|
-
return new Promise(function (resolve, reject) {
|
|
1672
|
-
if (_this8.options.useRecaptcha === true) {
|
|
1673
|
-
if (_this8.recaptchaValue) {
|
|
1674
|
-
_this8.apiService.add('/google/checkrecaptcha', JSON.stringify({
|
|
1675
|
-
grecaptcharesponse: _this8.recaptchaValue
|
|
1676
|
-
=======
|
|
1677
|
-
var _this9 = this;
|
|
1613
|
+
var _this11 = this;
|
|
1678
1614
|
|
|
1679
1615
|
return new Promise(function (resolve, reject) {
|
|
1680
|
-
if (
|
|
1681
|
-
if (
|
|
1682
|
-
|
|
1683
|
-
grecaptcharesponse:
|
|
1684
|
-
>>>>>>> master
|
|
1616
|
+
if (_this11.options.useRecaptcha === true) {
|
|
1617
|
+
if (_this11.recaptchaValue) {
|
|
1618
|
+
_this11.apiService.add('/google/checkrecaptcha', JSON.stringify({
|
|
1619
|
+
grecaptcharesponse: _this11.recaptchaValue
|
|
1685
1620
|
})).then(function (response) {
|
|
1686
1621
|
if (response.success && response.success === true) {
|
|
1687
1622
|
resolve(true);
|
|
@@ -1739,22 +1674,14 @@ var WebsyForm = /*#__PURE__*/function () {
|
|
|
1739
1674
|
}, {
|
|
1740
1675
|
key: "processComponents",
|
|
1741
1676
|
value: function processComponents(components, callbackFn) {
|
|
1742
|
-
|
|
1743
|
-
var _this9 = this;
|
|
1744
|
-
=======
|
|
1745
|
-
var _this10 = this;
|
|
1746
|
-
>>>>>>> master
|
|
1677
|
+
var _this12 = this;
|
|
1747
1678
|
|
|
1748
1679
|
if (components.length === 0) {
|
|
1749
1680
|
callbackFn();
|
|
1750
1681
|
} else {
|
|
1751
1682
|
components.forEach(function (c) {
|
|
1752
1683
|
if (typeof WebsyDesigns[c.component] !== 'undefined') {
|
|
1753
|
-
|
|
1754
|
-
var comp = new WebsyDesigns[c.component]("".concat(_this9.elementId, "_input_").concat(c.field, "_component"), c.options);
|
|
1755
|
-
=======
|
|
1756
|
-
c.instance = new WebsyDesigns[c.component]("".concat(_this10.elementId, "_input_").concat(c.field, "_component"), c.options);
|
|
1757
|
-
>>>>>>> master
|
|
1684
|
+
c.instance = new WebsyDesigns[c.component]("".concat(_this12.elementId, "_input_").concat(c.field, "_component"), c.options);
|
|
1758
1685
|
} else {// some user feedback here
|
|
1759
1686
|
}
|
|
1760
1687
|
});
|
|
@@ -1775,11 +1702,7 @@ var WebsyForm = /*#__PURE__*/function () {
|
|
|
1775
1702
|
}, {
|
|
1776
1703
|
key: "render",
|
|
1777
1704
|
value: function render(update, data) {
|
|
1778
|
-
|
|
1779
|
-
var _this10 = this;
|
|
1780
|
-
=======
|
|
1781
|
-
var _this11 = this;
|
|
1782
|
-
>>>>>>> master
|
|
1705
|
+
var _this13 = this;
|
|
1783
1706
|
|
|
1784
1707
|
var el = document.getElementById(this.elementId);
|
|
1785
1708
|
var componentsToProcess = [];
|
|
@@ -1789,19 +1712,11 @@ var WebsyForm = /*#__PURE__*/function () {
|
|
|
1789
1712
|
this.options.fields.forEach(function (f, i) {
|
|
1790
1713
|
if (f.component) {
|
|
1791
1714
|
componentsToProcess.push(f);
|
|
1792
|
-
|
|
1793
|
-
html += "\n ".concat(i > 0 ? '-->' : '', "<div class='").concat(f.classes, "'>\n ").concat(f.label ? "<label for=\"".concat(f.field, "\">").concat(f.label, "</label>") : '', "\n <div id='").concat(_this10.elementId, "_input_").concat(f.field, "_component' class='form-component'></div>\n </div><!--\n ");
|
|
1794
|
-
} else if (f.type === 'longtext') {
|
|
1795
|
-
html += "\n ".concat(i > 0 ? '-->' : '', "<div class='").concat(f.classes, "'>\n ").concat(f.label ? "<label for=\"".concat(f.field, "\">").concat(f.label, "</label>") : '', "\n <textarea\n id=\"").concat(_this10.elementId, "_input_").concat(f.field, "\"\n ").concat(f.required === true ? 'required' : '', " \n placeholder=\"").concat(f.placeholder || '', "\"\n name=\"").concat(f.field, "\" \n class=\"websy-input websy-textarea\"\n ></textarea>\n </div><!--\n ");
|
|
1796
|
-
} else {
|
|
1797
|
-
html += "\n ".concat(i > 0 ? '-->' : '', "<div class='").concat(f.classes, "'>\n ").concat(f.label ? "<label for=\"".concat(f.field, "\">").concat(f.label, "</label>") : '', "\n <input \n id=\"").concat(_this10.elementId, "_input_").concat(f.field, "\"\n ").concat(f.required === true ? 'required' : '', " \n type=\"").concat(f.type || 'text', "\" \n class=\"websy-input\" \n name=\"").concat(f.field, "\" \n placeholder=\"").concat(f.placeholder || '', "\"\n value=\"").concat(f.value || '', "\"\n oninvalidx=\"this.setCustomValidity('").concat(f.invalidMessage || 'Please fill in this field.', "')\"\n />\n </div><!--\n ");
|
|
1798
|
-
=======
|
|
1799
|
-
html += "\n ".concat(i > 0 ? '-->' : '', "<div class='").concat(f.classes || '', "'>\n ").concat(f.label ? "<label for=\"".concat(f.field, "\">").concat(f.label, "</label>") : '', "\n <div id='").concat(_this11.elementId, "_input_").concat(f.field, "_component' class='form-component'></div>\n </div><!--\n ");
|
|
1715
|
+
html += "\n ".concat(i > 0 ? '-->' : '', "<div class='").concat(f.classes || '', "'>\n ").concat(f.label ? "<label for=\"".concat(f.field, "\">").concat(f.label, "</label>") : '', "\n <div id='").concat(_this13.elementId, "_input_").concat(f.field, "_component' class='form-component'></div>\n </div><!--\n ");
|
|
1800
1716
|
} else if (f.type === 'longtext') {
|
|
1801
|
-
html += "\n ".concat(i > 0 ? '-->' : '', "<div class='").concat(f.classes || '', "'>\n ").concat(f.label ? "<label for=\"".concat(f.field, "\">").concat(f.label, "</label>") : '', "\n <textarea\n id=\"").concat(
|
|
1717
|
+
html += "\n ".concat(i > 0 ? '-->' : '', "<div class='").concat(f.classes || '', "'>\n ").concat(f.label ? "<label for=\"".concat(f.field, "\">").concat(f.label, "</label>") : '', "\n <textarea\n id=\"").concat(_this13.elementId, "_input_").concat(f.field, "\"\n ").concat(f.required === true ? 'required' : '', " \n placeholder=\"").concat(f.placeholder || '', "\"\n name=\"").concat(f.field, "\" \n class=\"websy-input websy-textarea\"\n ></textarea>\n </div><!--\n ");
|
|
1802
1718
|
} else {
|
|
1803
|
-
html += "\n ".concat(i > 0 ? '-->' : '', "<div class='").concat(f.classes || '', "'>\n ").concat(f.label ? "<label for=\"".concat(f.field, "\">").concat(f.label, "</label>") : '', "\n <input \n id=\"").concat(
|
|
1804
|
-
>>>>>>> master
|
|
1719
|
+
html += "\n ".concat(i > 0 ? '-->' : '', "<div class='").concat(f.classes || '', "'>\n ").concat(f.label ? "<label for=\"".concat(f.field, "\">").concat(f.label, "</label>") : '', "\n <input \n id=\"").concat(_this13.elementId, "_input_").concat(f.field, "\"\n ").concat(f.required === true ? 'required' : '', " \n type=\"").concat(f.type || 'text', "\" \n class=\"websy-input\" \n name=\"").concat(f.field, "\" \n placeholder=\"").concat(f.placeholder || '', "\"\n value=\"").concat(f.value || '', "\"\n valueAsDate=\"").concat(f.type === 'date' ? f.value : '', "\"\n oninvalidx=\"this.setCustomValidity('").concat(f.invalidMessage || 'Please fill in this field.', "')\"\n />\n </div><!--\n ");
|
|
1805
1720
|
}
|
|
1806
1721
|
});
|
|
1807
1722
|
html += "\n --><button class=\"websy-btn submit ".concat(this.options.submit.classes || '', "\">").concat(this.options.submit.text || 'Save', "</button>").concat(this.options.cancel ? '<!--' : '', "\n ");
|
|
@@ -1818,13 +1733,8 @@ var WebsyForm = /*#__PURE__*/function () {
|
|
|
1818
1733
|
|
|
1819
1734
|
el.innerHTML = html;
|
|
1820
1735
|
this.processComponents(componentsToProcess, function () {
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
_this10.recaptchaReady();
|
|
1824
|
-
=======
|
|
1825
|
-
if (_this11.options.useRecaptcha === true && typeof grecaptcha !== 'undefined') {
|
|
1826
|
-
_this11.recaptchaReady();
|
|
1827
|
-
>>>>>>> master
|
|
1736
|
+
if (_this13.options.useRecaptcha === true && typeof grecaptcha !== 'undefined') {
|
|
1737
|
+
_this13.recaptchaReady();
|
|
1828
1738
|
}
|
|
1829
1739
|
});
|
|
1830
1740
|
}
|
|
@@ -1832,11 +1742,7 @@ var WebsyForm = /*#__PURE__*/function () {
|
|
|
1832
1742
|
}, {
|
|
1833
1743
|
key: "submitForm",
|
|
1834
1744
|
value: function submitForm() {
|
|
1835
|
-
|
|
1836
|
-
var _this11 = this;
|
|
1837
|
-
=======
|
|
1838
|
-
var _this12 = this;
|
|
1839
|
-
>>>>>>> master
|
|
1745
|
+
var _this14 = this;
|
|
1840
1746
|
|
|
1841
1747
|
var formEl = document.getElementById("".concat(this.elementId, "Form"));
|
|
1842
1748
|
|
|
@@ -1850,40 +1756,22 @@ var WebsyForm = /*#__PURE__*/function () {
|
|
|
1850
1756
|
data[key] = value;
|
|
1851
1757
|
});
|
|
1852
1758
|
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
if (_this11.options.clearAfterSave === true) {
|
|
1857
|
-
=======
|
|
1858
|
-
if (_this12.options.url) {
|
|
1859
|
-
_this12.apiService.add(_this12.options.url, data).then(function (result) {
|
|
1860
|
-
if (_this12.options.clearAfterSave === true) {
|
|
1861
|
-
>>>>>>> master
|
|
1759
|
+
if (_this14.options.url) {
|
|
1760
|
+
_this14.apiService.add(_this14.options.url, data).then(function (result) {
|
|
1761
|
+
if (_this14.options.clearAfterSave === true) {
|
|
1862
1762
|
// this.render()
|
|
1863
1763
|
formEl.reset();
|
|
1864
1764
|
}
|
|
1865
1765
|
|
|
1866
|
-
|
|
1867
|
-
_this11.options.onSuccess.call(_this11, result);
|
|
1868
|
-
}, function (err) {
|
|
1869
|
-
console.log('Error submitting form data:', err);
|
|
1870
|
-
|
|
1871
|
-
_this11.options.onError.call(_this11, err);
|
|
1872
|
-
});
|
|
1873
|
-
} else if (_this11.options.submitFn) {
|
|
1874
|
-
_this11.options.submitFn(data, function () {
|
|
1875
|
-
if (_this11.options.clearAfterSave === true) {
|
|
1876
|
-
=======
|
|
1877
|
-
_this12.options.onSuccess.call(_this12, result);
|
|
1766
|
+
_this14.options.onSuccess.call(_this14, result);
|
|
1878
1767
|
}, function (err) {
|
|
1879
1768
|
console.log('Error submitting form data:', err);
|
|
1880
1769
|
|
|
1881
|
-
|
|
1770
|
+
_this14.options.onError.call(_this14, err);
|
|
1882
1771
|
});
|
|
1883
|
-
} else if (
|
|
1884
|
-
|
|
1885
|
-
if (
|
|
1886
|
-
>>>>>>> master
|
|
1772
|
+
} else if (_this14.options.submitFn) {
|
|
1773
|
+
_this14.options.submitFn(data, function () {
|
|
1774
|
+
if (_this14.options.clearAfterSave === true) {
|
|
1887
1775
|
// this.render()
|
|
1888
1776
|
formEl.reset();
|
|
1889
1777
|
}
|
|
@@ -1903,28 +1791,17 @@ var WebsyForm = /*#__PURE__*/function () {
|
|
|
1903
1791
|
}, {
|
|
1904
1792
|
key: "data",
|
|
1905
1793
|
set: function set(d) {
|
|
1906
|
-
|
|
1907
|
-
var _this12 = this;
|
|
1908
|
-
=======
|
|
1909
|
-
var _this13 = this;
|
|
1910
|
-
>>>>>>> master
|
|
1794
|
+
var _this15 = this;
|
|
1911
1795
|
|
|
1912
1796
|
if (!this.options.fields) {
|
|
1913
1797
|
this.options.fields = [];
|
|
1914
1798
|
}
|
|
1915
1799
|
|
|
1916
1800
|
var _loop = function _loop(key) {
|
|
1917
|
-
|
|
1918
|
-
_this12.options.fields.forEach(function (f) {
|
|
1919
|
-
if (f.field === key) {
|
|
1920
|
-
f.value = d[key];
|
|
1921
|
-
var el = document.getElementById("".concat(_this12.elementId, "_input_").concat(f.field));
|
|
1922
|
-
=======
|
|
1923
|
-
_this13.options.fields.forEach(function (f) {
|
|
1801
|
+
_this15.options.fields.forEach(function (f) {
|
|
1924
1802
|
if (f.field === key) {
|
|
1925
1803
|
f.value = d[key];
|
|
1926
|
-
var el = document.getElementById("".concat(
|
|
1927
|
-
>>>>>>> master
|
|
1804
|
+
var el = document.getElementById("".concat(_this15.elementId, "_input_").concat(f.field));
|
|
1928
1805
|
el.value = f.value;
|
|
1929
1806
|
}
|
|
1930
1807
|
});
|
|
@@ -2224,7 +2101,7 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
|
|
|
2224
2101
|
|
|
2225
2102
|
var Pager = /*#__PURE__*/function () {
|
|
2226
2103
|
function Pager(elementId, options) {
|
|
2227
|
-
var
|
|
2104
|
+
var _this16 = this;
|
|
2228
2105
|
|
|
2229
2106
|
_classCallCheck(this, Pager);
|
|
2230
2107
|
|
|
@@ -2277,8 +2154,8 @@ var Pager = /*#__PURE__*/function () {
|
|
|
2277
2154
|
allowClear: false,
|
|
2278
2155
|
disableSearch: true,
|
|
2279
2156
|
onItemSelected: function onItemSelected(selectedItem) {
|
|
2280
|
-
if (
|
|
2281
|
-
|
|
2157
|
+
if (_this16.options.onChangePageSize) {
|
|
2158
|
+
_this16.options.onChangePageSize(selectedItem.value);
|
|
2282
2159
|
}
|
|
2283
2160
|
}
|
|
2284
2161
|
});
|
|
@@ -2302,13 +2179,13 @@ var Pager = /*#__PURE__*/function () {
|
|
|
2302
2179
|
}, {
|
|
2303
2180
|
key: "render",
|
|
2304
2181
|
value: function render() {
|
|
2305
|
-
var
|
|
2182
|
+
var _this17 = this;
|
|
2306
2183
|
|
|
2307
2184
|
var el = document.getElementById("".concat(this.elementId, "_pageList"));
|
|
2308
2185
|
|
|
2309
2186
|
if (el) {
|
|
2310
2187
|
var pages = this.options.pages.map(function (item, index) {
|
|
2311
|
-
return "<li data-index=\"".concat(index, "\" class=\"websy-page-num ").concat(
|
|
2188
|
+
return "<li data-index=\"".concat(index, "\" class=\"websy-page-num ").concat(_this17.options.activePage === index ? 'active' : '', "\">").concat(index + 1, "</li>");
|
|
2312
2189
|
});
|
|
2313
2190
|
var startIndex = 0;
|
|
2314
2191
|
|
|
@@ -2376,107 +2253,58 @@ var WebsyPDFButton = /*#__PURE__*/function () {
|
|
|
2376
2253
|
_createClass(WebsyPDFButton, [{
|
|
2377
2254
|
key: "handleClick",
|
|
2378
2255
|
value: function handleClick(event) {
|
|
2379
|
-
|
|
2380
|
-
var _this13 = this;
|
|
2381
|
-
=======
|
|
2382
|
-
var _this16 = this;
|
|
2383
|
-
>>>>>>> master
|
|
2256
|
+
var _this18 = this;
|
|
2384
2257
|
|
|
2385
2258
|
if (event.target.classList.contains('websy-pdf-button')) {
|
|
2386
2259
|
this.loader.show();
|
|
2387
2260
|
setTimeout(function () {
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
var el = document.getElementById(_this13.options.targetId);
|
|
2391
|
-
=======
|
|
2392
|
-
if (_this16.options.targetId) {
|
|
2393
|
-
var el = document.getElementById(_this16.options.targetId);
|
|
2394
|
-
>>>>>>> master
|
|
2261
|
+
if (_this18.options.targetId) {
|
|
2262
|
+
var el = document.getElementById(_this18.options.targetId);
|
|
2395
2263
|
|
|
2396
2264
|
if (el) {
|
|
2397
2265
|
var pdfData = {
|
|
2398
2266
|
options: {}
|
|
2399
2267
|
};
|
|
2400
2268
|
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
pdfData.options = _extends({}, _this13.options.pdfOptions);
|
|
2269
|
+
if (_this18.options.pdfOptions) {
|
|
2270
|
+
pdfData.options = _extends({}, _this18.options.pdfOptions);
|
|
2404
2271
|
}
|
|
2405
2272
|
|
|
2406
|
-
if (
|
|
2407
|
-
if (
|
|
2408
|
-
var headerEl = document.getElementById(
|
|
2409
|
-
=======
|
|
2410
|
-
if (_this16.options.pdfOptions) {
|
|
2411
|
-
pdfData.options = _extends({}, _this16.options.pdfOptions);
|
|
2412
|
-
}
|
|
2413
|
-
|
|
2414
|
-
if (_this16.options.header) {
|
|
2415
|
-
if (_this16.options.header.elementId) {
|
|
2416
|
-
var headerEl = document.getElementById(_this16.options.header.elementId);
|
|
2417
|
-
>>>>>>> master
|
|
2273
|
+
if (_this18.options.header) {
|
|
2274
|
+
if (_this18.options.header.elementId) {
|
|
2275
|
+
var headerEl = document.getElementById(_this18.options.header.elementId);
|
|
2418
2276
|
|
|
2419
2277
|
if (headerEl) {
|
|
2420
2278
|
pdfData.header = headerEl.outerHTML;
|
|
2421
2279
|
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
pdfData.options.headerCSS = _this13.options.header.css;
|
|
2425
|
-
}
|
|
2426
|
-
}
|
|
2427
|
-
} else if (_this13.options.header.html) {
|
|
2428
|
-
pdfData.header = _this13.options.header.html;
|
|
2429
|
-
|
|
2430
|
-
if (_this13.options.header.css) {
|
|
2431
|
-
pdfData.options.headerCSS = _this13.options.header.css;
|
|
2432
|
-
}
|
|
2433
|
-
} else {
|
|
2434
|
-
pdfData.header = _this13.options.header;
|
|
2435
|
-
}
|
|
2436
|
-
}
|
|
2437
|
-
|
|
2438
|
-
if (_this13.options.footer) {
|
|
2439
|
-
if (_this13.options.footer.elementId) {
|
|
2440
|
-
var footerEl = document.getElementById(_this13.options.footer.elementId);
|
|
2441
|
-
=======
|
|
2442
|
-
if (_this16.options.header.css) {
|
|
2443
|
-
pdfData.options.headerCSS = _this16.options.header.css;
|
|
2280
|
+
if (_this18.options.header.css) {
|
|
2281
|
+
pdfData.options.headerCSS = _this18.options.header.css;
|
|
2444
2282
|
}
|
|
2445
2283
|
}
|
|
2446
|
-
} else if (
|
|
2447
|
-
pdfData.header =
|
|
2284
|
+
} else if (_this18.options.header.html) {
|
|
2285
|
+
pdfData.header = _this18.options.header.html;
|
|
2448
2286
|
|
|
2449
|
-
if (
|
|
2450
|
-
pdfData.options.headerCSS =
|
|
2287
|
+
if (_this18.options.header.css) {
|
|
2288
|
+
pdfData.options.headerCSS = _this18.options.header.css;
|
|
2451
2289
|
}
|
|
2452
2290
|
} else {
|
|
2453
|
-
pdfData.header =
|
|
2291
|
+
pdfData.header = _this18.options.header;
|
|
2454
2292
|
}
|
|
2455
2293
|
}
|
|
2456
2294
|
|
|
2457
|
-
if (
|
|
2458
|
-
if (
|
|
2459
|
-
var footerEl = document.getElementById(
|
|
2460
|
-
>>>>>>> master
|
|
2295
|
+
if (_this18.options.footer) {
|
|
2296
|
+
if (_this18.options.footer.elementId) {
|
|
2297
|
+
var footerEl = document.getElementById(_this18.options.footer.elementId);
|
|
2461
2298
|
|
|
2462
2299
|
if (footerEl) {
|
|
2463
2300
|
pdfData.footer = footerEl.outerHTML;
|
|
2464
2301
|
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
pdfData.options.footerCSS = _this13.options.footer.css;
|
|
2302
|
+
if (_this18.options.footer.css) {
|
|
2303
|
+
pdfData.options.footerCSS = _this18.options.footer.css;
|
|
2468
2304
|
}
|
|
2469
2305
|
}
|
|
2470
2306
|
} else {
|
|
2471
|
-
pdfData.footer =
|
|
2472
|
-
=======
|
|
2473
|
-
if (_this16.options.footer.css) {
|
|
2474
|
-
pdfData.options.footerCSS = _this16.options.footer.css;
|
|
2475
|
-
}
|
|
2476
|
-
}
|
|
2477
|
-
} else {
|
|
2478
|
-
pdfData.footer = _this16.options.footer;
|
|
2479
|
-
>>>>>>> master
|
|
2307
|
+
pdfData.footer = _this18.options.footer;
|
|
2480
2308
|
}
|
|
2481
2309
|
}
|
|
2482
2310
|
|
|
@@ -2485,40 +2313,31 @@ var WebsyPDFButton = /*#__PURE__*/function () {
|
|
|
2485
2313
|
// document.getElementById(`${this.elementId}_pdfFooter`).value = pdfData.footer
|
|
2486
2314
|
// document.getElementById(`${this.elementId}_form`).submit()
|
|
2487
2315
|
|
|
2488
|
-
|
|
2489
|
-
_this13.service.add('', pdfData, {
|
|
2490
|
-
responseType: 'blob'
|
|
2491
|
-
}).then(function (response) {
|
|
2492
|
-
_this13.loader.hide();
|
|
2493
|
-
=======
|
|
2494
|
-
_this16.service.add('', pdfData, {
|
|
2316
|
+
_this18.service.add('', pdfData, {
|
|
2495
2317
|
responseType: 'blob'
|
|
2496
2318
|
}).then(function (response) {
|
|
2497
|
-
|
|
2498
|
-
>>>>>>> master
|
|
2319
|
+
_this18.loader.hide();
|
|
2499
2320
|
|
|
2500
2321
|
var blob = new Blob([response], {
|
|
2501
2322
|
type: 'application/pdf'
|
|
2502
2323
|
});
|
|
2503
2324
|
var msg = "\n <div class='text-center websy-pdf-download'>\n <div>Your file is ready to download</div>\n <a href='".concat(URL.createObjectURL(blob), "' target='_blank'\n ");
|
|
2504
2325
|
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
msg += "download='".concat(_this13.options.fileName || 'Export', ".pdf'");
|
|
2508
|
-
}
|
|
2326
|
+
if (_this18.options.directDownload === true) {
|
|
2327
|
+
var fileName;
|
|
2509
2328
|
|
|
2510
|
-
|
|
2329
|
+
if (typeof _this18.options.fileName === 'function') {
|
|
2330
|
+
fileName = _this18.options.fileName() || 'Export';
|
|
2331
|
+
} else {
|
|
2332
|
+
fileName = _this18.options.fileName || 'Export';
|
|
2333
|
+
}
|
|
2511
2334
|
|
|
2512
|
-
|
|
2513
|
-
=======
|
|
2514
|
-
if (_this16.options.directDownload === true) {
|
|
2515
|
-
msg += "download='".concat(_this16.options.fileName || 'Export', ".pdf'");
|
|
2335
|
+
msg += "download='".concat(fileName, ".pdf'");
|
|
2516
2336
|
}
|
|
2517
2337
|
|
|
2518
|
-
msg += "\n >\n <button class='websy-btn download-pdf'>".concat(
|
|
2338
|
+
msg += "\n >\n <button class='websy-btn download-pdf'>".concat(_this18.options.buttonText, "</button>\n </a>\n </div>\n ");
|
|
2519
2339
|
|
|
2520
|
-
|
|
2521
|
-
>>>>>>> master
|
|
2340
|
+
_this18.popup.show({
|
|
2522
2341
|
message: msg,
|
|
2523
2342
|
mask: true
|
|
2524
2343
|
});
|
|
@@ -2703,11 +2522,7 @@ var WebsyPubSub = /*#__PURE__*/function () {
|
|
|
2703
2522
|
|
|
2704
2523
|
var WebsyResultList = /*#__PURE__*/function () {
|
|
2705
2524
|
function WebsyResultList(elementId, options) {
|
|
2706
|
-
|
|
2707
|
-
var _this14 = this;
|
|
2708
|
-
=======
|
|
2709
|
-
var _this17 = this;
|
|
2710
|
-
>>>>>>> master
|
|
2525
|
+
var _this19 = this;
|
|
2711
2526
|
|
|
2712
2527
|
_classCallCheck(this, WebsyResultList);
|
|
2713
2528
|
|
|
@@ -2735,15 +2550,9 @@ var WebsyResultList = /*#__PURE__*/function () {
|
|
|
2735
2550
|
|
|
2736
2551
|
if (_typeof(options.template) === 'object' && options.template.url) {
|
|
2737
2552
|
this.templateService.get(options.template.url).then(function (templateString) {
|
|
2738
|
-
|
|
2739
|
-
_this14.options.template = templateString;
|
|
2553
|
+
_this19.options.template = templateString;
|
|
2740
2554
|
|
|
2741
|
-
|
|
2742
|
-
=======
|
|
2743
|
-
_this17.options.template = templateString;
|
|
2744
|
-
|
|
2745
|
-
_this17.render();
|
|
2746
|
-
>>>>>>> master
|
|
2555
|
+
_this19.render();
|
|
2747
2556
|
});
|
|
2748
2557
|
} else {
|
|
2749
2558
|
this.render();
|
|
@@ -2762,11 +2571,7 @@ var WebsyResultList = /*#__PURE__*/function () {
|
|
|
2762
2571
|
}, {
|
|
2763
2572
|
key: "buildHTML",
|
|
2764
2573
|
value: function buildHTML(d) {
|
|
2765
|
-
|
|
2766
|
-
var _this15 = this;
|
|
2767
|
-
=======
|
|
2768
|
-
var _this18 = this;
|
|
2769
|
-
>>>>>>> master
|
|
2574
|
+
var _this20 = this;
|
|
2770
2575
|
|
|
2771
2576
|
var startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
2772
2577
|
var html = "";
|
|
@@ -2774,11 +2579,7 @@ var WebsyResultList = /*#__PURE__*/function () {
|
|
|
2774
2579
|
if (this.options.template) {
|
|
2775
2580
|
if (d.length > 0) {
|
|
2776
2581
|
d.forEach(function (row, ix) {
|
|
2777
|
-
|
|
2778
|
-
var template = "".concat(ix > 0 ? '-->' : '').concat(_this15.options.template).concat(ix < d.length - 1 ? '<!--' : ''); // find conditional elements
|
|
2779
|
-
=======
|
|
2780
|
-
var template = "".concat(ix > 0 ? '-->' : '').concat(_this18.options.template).concat(ix < d.length - 1 ? '<!--' : ''); // find conditional elements
|
|
2781
|
-
>>>>>>> master
|
|
2582
|
+
var template = "".concat(ix > 0 ? '-->' : '').concat(_this20.options.template).concat(ix < d.length - 1 ? '<!--' : ''); // find conditional elements
|
|
2782
2583
|
|
|
2783
2584
|
var ifMatches = _toConsumableArray(template.matchAll(/<\s*if[^>]*>([\s\S]*?)<\s*\/\s*if>/g));
|
|
2784
2585
|
|
|
@@ -2898,11 +2699,7 @@ var WebsyResultList = /*#__PURE__*/function () {
|
|
|
2898
2699
|
}, {
|
|
2899
2700
|
key: "handleClick",
|
|
2900
2701
|
value: function handleClick(event) {
|
|
2901
|
-
|
|
2902
|
-
var _this16 = this;
|
|
2903
|
-
=======
|
|
2904
|
-
var _this19 = this;
|
|
2905
|
-
>>>>>>> master
|
|
2702
|
+
var _this21 = this;
|
|
2906
2703
|
|
|
2907
2704
|
if (event.target.classList.contains('clickable')) {
|
|
2908
2705
|
var l = event.target.getAttribute('data-event');
|
|
@@ -2920,13 +2717,8 @@ var WebsyResultList = /*#__PURE__*/function () {
|
|
|
2920
2717
|
l = l[0];
|
|
2921
2718
|
params = params.map(function (p) {
|
|
2922
2719
|
if (typeof p !== 'string' && typeof p !== 'number') {
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
p = _this16.rows[+id][p];
|
|
2926
|
-
=======
|
|
2927
|
-
if (_this19.rows[+id]) {
|
|
2928
|
-
p = _this19.rows[+id][p];
|
|
2929
|
-
>>>>>>> master
|
|
2720
|
+
if (_this21.rows[+id]) {
|
|
2721
|
+
p = _this21.rows[+id][p];
|
|
2930
2722
|
}
|
|
2931
2723
|
} else if (typeof p === 'string') {
|
|
2932
2724
|
p = p.replace(/"/g, '').replace(/'/g, '');
|
|
@@ -2948,23 +2740,13 @@ var WebsyResultList = /*#__PURE__*/function () {
|
|
|
2948
2740
|
}, {
|
|
2949
2741
|
key: "render",
|
|
2950
2742
|
value: function render() {
|
|
2951
|
-
|
|
2952
|
-
var _this17 = this;
|
|
2953
|
-
|
|
2954
|
-
if (this.options.entity) {
|
|
2955
|
-
this.apiService.get(this.options.entity).then(function (results) {
|
|
2956
|
-
_this17.rows = results.rows;
|
|
2957
|
-
|
|
2958
|
-
_this17.resize();
|
|
2959
|
-
=======
|
|
2960
|
-
var _this20 = this;
|
|
2743
|
+
var _this22 = this;
|
|
2961
2744
|
|
|
2962
2745
|
if (this.options.entity) {
|
|
2963
2746
|
this.apiService.get(this.options.entity).then(function (results) {
|
|
2964
|
-
|
|
2747
|
+
_this22.rows = results.rows;
|
|
2965
2748
|
|
|
2966
|
-
|
|
2967
|
-
>>>>>>> master
|
|
2749
|
+
_this22.resize();
|
|
2968
2750
|
});
|
|
2969
2751
|
} else {
|
|
2970
2752
|
this.resize();
|
|
@@ -3043,11 +2825,7 @@ var WebsyRouter = /*#__PURE__*/function () {
|
|
|
3043
2825
|
_createClass(WebsyRouter, [{
|
|
3044
2826
|
key: "addGroup",
|
|
3045
2827
|
value: function addGroup(group) {
|
|
3046
|
-
|
|
3047
|
-
var _this18 = this;
|
|
3048
|
-
=======
|
|
3049
|
-
var _this21 = this;
|
|
3050
|
-
>>>>>>> master
|
|
2828
|
+
var _this23 = this;
|
|
3051
2829
|
|
|
3052
2830
|
if (!this.groups[group]) {
|
|
3053
2831
|
var els = document.querySelectorAll(".websy-view[data-group=\"".concat(group, "\"]"));
|
|
@@ -3055,11 +2833,7 @@ var WebsyRouter = /*#__PURE__*/function () {
|
|
|
3055
2833
|
if (els) {
|
|
3056
2834
|
console.log('els', els);
|
|
3057
2835
|
this.getClosestParent(els[0], function (parent) {
|
|
3058
|
-
|
|
3059
|
-
_this18.groups[group] = {
|
|
3060
|
-
=======
|
|
3061
|
-
_this21.groups[group] = {
|
|
3062
|
-
>>>>>>> master
|
|
2836
|
+
_this23.groups[group] = {
|
|
3063
2837
|
activeView: '',
|
|
3064
2838
|
views: [],
|
|
3065
2839
|
parent: parent.getAttribute('data-view')
|
|
@@ -3380,20 +3154,12 @@ var WebsyRouter = /*#__PURE__*/function () {
|
|
|
3380
3154
|
}, {
|
|
3381
3155
|
key: "showComponents",
|
|
3382
3156
|
value: function showComponents(view) {
|
|
3383
|
-
|
|
3384
|
-
var _this19 = this;
|
|
3385
|
-
=======
|
|
3386
|
-
var _this22 = this;
|
|
3387
|
-
>>>>>>> master
|
|
3157
|
+
var _this24 = this;
|
|
3388
3158
|
|
|
3389
3159
|
if (this.options.views && this.options.views[view] && this.options.views[view].components) {
|
|
3390
3160
|
this.options.views[view].components.forEach(function (c) {
|
|
3391
3161
|
if (typeof c.instance === 'undefined') {
|
|
3392
|
-
|
|
3393
|
-
_this19.prepComponent(c.elementId, c.options);
|
|
3394
|
-
=======
|
|
3395
|
-
_this22.prepComponent(c.elementId, c.options);
|
|
3396
|
-
>>>>>>> master
|
|
3162
|
+
_this24.prepComponent(c.elementId, c.options);
|
|
3397
3163
|
|
|
3398
3164
|
c.instance = new c.Component(c.elementId, c.options);
|
|
3399
3165
|
} else if (c.instance.render) {
|
|
@@ -3760,11 +3526,7 @@ var Switch = /*#__PURE__*/function () {
|
|
|
3760
3526
|
|
|
3761
3527
|
var WebsyTemplate = /*#__PURE__*/function () {
|
|
3762
3528
|
function WebsyTemplate(elementId, options) {
|
|
3763
|
-
|
|
3764
|
-
var _this20 = this;
|
|
3765
|
-
=======
|
|
3766
|
-
var _this23 = this;
|
|
3767
|
-
>>>>>>> master
|
|
3529
|
+
var _this25 = this;
|
|
3768
3530
|
|
|
3769
3531
|
_classCallCheck(this, WebsyTemplate);
|
|
3770
3532
|
|
|
@@ -3790,15 +3552,9 @@ var WebsyTemplate = /*#__PURE__*/function () {
|
|
|
3790
3552
|
|
|
3791
3553
|
if (_typeof(options.template) === 'object' && options.template.url) {
|
|
3792
3554
|
this.templateService.get(options.template.url).then(function (templateString) {
|
|
3793
|
-
|
|
3794
|
-
_this20.options.template = templateString;
|
|
3795
|
-
|
|
3796
|
-
_this20.render();
|
|
3797
|
-
=======
|
|
3798
|
-
_this23.options.template = templateString;
|
|
3555
|
+
_this25.options.template = templateString;
|
|
3799
3556
|
|
|
3800
|
-
|
|
3801
|
-
>>>>>>> master
|
|
3557
|
+
_this25.render();
|
|
3802
3558
|
});
|
|
3803
3559
|
} else {
|
|
3804
3560
|
this.render();
|
|
@@ -3808,11 +3564,7 @@ var WebsyTemplate = /*#__PURE__*/function () {
|
|
|
3808
3564
|
_createClass(WebsyTemplate, [{
|
|
3809
3565
|
key: "buildHTML",
|
|
3810
3566
|
value: function buildHTML() {
|
|
3811
|
-
|
|
3812
|
-
var _this21 = this;
|
|
3813
|
-
=======
|
|
3814
|
-
var _this24 = this;
|
|
3815
|
-
>>>>>>> master
|
|
3567
|
+
var _this26 = this;
|
|
3816
3568
|
|
|
3817
3569
|
var html = "";
|
|
3818
3570
|
|
|
@@ -3874,22 +3626,14 @@ var WebsyTemplate = /*#__PURE__*/function () {
|
|
|
3874
3626
|
}
|
|
3875
3627
|
|
|
3876
3628
|
if (polarity === true) {
|
|
3877
|
-
|
|
3878
|
-
if (typeof _this21.options.data[parts[0]] !== 'undefined' && _this21.options.data[parts[0]] === parts[1]) {
|
|
3879
|
-
=======
|
|
3880
|
-
if (typeof _this24.options.data[parts[0]] !== 'undefined' && _this24.options.data[parts[0]] === parts[1]) {
|
|
3881
|
-
>>>>>>> master
|
|
3629
|
+
if (typeof _this26.options.data[parts[0]] !== 'undefined' && _this26.options.data[parts[0]] === parts[1]) {
|
|
3882
3630
|
// remove the <if> tags
|
|
3883
3631
|
removeAll = false;
|
|
3884
3632
|
} else if (parts[0] === parts[1]) {
|
|
3885
3633
|
removeAll = false;
|
|
3886
3634
|
}
|
|
3887
3635
|
} else if (polarity === false) {
|
|
3888
|
-
|
|
3889
|
-
if (typeof _this21.options.data[parts[0]] !== 'undefined' && _this21.options.data[parts[0]] !== parts[1]) {
|
|
3890
|
-
=======
|
|
3891
|
-
if (typeof _this24.options.data[parts[0]] !== 'undefined' && _this24.options.data[parts[0]] !== parts[1]) {
|
|
3892
|
-
>>>>>>> master
|
|
3636
|
+
if (typeof _this26.options.data[parts[0]] !== 'undefined' && _this26.options.data[parts[0]] !== parts[1]) {
|
|
3893
3637
|
// remove the <if> tags
|
|
3894
3638
|
removeAll = false;
|
|
3895
3639
|
}
|
|
@@ -4157,11 +3901,7 @@ var WebsyUtils = {
|
|
|
4157
3901
|
|
|
4158
3902
|
var WebsyTable = /*#__PURE__*/function () {
|
|
4159
3903
|
function WebsyTable(elementId, options) {
|
|
4160
|
-
|
|
4161
|
-
var _this22 = this;
|
|
4162
|
-
=======
|
|
4163
|
-
var _this25 = this;
|
|
4164
|
-
>>>>>>> master
|
|
3904
|
+
var _this27 = this;
|
|
4165
3905
|
|
|
4166
3906
|
_classCallCheck(this, WebsyTable);
|
|
4167
3907
|
|
|
@@ -4199,13 +3939,8 @@ var WebsyTable = /*#__PURE__*/function () {
|
|
|
4199
3939
|
allowClear: false,
|
|
4200
3940
|
disableSearch: true,
|
|
4201
3941
|
onItemSelected: function onItemSelected(selectedItem) {
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
_this22.options.onChangePageSize(selectedItem.value);
|
|
4205
|
-
=======
|
|
4206
|
-
if (_this25.options.onChangePageSize) {
|
|
4207
|
-
_this25.options.onChangePageSize(selectedItem.value);
|
|
4208
|
-
>>>>>>> master
|
|
3942
|
+
if (_this27.options.onChangePageSize) {
|
|
3943
|
+
_this27.options.onChangePageSize(selectedItem.value);
|
|
4209
3944
|
}
|
|
4210
3945
|
}
|
|
4211
3946
|
});
|
|
@@ -4226,11 +3961,7 @@ var WebsyTable = /*#__PURE__*/function () {
|
|
|
4226
3961
|
_createClass(WebsyTable, [{
|
|
4227
3962
|
key: "appendRows",
|
|
4228
3963
|
value: function appendRows(data) {
|
|
4229
|
-
|
|
4230
|
-
var _this23 = this;
|
|
4231
|
-
=======
|
|
4232
|
-
var _this26 = this;
|
|
4233
|
-
>>>>>>> master
|
|
3964
|
+
var _this28 = this;
|
|
4234
3965
|
|
|
4235
3966
|
this.hideError();
|
|
4236
3967
|
var bodyHTML = '';
|
|
@@ -4238,24 +3969,15 @@ var WebsyTable = /*#__PURE__*/function () {
|
|
|
4238
3969
|
if (data) {
|
|
4239
3970
|
bodyHTML += data.map(function (r, rowIndex) {
|
|
4240
3971
|
return '<tr>' + r.map(function (c, i) {
|
|
4241
|
-
|
|
4242
|
-
if (_this23.options.columns[i].show !== false) {
|
|
4243
|
-
=======
|
|
4244
|
-
if (_this26.options.columns[i].show !== false) {
|
|
4245
|
-
>>>>>>> master
|
|
3972
|
+
if (_this28.options.columns[i].show !== false) {
|
|
4246
3973
|
var style = '';
|
|
4247
3974
|
|
|
4248
3975
|
if (c.style) {
|
|
4249
3976
|
style += c.style;
|
|
4250
3977
|
}
|
|
4251
3978
|
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
style += "width: ".concat(_this23.options.columns[i].width, "; ");
|
|
4255
|
-
=======
|
|
4256
|
-
if (_this26.options.columns[i].width) {
|
|
4257
|
-
style += "width: ".concat(_this26.options.columns[i].width, "; ");
|
|
4258
|
-
>>>>>>> master
|
|
3979
|
+
if (_this28.options.columns[i].width) {
|
|
3980
|
+
style += "width: ".concat(_this28.options.columns[i].width, "; ");
|
|
4259
3981
|
}
|
|
4260
3982
|
|
|
4261
3983
|
if (c.backgroundColor) {
|
|
@@ -4270,33 +3992,18 @@ var WebsyTable = /*#__PURE__*/function () {
|
|
|
4270
3992
|
style += "color: ".concat(c.color, "; ");
|
|
4271
3993
|
}
|
|
4272
3994
|
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
return "\n <td \n data-view='".concat(c.value, "' \n data-row-index='").concat(_this23.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='trigger-item ").concat(_this23.options.columns[i].clickable === true ? 'clickable' : '', " ").concat(_this23.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >").concat(c.displayText || _this23.options.columns[i].linkText || c.value, "</td>\n ");
|
|
4278
|
-
} else {
|
|
4279
|
-
var info = c.value;
|
|
4280
|
-
|
|
4281
|
-
if (_this23.options.columns[i].showAsImage === true) {
|
|
4282
|
-
c.value = "\n <img src='".concat(c.value, "'>\n ");
|
|
4283
|
-
}
|
|
4284
|
-
|
|
4285
|
-
return "\n <td \n data-info='".concat(info, "' \n data-row-index='").concat(_this23.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this23.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >").concat(c.value, "</td>\n ");
|
|
4286
|
-
=======
|
|
4287
|
-
if (_this26.options.columns[i].showAsLink === true && c.value.trim() !== '') {
|
|
4288
|
-
return "\n <td \n data-row-index='".concat(_this26.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this26.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >\n <a href='").concat(c.value, "' target='").concat(_this26.options.columns[i].openInNewTab === true ? '_blank' : '_self', "'>").concat(c.displayText || _this26.options.columns[i].linkText || c.value, "</a>\n </td>\n ");
|
|
4289
|
-
} else if ((_this26.options.columns[i].showAsNavigatorLink === true || _this26.options.columns[i].showAsRouterLink === true) && c.value.trim() !== '') {
|
|
4290
|
-
return "\n <td \n data-view='".concat(c.value, "' \n data-row-index='").concat(_this26.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='trigger-item ").concat(_this26.options.columns[i].clickable === true ? 'clickable' : '', " ").concat(_this26.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >").concat(c.displayText || _this26.options.columns[i].linkText || c.value, "</td>\n ");
|
|
3995
|
+
if (_this28.options.columns[i].showAsLink === true && c.value.trim() !== '') {
|
|
3996
|
+
return "\n <td \n data-row-index='".concat(_this28.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this28.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >\n <a href='").concat(c.value, "' target='").concat(_this28.options.columns[i].openInNewTab === true ? '_blank' : '_self', "'>").concat(c.displayText || _this28.options.columns[i].linkText || c.value, "</a>\n </td>\n ");
|
|
3997
|
+
} else if ((_this28.options.columns[i].showAsNavigatorLink === true || _this28.options.columns[i].showAsRouterLink === true) && c.value.trim() !== '') {
|
|
3998
|
+
return "\n <td \n data-view='".concat(c.value, "' \n data-row-index='").concat(_this28.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='trigger-item ").concat(_this28.options.columns[i].clickable === true ? 'clickable' : '', " ").concat(_this28.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >").concat(c.displayText || _this28.options.columns[i].linkText || c.value, "</td>\n ");
|
|
4291
3999
|
} else {
|
|
4292
4000
|
var info = c.value;
|
|
4293
4001
|
|
|
4294
|
-
if (
|
|
4002
|
+
if (_this28.options.columns[i].showAsImage === true) {
|
|
4295
4003
|
c.value = "\n <img src='".concat(c.value, "'>\n ");
|
|
4296
4004
|
}
|
|
4297
4005
|
|
|
4298
|
-
return "\n <td \n data-info='".concat(info, "' \n data-row-index='").concat(
|
|
4299
|
-
>>>>>>> master
|
|
4006
|
+
return "\n <td \n data-info='".concat(info, "' \n data-row-index='").concat(_this28.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this28.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >").concat(c.value, "</td>\n ");
|
|
4300
4007
|
}
|
|
4301
4008
|
}
|
|
4302
4009
|
}).join('') + '</tr>';
|
|
@@ -4455,11 +4162,7 @@ var WebsyTable = /*#__PURE__*/function () {
|
|
|
4455
4162
|
}, {
|
|
4456
4163
|
key: "render",
|
|
4457
4164
|
value: function render(data) {
|
|
4458
|
-
|
|
4459
|
-
var _this24 = this;
|
|
4460
|
-
=======
|
|
4461
|
-
var _this27 = this;
|
|
4462
|
-
>>>>>>> master
|
|
4165
|
+
var _this29 = this;
|
|
4463
4166
|
|
|
4464
4167
|
if (!this.options.columns) {
|
|
4465
4168
|
return;
|
|
@@ -4484,11 +4187,7 @@ var WebsyTable = /*#__PURE__*/function () {
|
|
|
4484
4187
|
|
|
4485
4188
|
var headHTML = '<tr>' + this.options.columns.map(function (c, i) {
|
|
4486
4189
|
if (c.show !== false) {
|
|
4487
|
-
|
|
4488
|
-
return "\n <th ".concat(c.width ? 'style="width: ' + (c.width || 'auto') + ';"' : '', ">\n <div class =\"tableHeader\">\n <div class=\"leftSection\">\n <div\n class=\"tableHeaderField ").concat(['asc', 'desc'].indexOf(c.sort) !== -1 ? 'sortable-column' : '', "\"\n data-index=\"").concat(i, "\" \n data-sort=\"").concat(c.sort, "\" \n >\n ").concat(c.name, "\n </div>\n </div>\n <div class=\"").concat(c.activeSort ? c.sort + ' sortOrder' : '', "\"></div>\n <!--").concat(c.searchable === true ? _this24.buildSearchIcon(c.qGroupFieldDefs[0]) : '', "-->\n </div>\n </th>\n ");
|
|
4489
|
-
=======
|
|
4490
|
-
return "\n <th ".concat(c.width ? 'style="width: ' + (c.width || 'auto') + ';"' : '', ">\n <div class =\"tableHeader\">\n <div class=\"leftSection\">\n <div\n class=\"tableHeaderField ").concat(['asc', 'desc'].indexOf(c.sort) !== -1 ? 'sortable-column' : '', "\"\n data-index=\"").concat(i, "\" \n data-sort=\"").concat(c.sort, "\" \n >\n ").concat(c.name, "\n </div>\n </div>\n <div class=\"").concat(c.activeSort ? c.sort + ' sortOrder' : '', "\"></div>\n <!--").concat(c.searchable === true ? _this27.buildSearchIcon(c.qGroupFieldDefs[0]) : '', "-->\n </div>\n </th>\n ");
|
|
4491
|
-
>>>>>>> master
|
|
4190
|
+
return "\n <th ".concat(c.width ? 'style="width: ' + (c.width || 'auto') + ';"' : '', ">\n <div class =\"tableHeader\">\n <div class=\"leftSection\">\n <div\n class=\"tableHeaderField ").concat(['asc', 'desc'].indexOf(c.sort) !== -1 ? 'sortable-column' : '', "\"\n data-index=\"").concat(i, "\" \n data-sort=\"").concat(c.sort, "\" \n >\n ").concat(c.name, "\n </div>\n </div>\n <div class=\"").concat(c.activeSort ? c.sort + ' sortOrder' : '', "\"></div>\n <!--").concat(c.searchable === true ? _this29.buildSearchIcon(c.qGroupFieldDefs[0]) : '', "-->\n </div>\n </th>\n ");
|
|
4492
4191
|
}
|
|
4493
4192
|
}).join('') + '</tr>';
|
|
4494
4193
|
var headEl = document.getElementById("".concat(this.elementId, "_head"));
|
|
@@ -4507,11 +4206,7 @@ var WebsyTable = /*#__PURE__*/function () {
|
|
|
4507
4206
|
|
|
4508
4207
|
if (pagingEl) {
|
|
4509
4208
|
var pages = new Array(this.options.pageCount).fill('').map(function (item, index) {
|
|
4510
|
-
|
|
4511
|
-
return "<li data-page=\"".concat(index, "\" class=\"websy-page-num ").concat(_this24.options.pageNum === index ? 'active' : '', "\">").concat(index + 1, "</li>");
|
|
4512
|
-
=======
|
|
4513
|
-
return "<li data-page=\"".concat(index, "\" class=\"websy-page-num ").concat(_this27.options.pageNum === index ? 'active' : '', "\">").concat(index + 1, "</li>");
|
|
4514
|
-
>>>>>>> master
|
|
4209
|
+
return "<li data-page=\"".concat(index, "\" class=\"websy-page-num ").concat(_this29.options.pageNum === index ? 'active' : '', "\">").concat(index + 1, "</li>");
|
|
4515
4210
|
});
|
|
4516
4211
|
var startIndex = 0;
|
|
4517
4212
|
|
|
@@ -4579,7 +4274,7 @@ var WebsyTable = /*#__PURE__*/function () {
|
|
|
4579
4274
|
|
|
4580
4275
|
var WebsyTable2 = /*#__PURE__*/function () {
|
|
4581
4276
|
function WebsyTable2(elementId, options) {
|
|
4582
|
-
var
|
|
4277
|
+
var _this30 = this;
|
|
4583
4278
|
|
|
4584
4279
|
_classCallCheck(this, WebsyTable2);
|
|
4585
4280
|
|
|
@@ -4620,8 +4315,8 @@ var WebsyTable2 = /*#__PURE__*/function () {
|
|
|
4620
4315
|
allowClear: false,
|
|
4621
4316
|
disableSearch: true,
|
|
4622
4317
|
onItemSelected: function onItemSelected(selectedItem) {
|
|
4623
|
-
if (
|
|
4624
|
-
|
|
4318
|
+
if (_this30.options.onChangePageSize) {
|
|
4319
|
+
_this30.options.onChangePageSize(selectedItem.value);
|
|
4625
4320
|
}
|
|
4626
4321
|
}
|
|
4627
4322
|
});
|
|
@@ -4645,7 +4340,7 @@ var WebsyTable2 = /*#__PURE__*/function () {
|
|
|
4645
4340
|
_createClass(WebsyTable2, [{
|
|
4646
4341
|
key: "appendRows",
|
|
4647
4342
|
value: function appendRows(data) {
|
|
4648
|
-
var
|
|
4343
|
+
var _this31 = this;
|
|
4649
4344
|
|
|
4650
4345
|
this.hideError();
|
|
4651
4346
|
var bodyEl = document.getElementById("".concat(this.elementId, "_body"));
|
|
@@ -4654,15 +4349,15 @@ var WebsyTable2 = /*#__PURE__*/function () {
|
|
|
4654
4349
|
if (data) {
|
|
4655
4350
|
bodyHTML += data.map(function (r, rowIndex) {
|
|
4656
4351
|
return '<tr>' + r.map(function (c, i) {
|
|
4657
|
-
if (
|
|
4658
|
-
var style = "height: ".concat(
|
|
4352
|
+
if (_this31.options.columns[i].show !== false) {
|
|
4353
|
+
var style = "height: ".concat(_this31.options.cellSize, "px; line-height: ").concat(_this31.options.cellSize, "px;");
|
|
4659
4354
|
|
|
4660
4355
|
if (c.style) {
|
|
4661
4356
|
style += c.style;
|
|
4662
4357
|
}
|
|
4663
4358
|
|
|
4664
|
-
if (
|
|
4665
|
-
style += "width: ".concat(
|
|
4359
|
+
if (_this31.options.columns[i].width) {
|
|
4360
|
+
style += "width: ".concat(_this31.options.columns[i].width, "; ");
|
|
4666
4361
|
}
|
|
4667
4362
|
|
|
4668
4363
|
if (c.backgroundColor) {
|
|
@@ -4677,18 +4372,18 @@ var WebsyTable2 = /*#__PURE__*/function () {
|
|
|
4677
4372
|
style += "color: ".concat(c.color, "; ");
|
|
4678
4373
|
}
|
|
4679
4374
|
|
|
4680
|
-
if (
|
|
4681
|
-
return "\n <td \n data-row-index='".concat(
|
|
4682
|
-
} else if ((
|
|
4683
|
-
return "\n <td \n data-view='".concat(c.value, "' \n data-row-index='").concat(
|
|
4375
|
+
if (_this31.options.columns[i].showAsLink === true && c.value.trim() !== '') {
|
|
4376
|
+
return "\n <td \n data-row-index='".concat(_this31.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this31.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >\n <a href='").concat(c.value, "' target='").concat(_this31.options.columns[i].openInNewTab === true ? '_blank' : '_self', "'>").concat(c.displayText || _this31.options.columns[i].linkText || c.value, "</a>\n </td>\n ");
|
|
4377
|
+
} else if ((_this31.options.columns[i].showAsNavigatorLink === true || _this31.options.columns[i].showAsRouterLink === true) && c.value.trim() !== '') {
|
|
4378
|
+
return "\n <td \n data-view='".concat(c.value, "' \n data-row-index='").concat(_this31.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='trigger-item ").concat(_this31.options.columns[i].clickable === true ? 'clickable' : '', " ").concat(_this31.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >").concat(c.displayText || _this31.options.columns[i].linkText || c.value, "</td>\n ");
|
|
4684
4379
|
} else {
|
|
4685
4380
|
var info = c.value;
|
|
4686
4381
|
|
|
4687
|
-
if (
|
|
4382
|
+
if (_this31.options.columns[i].showAsImage === true) {
|
|
4688
4383
|
c.value = "\n <img src='".concat(c.value, "'>\n ");
|
|
4689
4384
|
}
|
|
4690
4385
|
|
|
4691
|
-
return "\n <td \n data-info='".concat(info, "' \n data-row-index='").concat(
|
|
4386
|
+
return "\n <td \n data-info='".concat(info, "' \n data-row-index='").concat(_this31.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this31.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >").concat(c.value, "</td>\n ");
|
|
4692
4387
|
}
|
|
4693
4388
|
}
|
|
4694
4389
|
}).join('') + '</tr>';
|
|
@@ -4931,7 +4626,7 @@ var WebsyTable2 = /*#__PURE__*/function () {
|
|
|
4931
4626
|
}, {
|
|
4932
4627
|
key: "render",
|
|
4933
4628
|
value: function render(data) {
|
|
4934
|
-
var
|
|
4629
|
+
var _this32 = this;
|
|
4935
4630
|
|
|
4936
4631
|
if (!this.options.columns) {
|
|
4937
4632
|
return;
|
|
@@ -4957,7 +4652,7 @@ var WebsyTable2 = /*#__PURE__*/function () {
|
|
|
4957
4652
|
|
|
4958
4653
|
var headHTML = '<tr>' + this.options.columns.map(function (c, i) {
|
|
4959
4654
|
if (c.show !== false) {
|
|
4960
|
-
return "\n <th ".concat(c.width ? 'style="width: ' + (c.width || 'auto') + ';"' : '', ">\n <div class =\"tableHeader\">\n <div class=\"leftSection\">\n <div\n class=\"tableHeaderField ").concat(['asc', 'desc'].indexOf(c.sort) !== -1 ? 'sortable-column' : '', "\"\n data-index=\"").concat(i, "\" \n data-sort=\"").concat(c.sort, "\" \n >\n ").concat(c.name, "\n </div>\n </div>\n <div class=\"").concat(c.activeSort ? c.sort + ' sortOrder' : '', "\"></div>\n ").concat(c.searchable === true ?
|
|
4655
|
+
return "\n <th ".concat(c.width ? 'style="width: ' + (c.width || 'auto') + ';"' : '', ">\n <div class =\"tableHeader\">\n <div class=\"leftSection\">\n <div\n class=\"tableHeaderField ").concat(['asc', 'desc'].indexOf(c.sort) !== -1 ? 'sortable-column' : '', "\"\n data-index=\"").concat(i, "\" \n data-sort=\"").concat(c.sort, "\" \n >\n ").concat(c.name, "\n </div>\n </div>\n <div class=\"").concat(c.activeSort ? c.sort + ' sortOrder' : '', "\"></div>\n ").concat(c.searchable === true ? _this32.buildSearchIcon(i) : '', "\n </div>\n </th>\n ");
|
|
4961
4656
|
}
|
|
4962
4657
|
}).join('') + '</tr>';
|
|
4963
4658
|
var headEl = document.getElementById("".concat(this.elementId, "_head"));
|
|
@@ -4968,7 +4663,7 @@ var WebsyTable2 = /*#__PURE__*/function () {
|
|
|
4968
4663
|
var dropdownHTML = "";
|
|
4969
4664
|
this.options.columns.forEach(function (c, i) {
|
|
4970
4665
|
if (c.searchable && c.searchField) {
|
|
4971
|
-
dropdownHTML += "\n <div id=\"".concat(
|
|
4666
|
+
dropdownHTML += "\n <div id=\"".concat(_this32.elementId, "_columnSearch_").concat(i, "\" class=\"websy-modal-dropdown\"></div>\n ");
|
|
4972
4667
|
}
|
|
4973
4668
|
});
|
|
4974
4669
|
dropdownEl.innerHTML = dropdownHTML;
|
|
@@ -4990,7 +4685,7 @@ var WebsyTable2 = /*#__PURE__*/function () {
|
|
|
4990
4685
|
|
|
4991
4686
|
if (pagingEl) {
|
|
4992
4687
|
var pages = new Array(this.options.pageCount).fill('').map(function (item, index) {
|
|
4993
|
-
return "<li data-page=\"".concat(index, "\" class=\"websy-page-num ").concat(
|
|
4688
|
+
return "<li data-page=\"".concat(index, "\" class=\"websy-page-num ").concat(_this32.options.pageNum === index ? 'active' : '', "\">").concat(index + 1, "</li>");
|
|
4994
4689
|
});
|
|
4995
4690
|
var startIndex = 0;
|
|
4996
4691
|
|
|
@@ -5077,14 +4772,14 @@ var WebsyTable2 = /*#__PURE__*/function () {
|
|
|
5077
4772
|
}, {
|
|
5078
4773
|
key: "getColumnParameters",
|
|
5079
4774
|
value: function getColumnParameters(values) {
|
|
5080
|
-
var
|
|
4775
|
+
var _this33 = this;
|
|
5081
4776
|
|
|
5082
4777
|
var tableEl = document.getElementById("".concat(this.elementId, "_table"));
|
|
5083
4778
|
tableEl.style.tableLayout = 'auto';
|
|
5084
4779
|
tableEl.style.width = 'auto';
|
|
5085
4780
|
var bodyEl = document.getElementById("".concat(this.elementId, "_body"));
|
|
5086
4781
|
bodyEl.innerHTML = '<tr>' + values.map(function (c) {
|
|
5087
|
-
return "\n <td \n style='height: ".concat(
|
|
4782
|
+
return "\n <td \n style='height: ".concat(_this33.options.cellSize, "px; line-height: ").concat(_this33.options.cellSize, "px;'\n >").concat(c.value || ' ', "</td>\n ");
|
|
5088
4783
|
}).join('') + '</tr>'; // get height of the first data cell
|
|
5089
4784
|
|
|
5090
4785
|
var cells = bodyEl.querySelectorAll("tr:first-of-type td");
|
|
@@ -5125,11 +4820,7 @@ var WebsyTable2 = /*#__PURE__*/function () {
|
|
|
5125
4820
|
|
|
5126
4821
|
var WebsyChart = /*#__PURE__*/function () {
|
|
5127
4822
|
function WebsyChart(elementId, options) {
|
|
5128
|
-
|
|
5129
|
-
var _this25 = this;
|
|
5130
|
-
=======
|
|
5131
|
-
var _this32 = this;
|
|
5132
|
-
>>>>>>> master
|
|
4823
|
+
var _this34 = this;
|
|
5133
4824
|
|
|
5134
4825
|
_classCallCheck(this, WebsyChart);
|
|
5135
4826
|
|
|
@@ -5177,40 +4868,22 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5177
4868
|
this.invertOverride = function (input, input2) {
|
|
5178
4869
|
var xAxis = 'bottomAxis';
|
|
5179
4870
|
|
|
5180
|
-
|
|
5181
|
-
if (_this25.options.orientation === 'horizontal') {
|
|
5182
|
-
xAxis = 'leftAxis';
|
|
5183
|
-
}
|
|
5184
|
-
|
|
5185
|
-
var width = _this25[xAxis].step();
|
|
5186
|
-
|
|
5187
|
-
var output;
|
|
5188
|
-
|
|
5189
|
-
var domain = _toConsumableArray(_this25[xAxis].domain());
|
|
5190
|
-
|
|
5191
|
-
if (_this25.options.orientation === 'horizontal') {
|
|
5192
|
-
=======
|
|
5193
|
-
if (_this32.options.orientation === 'horizontal') {
|
|
4871
|
+
if (_this34.options.orientation === 'horizontal') {
|
|
5194
4872
|
xAxis = 'leftAxis';
|
|
5195
4873
|
}
|
|
5196
4874
|
|
|
5197
|
-
var width =
|
|
4875
|
+
var width = _this34[xAxis].step();
|
|
5198
4876
|
|
|
5199
4877
|
var output;
|
|
5200
4878
|
|
|
5201
|
-
var domain = _toConsumableArray(
|
|
4879
|
+
var domain = _toConsumableArray(_this34[xAxis].domain());
|
|
5202
4880
|
|
|
5203
|
-
if (
|
|
5204
|
-
>>>>>>> master
|
|
4881
|
+
if (_this34.options.orientation === 'horizontal') {
|
|
5205
4882
|
domain = domain.reverse();
|
|
5206
4883
|
}
|
|
5207
4884
|
|
|
5208
4885
|
for (var j = 0; j < domain.length; j++) {
|
|
5209
|
-
|
|
5210
|
-
var breakA = _this25[xAxis](domain[j]) - width / 2;
|
|
5211
|
-
=======
|
|
5212
|
-
var breakA = _this32[xAxis](domain[j]) - width / 2;
|
|
5213
|
-
>>>>>>> master
|
|
4886
|
+
var breakA = _this34[xAxis](domain[j]) - width / 2;
|
|
5214
4887
|
var breakB = breakA + width;
|
|
5215
4888
|
|
|
5216
4889
|
if (input > breakA && input <= breakB) {
|
|
@@ -5310,17 +4983,10 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5310
4983
|
}, {
|
|
5311
4984
|
key: "handleEventMouseMove",
|
|
5312
4985
|
value: function handleEventMouseMove(event, d) {
|
|
5313
|
-
|
|
5314
|
-
var _this26 = this;
|
|
5315
|
-
|
|
5316
|
-
var bisectDate = d3.bisector(function (d) {
|
|
5317
|
-
return _this26.parseX(d.x.value);
|
|
5318
|
-
=======
|
|
5319
|
-
var _this33 = this;
|
|
4986
|
+
var _this35 = this;
|
|
5320
4987
|
|
|
5321
4988
|
var bisectDate = d3.bisector(function (d) {
|
|
5322
|
-
return
|
|
5323
|
-
>>>>>>> master
|
|
4989
|
+
return _this35.parseX(d.x.value);
|
|
5324
4990
|
}).left;
|
|
5325
4991
|
|
|
5326
4992
|
if (this.options.showTrackingLine === true && d3.pointer(event)) {
|
|
@@ -5359,13 +5025,8 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5359
5025
|
}
|
|
5360
5026
|
|
|
5361
5027
|
this.options.data.series.forEach(function (s) {
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
xPoint = _this26[xAxis](_this26.parseX(xLabel));
|
|
5365
|
-
=======
|
|
5366
|
-
if (_this33.options.data[xData].scale !== 'Time') {
|
|
5367
|
-
xPoint = _this33[xAxis](_this33.parseX(xLabel));
|
|
5368
|
-
>>>>>>> master
|
|
5028
|
+
if (_this35.options.data[xData].scale !== 'Time') {
|
|
5029
|
+
xPoint = _this35[xAxis](_this35.parseX(xLabel));
|
|
5369
5030
|
s.data.forEach(function (d) {
|
|
5370
5031
|
if (d.x.value === xLabel) {
|
|
5371
5032
|
if (!d.y.color) {
|
|
@@ -5380,21 +5041,13 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5380
5041
|
var pointA = s.data[index - 1];
|
|
5381
5042
|
var pointB = s.data[index];
|
|
5382
5043
|
|
|
5383
|
-
|
|
5384
|
-
if (_this26.options.orientation === 'horizontal') {
|
|
5385
|
-
=======
|
|
5386
|
-
if (_this33.options.orientation === 'horizontal') {
|
|
5387
|
-
>>>>>>> master
|
|
5044
|
+
if (_this35.options.orientation === 'horizontal') {
|
|
5388
5045
|
pointA = _toConsumableArray(s.data).reverse()[index - 1];
|
|
5389
5046
|
pointB = _toConsumableArray(s.data).reverse()[index];
|
|
5390
5047
|
}
|
|
5391
5048
|
|
|
5392
5049
|
if (pointA && !pointB) {
|
|
5393
|
-
|
|
5394
|
-
xPoint = _this26[xAxis](_this26.parseX(pointA.x.value));
|
|
5395
|
-
=======
|
|
5396
|
-
xPoint = _this33[xAxis](_this33.parseX(pointA.x.value));
|
|
5397
|
-
>>>>>>> master
|
|
5050
|
+
xPoint = _this35[xAxis](_this35.parseX(pointA.x.value));
|
|
5398
5051
|
tooltipTitle = pointA.x.value;
|
|
5399
5052
|
|
|
5400
5053
|
if (!pointA.y.color) {
|
|
@@ -5404,20 +5057,12 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5404
5057
|
tooltipData.push(pointA.y);
|
|
5405
5058
|
|
|
5406
5059
|
if (typeof pointA.x.value.getTime !== 'undefined') {
|
|
5407
|
-
|
|
5408
|
-
tooltipTitle = d3.timeFormat(_this26.options.dateFormat || _this26.options.calculatedTimeFormatPattern)(pointA.x.value);
|
|
5409
|
-
=======
|
|
5410
|
-
tooltipTitle = d3.timeFormat(_this33.options.dateFormat || _this33.options.calculatedTimeFormatPattern)(pointA.x.value);
|
|
5411
|
-
>>>>>>> master
|
|
5060
|
+
tooltipTitle = d3.timeFormat(_this35.options.dateFormat || _this35.options.calculatedTimeFormatPattern)(pointA.x.value);
|
|
5412
5061
|
}
|
|
5413
5062
|
}
|
|
5414
5063
|
|
|
5415
5064
|
if (pointB && !pointA) {
|
|
5416
|
-
|
|
5417
|
-
xPoint = _this26[xAxis](_this26.parseX(pointB.x.value));
|
|
5418
|
-
=======
|
|
5419
|
-
xPoint = _this33[xAxis](_this33.parseX(pointB.x.value));
|
|
5420
|
-
>>>>>>> master
|
|
5065
|
+
xPoint = _this35[xAxis](_this35.parseX(pointB.x.value));
|
|
5421
5066
|
tooltipTitle = pointB.x.value;
|
|
5422
5067
|
|
|
5423
5068
|
if (!pointB.y.color) {
|
|
@@ -5427,24 +5072,14 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5427
5072
|
tooltipData.push(pointB.y);
|
|
5428
5073
|
|
|
5429
5074
|
if (typeof pointB.x.value.getTime !== 'undefined') {
|
|
5430
|
-
|
|
5431
|
-
tooltipTitle = d3.timeFormat(_this26.options.dateFormat || _this26.options.calculatedTimeFormatPattern)(pointB.x.value);
|
|
5432
|
-
=======
|
|
5433
|
-
tooltipTitle = d3.timeFormat(_this33.options.dateFormat || _this33.options.calculatedTimeFormatPattern)(pointB.x.value);
|
|
5434
|
-
>>>>>>> master
|
|
5075
|
+
tooltipTitle = d3.timeFormat(_this35.options.dateFormat || _this35.options.calculatedTimeFormatPattern)(pointB.x.value);
|
|
5435
5076
|
}
|
|
5436
5077
|
}
|
|
5437
5078
|
|
|
5438
5079
|
if (pointA && pointB) {
|
|
5439
|
-
|
|
5440
|
-
var d0 = _this26[xAxis](_this26.parseX(pointA.x.value));
|
|
5080
|
+
var d0 = _this35[xAxis](_this35.parseX(pointA.x.value));
|
|
5441
5081
|
|
|
5442
|
-
var d1 =
|
|
5443
|
-
=======
|
|
5444
|
-
var d0 = _this33[xAxis](_this33.parseX(pointA.x.value));
|
|
5445
|
-
|
|
5446
|
-
var d1 = _this33[xAxis](_this33.parseX(pointB.x.value));
|
|
5447
|
-
>>>>>>> master
|
|
5082
|
+
var d1 = _this35[xAxis](_this35.parseX(pointB.x.value));
|
|
5448
5083
|
|
|
5449
5084
|
var mid = Math.abs(d0 - d1) / 2;
|
|
5450
5085
|
|
|
@@ -5453,11 +5088,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5453
5088
|
tooltipTitle = pointB.x.value;
|
|
5454
5089
|
|
|
5455
5090
|
if (typeof pointB.x.value.getTime !== 'undefined') {
|
|
5456
|
-
|
|
5457
|
-
tooltipTitle = d3.timeFormat(_this26.options.dateFormat || _this26.options.calculatedTimeFormatPattern)(pointB.x.value);
|
|
5458
|
-
=======
|
|
5459
|
-
tooltipTitle = d3.timeFormat(_this33.options.dateFormat || _this33.options.calculatedTimeFormatPattern)(pointB.x.value);
|
|
5460
|
-
>>>>>>> master
|
|
5091
|
+
tooltipTitle = d3.timeFormat(_this35.options.dateFormat || _this35.options.calculatedTimeFormatPattern)(pointB.x.value);
|
|
5461
5092
|
}
|
|
5462
5093
|
|
|
5463
5094
|
if (!pointB.y.color) {
|
|
@@ -5470,11 +5101,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5470
5101
|
tooltipTitle = pointA.x.value;
|
|
5471
5102
|
|
|
5472
5103
|
if (typeof pointB.x.value.getTime !== 'undefined') {
|
|
5473
|
-
|
|
5474
|
-
tooltipTitle = d3.timeFormat(_this26.options.dateFormat || _this26.options.calculatedTimeFormatPattern)(pointB.x.value);
|
|
5475
|
-
=======
|
|
5476
|
-
tooltipTitle = d3.timeFormat(_this33.options.dateFormat || _this33.options.calculatedTimeFormatPattern)(pointB.x.value);
|
|
5477
|
-
>>>>>>> master
|
|
5104
|
+
tooltipTitle = d3.timeFormat(_this35.options.dateFormat || _this35.options.calculatedTimeFormatPattern)(pointB.x.value);
|
|
5478
5105
|
}
|
|
5479
5106
|
|
|
5480
5107
|
if (!pointA.y.color) {
|
|
@@ -5579,11 +5206,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5579
5206
|
}, {
|
|
5580
5207
|
key: "render",
|
|
5581
5208
|
value: function render(options) {
|
|
5582
|
-
|
|
5583
|
-
var _this27 = this;
|
|
5584
|
-
=======
|
|
5585
|
-
var _this34 = this;
|
|
5586
|
-
>>>>>>> master
|
|
5209
|
+
var _this36 = this;
|
|
5587
5210
|
|
|
5588
5211
|
/* global d3 options */
|
|
5589
5212
|
if (typeof options !== 'undefined') {
|
|
@@ -5652,11 +5275,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5652
5275
|
var legendData = this.options.data.series.map(function (s, i) {
|
|
5653
5276
|
return {
|
|
5654
5277
|
value: s.label || s.key,
|
|
5655
|
-
|
|
5656
|
-
color: s.color || _this27.options.colors[i % _this27.options.colors.length]
|
|
5657
|
-
=======
|
|
5658
|
-
color: s.color || _this34.options.colors[i % _this34.options.colors.length]
|
|
5659
|
-
>>>>>>> master
|
|
5278
|
+
color: s.color || _this36.options.colors[i % _this36.options.colors.length]
|
|
5660
5279
|
};
|
|
5661
5280
|
});
|
|
5662
5281
|
|
|
@@ -5895,11 +5514,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5895
5514
|
|
|
5896
5515
|
if (this.options.data.bottom.formatter) {
|
|
5897
5516
|
bAxisFunc.tickFormat(function (d) {
|
|
5898
|
-
|
|
5899
|
-
return _this27.options.data.bottom.formatter(d);
|
|
5900
|
-
=======
|
|
5901
|
-
return _this34.options.data.bottom.formatter(d);
|
|
5902
|
-
>>>>>>> master
|
|
5517
|
+
return _this36.options.data.bottom.formatter(d);
|
|
5903
5518
|
});
|
|
5904
5519
|
}
|
|
5905
5520
|
|
|
@@ -5926,13 +5541,8 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5926
5541
|
|
|
5927
5542
|
if (this.options.margin.axisLeft > 0) {
|
|
5928
5543
|
this.leftAxisLayer.call(d3.axisLeft(this.leftAxis).ticks(this.options.data.left.ticks || 5).tickFormat(function (d) {
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
d = _this27.options.data.left.formatter(d);
|
|
5932
|
-
=======
|
|
5933
|
-
if (_this34.options.data.left.formatter) {
|
|
5934
|
-
d = _this34.options.data.left.formatter(d);
|
|
5935
|
-
>>>>>>> master
|
|
5544
|
+
if (_this36.options.data.left.formatter) {
|
|
5545
|
+
d = _this36.options.data.left.formatter(d);
|
|
5936
5546
|
}
|
|
5937
5547
|
|
|
5938
5548
|
return d;
|
|
@@ -5969,13 +5579,8 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
5969
5579
|
|
|
5970
5580
|
if (this.options.margin.axisRight > 0 && (this.options.data.right.min !== 0 || this.options.data.right.max !== 0)) {
|
|
5971
5581
|
this.rightAxisLayer.call(d3.axisRight(this.rightAxis).ticks(this.options.data.left.ticks || 5).tickFormat(function (d) {
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
d = _this27.options.data.right.formatter(d);
|
|
5975
|
-
=======
|
|
5976
|
-
if (_this34.options.data.right.formatter) {
|
|
5977
|
-
d = _this34.options.data.right.formatter(d);
|
|
5978
|
-
>>>>>>> master
|
|
5582
|
+
if (_this36.options.data.right.formatter) {
|
|
5583
|
+
d = _this36.options.data.right.formatter(d);
|
|
5979
5584
|
}
|
|
5980
5585
|
|
|
5981
5586
|
return d;
|
|
@@ -6001,29 +5606,16 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
6001
5606
|
|
|
6002
5607
|
this.options.data.series.forEach(function (series, index) {
|
|
6003
5608
|
if (!series.key) {
|
|
6004
|
-
|
|
6005
|
-
series.key = _this27.createIdentity();
|
|
6006
|
-
}
|
|
6007
|
-
|
|
6008
|
-
if (!series.color) {
|
|
6009
|
-
series.color = _this27.options.colors[index % _this27.options.colors.length];
|
|
6010
|
-
}
|
|
6011
|
-
|
|
6012
|
-
_this27["render".concat(series.type || 'bar')](series, index);
|
|
6013
|
-
|
|
6014
|
-
_this27.renderLabels(series, index);
|
|
6015
|
-
=======
|
|
6016
|
-
series.key = _this34.createIdentity();
|
|
5609
|
+
series.key = _this36.createIdentity();
|
|
6017
5610
|
}
|
|
6018
5611
|
|
|
6019
5612
|
if (!series.color) {
|
|
6020
|
-
series.color =
|
|
5613
|
+
series.color = _this36.options.colors[index % _this36.options.colors.length];
|
|
6021
5614
|
}
|
|
6022
5615
|
|
|
6023
|
-
|
|
5616
|
+
_this36["render".concat(series.type || 'bar')](series, index);
|
|
6024
5617
|
|
|
6025
|
-
|
|
6026
|
-
>>>>>>> master
|
|
5618
|
+
_this36.renderLabels(series, index);
|
|
6027
5619
|
});
|
|
6028
5620
|
}
|
|
6029
5621
|
}
|
|
@@ -6031,30 +5623,17 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
6031
5623
|
}, {
|
|
6032
5624
|
key: "renderarea",
|
|
6033
5625
|
value: function renderarea(series, index) {
|
|
6034
|
-
|
|
6035
|
-
var _this28 = this;
|
|
6036
|
-
=======
|
|
6037
|
-
var _this35 = this;
|
|
6038
|
-
>>>>>>> master
|
|
5626
|
+
var _this37 = this;
|
|
6039
5627
|
|
|
6040
5628
|
/* global d3 series index */
|
|
6041
5629
|
var drawArea = function drawArea(xAxis, yAxis, curveStyle) {
|
|
6042
5630
|
return d3.area().x(function (d) {
|
|
6043
|
-
|
|
6044
|
-
return _this28[xAxis](_this28.parseX(d.x.value));
|
|
6045
|
-
}).y0(function (d) {
|
|
6046
|
-
return _this28[yAxis](0);
|
|
6047
|
-
}).y1(function (d) {
|
|
6048
|
-
return _this28[yAxis](isNaN(d.y.value) ? 0 : d.y.value);
|
|
6049
|
-
}).curve(d3[curveStyle || _this28.options.curveStyle]);
|
|
6050
|
-
=======
|
|
6051
|
-
return _this35[xAxis](_this35.parseX(d.x.value));
|
|
5631
|
+
return _this37[xAxis](_this37.parseX(d.x.value));
|
|
6052
5632
|
}).y0(function (d) {
|
|
6053
|
-
return
|
|
5633
|
+
return _this37[yAxis](0);
|
|
6054
5634
|
}).y1(function (d) {
|
|
6055
|
-
return
|
|
6056
|
-
}).curve(d3[curveStyle ||
|
|
6057
|
-
>>>>>>> master
|
|
5635
|
+
return _this37[yAxis](isNaN(d.y.value) ? 0 : d.y.value);
|
|
5636
|
+
}).curve(d3[curveStyle || _this37.options.curveStyle]);
|
|
6058
5637
|
};
|
|
6059
5638
|
|
|
6060
5639
|
var xAxis = 'bottomAxis';
|
|
@@ -6227,26 +5806,15 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
6227
5806
|
}, {
|
|
6228
5807
|
key: "renderline",
|
|
6229
5808
|
value: function renderline(series, index) {
|
|
6230
|
-
|
|
6231
|
-
var _this29 = this;
|
|
6232
|
-
=======
|
|
6233
|
-
var _this36 = this;
|
|
6234
|
-
>>>>>>> master
|
|
5809
|
+
var _this38 = this;
|
|
6235
5810
|
|
|
6236
5811
|
/* global series index d3 */
|
|
6237
5812
|
var drawLine = function drawLine(xAxis, yAxis, curveStyle) {
|
|
6238
5813
|
return d3.line().x(function (d) {
|
|
6239
|
-
|
|
6240
|
-
return _this29[xAxis](_this29.parseX(d.x.value));
|
|
6241
|
-
}).y(function (d) {
|
|
6242
|
-
return _this29[yAxis](isNaN(d.y.value) ? 0 : d.y.value);
|
|
6243
|
-
}).curve(d3[curveStyle || _this29.options.curveStyle]);
|
|
6244
|
-
=======
|
|
6245
|
-
return _this36[xAxis](_this36.parseX(d.x.value));
|
|
5814
|
+
return _this38[xAxis](_this38.parseX(d.x.value));
|
|
6246
5815
|
}).y(function (d) {
|
|
6247
|
-
return
|
|
6248
|
-
}).curve(d3[curveStyle ||
|
|
6249
|
-
>>>>>>> master
|
|
5816
|
+
return _this38[yAxis](isNaN(d.y.value) ? 0 : d.y.value);
|
|
5817
|
+
}).curve(d3[curveStyle || _this38.options.curveStyle]);
|
|
6250
5818
|
};
|
|
6251
5819
|
|
|
6252
5820
|
var xAxis = 'bottomAxis';
|
|
@@ -6284,22 +5852,14 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
6284
5852
|
}, {
|
|
6285
5853
|
key: "rendersymbol",
|
|
6286
5854
|
value: function rendersymbol(series, index) {
|
|
6287
|
-
|
|
6288
|
-
var _this30 = this;
|
|
6289
|
-
=======
|
|
6290
|
-
var _this37 = this;
|
|
6291
|
-
>>>>>>> master
|
|
5855
|
+
var _this39 = this;
|
|
6292
5856
|
|
|
6293
5857
|
/* global d3 series index series.key */
|
|
6294
5858
|
var drawSymbol = function drawSymbol(size) {
|
|
6295
5859
|
return d3.symbol() // .type(d => {
|
|
6296
5860
|
// return d3.symbols[0]
|
|
6297
5861
|
// })
|
|
6298
|
-
|
|
6299
|
-
.size(size || _this30.options.symbolSize);
|
|
6300
|
-
=======
|
|
6301
|
-
.size(size || _this37.options.symbolSize);
|
|
6302
|
-
>>>>>>> master
|
|
5862
|
+
.size(size || _this39.options.symbolSize);
|
|
6303
5863
|
};
|
|
6304
5864
|
|
|
6305
5865
|
var xAxis = 'bottomAxis';
|
|
@@ -6317,11 +5877,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
6317
5877
|
symbols.attr('d', function (d) {
|
|
6318
5878
|
return drawSymbol(d.y.size || series.symbolSize)(d);
|
|
6319
5879
|
}).transition(this.transition).attr('fill', 'white').attr('stroke', series.color).attr('transform', function (d) {
|
|
6320
|
-
|
|
6321
|
-
return "translate(".concat(_this30[xAxis](_this30.parseX(d.x.value)), ", ").concat(_this30[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
|
|
6322
|
-
=======
|
|
6323
|
-
return "translate(".concat(_this37[xAxis](_this37.parseX(d.x.value)), ", ").concat(_this37[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
|
|
6324
|
-
>>>>>>> master
|
|
5880
|
+
return "translate(".concat(_this39[xAxis](_this39.parseX(d.x.value)), ", ").concat(_this39[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
|
|
6325
5881
|
}); // Enter
|
|
6326
5882
|
|
|
6327
5883
|
symbols.enter().append('path').attr('d', function (d) {
|
|
@@ -6330,11 +5886,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
6330
5886
|
.attr('fill', 'white').attr('stroke', series.color).attr('class', function (d) {
|
|
6331
5887
|
return "symbol symbol_".concat(series.key);
|
|
6332
5888
|
}).attr('transform', function (d) {
|
|
6333
|
-
|
|
6334
|
-
return "translate(".concat(_this30[xAxis](_this30.parseX(d.x.value)), ", ").concat(_this30[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
|
|
6335
|
-
=======
|
|
6336
|
-
return "translate(".concat(_this37[xAxis](_this37.parseX(d.x.value)), ", ").concat(_this37[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
|
|
6337
|
-
>>>>>>> master
|
|
5889
|
+
return "translate(".concat(_this39[xAxis](_this39.parseX(d.x.value)), ", ").concat(_this39[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
|
|
6338
5890
|
});
|
|
6339
5891
|
}
|
|
6340
5892
|
}, {
|
|
@@ -6489,11 +6041,7 @@ var WebsyLegend = /*#__PURE__*/function () {
|
|
|
6489
6041
|
}, {
|
|
6490
6042
|
key: "resize",
|
|
6491
6043
|
value: function resize() {
|
|
6492
|
-
|
|
6493
|
-
var _this31 = this;
|
|
6494
|
-
=======
|
|
6495
|
-
var _this38 = this;
|
|
6496
|
-
>>>>>>> master
|
|
6044
|
+
var _this40 = this;
|
|
6497
6045
|
|
|
6498
6046
|
var el = document.getElementById(this.elementId);
|
|
6499
6047
|
|
|
@@ -6506,11 +6054,7 @@ var WebsyLegend = /*#__PURE__*/function () {
|
|
|
6506
6054
|
// }
|
|
6507
6055
|
var html = "\n <div class='text-".concat(this.options.align, "'>\n ");
|
|
6508
6056
|
html += this._data.map(function (d, i) {
|
|
6509
|
-
|
|
6510
|
-
return _this31.getLegendItemHTML(d);
|
|
6511
|
-
=======
|
|
6512
|
-
return _this38.getLegendItemHTML(d);
|
|
6513
|
-
>>>>>>> master
|
|
6057
|
+
return _this40.getLegendItemHTML(d);
|
|
6514
6058
|
}).join('');
|
|
6515
6059
|
html += "\n <div>\n ";
|
|
6516
6060
|
el.innerHTML = html;
|
|
@@ -6683,11 +6227,7 @@ var WebsyMap = /*#__PURE__*/function () {
|
|
|
6683
6227
|
}, {
|
|
6684
6228
|
key: "render",
|
|
6685
6229
|
value: function render() {
|
|
6686
|
-
|
|
6687
|
-
var _this32 = this;
|
|
6688
|
-
=======
|
|
6689
|
-
var _this39 = this;
|
|
6690
|
-
>>>>>>> master
|
|
6230
|
+
var _this41 = this;
|
|
6691
6231
|
|
|
6692
6232
|
var mapEl = document.getElementById("".concat(this.elementId, "_map"));
|
|
6693
6233
|
var legendEl = document.getElementById("".concat(this.elementId, "_map"));
|
|
@@ -6696,11 +6236,7 @@ var WebsyMap = /*#__PURE__*/function () {
|
|
|
6696
6236
|
var legendData = this.options.data.polygons.map(function (s, i) {
|
|
6697
6237
|
return {
|
|
6698
6238
|
value: s.label || s.key,
|
|
6699
|
-
|
|
6700
|
-
color: s.color || _this32.options.colors[i % _this32.options.colors.length]
|
|
6701
|
-
=======
|
|
6702
|
-
color: s.color || _this39.options.colors[i % _this39.options.colors.length]
|
|
6703
|
-
>>>>>>> master
|
|
6239
|
+
color: s.color || _this41.options.colors[i % _this41.options.colors.length]
|
|
6704
6240
|
};
|
|
6705
6241
|
});
|
|
6706
6242
|
var longestValue = legendData.map(function (s) {
|
|
@@ -6764,11 +6300,7 @@ var WebsyMap = /*#__PURE__*/function () {
|
|
|
6764
6300
|
|
|
6765
6301
|
if (this.polygons) {
|
|
6766
6302
|
this.polygons.forEach(function (p) {
|
|
6767
|
-
|
|
6768
|
-
return _this32.map.removeLayer(p);
|
|
6769
|
-
=======
|
|
6770
|
-
return _this39.map.removeLayer(p);
|
|
6771
|
-
>>>>>>> master
|
|
6303
|
+
return _this41.map.removeLayer(p);
|
|
6772
6304
|
});
|
|
6773
6305
|
}
|
|
6774
6306
|
|
|
@@ -6826,30 +6358,18 @@ var WebsyMap = /*#__PURE__*/function () {
|
|
|
6826
6358
|
}
|
|
6827
6359
|
|
|
6828
6360
|
if (!p.options.color) {
|
|
6829
|
-
|
|
6830
|
-
p.options.color = _this32.options.colors[i % _this32.options.colors.length];
|
|
6831
|
-
=======
|
|
6832
|
-
p.options.color = _this39.options.colors[i % _this39.options.colors.length];
|
|
6833
|
-
>>>>>>> master
|
|
6361
|
+
p.options.color = _this41.options.colors[i % _this41.options.colors.length];
|
|
6834
6362
|
}
|
|
6835
6363
|
|
|
6836
6364
|
var pol = L.polygon(p.data.map(function (c) {
|
|
6837
6365
|
return c.map(function (d) {
|
|
6838
6366
|
return [d.Latitude, d.Longitude];
|
|
6839
6367
|
});
|
|
6840
|
-
|
|
6841
|
-
}), p.options).addTo(_this32.map);
|
|
6842
|
-
|
|
6843
|
-
_this32.polygons.push(pol);
|
|
6844
|
-
|
|
6845
|
-
_this32.map.fitBounds(pol.getBounds());
|
|
6846
|
-
=======
|
|
6847
|
-
}), p.options).addTo(_this39.map);
|
|
6368
|
+
}), p.options).addTo(_this41.map);
|
|
6848
6369
|
|
|
6849
|
-
|
|
6370
|
+
_this41.polygons.push(pol);
|
|
6850
6371
|
|
|
6851
|
-
|
|
6852
|
-
>>>>>>> master
|
|
6372
|
+
_this41.map.fitBounds(pol.getBounds());
|
|
6853
6373
|
});
|
|
6854
6374
|
} // if (this.data.markers.length > 0) {
|
|
6855
6375
|
// el.classList.remove('hidden')
|