@websy/websy-designs 1.1.1 → 1.1.2

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.
@@ -46,7 +46,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
46
46
  APIService
47
47
  ButtonGroup
48
48
  WebsyUtils
49
+ <<<<<<< HEAD
50
+ WebsyCarousel
51
+ =======
49
52
  Pager
53
+ >>>>>>> master
50
54
  */
51
55
 
52
56
  /* global XMLHttpRequest fetch ENV */
@@ -286,6 +290,192 @@ var ButtonGroup = /*#__PURE__*/function () {
286
290
 
287
291
  return ButtonGroup;
288
292
  }();
293
+ /* global */
294
+
295
+
296
+ var WebsyCarousel = /*#__PURE__*/function () {
297
+ function WebsyCarousel(elementId, options) {
298
+ _classCallCheck(this, WebsyCarousel);
299
+
300
+ var DEFAULTS = {
301
+ currentFrame: 0,
302
+ frameDuration: 4000,
303
+ showFrameSelector: true,
304
+ showPrevNext: true
305
+ };
306
+ this.playTimeoutFn = null;
307
+ this.options = _extends({}, DEFAULTS, options);
308
+
309
+ if (!elementId) {
310
+ console.log('No element Id provided');
311
+ }
312
+
313
+ var el = document.getElementById(elementId);
314
+
315
+ if (el) {
316
+ this.elementId = elementId;
317
+ el.addEventListener('click', this.handleClick.bind(this));
318
+ this.render();
319
+ }
320
+ }
321
+
322
+ _createClass(WebsyCarousel, [{
323
+ key: "handleClick",
324
+ value: function handleClick(event) {
325
+ if (event.target.classList.contains('websy-next-arrow')) {
326
+ this.next();
327
+ }
328
+
329
+ if (event.target.classList.contains('websy-prev-arrow')) {
330
+ this.prev();
331
+ }
332
+
333
+ if (event.target.classList.contains('websy-progress-btn' || 'websy-progress-btn-active')) {
334
+ var index = +event.target.getAttribute('data-index');
335
+ var prevFrameIndex = this.options.currentFrame;
336
+ this.options.currentFrame = index;
337
+ this.showFrame(prevFrameIndex, index);
338
+ }
339
+ }
340
+ }, {
341
+ key: "next",
342
+ value: function next() {
343
+ this.pause();
344
+ var prevFrameIndex = this.options.currentFrame;
345
+
346
+ if (this.options.currentFrame === this.options.frames.length - 1) {
347
+ this.options.currentFrame = 0;
348
+ } else {
349
+ this.options.currentFrame++;
350
+ }
351
+
352
+ this.showFrame(prevFrameIndex, this.options.currentFrame); // this.play()
353
+ // document.getElementById(`${this.elementId}_frame_${this.options.currentFrame}`)
354
+ // .style.transform = `translateX(-100%)`
355
+ // if (`${this.options.currentFrame === this.options.frames.length - 1}`) {
356
+ // document.getElementById`${this.elementId}_frame_${this.options.currentFrame}`.style.transform = `translateX('-100%')`
357
+ // }
358
+ }
359
+ }, {
360
+ key: "pause",
361
+ value: function pause() {
362
+ if (this.playTimeoutFn) {
363
+ clearTimeout(this.playTimeoutFn);
364
+ }
365
+ }
366
+ }, {
367
+ key: "play",
368
+ value: function play() {
369
+ var _this2 = this;
370
+
371
+ this.playTimeoutFn = setTimeout(function () {
372
+ var prevFrameIndex = _this2.options.currentFrame;
373
+
374
+ if (_this2.options.currentFrame === _this2.options.frames.length - 1) {
375
+ _this2.options.currentFrame = 0;
376
+ } else {
377
+ _this2.options.currentFrame++;
378
+ }
379
+
380
+ _this2.showFrame(prevFrameIndex, _this2.options.currentFrame);
381
+
382
+ _this2.play();
383
+ }, this.options.frameDuration);
384
+ }
385
+ }, {
386
+ key: "prev",
387
+ value: function prev() {
388
+ this.pause();
389
+ var prevFrameIndex = this.options.currentFrame;
390
+
391
+ if (this.options.currentFrame === 0) {
392
+ this.options.currentFrame = this.options.frames.length - 1;
393
+ } else {
394
+ this.options.currentFrame--;
395
+ }
396
+
397
+ this.showFrame(prevFrameIndex, this.options.currentFrame); // this.play()
398
+ // document.getElementById(`${this.elementId}_frame_${this.options.currentFrame}`)
399
+ // .style.transform = `translateX(100%)`
400
+ }
401
+ }, {
402
+ key: "render",
403
+ value: function render(options) {
404
+ this.options = _extends({}, this.options, options);
405
+ this.resize();
406
+ }
407
+ }, {
408
+ key: "resize",
409
+ value: function resize() {
410
+ var _this3 = this;
411
+
412
+ var el = document.getElementById(this.elementId);
413
+
414
+ if (el) {
415
+ var html = "\n <div class=\"websy-carousel\">\n ";
416
+ this.options.frames.forEach(function (frame, frameIndex) {
417
+ html += "\n <div id=\"".concat(_this3.elementId, "_frame_").concat(frameIndex, "\" class=\"websy-frame-container animate\" style=\"transform: translateX(").concat(frameIndex === 0 ? '0' : '100%', ")\">\n ");
418
+ frame.images.forEach(function (image) {
419
+ html += "\n <div style=\"".concat(image.style || 'position: absolute; width: 100%; height: 100%; top: 0; left: 0;', " background-image: url('").concat(image.url, "')\" class=\"").concat(image.classes || '', " websy-carousel-image\">\n </div>\n ");
420
+ });
421
+ frame.text && frame.text.forEach(function (text) {
422
+ html += "\n <div style=\"".concat(text.style || 'position: absolute; width: 100%; height: 100%; top: 0; left: 0;', "\" class=\"").concat(text.classes || '', " websy-carousel-image\">\n ").concat(text.html, "\n </div>\n ");
423
+ });
424
+ html += "</div>";
425
+ });
426
+
427
+ if (this.options.showFrameSelector === true) {
428
+ html += "<div class=\"websy-btn-parent\">";
429
+ this.options.frames.forEach(function (frame, frameIndex) {
430
+ html += "\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" data-index=\"".concat(frameIndex, "\" id=\"").concat(_this3.elementId, "_selector_").concat(frameIndex, "\" \n class=\"websy-progress-btn ").concat(_this3.options.currentFrame === frameIndex ? 'websy-progress-btn-active' : '', "\">\n <title>Ellipse</title><circle cx=\"256\" cy=\"256\" r=\"192\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"32\"/>\n </svg>\n ");
431
+ });
432
+ html += "</div>";
433
+ }
434
+
435
+ if (this.options.showPrevNext === true) {
436
+ html += "\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"websy-prev-arrow\"\n viewBox=\"0 0 512 512\">\n <title>Caret Back</title>\n <path d=\"M321.94 98L158.82 237.78a24 24 0 000 36.44L321.94 414c15.57 13.34 39.62 2.28 39.62-18.22v-279.6c0-20.5-24.05-31.56-39.62-18.18z\"/>\n </svg>\n </div>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" class=\"websy-next-arrow\">\n <title>Caret Forward</title>\n <path d=\"M190.06 414l163.12-139.78a24 24 0 000-36.44L190.06 98c-15.57-13.34-39.62-2.28-39.62 18.22v279.6c0 20.5 24.05 31.56 39.62 18.18z\"/>\n </svg>\n ";
437
+ }
438
+
439
+ html += "\n </div>\n ";
440
+ el.innerHTML = html;
441
+ } // this.play()
442
+ // this.showFrameSelector()
443
+
444
+ }
445
+ }, {
446
+ key: "showFrame",
447
+ value: function showFrame(prevFrameIndex, currFrameIndex) {
448
+ var prevTranslateX = prevFrameIndex > currFrameIndex ? '100%' : '-100%';
449
+ var nextTranslateX = prevFrameIndex < currFrameIndex ? '100%' : '-100%';
450
+
451
+ if (currFrameIndex === 0 && prevFrameIndex === this.options.frames.length - 1) {
452
+ prevTranslateX = '-100%';
453
+ nextTranslateX = '100%';
454
+ } else if (prevFrameIndex === 0 && currFrameIndex === this.options.frames.length - 1) {
455
+ prevTranslateX = '100%';
456
+ nextTranslateX = '-100%';
457
+ }
458
+
459
+ var prevF = document.getElementById("".concat(this.elementId, "_frame_").concat(prevFrameIndex));
460
+ prevF.style.transform = "translateX(".concat(prevTranslateX, ")");
461
+ var btnInactive = document.getElementById("".concat(this.elementId, "_selector_").concat(prevFrameIndex));
462
+ btnInactive.classList.remove('websy-progress-btn-active');
463
+ var newF = document.getElementById("".concat(this.elementId, "_frame_").concat(currFrameIndex));
464
+ newF.classList.remove('animate');
465
+ newF.style.transform = "translateX(".concat(nextTranslateX, ")");
466
+ setTimeout(function () {
467
+ newF.classList.add('animate');
468
+ newF.style.transform = 'translateX(0%)';
469
+ }, 100);
470
+ var btnActive = document.getElementById("".concat(this.elementId, "_selector_").concat(currFrameIndex));
471
+ btnActive.classList.add('websy-progress-btn-active');
472
+ } // showFrameSelector () {
473
+ // }
474
+
475
+ }]);
476
+
477
+ return WebsyCarousel;
478
+ }();
289
479
 
290
480
  var WebsyDatePicker = /*#__PURE__*/function () {
291
481
  function WebsyDatePicker(elementId, options) {
@@ -773,9 +963,15 @@ var WebsyDatePicker = /*#__PURE__*/function () {
773
963
  value: function renderRanges() {
774
964
  var _this4 = this;
775
965
 
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
+ =======
776
971
  return this.options.ranges[this.options.mode].map(function (r, i) {
777
972
  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 ");
778
973
  }).join('') + "<li data-index='-1' class='websy-date-picker-range ".concat(this.selectedRange === -1 ? 'active' : '', "'>Custom</li>");
974
+ >>>>>>> master
779
975
  }
780
976
  }, {
781
977
  key: "scrollRangeIntoView",
@@ -1170,6 +1366,29 @@ var WebsyDropdown = /*#__PURE__*/function () {
1170
1366
  }, {
1171
1367
  key: "render",
1172
1368
  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
+ =======
1173
1392
  if (!this.elementId) {
1174
1393
  console.log('No element Id provided for Websy Dropdown');
1175
1394
  return;
@@ -1209,6 +1428,7 @@ var WebsyDropdown = /*#__PURE__*/function () {
1209
1428
  // </div>
1210
1429
  // `
1211
1430
  // el.innerHTML = html
1431
+ >>>>>>> master
1212
1432
 
1213
1433
 
1214
1434
  this.renderItems();
@@ -1216,10 +1436,17 @@ var WebsyDropdown = /*#__PURE__*/function () {
1216
1436
  }, {
1217
1437
  key: "renderItems",
1218
1438
  value: function renderItems() {
1439
+ <<<<<<< HEAD
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
+ =======
1219
1445
  var _this7 = this;
1220
1446
 
1221
1447
  var html = this.options.items.map(function (r, i) {
1222
1448
  return "\n <li data-index='".concat(i, "' class='websy-dropdown-item ").concat((r.classes || []).join(' '), " ").concat(_this7.selectedItems.indexOf(i) !== -1 ? 'active' : '', "'>").concat(r.label, "</li>\n ");
1449
+ >>>>>>> master
1223
1450
  }).join('');
1224
1451
  var el = document.getElementById("".concat(this.elementId, "_items"));
1225
1452
 
@@ -1238,7 +1465,11 @@ var WebsyDropdown = /*#__PURE__*/function () {
1238
1465
  }, {
1239
1466
  key: "updateHeader",
1240
1467
  value: function updateHeader(item) {
1468
+ <<<<<<< HEAD
1469
+ var _this7 = this;
1470
+ =======
1241
1471
  var _this8 = this;
1472
+ >>>>>>> master
1242
1473
 
1243
1474
  var el = document.getElementById(this.elementId);
1244
1475
  var headerEl = document.getElementById("".concat(this.elementId, "_header"));
@@ -1284,17 +1515,28 @@ var WebsyDropdown = /*#__PURE__*/function () {
1284
1515
  } else if (this.selectedItems.length > 1) {
1285
1516
  if (this.options.showCompleteSelectedList === true) {
1286
1517
  var selectedLabels = this.selectedItems.map(function (s) {
1518
+ <<<<<<< HEAD
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
+ =======
1287
1524
  return _this8.options.items[s].label || _this8.options.items[s].value;
1288
1525
  }).join(this.options.multiValueDelimiter);
1289
1526
  var selectedValues = this.selectedItems.map(function (s) {
1290
1527
  return _this8.options.items[s].value || _this8.options.items[s].label;
1528
+ >>>>>>> master
1291
1529
  }).join(this.options.multiValueDelimiter);
1292
1530
  labelEl.innerHTML = selectedLabels;
1293
1531
  labelEl.setAttribute('data-info', selectedLabels);
1294
1532
  inputEl.value = selectedValues;
1295
1533
  } else {
1296
1534
  var _selectedValues = this.selectedItems.map(function (s) {
1535
+ <<<<<<< HEAD
1536
+ return _this7.options.items[s].value || _this7.options.items[s].label;
1537
+ =======
1297
1538
  return _this8.options.items[s].value || _this8.options.items[s].label;
1539
+ >>>>>>> master
1298
1540
  }).join(this.options.multiValueDelimiter);
1299
1541
 
1300
1542
  labelEl.innerHTML = "".concat(this.selectedItems.length, " selected");
@@ -1423,6 +1665,15 @@ var WebsyForm = /*#__PURE__*/function () {
1423
1665
  }, {
1424
1666
  key: "checkRecaptcha",
1425
1667
  value: function checkRecaptcha() {
1668
+ <<<<<<< HEAD
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
+ =======
1426
1677
  var _this9 = this;
1427
1678
 
1428
1679
  return new Promise(function (resolve, reject) {
@@ -1430,6 +1681,7 @@ var WebsyForm = /*#__PURE__*/function () {
1430
1681
  if (_this9.recaptchaValue) {
1431
1682
  _this9.apiService.add('/google/checkrecaptcha', JSON.stringify({
1432
1683
  grecaptcharesponse: _this9.recaptchaValue
1684
+ >>>>>>> master
1433
1685
  })).then(function (response) {
1434
1686
  if (response.success && response.success === true) {
1435
1687
  resolve(true);
@@ -1487,14 +1739,22 @@ var WebsyForm = /*#__PURE__*/function () {
1487
1739
  }, {
1488
1740
  key: "processComponents",
1489
1741
  value: function processComponents(components, callbackFn) {
1742
+ <<<<<<< HEAD
1743
+ var _this9 = this;
1744
+ =======
1490
1745
  var _this10 = this;
1746
+ >>>>>>> master
1491
1747
 
1492
1748
  if (components.length === 0) {
1493
1749
  callbackFn();
1494
1750
  } else {
1495
1751
  components.forEach(function (c) {
1496
1752
  if (typeof WebsyDesigns[c.component] !== 'undefined') {
1753
+ <<<<<<< HEAD
1754
+ var comp = new WebsyDesigns[c.component]("".concat(_this9.elementId, "_input_").concat(c.field, "_component"), c.options);
1755
+ =======
1497
1756
  c.instance = new WebsyDesigns[c.component]("".concat(_this10.elementId, "_input_").concat(c.field, "_component"), c.options);
1757
+ >>>>>>> master
1498
1758
  } else {// some user feedback here
1499
1759
  }
1500
1760
  });
@@ -1515,7 +1775,11 @@ var WebsyForm = /*#__PURE__*/function () {
1515
1775
  }, {
1516
1776
  key: "render",
1517
1777
  value: function render(update, data) {
1778
+ <<<<<<< HEAD
1779
+ var _this10 = this;
1780
+ =======
1518
1781
  var _this11 = this;
1782
+ >>>>>>> master
1519
1783
 
1520
1784
  var el = document.getElementById(this.elementId);
1521
1785
  var componentsToProcess = [];
@@ -1525,11 +1789,19 @@ var WebsyForm = /*#__PURE__*/function () {
1525
1789
  this.options.fields.forEach(function (f, i) {
1526
1790
  if (f.component) {
1527
1791
  componentsToProcess.push(f);
1792
+ <<<<<<< HEAD
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
+ =======
1528
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 ");
1529
1800
  } else if (f.type === 'longtext') {
1530
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(_this11.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 ");
1531
1802
  } else {
1532
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(_this11.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 ");
1804
+ >>>>>>> master
1533
1805
  }
1534
1806
  });
1535
1807
  html += "\n --><button class=\"websy-btn submit ".concat(this.options.submit.classes || '', "\">").concat(this.options.submit.text || 'Save', "</button>").concat(this.options.cancel ? '<!--' : '', "\n ");
@@ -1546,8 +1818,13 @@ var WebsyForm = /*#__PURE__*/function () {
1546
1818
 
1547
1819
  el.innerHTML = html;
1548
1820
  this.processComponents(componentsToProcess, function () {
1821
+ <<<<<<< HEAD
1822
+ if (_this10.options.useRecaptcha === true && typeof grecaptcha !== 'undefined') {
1823
+ _this10.recaptchaReady();
1824
+ =======
1549
1825
  if (_this11.options.useRecaptcha === true && typeof grecaptcha !== 'undefined') {
1550
1826
  _this11.recaptchaReady();
1827
+ >>>>>>> master
1551
1828
  }
1552
1829
  });
1553
1830
  }
@@ -1555,7 +1832,11 @@ var WebsyForm = /*#__PURE__*/function () {
1555
1832
  }, {
1556
1833
  key: "submitForm",
1557
1834
  value: function submitForm() {
1835
+ <<<<<<< HEAD
1836
+ var _this11 = this;
1837
+ =======
1558
1838
  var _this12 = this;
1839
+ >>>>>>> master
1559
1840
 
1560
1841
  var formEl = document.getElementById("".concat(this.elementId, "Form"));
1561
1842
 
@@ -1569,13 +1850,30 @@ var WebsyForm = /*#__PURE__*/function () {
1569
1850
  data[key] = value;
1570
1851
  });
1571
1852
 
1853
+ <<<<<<< HEAD
1854
+ if (_this11.options.url) {
1855
+ _this11.apiService.add(_this11.options.url, data).then(function (result) {
1856
+ if (_this11.options.clearAfterSave === true) {
1857
+ =======
1572
1858
  if (_this12.options.url) {
1573
1859
  _this12.apiService.add(_this12.options.url, data).then(function (result) {
1574
1860
  if (_this12.options.clearAfterSave === true) {
1861
+ >>>>>>> master
1575
1862
  // this.render()
1576
1863
  formEl.reset();
1577
1864
  }
1578
1865
 
1866
+ <<<<<<< HEAD
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
+ =======
1579
1877
  _this12.options.onSuccess.call(_this12, result);
1580
1878
  }, function (err) {
1581
1879
  console.log('Error submitting form data:', err);
@@ -1585,6 +1883,7 @@ var WebsyForm = /*#__PURE__*/function () {
1585
1883
  } else if (_this12.options.submitFn) {
1586
1884
  _this12.options.submitFn(data, function () {
1587
1885
  if (_this12.options.clearAfterSave === true) {
1886
+ >>>>>>> master
1588
1887
  // this.render()
1589
1888
  formEl.reset();
1590
1889
  }
@@ -1604,17 +1903,28 @@ var WebsyForm = /*#__PURE__*/function () {
1604
1903
  }, {
1605
1904
  key: "data",
1606
1905
  set: function set(d) {
1906
+ <<<<<<< HEAD
1907
+ var _this12 = this;
1908
+ =======
1607
1909
  var _this13 = this;
1910
+ >>>>>>> master
1608
1911
 
1609
1912
  if (!this.options.fields) {
1610
1913
  this.options.fields = [];
1611
1914
  }
1612
1915
 
1613
1916
  var _loop = function _loop(key) {
1917
+ <<<<<<< HEAD
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
+ =======
1614
1923
  _this13.options.fields.forEach(function (f) {
1615
1924
  if (f.field === key) {
1616
1925
  f.value = d[key];
1617
1926
  var el = document.getElementById("".concat(_this13.elementId, "_input_").concat(f.field));
1927
+ >>>>>>> master
1618
1928
  el.value = f.value;
1619
1929
  }
1620
1930
  });
@@ -2066,19 +2376,37 @@ var WebsyPDFButton = /*#__PURE__*/function () {
2066
2376
  _createClass(WebsyPDFButton, [{
2067
2377
  key: "handleClick",
2068
2378
  value: function handleClick(event) {
2379
+ <<<<<<< HEAD
2380
+ var _this13 = this;
2381
+ =======
2069
2382
  var _this16 = this;
2383
+ >>>>>>> master
2070
2384
 
2071
2385
  if (event.target.classList.contains('websy-pdf-button')) {
2072
2386
  this.loader.show();
2073
2387
  setTimeout(function () {
2388
+ <<<<<<< HEAD
2389
+ if (_this13.options.targetId) {
2390
+ var el = document.getElementById(_this13.options.targetId);
2391
+ =======
2074
2392
  if (_this16.options.targetId) {
2075
2393
  var el = document.getElementById(_this16.options.targetId);
2394
+ >>>>>>> master
2076
2395
 
2077
2396
  if (el) {
2078
2397
  var pdfData = {
2079
2398
  options: {}
2080
2399
  };
2081
2400
 
2401
+ <<<<<<< HEAD
2402
+ if (_this13.options.pdfOptions) {
2403
+ pdfData.options = _extends({}, _this13.options.pdfOptions);
2404
+ }
2405
+
2406
+ if (_this13.options.header) {
2407
+ if (_this13.options.header.elementId) {
2408
+ var headerEl = document.getElementById(_this13.options.header.elementId);
2409
+ =======
2082
2410
  if (_this16.options.pdfOptions) {
2083
2411
  pdfData.options = _extends({}, _this16.options.pdfOptions);
2084
2412
  }
@@ -2086,10 +2414,31 @@ var WebsyPDFButton = /*#__PURE__*/function () {
2086
2414
  if (_this16.options.header) {
2087
2415
  if (_this16.options.header.elementId) {
2088
2416
  var headerEl = document.getElementById(_this16.options.header.elementId);
2417
+ >>>>>>> master
2089
2418
 
2090
2419
  if (headerEl) {
2091
2420
  pdfData.header = headerEl.outerHTML;
2092
2421
 
2422
+ <<<<<<< HEAD
2423
+ if (_this13.options.header.css) {
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
+ =======
2093
2442
  if (_this16.options.header.css) {
2094
2443
  pdfData.options.headerCSS = _this16.options.header.css;
2095
2444
  }
@@ -2108,16 +2457,26 @@ var WebsyPDFButton = /*#__PURE__*/function () {
2108
2457
  if (_this16.options.footer) {
2109
2458
  if (_this16.options.footer.elementId) {
2110
2459
  var footerEl = document.getElementById(_this16.options.footer.elementId);
2460
+ >>>>>>> master
2111
2461
 
2112
2462
  if (footerEl) {
2113
2463
  pdfData.footer = footerEl.outerHTML;
2114
2464
 
2465
+ <<<<<<< HEAD
2466
+ if (_this13.options.footer.css) {
2467
+ pdfData.options.footerCSS = _this13.options.footer.css;
2468
+ }
2469
+ }
2470
+ } else {
2471
+ pdfData.footer = _this13.options.footer;
2472
+ =======
2115
2473
  if (_this16.options.footer.css) {
2116
2474
  pdfData.options.footerCSS = _this16.options.footer.css;
2117
2475
  }
2118
2476
  }
2119
2477
  } else {
2120
2478
  pdfData.footer = _this16.options.footer;
2479
+ >>>>>>> master
2121
2480
  }
2122
2481
  }
2123
2482
 
@@ -2126,16 +2485,32 @@ var WebsyPDFButton = /*#__PURE__*/function () {
2126
2485
  // document.getElementById(`${this.elementId}_pdfFooter`).value = pdfData.footer
2127
2486
  // document.getElementById(`${this.elementId}_form`).submit()
2128
2487
 
2488
+ <<<<<<< HEAD
2489
+ _this13.service.add('', pdfData, {
2490
+ responseType: 'blob'
2491
+ }).then(function (response) {
2492
+ _this13.loader.hide();
2493
+ =======
2129
2494
  _this16.service.add('', pdfData, {
2130
2495
  responseType: 'blob'
2131
2496
  }).then(function (response) {
2132
2497
  _this16.loader.hide();
2498
+ >>>>>>> master
2133
2499
 
2134
2500
  var blob = new Blob([response], {
2135
2501
  type: 'application/pdf'
2136
2502
  });
2137
2503
  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 ");
2138
2504
 
2505
+ <<<<<<< HEAD
2506
+ if (_this13.options.directDownload === true) {
2507
+ msg += "download='".concat(_this13.options.fileName || 'Export', ".pdf'");
2508
+ }
2509
+
2510
+ msg += "\n >\n <button class='websy-btn download-pdf'>".concat(_this13.options.buttonText, "</button>\n </a>\n </div>\n ");
2511
+
2512
+ _this13.popup.show({
2513
+ =======
2139
2514
  if (_this16.options.directDownload === true) {
2140
2515
  msg += "download='".concat(_this16.options.fileName || 'Export', ".pdf'");
2141
2516
  }
@@ -2143,6 +2518,7 @@ var WebsyPDFButton = /*#__PURE__*/function () {
2143
2518
  msg += "\n >\n <button class='websy-btn download-pdf'>".concat(_this16.options.buttonText, "</button>\n </a>\n </div>\n ");
2144
2519
 
2145
2520
  _this16.popup.show({
2521
+ >>>>>>> master
2146
2522
  message: msg,
2147
2523
  mask: true
2148
2524
  });
@@ -2327,7 +2703,11 @@ var WebsyPubSub = /*#__PURE__*/function () {
2327
2703
 
2328
2704
  var WebsyResultList = /*#__PURE__*/function () {
2329
2705
  function WebsyResultList(elementId, options) {
2706
+ <<<<<<< HEAD
2707
+ var _this14 = this;
2708
+ =======
2330
2709
  var _this17 = this;
2710
+ >>>>>>> master
2331
2711
 
2332
2712
  _classCallCheck(this, WebsyResultList);
2333
2713
 
@@ -2355,9 +2735,15 @@ var WebsyResultList = /*#__PURE__*/function () {
2355
2735
 
2356
2736
  if (_typeof(options.template) === 'object' && options.template.url) {
2357
2737
  this.templateService.get(options.template.url).then(function (templateString) {
2738
+ <<<<<<< HEAD
2739
+ _this14.options.template = templateString;
2740
+
2741
+ _this14.render();
2742
+ =======
2358
2743
  _this17.options.template = templateString;
2359
2744
 
2360
2745
  _this17.render();
2746
+ >>>>>>> master
2361
2747
  });
2362
2748
  } else {
2363
2749
  this.render();
@@ -2376,7 +2762,11 @@ var WebsyResultList = /*#__PURE__*/function () {
2376
2762
  }, {
2377
2763
  key: "buildHTML",
2378
2764
  value: function buildHTML(d) {
2765
+ <<<<<<< HEAD
2766
+ var _this15 = this;
2767
+ =======
2379
2768
  var _this18 = this;
2769
+ >>>>>>> master
2380
2770
 
2381
2771
  var startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2382
2772
  var html = "";
@@ -2384,7 +2774,11 @@ var WebsyResultList = /*#__PURE__*/function () {
2384
2774
  if (this.options.template) {
2385
2775
  if (d.length > 0) {
2386
2776
  d.forEach(function (row, ix) {
2777
+ <<<<<<< HEAD
2778
+ var template = "".concat(ix > 0 ? '-->' : '').concat(_this15.options.template).concat(ix < d.length - 1 ? '<!--' : ''); // find conditional elements
2779
+ =======
2387
2780
  var template = "".concat(ix > 0 ? '-->' : '').concat(_this18.options.template).concat(ix < d.length - 1 ? '<!--' : ''); // find conditional elements
2781
+ >>>>>>> master
2388
2782
 
2389
2783
  var ifMatches = _toConsumableArray(template.matchAll(/<\s*if[^>]*>([\s\S]*?)<\s*\/\s*if>/g));
2390
2784
 
@@ -2504,7 +2898,11 @@ var WebsyResultList = /*#__PURE__*/function () {
2504
2898
  }, {
2505
2899
  key: "handleClick",
2506
2900
  value: function handleClick(event) {
2901
+ <<<<<<< HEAD
2902
+ var _this16 = this;
2903
+ =======
2507
2904
  var _this19 = this;
2905
+ >>>>>>> master
2508
2906
 
2509
2907
  if (event.target.classList.contains('clickable')) {
2510
2908
  var l = event.target.getAttribute('data-event');
@@ -2522,8 +2920,13 @@ var WebsyResultList = /*#__PURE__*/function () {
2522
2920
  l = l[0];
2523
2921
  params = params.map(function (p) {
2524
2922
  if (typeof p !== 'string' && typeof p !== 'number') {
2923
+ <<<<<<< HEAD
2924
+ if (_this16.rows[+id]) {
2925
+ p = _this16.rows[+id][p];
2926
+ =======
2525
2927
  if (_this19.rows[+id]) {
2526
2928
  p = _this19.rows[+id][p];
2929
+ >>>>>>> master
2527
2930
  }
2528
2931
  } else if (typeof p === 'string') {
2529
2932
  p = p.replace(/"/g, '').replace(/'/g, '');
@@ -2545,6 +2948,15 @@ var WebsyResultList = /*#__PURE__*/function () {
2545
2948
  }, {
2546
2949
  key: "render",
2547
2950
  value: function render() {
2951
+ <<<<<<< HEAD
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
+ =======
2548
2960
  var _this20 = this;
2549
2961
 
2550
2962
  if (this.options.entity) {
@@ -2552,6 +2964,7 @@ var WebsyResultList = /*#__PURE__*/function () {
2552
2964
  _this20.rows = results.rows;
2553
2965
 
2554
2966
  _this20.resize();
2967
+ >>>>>>> master
2555
2968
  });
2556
2969
  } else {
2557
2970
  this.resize();
@@ -2630,7 +3043,11 @@ var WebsyRouter = /*#__PURE__*/function () {
2630
3043
  _createClass(WebsyRouter, [{
2631
3044
  key: "addGroup",
2632
3045
  value: function addGroup(group) {
3046
+ <<<<<<< HEAD
3047
+ var _this18 = this;
3048
+ =======
2633
3049
  var _this21 = this;
3050
+ >>>>>>> master
2634
3051
 
2635
3052
  if (!this.groups[group]) {
2636
3053
  var els = document.querySelectorAll(".websy-view[data-group=\"".concat(group, "\"]"));
@@ -2638,7 +3055,11 @@ var WebsyRouter = /*#__PURE__*/function () {
2638
3055
  if (els) {
2639
3056
  console.log('els', els);
2640
3057
  this.getClosestParent(els[0], function (parent) {
3058
+ <<<<<<< HEAD
3059
+ _this18.groups[group] = {
3060
+ =======
2641
3061
  _this21.groups[group] = {
3062
+ >>>>>>> master
2642
3063
  activeView: '',
2643
3064
  views: [],
2644
3065
  parent: parent.getAttribute('data-view')
@@ -2959,12 +3380,20 @@ var WebsyRouter = /*#__PURE__*/function () {
2959
3380
  }, {
2960
3381
  key: "showComponents",
2961
3382
  value: function showComponents(view) {
3383
+ <<<<<<< HEAD
3384
+ var _this19 = this;
3385
+ =======
2962
3386
  var _this22 = this;
3387
+ >>>>>>> master
2963
3388
 
2964
3389
  if (this.options.views && this.options.views[view] && this.options.views[view].components) {
2965
3390
  this.options.views[view].components.forEach(function (c) {
2966
3391
  if (typeof c.instance === 'undefined') {
3392
+ <<<<<<< HEAD
3393
+ _this19.prepComponent(c.elementId, c.options);
3394
+ =======
2967
3395
  _this22.prepComponent(c.elementId, c.options);
3396
+ >>>>>>> master
2968
3397
 
2969
3398
  c.instance = new c.Component(c.elementId, c.options);
2970
3399
  } else if (c.instance.render) {
@@ -3331,7 +3760,11 @@ var Switch = /*#__PURE__*/function () {
3331
3760
 
3332
3761
  var WebsyTemplate = /*#__PURE__*/function () {
3333
3762
  function WebsyTemplate(elementId, options) {
3763
+ <<<<<<< HEAD
3764
+ var _this20 = this;
3765
+ =======
3334
3766
  var _this23 = this;
3767
+ >>>>>>> master
3335
3768
 
3336
3769
  _classCallCheck(this, WebsyTemplate);
3337
3770
 
@@ -3357,9 +3790,15 @@ var WebsyTemplate = /*#__PURE__*/function () {
3357
3790
 
3358
3791
  if (_typeof(options.template) === 'object' && options.template.url) {
3359
3792
  this.templateService.get(options.template.url).then(function (templateString) {
3793
+ <<<<<<< HEAD
3794
+ _this20.options.template = templateString;
3795
+
3796
+ _this20.render();
3797
+ =======
3360
3798
  _this23.options.template = templateString;
3361
3799
 
3362
3800
  _this23.render();
3801
+ >>>>>>> master
3363
3802
  });
3364
3803
  } else {
3365
3804
  this.render();
@@ -3369,7 +3808,11 @@ var WebsyTemplate = /*#__PURE__*/function () {
3369
3808
  _createClass(WebsyTemplate, [{
3370
3809
  key: "buildHTML",
3371
3810
  value: function buildHTML() {
3811
+ <<<<<<< HEAD
3812
+ var _this21 = this;
3813
+ =======
3372
3814
  var _this24 = this;
3815
+ >>>>>>> master
3373
3816
 
3374
3817
  var html = "";
3375
3818
 
@@ -3431,14 +3874,22 @@ var WebsyTemplate = /*#__PURE__*/function () {
3431
3874
  }
3432
3875
 
3433
3876
  if (polarity === true) {
3877
+ <<<<<<< HEAD
3878
+ if (typeof _this21.options.data[parts[0]] !== 'undefined' && _this21.options.data[parts[0]] === parts[1]) {
3879
+ =======
3434
3880
  if (typeof _this24.options.data[parts[0]] !== 'undefined' && _this24.options.data[parts[0]] === parts[1]) {
3881
+ >>>>>>> master
3435
3882
  // remove the <if> tags
3436
3883
  removeAll = false;
3437
3884
  } else if (parts[0] === parts[1]) {
3438
3885
  removeAll = false;
3439
3886
  }
3440
3887
  } else if (polarity === false) {
3888
+ <<<<<<< HEAD
3889
+ if (typeof _this21.options.data[parts[0]] !== 'undefined' && _this21.options.data[parts[0]] !== parts[1]) {
3890
+ =======
3441
3891
  if (typeof _this24.options.data[parts[0]] !== 'undefined' && _this24.options.data[parts[0]] !== parts[1]) {
3892
+ >>>>>>> master
3442
3893
  // remove the <if> tags
3443
3894
  removeAll = false;
3444
3895
  }
@@ -3706,7 +4157,11 @@ var WebsyUtils = {
3706
4157
 
3707
4158
  var WebsyTable = /*#__PURE__*/function () {
3708
4159
  function WebsyTable(elementId, options) {
4160
+ <<<<<<< HEAD
4161
+ var _this22 = this;
4162
+ =======
3709
4163
  var _this25 = this;
4164
+ >>>>>>> master
3710
4165
 
3711
4166
  _classCallCheck(this, WebsyTable);
3712
4167
 
@@ -3744,8 +4199,13 @@ var WebsyTable = /*#__PURE__*/function () {
3744
4199
  allowClear: false,
3745
4200
  disableSearch: true,
3746
4201
  onItemSelected: function onItemSelected(selectedItem) {
4202
+ <<<<<<< HEAD
4203
+ if (_this22.options.onChangePageSize) {
4204
+ _this22.options.onChangePageSize(selectedItem.value);
4205
+ =======
3747
4206
  if (_this25.options.onChangePageSize) {
3748
4207
  _this25.options.onChangePageSize(selectedItem.value);
4208
+ >>>>>>> master
3749
4209
  }
3750
4210
  }
3751
4211
  });
@@ -3766,7 +4226,11 @@ var WebsyTable = /*#__PURE__*/function () {
3766
4226
  _createClass(WebsyTable, [{
3767
4227
  key: "appendRows",
3768
4228
  value: function appendRows(data) {
4229
+ <<<<<<< HEAD
4230
+ var _this23 = this;
4231
+ =======
3769
4232
  var _this26 = this;
4233
+ >>>>>>> master
3770
4234
 
3771
4235
  this.hideError();
3772
4236
  var bodyHTML = '';
@@ -3774,15 +4238,24 @@ var WebsyTable = /*#__PURE__*/function () {
3774
4238
  if (data) {
3775
4239
  bodyHTML += data.map(function (r, rowIndex) {
3776
4240
  return '<tr>' + r.map(function (c, i) {
4241
+ <<<<<<< HEAD
4242
+ if (_this23.options.columns[i].show !== false) {
4243
+ =======
3777
4244
  if (_this26.options.columns[i].show !== false) {
4245
+ >>>>>>> master
3778
4246
  var style = '';
3779
4247
 
3780
4248
  if (c.style) {
3781
4249
  style += c.style;
3782
4250
  }
3783
4251
 
4252
+ <<<<<<< HEAD
4253
+ if (_this23.options.columns[i].width) {
4254
+ style += "width: ".concat(_this23.options.columns[i].width, "; ");
4255
+ =======
3784
4256
  if (_this26.options.columns[i].width) {
3785
4257
  style += "width: ".concat(_this26.options.columns[i].width, "; ");
4258
+ >>>>>>> master
3786
4259
  }
3787
4260
 
3788
4261
  if (c.backgroundColor) {
@@ -3797,6 +4270,20 @@ var WebsyTable = /*#__PURE__*/function () {
3797
4270
  style += "color: ".concat(c.color, "; ");
3798
4271
  }
3799
4272
 
4273
+ <<<<<<< HEAD
4274
+ if (_this23.options.columns[i].showAsLink === true && c.value.trim() !== '') {
4275
+ return "\n <td \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 >\n <a href='").concat(c.value, "' target='").concat(_this23.options.columns[i].openInNewTab === true ? '_blank' : '_self', "'>").concat(c.displayText || _this23.options.columns[i].linkText || c.value, "</a>\n </td>\n ");
4276
+ } else if ((_this23.options.columns[i].showAsNavigatorLink === true || _this23.options.columns[i].showAsRouterLink === true) && c.value.trim() !== '') {
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
+ =======
3800
4287
  if (_this26.options.columns[i].showAsLink === true && c.value.trim() !== '') {
3801
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 ");
3802
4289
  } else if ((_this26.options.columns[i].showAsNavigatorLink === true || _this26.options.columns[i].showAsRouterLink === true) && c.value.trim() !== '') {
@@ -3809,6 +4296,7 @@ var WebsyTable = /*#__PURE__*/function () {
3809
4296
  }
3810
4297
 
3811
4298
  return "\n <td \n data-info='".concat(info, "' \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 >").concat(c.value, "</td>\n ");
4299
+ >>>>>>> master
3812
4300
  }
3813
4301
  }
3814
4302
  }).join('') + '</tr>';
@@ -3967,7 +4455,11 @@ var WebsyTable = /*#__PURE__*/function () {
3967
4455
  }, {
3968
4456
  key: "render",
3969
4457
  value: function render(data) {
4458
+ <<<<<<< HEAD
4459
+ var _this24 = this;
4460
+ =======
3970
4461
  var _this27 = this;
4462
+ >>>>>>> master
3971
4463
 
3972
4464
  if (!this.options.columns) {
3973
4465
  return;
@@ -3992,7 +4484,11 @@ var WebsyTable = /*#__PURE__*/function () {
3992
4484
 
3993
4485
  var headHTML = '<tr>' + this.options.columns.map(function (c, i) {
3994
4486
  if (c.show !== false) {
4487
+ <<<<<<< HEAD
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
+ =======
3995
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
3996
4492
  }
3997
4493
  }).join('') + '</tr>';
3998
4494
  var headEl = document.getElementById("".concat(this.elementId, "_head"));
@@ -4011,7 +4507,11 @@ var WebsyTable = /*#__PURE__*/function () {
4011
4507
 
4012
4508
  if (pagingEl) {
4013
4509
  var pages = new Array(this.options.pageCount).fill('').map(function (item, index) {
4510
+ <<<<<<< HEAD
4511
+ return "<li data-page=\"".concat(index, "\" class=\"websy-page-num ").concat(_this24.options.pageNum === index ? 'active' : '', "\">").concat(index + 1, "</li>");
4512
+ =======
4014
4513
  return "<li data-page=\"".concat(index, "\" class=\"websy-page-num ").concat(_this27.options.pageNum === index ? 'active' : '', "\">").concat(index + 1, "</li>");
4514
+ >>>>>>> master
4015
4515
  });
4016
4516
  var startIndex = 0;
4017
4517
 
@@ -4625,7 +5125,11 @@ var WebsyTable2 = /*#__PURE__*/function () {
4625
5125
 
4626
5126
  var WebsyChart = /*#__PURE__*/function () {
4627
5127
  function WebsyChart(elementId, options) {
5128
+ <<<<<<< HEAD
5129
+ var _this25 = this;
5130
+ =======
4628
5131
  var _this32 = this;
5132
+ >>>>>>> master
4629
5133
 
4630
5134
  _classCallCheck(this, WebsyChart);
4631
5135
 
@@ -4673,6 +5177,19 @@ var WebsyChart = /*#__PURE__*/function () {
4673
5177
  this.invertOverride = function (input, input2) {
4674
5178
  var xAxis = 'bottomAxis';
4675
5179
 
5180
+ <<<<<<< HEAD
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
+ =======
4676
5193
  if (_this32.options.orientation === 'horizontal') {
4677
5194
  xAxis = 'leftAxis';
4678
5195
  }
@@ -4684,11 +5201,16 @@ var WebsyChart = /*#__PURE__*/function () {
4684
5201
  var domain = _toConsumableArray(_this32[xAxis].domain());
4685
5202
 
4686
5203
  if (_this32.options.orientation === 'horizontal') {
5204
+ >>>>>>> master
4687
5205
  domain = domain.reverse();
4688
5206
  }
4689
5207
 
4690
5208
  for (var j = 0; j < domain.length; j++) {
5209
+ <<<<<<< HEAD
5210
+ var breakA = _this25[xAxis](domain[j]) - width / 2;
5211
+ =======
4691
5212
  var breakA = _this32[xAxis](domain[j]) - width / 2;
5213
+ >>>>>>> master
4692
5214
  var breakB = breakA + width;
4693
5215
 
4694
5216
  if (input > breakA && input <= breakB) {
@@ -4788,10 +5310,17 @@ var WebsyChart = /*#__PURE__*/function () {
4788
5310
  }, {
4789
5311
  key: "handleEventMouseMove",
4790
5312
  value: function handleEventMouseMove(event, d) {
5313
+ <<<<<<< HEAD
5314
+ var _this26 = this;
5315
+
5316
+ var bisectDate = d3.bisector(function (d) {
5317
+ return _this26.parseX(d.x.value);
5318
+ =======
4791
5319
  var _this33 = this;
4792
5320
 
4793
5321
  var bisectDate = d3.bisector(function (d) {
4794
5322
  return _this33.parseX(d.x.value);
5323
+ >>>>>>> master
4795
5324
  }).left;
4796
5325
 
4797
5326
  if (this.options.showTrackingLine === true && d3.pointer(event)) {
@@ -4830,8 +5359,13 @@ var WebsyChart = /*#__PURE__*/function () {
4830
5359
  }
4831
5360
 
4832
5361
  this.options.data.series.forEach(function (s) {
5362
+ <<<<<<< HEAD
5363
+ if (_this26.options.data[xData].scale !== 'Time') {
5364
+ xPoint = _this26[xAxis](_this26.parseX(xLabel));
5365
+ =======
4833
5366
  if (_this33.options.data[xData].scale !== 'Time') {
4834
5367
  xPoint = _this33[xAxis](_this33.parseX(xLabel));
5368
+ >>>>>>> master
4835
5369
  s.data.forEach(function (d) {
4836
5370
  if (d.x.value === xLabel) {
4837
5371
  if (!d.y.color) {
@@ -4846,13 +5380,21 @@ var WebsyChart = /*#__PURE__*/function () {
4846
5380
  var pointA = s.data[index - 1];
4847
5381
  var pointB = s.data[index];
4848
5382
 
5383
+ <<<<<<< HEAD
5384
+ if (_this26.options.orientation === 'horizontal') {
5385
+ =======
4849
5386
  if (_this33.options.orientation === 'horizontal') {
5387
+ >>>>>>> master
4850
5388
  pointA = _toConsumableArray(s.data).reverse()[index - 1];
4851
5389
  pointB = _toConsumableArray(s.data).reverse()[index];
4852
5390
  }
4853
5391
 
4854
5392
  if (pointA && !pointB) {
5393
+ <<<<<<< HEAD
5394
+ xPoint = _this26[xAxis](_this26.parseX(pointA.x.value));
5395
+ =======
4855
5396
  xPoint = _this33[xAxis](_this33.parseX(pointA.x.value));
5397
+ >>>>>>> master
4856
5398
  tooltipTitle = pointA.x.value;
4857
5399
 
4858
5400
  if (!pointA.y.color) {
@@ -4862,12 +5404,20 @@ var WebsyChart = /*#__PURE__*/function () {
4862
5404
  tooltipData.push(pointA.y);
4863
5405
 
4864
5406
  if (typeof pointA.x.value.getTime !== 'undefined') {
5407
+ <<<<<<< HEAD
5408
+ tooltipTitle = d3.timeFormat(_this26.options.dateFormat || _this26.options.calculatedTimeFormatPattern)(pointA.x.value);
5409
+ =======
4865
5410
  tooltipTitle = d3.timeFormat(_this33.options.dateFormat || _this33.options.calculatedTimeFormatPattern)(pointA.x.value);
5411
+ >>>>>>> master
4866
5412
  }
4867
5413
  }
4868
5414
 
4869
5415
  if (pointB && !pointA) {
5416
+ <<<<<<< HEAD
5417
+ xPoint = _this26[xAxis](_this26.parseX(pointB.x.value));
5418
+ =======
4870
5419
  xPoint = _this33[xAxis](_this33.parseX(pointB.x.value));
5420
+ >>>>>>> master
4871
5421
  tooltipTitle = pointB.x.value;
4872
5422
 
4873
5423
  if (!pointB.y.color) {
@@ -4877,14 +5427,24 @@ var WebsyChart = /*#__PURE__*/function () {
4877
5427
  tooltipData.push(pointB.y);
4878
5428
 
4879
5429
  if (typeof pointB.x.value.getTime !== 'undefined') {
5430
+ <<<<<<< HEAD
5431
+ tooltipTitle = d3.timeFormat(_this26.options.dateFormat || _this26.options.calculatedTimeFormatPattern)(pointB.x.value);
5432
+ =======
4880
5433
  tooltipTitle = d3.timeFormat(_this33.options.dateFormat || _this33.options.calculatedTimeFormatPattern)(pointB.x.value);
5434
+ >>>>>>> master
4881
5435
  }
4882
5436
  }
4883
5437
 
4884
5438
  if (pointA && pointB) {
5439
+ <<<<<<< HEAD
5440
+ var d0 = _this26[xAxis](_this26.parseX(pointA.x.value));
5441
+
5442
+ var d1 = _this26[xAxis](_this26.parseX(pointB.x.value));
5443
+ =======
4885
5444
  var d0 = _this33[xAxis](_this33.parseX(pointA.x.value));
4886
5445
 
4887
5446
  var d1 = _this33[xAxis](_this33.parseX(pointB.x.value));
5447
+ >>>>>>> master
4888
5448
 
4889
5449
  var mid = Math.abs(d0 - d1) / 2;
4890
5450
 
@@ -4893,7 +5453,11 @@ var WebsyChart = /*#__PURE__*/function () {
4893
5453
  tooltipTitle = pointB.x.value;
4894
5454
 
4895
5455
  if (typeof pointB.x.value.getTime !== 'undefined') {
5456
+ <<<<<<< HEAD
5457
+ tooltipTitle = d3.timeFormat(_this26.options.dateFormat || _this26.options.calculatedTimeFormatPattern)(pointB.x.value);
5458
+ =======
4896
5459
  tooltipTitle = d3.timeFormat(_this33.options.dateFormat || _this33.options.calculatedTimeFormatPattern)(pointB.x.value);
5460
+ >>>>>>> master
4897
5461
  }
4898
5462
 
4899
5463
  if (!pointB.y.color) {
@@ -4906,7 +5470,11 @@ var WebsyChart = /*#__PURE__*/function () {
4906
5470
  tooltipTitle = pointA.x.value;
4907
5471
 
4908
5472
  if (typeof pointB.x.value.getTime !== 'undefined') {
5473
+ <<<<<<< HEAD
5474
+ tooltipTitle = d3.timeFormat(_this26.options.dateFormat || _this26.options.calculatedTimeFormatPattern)(pointB.x.value);
5475
+ =======
4909
5476
  tooltipTitle = d3.timeFormat(_this33.options.dateFormat || _this33.options.calculatedTimeFormatPattern)(pointB.x.value);
5477
+ >>>>>>> master
4910
5478
  }
4911
5479
 
4912
5480
  if (!pointA.y.color) {
@@ -5011,7 +5579,11 @@ var WebsyChart = /*#__PURE__*/function () {
5011
5579
  }, {
5012
5580
  key: "render",
5013
5581
  value: function render(options) {
5582
+ <<<<<<< HEAD
5583
+ var _this27 = this;
5584
+ =======
5014
5585
  var _this34 = this;
5586
+ >>>>>>> master
5015
5587
 
5016
5588
  /* global d3 options */
5017
5589
  if (typeof options !== 'undefined') {
@@ -5080,7 +5652,11 @@ var WebsyChart = /*#__PURE__*/function () {
5080
5652
  var legendData = this.options.data.series.map(function (s, i) {
5081
5653
  return {
5082
5654
  value: s.label || s.key,
5655
+ <<<<<<< HEAD
5656
+ color: s.color || _this27.options.colors[i % _this27.options.colors.length]
5657
+ =======
5083
5658
  color: s.color || _this34.options.colors[i % _this34.options.colors.length]
5659
+ >>>>>>> master
5084
5660
  };
5085
5661
  });
5086
5662
 
@@ -5319,7 +5895,11 @@ var WebsyChart = /*#__PURE__*/function () {
5319
5895
 
5320
5896
  if (this.options.data.bottom.formatter) {
5321
5897
  bAxisFunc.tickFormat(function (d) {
5898
+ <<<<<<< HEAD
5899
+ return _this27.options.data.bottom.formatter(d);
5900
+ =======
5322
5901
  return _this34.options.data.bottom.formatter(d);
5902
+ >>>>>>> master
5323
5903
  });
5324
5904
  }
5325
5905
 
@@ -5346,8 +5926,13 @@ var WebsyChart = /*#__PURE__*/function () {
5346
5926
 
5347
5927
  if (this.options.margin.axisLeft > 0) {
5348
5928
  this.leftAxisLayer.call(d3.axisLeft(this.leftAxis).ticks(this.options.data.left.ticks || 5).tickFormat(function (d) {
5929
+ <<<<<<< HEAD
5930
+ if (_this27.options.data.left.formatter) {
5931
+ d = _this27.options.data.left.formatter(d);
5932
+ =======
5349
5933
  if (_this34.options.data.left.formatter) {
5350
5934
  d = _this34.options.data.left.formatter(d);
5935
+ >>>>>>> master
5351
5936
  }
5352
5937
 
5353
5938
  return d;
@@ -5384,8 +5969,13 @@ var WebsyChart = /*#__PURE__*/function () {
5384
5969
 
5385
5970
  if (this.options.margin.axisRight > 0 && (this.options.data.right.min !== 0 || this.options.data.right.max !== 0)) {
5386
5971
  this.rightAxisLayer.call(d3.axisRight(this.rightAxis).ticks(this.options.data.left.ticks || 5).tickFormat(function (d) {
5972
+ <<<<<<< HEAD
5973
+ if (_this27.options.data.right.formatter) {
5974
+ d = _this27.options.data.right.formatter(d);
5975
+ =======
5387
5976
  if (_this34.options.data.right.formatter) {
5388
5977
  d = _this34.options.data.right.formatter(d);
5978
+ >>>>>>> master
5389
5979
  }
5390
5980
 
5391
5981
  return d;
@@ -5411,6 +6001,18 @@ var WebsyChart = /*#__PURE__*/function () {
5411
6001
 
5412
6002
  this.options.data.series.forEach(function (series, index) {
5413
6003
  if (!series.key) {
6004
+ <<<<<<< HEAD
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
+ =======
5414
6016
  series.key = _this34.createIdentity();
5415
6017
  }
5416
6018
 
@@ -5421,6 +6023,7 @@ var WebsyChart = /*#__PURE__*/function () {
5421
6023
  _this34["render".concat(series.type || 'bar')](series, index);
5422
6024
 
5423
6025
  _this34.renderLabels(series, index);
6026
+ >>>>>>> master
5424
6027
  });
5425
6028
  }
5426
6029
  }
@@ -5428,17 +6031,30 @@ var WebsyChart = /*#__PURE__*/function () {
5428
6031
  }, {
5429
6032
  key: "renderarea",
5430
6033
  value: function renderarea(series, index) {
6034
+ <<<<<<< HEAD
6035
+ var _this28 = this;
6036
+ =======
5431
6037
  var _this35 = this;
6038
+ >>>>>>> master
5432
6039
 
5433
6040
  /* global d3 series index */
5434
6041
  var drawArea = function drawArea(xAxis, yAxis, curveStyle) {
5435
6042
  return d3.area().x(function (d) {
6043
+ <<<<<<< HEAD
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
+ =======
5436
6051
  return _this35[xAxis](_this35.parseX(d.x.value));
5437
6052
  }).y0(function (d) {
5438
6053
  return _this35[yAxis](0);
5439
6054
  }).y1(function (d) {
5440
6055
  return _this35[yAxis](isNaN(d.y.value) ? 0 : d.y.value);
5441
6056
  }).curve(d3[curveStyle || _this35.options.curveStyle]);
6057
+ >>>>>>> master
5442
6058
  };
5443
6059
 
5444
6060
  var xAxis = 'bottomAxis';
@@ -5611,15 +6227,26 @@ var WebsyChart = /*#__PURE__*/function () {
5611
6227
  }, {
5612
6228
  key: "renderline",
5613
6229
  value: function renderline(series, index) {
6230
+ <<<<<<< HEAD
6231
+ var _this29 = this;
6232
+ =======
5614
6233
  var _this36 = this;
6234
+ >>>>>>> master
5615
6235
 
5616
6236
  /* global series index d3 */
5617
6237
  var drawLine = function drawLine(xAxis, yAxis, curveStyle) {
5618
6238
  return d3.line().x(function (d) {
6239
+ <<<<<<< HEAD
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
+ =======
5619
6245
  return _this36[xAxis](_this36.parseX(d.x.value));
5620
6246
  }).y(function (d) {
5621
6247
  return _this36[yAxis](isNaN(d.y.value) ? 0 : d.y.value);
5622
6248
  }).curve(d3[curveStyle || _this36.options.curveStyle]);
6249
+ >>>>>>> master
5623
6250
  };
5624
6251
 
5625
6252
  var xAxis = 'bottomAxis';
@@ -5657,14 +6284,22 @@ var WebsyChart = /*#__PURE__*/function () {
5657
6284
  }, {
5658
6285
  key: "rendersymbol",
5659
6286
  value: function rendersymbol(series, index) {
6287
+ <<<<<<< HEAD
6288
+ var _this30 = this;
6289
+ =======
5660
6290
  var _this37 = this;
6291
+ >>>>>>> master
5661
6292
 
5662
6293
  /* global d3 series index series.key */
5663
6294
  var drawSymbol = function drawSymbol(size) {
5664
6295
  return d3.symbol() // .type(d => {
5665
6296
  // return d3.symbols[0]
5666
6297
  // })
6298
+ <<<<<<< HEAD
6299
+ .size(size || _this30.options.symbolSize);
6300
+ =======
5667
6301
  .size(size || _this37.options.symbolSize);
6302
+ >>>>>>> master
5668
6303
  };
5669
6304
 
5670
6305
  var xAxis = 'bottomAxis';
@@ -5682,7 +6317,11 @@ var WebsyChart = /*#__PURE__*/function () {
5682
6317
  symbols.attr('d', function (d) {
5683
6318
  return drawSymbol(d.y.size || series.symbolSize)(d);
5684
6319
  }).transition(this.transition).attr('fill', 'white').attr('stroke', series.color).attr('transform', function (d) {
6320
+ <<<<<<< HEAD
6321
+ return "translate(".concat(_this30[xAxis](_this30.parseX(d.x.value)), ", ").concat(_this30[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
6322
+ =======
5685
6323
  return "translate(".concat(_this37[xAxis](_this37.parseX(d.x.value)), ", ").concat(_this37[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
6324
+ >>>>>>> master
5686
6325
  }); // Enter
5687
6326
 
5688
6327
  symbols.enter().append('path').attr('d', function (d) {
@@ -5691,7 +6330,11 @@ var WebsyChart = /*#__PURE__*/function () {
5691
6330
  .attr('fill', 'white').attr('stroke', series.color).attr('class', function (d) {
5692
6331
  return "symbol symbol_".concat(series.key);
5693
6332
  }).attr('transform', function (d) {
6333
+ <<<<<<< HEAD
6334
+ return "translate(".concat(_this30[xAxis](_this30.parseX(d.x.value)), ", ").concat(_this30[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
6335
+ =======
5694
6336
  return "translate(".concat(_this37[xAxis](_this37.parseX(d.x.value)), ", ").concat(_this37[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
6337
+ >>>>>>> master
5695
6338
  });
5696
6339
  }
5697
6340
  }, {
@@ -5846,7 +6489,11 @@ var WebsyLegend = /*#__PURE__*/function () {
5846
6489
  }, {
5847
6490
  key: "resize",
5848
6491
  value: function resize() {
6492
+ <<<<<<< HEAD
6493
+ var _this31 = this;
6494
+ =======
5849
6495
  var _this38 = this;
6496
+ >>>>>>> master
5850
6497
 
5851
6498
  var el = document.getElementById(this.elementId);
5852
6499
 
@@ -5859,7 +6506,11 @@ var WebsyLegend = /*#__PURE__*/function () {
5859
6506
  // }
5860
6507
  var html = "\n <div class='text-".concat(this.options.align, "'>\n ");
5861
6508
  html += this._data.map(function (d, i) {
6509
+ <<<<<<< HEAD
6510
+ return _this31.getLegendItemHTML(d);
6511
+ =======
5862
6512
  return _this38.getLegendItemHTML(d);
6513
+ >>>>>>> master
5863
6514
  }).join('');
5864
6515
  html += "\n <div>\n ";
5865
6516
  el.innerHTML = html;
@@ -6032,7 +6683,11 @@ var WebsyMap = /*#__PURE__*/function () {
6032
6683
  }, {
6033
6684
  key: "render",
6034
6685
  value: function render() {
6686
+ <<<<<<< HEAD
6687
+ var _this32 = this;
6688
+ =======
6035
6689
  var _this39 = this;
6690
+ >>>>>>> master
6036
6691
 
6037
6692
  var mapEl = document.getElementById("".concat(this.elementId, "_map"));
6038
6693
  var legendEl = document.getElementById("".concat(this.elementId, "_map"));
@@ -6041,7 +6696,11 @@ var WebsyMap = /*#__PURE__*/function () {
6041
6696
  var legendData = this.options.data.polygons.map(function (s, i) {
6042
6697
  return {
6043
6698
  value: s.label || s.key,
6699
+ <<<<<<< HEAD
6700
+ color: s.color || _this32.options.colors[i % _this32.options.colors.length]
6701
+ =======
6044
6702
  color: s.color || _this39.options.colors[i % _this39.options.colors.length]
6703
+ >>>>>>> master
6045
6704
  };
6046
6705
  });
6047
6706
  var longestValue = legendData.map(function (s) {
@@ -6105,7 +6764,11 @@ var WebsyMap = /*#__PURE__*/function () {
6105
6764
 
6106
6765
  if (this.polygons) {
6107
6766
  this.polygons.forEach(function (p) {
6767
+ <<<<<<< HEAD
6768
+ return _this32.map.removeLayer(p);
6769
+ =======
6108
6770
  return _this39.map.removeLayer(p);
6771
+ >>>>>>> master
6109
6772
  });
6110
6773
  }
6111
6774
 
@@ -6163,18 +6826,30 @@ var WebsyMap = /*#__PURE__*/function () {
6163
6826
  }
6164
6827
 
6165
6828
  if (!p.options.color) {
6829
+ <<<<<<< HEAD
6830
+ p.options.color = _this32.options.colors[i % _this32.options.colors.length];
6831
+ =======
6166
6832
  p.options.color = _this39.options.colors[i % _this39.options.colors.length];
6833
+ >>>>>>> master
6167
6834
  }
6168
6835
 
6169
6836
  var pol = L.polygon(p.data.map(function (c) {
6170
6837
  return c.map(function (d) {
6171
6838
  return [d.Latitude, d.Longitude];
6172
6839
  });
6840
+ <<<<<<< HEAD
6841
+ }), p.options).addTo(_this32.map);
6842
+
6843
+ _this32.polygons.push(pol);
6844
+
6845
+ _this32.map.fitBounds(pol.getBounds());
6846
+ =======
6173
6847
  }), p.options).addTo(_this39.map);
6174
6848
 
6175
6849
  _this39.polygons.push(pol);
6176
6850
 
6177
6851
  _this39.map.fitBounds(pol.getBounds());
6852
+ >>>>>>> master
6178
6853
  });
6179
6854
  } // if (this.data.markers.length > 0) {
6180
6855
  // el.classList.remove('hidden')