@websy/websy-designs 1.4.10 → 1.4.12

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.
@@ -538,13 +538,14 @@ var WebsyDatePicker = /*#__PURE__*/function () {
538
538
  } else if (event.target.classList.contains('websy-dp-cancel')) {
539
539
  this.close();
540
540
  } else if (event.target.classList.contains('clear-selection')) {
541
+ this.currentselection = [];
542
+ this.selectedRangeDates = [];
541
543
  this.selectRange(0, false);
542
544
 
543
545
  if (this.options.onClear) {
544
546
  this.options.onClear();
545
- }
547
+ } // this.updateRange(0)
546
548
 
547
- this.updateRange(0);
548
549
  }
549
550
  }
550
551
  }, {
@@ -1118,29 +1119,32 @@ var WebsyDatePicker = /*#__PURE__*/function () {
1118
1119
  }, {
1119
1120
  key: "selectRange",
1120
1121
  value: function selectRange(index) {
1121
- var _this6 = this;
1122
-
1123
1122
  var confirm = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1124
1123
 
1125
1124
  if (this.options.ranges[this.options.mode][index]) {
1126
1125
  this.selectedRangeDates = _toConsumableArray(this.options.ranges[this.options.mode][index].range);
1127
- this.currentselection = this.options.ranges[this.options.mode][index].range.map(function (d) {
1128
- if (_this6.options.mode === 'date' || _this6.options.mode === 'monthyear') {
1129
- return d.getTime();
1130
- } else {
1131
- return d;
1132
- }
1133
- });
1126
+ this.currentselection = []; // this.currentselection = this.options.ranges[this.options.mode][index].range.map(d => {
1127
+ // if (this.options.mode === 'date' || this.options.mode === 'monthyear') {
1128
+ // return d.getTime()
1129
+ // }
1130
+ // else {
1131
+ // return d
1132
+ // }
1133
+ // })
1134
+
1134
1135
  this.selectedRange = +index;
1135
1136
  this.highlightRange();
1136
1137
  this.updateRange();
1137
- this.close(confirm, true);
1138
+
1139
+ if (confirm === true) {
1140
+ this.close(confirm, true);
1141
+ }
1138
1142
  }
1139
1143
  }
1140
1144
  }, {
1141
1145
  key: "selectCustomRange",
1142
1146
  value: function selectCustomRange(rangeInput) {
1143
- var _this7 = this;
1147
+ var _this6 = this;
1144
1148
 
1145
1149
  this.selectedRange = -1;
1146
1150
  this.isContinuousRange = true; // if (rangeInput.length === 1) {
@@ -1156,13 +1160,13 @@ var WebsyDatePicker = /*#__PURE__*/function () {
1156
1160
  this.customRangeSelected = true;
1157
1161
  rangeInput.forEach(function (r, i) {
1158
1162
  if (i > 0) {
1159
- if (_this7.options.mode === 'date' || _this7.options.mode === 'monthyear') {
1160
- if (r.getTime() / _this7.oneDay - rangeInput[i - 1] / _this7.oneDay > 1) {
1161
- _this7.isContinuousRange = false;
1163
+ if (_this6.options.mode === 'date' || _this6.options.mode === 'monthyear') {
1164
+ if (r.getTime() / _this6.oneDay - rangeInput[i - 1] / _this6.oneDay > 1) {
1165
+ _this6.isContinuousRange = false;
1162
1166
  }
1163
- } else if (_this7.options.mode === 'hour' || _this7.options.mode === 'year') {
1167
+ } else if (_this6.options.mode === 'hour' || _this6.options.mode === 'year') {
1164
1168
  if (r - rangeInput[i - 1] > 1) {
1165
- _this7.isContinuousRange = false;
1169
+ _this6.isContinuousRange = false;
1166
1170
  }
1167
1171
  }
1168
1172
  }
@@ -1241,27 +1245,27 @@ var WebsyDatePicker = /*#__PURE__*/function () {
1241
1245
  }, {
1242
1246
  key: "updateRange",
1243
1247
  value: function updateRange() {
1244
- var _this8 = this;
1248
+ var _this7 = this;
1245
1249
 
1246
1250
  var range;
1247
1251
 
1248
1252
  if (this.selectedRange === -1) {
1249
1253
  var list = (this.currentselection.length > 0 ? this.currentselection : this.selectedRangeDates).map(function (d) {
1250
- if (_this8.options.mode === 'date') {
1254
+ if (_this7.options.mode === 'date') {
1251
1255
  if (!d.toLocaleDateString) {
1252
1256
  d = new Date(d);
1253
1257
  }
1254
1258
 
1255
1259
  return d.toLocaleDateString();
1256
- } else if (_this8.options.mode === 'year') {
1260
+ } else if (_this7.options.mode === 'year') {
1257
1261
  return d;
1258
- } else if (_this8.options.mode === 'monthyear') {
1262
+ } else if (_this7.options.mode === 'monthyear') {
1259
1263
  if (!d.getMonth) {
1260
1264
  d = new Date(d);
1261
1265
  }
1262
1266
 
1263
- return "".concat(_this8.options.monthMap[d.getMonth()], " ").concat(d.getFullYear());
1264
- } else if (_this8.options.mode === 'hour') {
1267
+ return "".concat(_this7.options.monthMap[d.getMonth()], " ").concat(d.getFullYear());
1268
+ } else if (_this7.options.mode === 'hour') {
1265
1269
  return d;
1266
1270
  }
1267
1271
  });
@@ -1622,7 +1626,7 @@ var WebsyDragDrop = /*#__PURE__*/function () {
1622
1626
  }, {
1623
1627
  key: "render",
1624
1628
  value: function render() {
1625
- var _this9 = this;
1629
+ var _this8 = this;
1626
1630
 
1627
1631
  var el = document.getElementById("".concat(this.elementId, "_container"));
1628
1632
 
@@ -1630,7 +1634,7 @@ var WebsyDragDrop = /*#__PURE__*/function () {
1630
1634
  this.measureItems();
1631
1635
  var html = "\n <div id='".concat(this.elementId, "start_item' class='websy-dragdrop-item ").concat(this.options.items.length === 0 ? 'empty' : '', "' data-id='").concat(this.elementId, "start'>\n <div id='").concat(this.elementId, "start_dropZone' class='websy-drop-zone droppable' data-index='start' data-side='start' data-id='").concat(this.elementId, "start' data-placeholder='").concat(this.options.dropPlaceholder, "'></div>\n </div>\n ");
1632
1636
  html += this.options.items.map(function (d, i) {
1633
- return _this9.createItemHtml(_this9.elementId, i, d);
1637
+ return _this8.createItemHtml(_this8.elementId, i, d);
1634
1638
  }).join('');
1635
1639
  el.innerHTML = html;
1636
1640
  this.options.items.forEach(function (item, i) {
@@ -1655,7 +1659,7 @@ var WebsyDragDrop = /*#__PURE__*/function () {
1655
1659
 
1656
1660
  var WebsyDropdown = /*#__PURE__*/function () {
1657
1661
  function WebsyDropdown(elementId, options) {
1658
- var _this10 = this;
1662
+ var _this9 = this;
1659
1663
 
1660
1664
  _classCallCheck(this, WebsyDropdown);
1661
1665
 
@@ -1704,10 +1708,10 @@ var WebsyDropdown = /*#__PURE__*/function () {
1704
1708
  el.addEventListener('mouseout', this.handleMouseOut.bind(this));
1705
1709
  el.addEventListener('mousemove', this.handleMouseMove.bind(this));
1706
1710
  var headerLabel = this.selectedItems.map(function (s) {
1707
- return _this10.options.items[s].label || _this10.options.items[s].value;
1711
+ return _this9.options.items[s].label || _this9.options.items[s].value;
1708
1712
  }).join(this.options.multiValueDelimiter);
1709
1713
  var headerValue = this.selectedItems.map(function (s) {
1710
- return _this10.options.items[s].value || _this10.options.items[s].label;
1714
+ return _this9.options.items[s].value || _this9.options.items[s].label;
1711
1715
  }).join(this.options.multiValueDelimiter);
1712
1716
  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, " ").concat(this.options.customActions.length > 0 ? 'with-actions' : '', "'>\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 ");
1713
1717
 
@@ -2001,10 +2005,10 @@ var WebsyDropdown = /*#__PURE__*/function () {
2001
2005
  }, {
2002
2006
  key: "renderItems",
2003
2007
  value: function renderItems() {
2004
- var _this11 = this;
2008
+ var _this10 = this;
2005
2009
 
2006
2010
  var html = this.options.items.map(function (r, i) {
2007
- return "\n <li data-index='".concat(r.index, "' class='websy-dropdown-item ").concat((r.classes || []).join(' '), " ").concat(_this11.selectedItems.indexOf(r.index) !== -1 ? 'active' : '', "'>").concat(r.label, "</li>\n ");
2011
+ return "\n <li data-index='".concat(r.index, "' class='websy-dropdown-item ").concat((r.classes || []).join(' '), " ").concat(_this10.selectedItems.indexOf(r.index) !== -1 ? 'active' : '', "'>").concat(r.label, "</li>\n ");
2008
2012
  }).join('');
2009
2013
  var el = document.getElementById("".concat(this.elementId, "_items"));
2010
2014
 
@@ -2240,16 +2244,16 @@ var WebsyForm = /*#__PURE__*/function () {
2240
2244
  }, {
2241
2245
  key: "checkRecaptcha",
2242
2246
  value: function checkRecaptcha() {
2243
- var _this12 = this;
2247
+ var _this11 = this;
2244
2248
 
2245
2249
  return new Promise(function (resolve, reject) {
2246
- if (_this12.options.useRecaptcha === true) {
2250
+ if (_this11.options.useRecaptcha === true) {
2247
2251
  // if (this.recaptchaValue) {
2248
2252
  grecaptcha.ready(function () {
2249
2253
  grecaptcha.execute(ENVIRONMENT.RECAPTCHA_KEY, {
2250
2254
  action: 'submit'
2251
2255
  }).then(function (token) {
2252
- _this12.apiService.add('google/checkrecaptcha', {
2256
+ _this11.apiService.add('google/checkrecaptcha', {
2253
2257
  grecaptcharesponse: token
2254
2258
  }).then(function (response) {
2255
2259
  if (response.success && response.success === true) {
@@ -2312,14 +2316,14 @@ var WebsyForm = /*#__PURE__*/function () {
2312
2316
  }, {
2313
2317
  key: "processComponents",
2314
2318
  value: function processComponents(components, callbackFn) {
2315
- var _this13 = this;
2319
+ var _this12 = this;
2316
2320
 
2317
2321
  if (components.length === 0) {
2318
2322
  callbackFn();
2319
2323
  } else {
2320
2324
  components.forEach(function (c) {
2321
2325
  if (typeof WebsyDesigns[c.component] !== 'undefined') {
2322
- c.instance = new WebsyDesigns[c.component]("".concat(_this13.elementId, "_input_").concat(c.field, "_component"), c.options);
2326
+ c.instance = new WebsyDesigns[c.component]("".concat(_this12.elementId, "_input_").concat(c.field, "_component"), c.options);
2323
2327
  } else {// some user feedback here
2324
2328
  }
2325
2329
  });
@@ -2340,7 +2344,7 @@ var WebsyForm = /*#__PURE__*/function () {
2340
2344
  }, {
2341
2345
  key: "render",
2342
2346
  value: function render(update, data) {
2343
- var _this14 = this;
2347
+ var _this13 = this;
2344
2348
 
2345
2349
  var el = document.getElementById(this.elementId);
2346
2350
  var componentsToProcess = [];
@@ -2350,11 +2354,11 @@ var WebsyForm = /*#__PURE__*/function () {
2350
2354
  this.options.fields.forEach(function (f, i) {
2351
2355
  if (f.component) {
2352
2356
  componentsToProcess.push(f);
2353
- 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(_this14.elementId, "_input_").concat(f.field, "_component' class='form-component'></div>\n </div><!--\n ");
2357
+ 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 ");
2354
2358
  } else if (f.type === 'longtext') {
2355
- 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(_this14.elementId, "_input_").concat(f.field, "\"\n ").concat(f.required === true ? 'required' : '', " \n placeholder=\"").concat(f.placeholder || '', "\"\n name=\"").concat(f.field, "\" \n ").concat((f.attributes || []).join(' '), "\n class=\"websy-input websy-textarea\"\n ></textarea>\n </div><!--\n ");
2359
+ 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 ").concat((f.attributes || []).join(' '), "\n class=\"websy-input websy-textarea\"\n ></textarea>\n </div><!--\n ");
2356
2360
  } else {
2357
- 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(_this14.elementId, "_input_").concat(f.field, "\"\n ").concat(f.required === true ? 'required' : '', " \n type=\"").concat(f.type || 'text', "\" \n class=\"websy-input\" \n ").concat((f.attributes || []).join(' '), "\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 ");
2361
+ 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 ").concat((f.attributes || []).join(' '), "\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 ");
2358
2362
  }
2359
2363
  });
2360
2364
  html += "\n --><button class=\"websy-btn submit ".concat(this.options.submit.classes || '', "\">").concat(this.options.submit.text || 'Save', "</button>").concat(this.options.cancel ? '<!--' : '', "\n ");
@@ -2371,7 +2375,7 @@ var WebsyForm = /*#__PURE__*/function () {
2371
2375
 
2372
2376
  el.innerHTML = html;
2373
2377
  this.processComponents(componentsToProcess, function () {
2374
- if (_this14.options.useRecaptcha === true && typeof grecaptcha !== 'undefined') {// this.recaptchaReady()
2378
+ if (_this13.options.useRecaptcha === true && typeof grecaptcha !== 'undefined') {// this.recaptchaReady()
2375
2379
  }
2376
2380
  });
2377
2381
  }
@@ -2379,7 +2383,7 @@ var WebsyForm = /*#__PURE__*/function () {
2379
2383
  }, {
2380
2384
  key: "submitForm",
2381
2385
  value: function submitForm() {
2382
- var _this15 = this;
2386
+ var _this14 = this;
2383
2387
 
2384
2388
  var formEl = document.getElementById("".concat(this.elementId, "Form"));
2385
2389
 
@@ -2393,32 +2397,32 @@ var WebsyForm = /*#__PURE__*/function () {
2393
2397
  data[key] = value;
2394
2398
  });
2395
2399
 
2396
- if (_this15.options.url) {
2397
- var _this15$apiService;
2400
+ if (_this14.options.url) {
2401
+ var _this14$apiService;
2398
2402
 
2399
- var params = [_this15.options.url];
2403
+ var params = [_this14.options.url];
2400
2404
 
2401
- if (_this15.options.mode === 'update') {
2402
- params.push(_this15.options.id);
2405
+ if (_this14.options.mode === 'update') {
2406
+ params.push(_this14.options.id);
2403
2407
  }
2404
2408
 
2405
2409
  params.push(data);
2406
2410
 
2407
- (_this15$apiService = _this15.apiService)[_this15.options.mode].apply(_this15$apiService, params).then(function (result) {
2408
- if (_this15.options.clearAfterSave === true) {
2411
+ (_this14$apiService = _this14.apiService)[_this14.options.mode].apply(_this14$apiService, params).then(function (result) {
2412
+ if (_this14.options.clearAfterSave === true) {
2409
2413
  // this.render()
2410
2414
  formEl.reset();
2411
2415
  }
2412
2416
 
2413
- _this15.options.onSuccess.call(_this15, result);
2417
+ _this14.options.onSuccess.call(_this14, result);
2414
2418
  }, function (err) {
2415
2419
  console.log('Error submitting form data:', err);
2416
2420
 
2417
- _this15.options.onError.call(_this15, err);
2421
+ _this14.options.onError.call(_this14, err);
2418
2422
  });
2419
- } else if (_this15.options.submitFn) {
2420
- _this15.options.submitFn(data, function () {
2421
- if (_this15.options.clearAfterSave === true) {
2423
+ } else if (_this14.options.submitFn) {
2424
+ _this14.options.submitFn(data, function () {
2425
+ if (_this14.options.clearAfterSave === true) {
2422
2426
  // this.render()
2423
2427
  formEl.reset();
2424
2428
  }
@@ -2438,17 +2442,17 @@ var WebsyForm = /*#__PURE__*/function () {
2438
2442
  }, {
2439
2443
  key: "data",
2440
2444
  set: function set(d) {
2441
- var _this16 = this;
2445
+ var _this15 = this;
2442
2446
 
2443
2447
  if (!this.options.fields) {
2444
2448
  this.options.fields = [];
2445
2449
  }
2446
2450
 
2447
2451
  var _loop = function _loop(key) {
2448
- _this16.options.fields.forEach(function (f) {
2452
+ _this15.options.fields.forEach(function (f) {
2449
2453
  if (f.field === key) {
2450
2454
  f.value = d[key];
2451
- var el = document.getElementById("".concat(_this16.elementId, "_input_").concat(f.field));
2455
+ var el = document.getElementById("".concat(_this15.elementId, "_input_").concat(f.field));
2452
2456
  el.value = f.value;
2453
2457
  }
2454
2458
  });
@@ -2649,11 +2653,11 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
2649
2653
  }, {
2650
2654
  key: "handleSearch",
2651
2655
  value: function handleSearch(searchText) {
2652
- var _this17 = this;
2656
+ var _this16 = this;
2653
2657
 
2654
2658
  var el = document.getElementById(this.elementId);
2655
2659
  var lowestItems = this.flatItems.filter(function (d) {
2656
- return d.level === _this17.maxLevel;
2660
+ return d.level === _this16.maxLevel;
2657
2661
  });
2658
2662
  var visibleItems = lowestItems;
2659
2663
  var defaultMethod = 'remove';
@@ -2661,7 +2665,7 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
2661
2665
  if (searchText.length > 1) {
2662
2666
  defaultMethod = 'add';
2663
2667
  visibleItems = lowestItems.filter(function (d) {
2664
- return d[_this17.options.searchProp].toLowerCase().indexOf(searchText.toLowerCase()) !== -1;
2668
+ return d[_this16.options.searchProp].toLowerCase().indexOf(searchText.toLowerCase()) !== -1;
2665
2669
  });
2666
2670
  } // hide everything
2667
2671
 
@@ -2845,7 +2849,7 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
2845
2849
 
2846
2850
  var Pager = /*#__PURE__*/function () {
2847
2851
  function Pager(elementId, options) {
2848
- var _this18 = this;
2852
+ var _this17 = this;
2849
2853
 
2850
2854
  _classCallCheck(this, Pager);
2851
2855
 
@@ -2898,8 +2902,8 @@ var Pager = /*#__PURE__*/function () {
2898
2902
  allowClear: false,
2899
2903
  disableSearch: true,
2900
2904
  onItemSelected: function onItemSelected(selectedItem) {
2901
- if (_this18.options.onChangePageSize) {
2902
- _this18.options.onChangePageSize(selectedItem.value);
2905
+ if (_this17.options.onChangePageSize) {
2906
+ _this17.options.onChangePageSize(selectedItem.value);
2903
2907
  }
2904
2908
  }
2905
2909
  });
@@ -2923,13 +2927,13 @@ var Pager = /*#__PURE__*/function () {
2923
2927
  }, {
2924
2928
  key: "render",
2925
2929
  value: function render() {
2926
- var _this19 = this;
2930
+ var _this18 = this;
2927
2931
 
2928
2932
  var el = document.getElementById("".concat(this.elementId, "_pageList"));
2929
2933
 
2930
2934
  if (el) {
2931
2935
  var pages = this.options.pages.map(function (item, index) {
2932
- return "<li data-index=\"".concat(index, "\" class=\"websy-page-num ").concat(_this19.options.activePage === index ? 'active' : '', "\">").concat(index + 1, "</li>");
2936
+ return "<li data-index=\"".concat(index, "\" class=\"websy-page-num ").concat(_this18.options.activePage === index ? 'active' : '', "\">").concat(index + 1, "</li>");
2933
2937
  });
2934
2938
  var startIndex = 0;
2935
2939
 
@@ -2997,58 +3001,58 @@ var WebsyPDFButton = /*#__PURE__*/function () {
2997
3001
  _createClass(WebsyPDFButton, [{
2998
3002
  key: "handleClick",
2999
3003
  value: function handleClick(event) {
3000
- var _this20 = this;
3004
+ var _this19 = this;
3001
3005
 
3002
3006
  if (event.target.classList.contains('websy-pdf-button')) {
3003
3007
  this.loader.show();
3004
3008
  setTimeout(function () {
3005
- if (_this20.options.targetId) {
3006
- var el = document.getElementById(_this20.options.targetId);
3009
+ if (_this19.options.targetId) {
3010
+ var el = document.getElementById(_this19.options.targetId);
3007
3011
 
3008
3012
  if (el) {
3009
3013
  var pdfData = {
3010
3014
  options: {}
3011
3015
  };
3012
3016
 
3013
- if (_this20.options.pdfOptions) {
3014
- pdfData.options = _extends({}, _this20.options.pdfOptions);
3017
+ if (_this19.options.pdfOptions) {
3018
+ pdfData.options = _extends({}, _this19.options.pdfOptions);
3015
3019
  }
3016
3020
 
3017
- if (_this20.options.header) {
3018
- if (_this20.options.header.elementId) {
3019
- var headerEl = document.getElementById(_this20.options.header.elementId);
3021
+ if (_this19.options.header) {
3022
+ if (_this19.options.header.elementId) {
3023
+ var headerEl = document.getElementById(_this19.options.header.elementId);
3020
3024
 
3021
3025
  if (headerEl) {
3022
3026
  pdfData.header = headerEl.outerHTML;
3023
3027
 
3024
- if (_this20.options.header.css) {
3025
- pdfData.options.headerCSS = _this20.options.header.css;
3028
+ if (_this19.options.header.css) {
3029
+ pdfData.options.headerCSS = _this19.options.header.css;
3026
3030
  }
3027
3031
  }
3028
- } else if (_this20.options.header.html) {
3029
- pdfData.header = _this20.options.header.html;
3032
+ } else if (_this19.options.header.html) {
3033
+ pdfData.header = _this19.options.header.html;
3030
3034
 
3031
- if (_this20.options.header.css) {
3032
- pdfData.options.headerCSS = _this20.options.header.css;
3035
+ if (_this19.options.header.css) {
3036
+ pdfData.options.headerCSS = _this19.options.header.css;
3033
3037
  }
3034
3038
  } else {
3035
- pdfData.header = _this20.options.header;
3039
+ pdfData.header = _this19.options.header;
3036
3040
  }
3037
3041
  }
3038
3042
 
3039
- if (_this20.options.footer) {
3040
- if (_this20.options.footer.elementId) {
3041
- var footerEl = document.getElementById(_this20.options.footer.elementId);
3043
+ if (_this19.options.footer) {
3044
+ if (_this19.options.footer.elementId) {
3045
+ var footerEl = document.getElementById(_this19.options.footer.elementId);
3042
3046
 
3043
3047
  if (footerEl) {
3044
3048
  pdfData.footer = footerEl.outerHTML;
3045
3049
 
3046
- if (_this20.options.footer.css) {
3047
- pdfData.options.footerCSS = _this20.options.footer.css;
3050
+ if (_this19.options.footer.css) {
3051
+ pdfData.options.footerCSS = _this19.options.footer.css;
3048
3052
  }
3049
3053
  }
3050
3054
  } else {
3051
- pdfData.footer = _this20.options.footer;
3055
+ pdfData.footer = _this19.options.footer;
3052
3056
  }
3053
3057
  }
3054
3058
 
@@ -3057,31 +3061,31 @@ var WebsyPDFButton = /*#__PURE__*/function () {
3057
3061
  // document.getElementById(`${this.elementId}_pdfFooter`).value = pdfData.footer
3058
3062
  // document.getElementById(`${this.elementId}_form`).submit()
3059
3063
 
3060
- _this20.service.add('', pdfData, {
3064
+ _this19.service.add('', pdfData, {
3061
3065
  responseType: 'blob'
3062
3066
  }).then(function (response) {
3063
- _this20.loader.hide();
3067
+ _this19.loader.hide();
3064
3068
 
3065
3069
  var blob = new Blob([response], {
3066
3070
  type: 'application/pdf'
3067
3071
  });
3068
3072
  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 ");
3069
3073
 
3070
- if (_this20.options.directDownload === true) {
3074
+ if (_this19.options.directDownload === true) {
3071
3075
  var fileName;
3072
3076
 
3073
- if (typeof _this20.options.fileName === 'function') {
3074
- fileName = _this20.options.fileName() || 'Export';
3077
+ if (typeof _this19.options.fileName === 'function') {
3078
+ fileName = _this19.options.fileName() || 'Export';
3075
3079
  } else {
3076
- fileName = _this20.options.fileName || 'Export';
3080
+ fileName = _this19.options.fileName || 'Export';
3077
3081
  }
3078
3082
 
3079
3083
  msg += "download='".concat(fileName, ".pdf'");
3080
3084
  }
3081
3085
 
3082
- msg += "\n >\n <button class='websy-btn download-pdf'>".concat(_this20.options.buttonText, "</button>\n </a>\n </div>\n ");
3086
+ msg += "\n >\n <button class='websy-btn download-pdf'>".concat(_this19.options.buttonText, "</button>\n </a>\n </div>\n ");
3083
3087
 
3084
- _this20.popup.show({
3088
+ _this19.popup.show({
3085
3089
  message: msg,
3086
3090
  mask: true
3087
3091
  });
@@ -3282,7 +3286,7 @@ var WebsyPubSub = /*#__PURE__*/function () {
3282
3286
 
3283
3287
  var ResponsiveText = /*#__PURE__*/function () {
3284
3288
  function ResponsiveText(elementId, options) {
3285
- var _this21 = this;
3289
+ var _this20 = this;
3286
3290
 
3287
3291
  _classCallCheck(this, ResponsiveText);
3288
3292
 
@@ -3295,7 +3299,7 @@ var ResponsiveText = /*#__PURE__*/function () {
3295
3299
  this.elementId = elementId;
3296
3300
  this.canvas = document.createElement('canvas');
3297
3301
  window.addEventListener('resize', function () {
3298
- return _this21.render();
3302
+ return _this20.render();
3299
3303
  });
3300
3304
  var el = document.getElementById(this.elementId);
3301
3305
 
@@ -3514,7 +3518,7 @@ var ResponsiveText = /*#__PURE__*/function () {
3514
3518
 
3515
3519
  var WebsyResultList = /*#__PURE__*/function () {
3516
3520
  function WebsyResultList(elementId, options) {
3517
- var _this22 = this;
3521
+ var _this21 = this;
3518
3522
 
3519
3523
  _classCallCheck(this, WebsyResultList);
3520
3524
 
@@ -3546,9 +3550,9 @@ var WebsyResultList = /*#__PURE__*/function () {
3546
3550
 
3547
3551
  if (_typeof(options.template) === 'object' && options.template.url) {
3548
3552
  this.templateService.get(options.template.url).then(function (templateString) {
3549
- _this22.options.template = templateString;
3553
+ _this21.options.template = templateString;
3550
3554
 
3551
- _this22.render();
3555
+ _this21.render();
3552
3556
  });
3553
3557
  } else {
3554
3558
  this.render();
@@ -3568,7 +3572,7 @@ var WebsyResultList = /*#__PURE__*/function () {
3568
3572
  }, {
3569
3573
  key: "buildHTML",
3570
3574
  value: function buildHTML(d) {
3571
- var _this23 = this;
3575
+ var _this22 = this;
3572
3576
 
3573
3577
  var startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
3574
3578
  var inputTemplate = arguments.length > 2 ? arguments[2] : undefined;
@@ -3578,7 +3582,7 @@ var WebsyResultList = /*#__PURE__*/function () {
3578
3582
  if (this.options.template) {
3579
3583
  if (d.length > 0) {
3580
3584
  d.forEach(function (row, ix) {
3581
- var template = "".concat(ix > 0 ? '-->' : '').concat(inputTemplate || _this23.options.template).concat(ix < d.length - 1 ? '<!--' : ''); // find conditional elements
3585
+ var template = "".concat(ix > 0 ? '-->' : '').concat(inputTemplate || _this22.options.template).concat(ix < d.length - 1 ? '<!--' : ''); // find conditional elements
3582
3586
 
3583
3587
  var ifMatches = _toConsumableArray(template.matchAll(/<\s*if[^>]*>([\s\S]*?)<\s*\/\s*if>/g));
3584
3588
 
@@ -3683,7 +3687,7 @@ var WebsyResultList = /*#__PURE__*/function () {
3683
3687
  parts.forEach(function (p) {
3684
3688
  items = items[p];
3685
3689
  });
3686
- template = template.replace(m[0], _this23.buildHTML(items, 0, withoutFor, [].concat(_toConsumableArray(locator), ["".concat(startIndex + ix, ":").concat(c)])));
3690
+ template = template.replace(m[0], _this22.buildHTML(items, 0, withoutFor, [].concat(_toConsumableArray(locator), ["".concat(startIndex + ix, ":").concat(c)])));
3687
3691
  }
3688
3692
  });
3689
3693
 
@@ -3695,7 +3699,7 @@ var WebsyResultList = /*#__PURE__*/function () {
3695
3699
  }
3696
3700
  });
3697
3701
 
3698
- var flatRow = _this23.flattenObject(row);
3702
+ var flatRow = _this22.flattenObject(row);
3699
3703
 
3700
3704
  for (var key in flatRow) {
3701
3705
  var rg = new RegExp("{".concat(key, "}"), 'gm');
@@ -3830,13 +3834,13 @@ var WebsyResultList = /*#__PURE__*/function () {
3830
3834
  }, {
3831
3835
  key: "render",
3832
3836
  value: function render() {
3833
- var _this24 = this;
3837
+ var _this23 = this;
3834
3838
 
3835
3839
  if (this.options.entity) {
3836
3840
  this.apiService.get(this.options.entity).then(function (results) {
3837
- _this24.rows = results.rows;
3841
+ _this23.rows = results.rows;
3838
3842
 
3839
- _this24.resize();
3843
+ _this23.resize();
3840
3844
  });
3841
3845
  } else {
3842
3846
  this.resize();
@@ -3922,14 +3926,14 @@ var WebsyRouter = /*#__PURE__*/function () {
3922
3926
  _createClass(WebsyRouter, [{
3923
3927
  key: "addGroup",
3924
3928
  value: function addGroup(group) {
3925
- var _this25 = this;
3929
+ var _this24 = this;
3926
3930
 
3927
3931
  if (!this.groups[group]) {
3928
3932
  var els = document.querySelectorAll(".websy-view[data-group=\"".concat(group, "\"]"));
3929
3933
 
3930
3934
  if (els) {
3931
3935
  this.getClosestParent(els[0], function (parent) {
3932
- _this25.groups[group] = {
3936
+ _this24.groups[group] = {
3933
3937
  activeView: '',
3934
3938
  views: [],
3935
3939
  parent: parent.getAttribute('data-view')
@@ -3992,7 +3996,7 @@ var WebsyRouter = /*#__PURE__*/function () {
3992
3996
  }, {
3993
3997
  key: "removeUrlParams",
3994
3998
  value: function removeUrlParams() {
3995
- var _this26 = this;
3999
+ var _this25 = this;
3996
4000
 
3997
4001
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
3998
4002
  var reloadView = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
@@ -4006,7 +4010,7 @@ var WebsyRouter = /*#__PURE__*/function () {
4006
4010
 
4007
4011
  if (this.currentParams && this.currentParams.items) {
4008
4012
  params.forEach(function (p) {
4009
- delete _this26.currentParams.items[p];
4013
+ delete _this25.currentParams.items[p];
4010
4014
  });
4011
4015
  path = this.buildUrlPath(this.currentParams.items);
4012
4016
  }
@@ -4370,12 +4374,12 @@ var WebsyRouter = /*#__PURE__*/function () {
4370
4374
  }, {
4371
4375
  key: "showComponents",
4372
4376
  value: function showComponents(view) {
4373
- var _this27 = this;
4377
+ var _this26 = this;
4374
4378
 
4375
4379
  if (this.options.views && this.options.views[view] && this.options.views[view].components) {
4376
4380
  this.options.views[view].components.forEach(function (c) {
4377
4381
  if (typeof c.instance === 'undefined') {
4378
- _this27.prepComponent(c.elementId, c.options);
4382
+ _this26.prepComponent(c.elementId, c.options);
4379
4383
 
4380
4384
  c.instance = new c.Component(c.elementId, c.options);
4381
4385
  } else if (c.instance.render) {
@@ -4752,7 +4756,7 @@ var Switch = /*#__PURE__*/function () {
4752
4756
 
4753
4757
  var WebsyTemplate = /*#__PURE__*/function () {
4754
4758
  function WebsyTemplate(elementId, options) {
4755
- var _this28 = this;
4759
+ var _this27 = this;
4756
4760
 
4757
4761
  _classCallCheck(this, WebsyTemplate);
4758
4762
 
@@ -4778,9 +4782,9 @@ var WebsyTemplate = /*#__PURE__*/function () {
4778
4782
 
4779
4783
  if (_typeof(options.template) === 'object' && options.template.url) {
4780
4784
  this.templateService.get(options.template.url).then(function (templateString) {
4781
- _this28.options.template = templateString;
4785
+ _this27.options.template = templateString;
4782
4786
 
4783
- _this28.render();
4787
+ _this27.render();
4784
4788
  });
4785
4789
  } else {
4786
4790
  this.render();
@@ -4790,7 +4794,7 @@ var WebsyTemplate = /*#__PURE__*/function () {
4790
4794
  _createClass(WebsyTemplate, [{
4791
4795
  key: "buildHTML",
4792
4796
  value: function buildHTML() {
4793
- var _this29 = this;
4797
+ var _this28 = this;
4794
4798
 
4795
4799
  var html = "";
4796
4800
 
@@ -4852,14 +4856,14 @@ var WebsyTemplate = /*#__PURE__*/function () {
4852
4856
  }
4853
4857
 
4854
4858
  if (polarity === true) {
4855
- if (typeof _this29.options.data[parts[0]] !== 'undefined' && _this29.options.data[parts[0]] === parts[1]) {
4859
+ if (typeof _this28.options.data[parts[0]] !== 'undefined' && _this28.options.data[parts[0]] === parts[1]) {
4856
4860
  // remove the <if> tags
4857
4861
  removeAll = false;
4858
4862
  } else if (parts[0] === parts[1]) {
4859
4863
  removeAll = false;
4860
4864
  }
4861
4865
  } else if (polarity === false) {
4862
- if (typeof _this29.options.data[parts[0]] !== 'undefined' && _this29.options.data[parts[0]] !== parts[1]) {
4866
+ if (typeof _this28.options.data[parts[0]] !== 'undefined' && _this28.options.data[parts[0]] !== parts[1]) {
4863
4867
  // remove the <if> tags
4864
4868
  removeAll = false;
4865
4869
  }
@@ -5149,7 +5153,7 @@ var WebsyUtils = {
5149
5153
 
5150
5154
  var WebsyTable = /*#__PURE__*/function () {
5151
5155
  function WebsyTable(elementId, options) {
5152
- var _this30 = this;
5156
+ var _this29 = this;
5153
5157
 
5154
5158
  _classCallCheck(this, WebsyTable);
5155
5159
 
@@ -5187,8 +5191,8 @@ var WebsyTable = /*#__PURE__*/function () {
5187
5191
  allowClear: false,
5188
5192
  disableSearch: true,
5189
5193
  onItemSelected: function onItemSelected(selectedItem) {
5190
- if (_this30.options.onChangePageSize) {
5191
- _this30.options.onChangePageSize(selectedItem.value);
5194
+ if (_this29.options.onChangePageSize) {
5195
+ _this29.options.onChangePageSize(selectedItem.value);
5192
5196
  }
5193
5197
  }
5194
5198
  });
@@ -5209,7 +5213,7 @@ var WebsyTable = /*#__PURE__*/function () {
5209
5213
  _createClass(WebsyTable, [{
5210
5214
  key: "appendRows",
5211
5215
  value: function appendRows(data) {
5212
- var _this31 = this;
5216
+ var _this30 = this;
5213
5217
 
5214
5218
  this.hideError();
5215
5219
  var bodyHTML = '';
@@ -5217,15 +5221,15 @@ var WebsyTable = /*#__PURE__*/function () {
5217
5221
  if (data) {
5218
5222
  bodyHTML += data.map(function (r, rowIndex) {
5219
5223
  return '<tr>' + r.map(function (c, i) {
5220
- if (_this31.options.columns[i].show !== false) {
5224
+ if (_this30.options.columns[i].show !== false) {
5221
5225
  var style = '';
5222
5226
 
5223
5227
  if (c.style) {
5224
5228
  style += c.style;
5225
5229
  }
5226
5230
 
5227
- if (_this31.options.columns[i].width) {
5228
- style += "width: ".concat(_this31.options.columns[i].width, "; ");
5231
+ if (_this30.options.columns[i].width) {
5232
+ style += "width: ".concat(_this30.options.columns[i].width, "; ");
5229
5233
  }
5230
5234
 
5231
5235
  if (c.backgroundColor) {
@@ -5240,18 +5244,18 @@ var WebsyTable = /*#__PURE__*/function () {
5240
5244
  style += "color: ".concat(c.color, "; ");
5241
5245
  }
5242
5246
 
5243
- if (_this31.options.columns[i].showAsLink === true && c.value.trim() !== '') {
5244
- 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 ");
5245
- } else if ((_this31.options.columns[i].showAsNavigatorLink === true || _this31.options.columns[i].showAsRouterLink === true) && c.value.trim() !== '') {
5246
- 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='websy-trigger 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 ");
5247
+ if (_this30.options.columns[i].showAsLink === true && c.value.trim() !== '') {
5248
+ return "\n <td \n data-row-index='".concat(_this30.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this30.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(_this30.options.columns[i].openInNewTab === true ? '_blank' : '_self', "'>").concat(c.displayText || _this30.options.columns[i].linkText || c.value, "</a>\n </td>\n ");
5249
+ } else if ((_this30.options.columns[i].showAsNavigatorLink === true || _this30.options.columns[i].showAsRouterLink === true) && c.value.trim() !== '') {
5250
+ return "\n <td \n data-view='".concat(c.value, "' \n data-row-index='").concat(_this30.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='websy-trigger trigger-item ").concat(_this30.options.columns[i].clickable === true ? 'clickable' : '', " ").concat(_this30.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >").concat(c.displayText || _this30.options.columns[i].linkText || c.value, "</td>\n ");
5247
5251
  } else {
5248
5252
  var info = c.value;
5249
5253
 
5250
- if (_this31.options.columns[i].showAsImage === true) {
5254
+ if (_this30.options.columns[i].showAsImage === true) {
5251
5255
  c.value = "\n <img src='".concat(c.value, "'>\n ");
5252
5256
  }
5253
5257
 
5254
- 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 ");
5258
+ return "\n <td \n data-info='".concat(info, "' \n data-row-index='").concat(_this30.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this30.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 ");
5255
5259
  }
5256
5260
  }
5257
5261
  }).join('') + '</tr>';
@@ -5423,7 +5427,7 @@ var WebsyTable = /*#__PURE__*/function () {
5423
5427
  }, {
5424
5428
  key: "render",
5425
5429
  value: function render(data) {
5426
- var _this32 = this;
5430
+ var _this31 = this;
5427
5431
 
5428
5432
  if (!this.options.columns) {
5429
5433
  return;
@@ -5458,7 +5462,7 @@ var WebsyTable = /*#__PURE__*/function () {
5458
5462
  style += "width: ".concat(c.width || 'auto', ";");
5459
5463
  }
5460
5464
 
5461
- return "\n <th style=\"".concat(style, "\">\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(c.qGroupFieldDefs[0]) : '', "-->\n </div>\n </th>\n ");
5465
+ return "\n <th style=\"".concat(style, "\">\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 ? _this31.buildSearchIcon(c.qGroupFieldDefs[0]) : '', "-->\n </div>\n </th>\n ");
5462
5466
  }
5463
5467
  }).join('') + '</tr>';
5464
5468
  var headEl = document.getElementById("".concat(this.elementId, "_head"));
@@ -5477,7 +5481,7 @@ var WebsyTable = /*#__PURE__*/function () {
5477
5481
 
5478
5482
  if (pagingEl) {
5479
5483
  var pages = new Array(this.options.pageCount).fill('').map(function (item, index) {
5480
- return "<li data-page=\"".concat(index, "\" class=\"websy-page-num ").concat(_this32.options.pageNum === index ? 'active' : '', "\">").concat(index + 1, "</li>");
5484
+ return "<li data-page=\"".concat(index, "\" class=\"websy-page-num ").concat(_this31.options.pageNum === index ? 'active' : '', "\">").concat(index + 1, "</li>");
5481
5485
  });
5482
5486
  var startIndex = 0;
5483
5487
 
@@ -5545,7 +5549,7 @@ var WebsyTable = /*#__PURE__*/function () {
5545
5549
 
5546
5550
  var WebsyTable2 = /*#__PURE__*/function () {
5547
5551
  function WebsyTable2(elementId, options) {
5548
- var _this33 = this;
5552
+ var _this32 = this;
5549
5553
 
5550
5554
  _classCallCheck(this, WebsyTable2);
5551
5555
 
@@ -5586,8 +5590,8 @@ var WebsyTable2 = /*#__PURE__*/function () {
5586
5590
  allowClear: false,
5587
5591
  disableSearch: true,
5588
5592
  onItemSelected: function onItemSelected(selectedItem) {
5589
- if (_this33.options.onChangePageSize) {
5590
- _this33.options.onChangePageSize(selectedItem.value);
5593
+ if (_this32.options.onChangePageSize) {
5594
+ _this32.options.onChangePageSize(selectedItem.value);
5591
5595
  }
5592
5596
  }
5593
5597
  });
@@ -5611,7 +5615,7 @@ var WebsyTable2 = /*#__PURE__*/function () {
5611
5615
  _createClass(WebsyTable2, [{
5612
5616
  key: "appendRows",
5613
5617
  value: function appendRows(data) {
5614
- var _this34 = this;
5618
+ var _this33 = this;
5615
5619
 
5616
5620
  this.hideError();
5617
5621
  var bodyEl = document.getElementById("".concat(this.elementId, "_body"));
@@ -5620,15 +5624,15 @@ var WebsyTable2 = /*#__PURE__*/function () {
5620
5624
  if (data) {
5621
5625
  bodyHTML += data.map(function (r, rowIndex) {
5622
5626
  return '<tr>' + r.map(function (c, i) {
5623
- if (_this34.options.columns[i].show !== false) {
5624
- var style = "height: ".concat(_this34.options.cellSize, "px; line-height: ").concat(_this34.options.cellSize, "px;");
5627
+ if (_this33.options.columns[i].show !== false) {
5628
+ var style = "height: ".concat(_this33.options.cellSize, "px; line-height: ").concat(_this33.options.cellSize, "px;");
5625
5629
 
5626
5630
  if (c.style) {
5627
5631
  style += c.style;
5628
5632
  }
5629
5633
 
5630
- if (_this34.options.columns[i].width) {
5631
- style += "width: ".concat(_this34.options.columns[i].width, "; ");
5634
+ if (_this33.options.columns[i].width) {
5635
+ style += "width: ".concat(_this33.options.columns[i].width, "; ");
5632
5636
  }
5633
5637
 
5634
5638
  if (c.backgroundColor) {
@@ -5643,18 +5647,18 @@ var WebsyTable2 = /*#__PURE__*/function () {
5643
5647
  style += "color: ".concat(c.color, "; ");
5644
5648
  }
5645
5649
 
5646
- if (_this34.options.columns[i].showAsLink === true && c.value.trim() !== '') {
5647
- return "\n <td \n data-row-index='".concat(_this34.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this34.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(_this34.options.columns[i].openInNewTab === true ? '_blank' : '_self', "'>").concat(c.displayText || _this34.options.columns[i].linkText || c.value, "</a>\n </td>\n ");
5648
- } else if ((_this34.options.columns[i].showAsNavigatorLink === true || _this34.options.columns[i].showAsRouterLink === true) && c.value.trim() !== '') {
5649
- return "\n <td \n data-view='".concat(c.value, "' \n data-row-index='").concat(_this34.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='websy-trigger trigger-item ").concat(_this34.options.columns[i].clickable === true ? 'clickable' : '', " ").concat(_this34.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >").concat(c.displayText || _this34.options.columns[i].linkText || c.value, "</td>\n ");
5650
+ if (_this33.options.columns[i].showAsLink === true && c.value.trim() !== '') {
5651
+ return "\n <td \n data-row-index='".concat(_this33.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this33.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(_this33.options.columns[i].openInNewTab === true ? '_blank' : '_self', "'>").concat(c.displayText || _this33.options.columns[i].linkText || c.value, "</a>\n </td>\n ");
5652
+ } else if ((_this33.options.columns[i].showAsNavigatorLink === true || _this33.options.columns[i].showAsRouterLink === true) && c.value.trim() !== '') {
5653
+ return "\n <td \n data-view='".concat(c.value, "' \n data-row-index='").concat(_this33.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='websy-trigger trigger-item ").concat(_this33.options.columns[i].clickable === true ? 'clickable' : '', " ").concat(_this33.options.columns[i].classes || '', "' \n style='").concat(style, "'\n colspan='").concat(c.colspan || 1, "'\n rowspan='").concat(c.rowspan || 1, "'\n >").concat(c.displayText || _this33.options.columns[i].linkText || c.value, "</td>\n ");
5650
5654
  } else {
5651
5655
  var info = c.value;
5652
5656
 
5653
- if (_this34.options.columns[i].showAsImage === true) {
5657
+ if (_this33.options.columns[i].showAsImage === true) {
5654
5658
  c.value = "\n <img src='".concat(c.value, "'>\n ");
5655
5659
  }
5656
5660
 
5657
- return "\n <td \n data-info='".concat(info, "' \n data-row-index='").concat(_this34.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this34.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 ");
5661
+ return "\n <td \n data-info='".concat(info, "' \n data-row-index='").concat(_this33.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this33.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 ");
5658
5662
  }
5659
5663
  }
5660
5664
  }).join('') + '</tr>';
@@ -5917,7 +5921,7 @@ var WebsyTable2 = /*#__PURE__*/function () {
5917
5921
  }, {
5918
5922
  key: "render",
5919
5923
  value: function render(data) {
5920
- var _this35 = this;
5924
+ var _this34 = this;
5921
5925
 
5922
5926
  if (!this.options.columns) {
5923
5927
  return;
@@ -5953,7 +5957,7 @@ var WebsyTable2 = /*#__PURE__*/function () {
5953
5957
  style += "width: ".concat(c.width || 'auto', "; ");
5954
5958
  }
5955
5959
 
5956
- return "\n <th style=\"".concat(style, "\">\n <div class =\"tableHeader\">\n <div class=\"leftSection\">\n <div\n class=\"tableHeaderField ").concat(['asc', 'desc'].indexOf(c.sort) !== -1 ? 'sortable-column' : '', "\"\n data-sort-index=\"").concat(c.sortIndex || i, "\"\n data-index=\"").concat(i, "\"\n data-sort=\"").concat(c.sort, "\"\n style=\"").concat(c.style || '', "\" \n >\n ").concat(c.name, "\n </div>\n </div>\n <div class=\"").concat(c.activeSort ? c.sort + ' sortOrder' : '', "\"></div>\n ").concat(c.searchable === true ? _this35.buildSearchIcon(i) : '', "\n </div>\n </th>\n ");
5960
+ return "\n <th style=\"".concat(style, "\">\n <div class =\"tableHeader\">\n <div class=\"leftSection\">\n <div\n class=\"tableHeaderField ").concat(['asc', 'desc'].indexOf(c.sort) !== -1 ? 'sortable-column' : '', "\"\n data-sort-index=\"").concat(c.sortIndex || i, "\"\n data-index=\"").concat(i, "\"\n data-sort=\"").concat(c.sort, "\"\n style=\"").concat(c.style || '', "\" \n >\n ").concat(c.name, "\n </div>\n </div>\n <div class=\"").concat(c.activeSort ? c.sort + ' sortOrder' : '', "\"></div>\n ").concat(c.searchable === true ? _this34.buildSearchIcon(i) : '', "\n </div>\n </th>\n ");
5957
5961
  }
5958
5962
  }).join('') + '</tr>';
5959
5963
  var headEl = document.getElementById("".concat(this.elementId, "_head"));
@@ -5964,7 +5968,7 @@ var WebsyTable2 = /*#__PURE__*/function () {
5964
5968
  var dropdownHTML = "";
5965
5969
  this.options.columns.forEach(function (c, i) {
5966
5970
  if (c.searchable && c.searchField) {
5967
- dropdownHTML += "\n <div id=\"".concat(_this35.elementId, "_columnSearch_").concat(i, "\" class=\"websy-modal-dropdown\"></div>\n ");
5971
+ dropdownHTML += "\n <div id=\"".concat(_this34.elementId, "_columnSearch_").concat(i, "\" class=\"websy-modal-dropdown\"></div>\n ");
5968
5972
  }
5969
5973
  });
5970
5974
  dropdownEl.innerHTML = dropdownHTML;
@@ -5986,7 +5990,7 @@ var WebsyTable2 = /*#__PURE__*/function () {
5986
5990
 
5987
5991
  if (pagingEl) {
5988
5992
  var pages = new Array(this.options.pageCount).fill('').map(function (item, index) {
5989
- return "<li data-page=\"".concat(index, "\" class=\"websy-page-num ").concat(_this35.options.pageNum === index ? 'active' : '', "\">").concat(index + 1, "</li>");
5993
+ return "<li data-page=\"".concat(index, "\" class=\"websy-page-num ").concat(_this34.options.pageNum === index ? 'active' : '', "\">").concat(index + 1, "</li>");
5990
5994
  });
5991
5995
  var startIndex = 0;
5992
5996
 
@@ -6077,7 +6081,7 @@ var WebsyTable2 = /*#__PURE__*/function () {
6077
6081
  }, {
6078
6082
  key: "getColumnParameters",
6079
6083
  value: function getColumnParameters(values) {
6080
- var _this36 = this;
6084
+ var _this35 = this;
6081
6085
 
6082
6086
  var tableEl = document.getElementById("".concat(this.elementId, "_table"));
6083
6087
  tableEl.style.tableLayout = 'auto';
@@ -6085,10 +6089,10 @@ var WebsyTable2 = /*#__PURE__*/function () {
6085
6089
  var headEl = document.getElementById("".concat(this.elementId, "_head"));
6086
6090
  var bodyEl = document.getElementById("".concat(this.elementId, "_body"));
6087
6091
  headEl.innerHTML = '<tr style="visibility: hidden;">' + values.map(function (c, i) {
6088
- return "\n <th>\n <div class =\"tableHeader\">\n <div class=\"leftSection\">\n <div\n class=\"tableHeaderField\" \n >\n ".concat(c.value || 'nbsp;', "\n </div>\n </div> \n ").concat(c.searchable === true ? _this36.buildSearchIcon(i) : '', "\n </div>\n </th>\n ");
6092
+ return "\n <th>\n <div class =\"tableHeader\">\n <div class=\"leftSection\">\n <div\n class=\"tableHeaderField\" \n >\n ".concat(c.value || 'nbsp;', "\n </div>\n </div> \n ").concat(c.searchable === true ? _this35.buildSearchIcon(i) : '', "\n </div>\n </th>\n ");
6089
6093
  }).join('') + '</tr>';
6090
6094
  bodyEl.innerHTML = '<tr style="visibility: hidden;">' + values.map(function (c) {
6091
- return "\n <td \n style='height: ".concat(_this36.options.cellSize, "px; line-height: ").concat(_this36.options.cellSize, "px; padding: 10px 5px;'\n >").concat(c.value || '&nbsp;', "</td>\n ");
6095
+ return "\n <td \n style='height: ".concat(_this35.options.cellSize, "px; line-height: ").concat(_this35.options.cellSize, "px; padding: 10px 5px;'\n >").concat(c.value || '&nbsp;', "</td>\n ");
6092
6096
  }).join('') + '</tr>'; // get height of the first data cell
6093
6097
 
6094
6098
  var cells = bodyEl.querySelectorAll("tr:first-of-type td");
@@ -6216,7 +6220,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
6216
6220
  }, {
6217
6221
  key: "buildBodyHtml",
6218
6222
  value: function buildBodyHtml() {
6219
- var _this37 = this;
6223
+ var _this36 = this;
6220
6224
 
6221
6225
  var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
6222
6226
  var useWidths = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
@@ -6285,11 +6289,11 @@ var WebsyTable3 = /*#__PURE__*/function () {
6285
6289
  bodyHtml += "\n ><div style='".concat(divStyle, "'>");
6286
6290
 
6287
6291
  if (cell.expandable === true) {
6288
- bodyHtml += "<i \n data-row-index='".concat(rowIndex, "'\n data-col-index='").concat(cell.level || cellIndex, "'\n class='websy-table-cell-expand'\n >").concat(_this37.options.plusIcon, "</i>");
6292
+ bodyHtml += "<i \n data-row-index='".concat(rowIndex, "'\n data-col-index='").concat(cell.level || cellIndex, "'\n class='websy-table-cell-expand'\n >").concat(_this36.options.plusIcon, "</i>");
6289
6293
  }
6290
6294
 
6291
6295
  if (cell.collapsable === true) {
6292
- bodyHtml += "<i \n data-row-index='".concat(rowIndex, "'\n data-col-index='").concat(cell.level || cellIndex, "'\n class='websy-table-cell-collapse'\n >").concat(_this37.options.minusIcon, "</i>");
6296
+ bodyHtml += "<i \n data-row-index='".concat(rowIndex, "'\n data-col-index='").concat(cell.level || cellIndex, "'\n class='websy-table-cell-collapse'\n >").concat(_this36.options.minusIcon, "</i>");
6293
6297
  }
6294
6298
 
6295
6299
  if (sizingColumns[sizeIndex].showAsLink === true && cell.value.trim() !== '') {
@@ -6314,7 +6318,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
6314
6318
  }, {
6315
6319
  key: "buildHeaderHtml",
6316
6320
  value: function buildHeaderHtml() {
6317
- var _this38 = this;
6321
+ var _this37 = this;
6318
6322
 
6319
6323
  var useWidths = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
6320
6324
  var headerHtml = '';
@@ -6329,7 +6333,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
6329
6333
  }
6330
6334
 
6331
6335
  this.options.columns.forEach(function (row, rowIndex) {
6332
- if (useWidths === false && rowIndex !== _this38.options.columns.length - 1) {
6336
+ if (useWidths === false && rowIndex !== _this37.options.columns.length - 1) {
6333
6337
  // if we're calculating the size we only want to render the last row of column headers
6334
6338
  return;
6335
6339
  }
@@ -6355,18 +6359,18 @@ var WebsyTable3 = /*#__PURE__*/function () {
6355
6359
  // `
6356
6360
  // }
6357
6361
 
6358
- headerHtml += "><div style='".concat(divStyle, "'>").concat(col.name).concat(col.searchable === true ? _this38.buildSearchIcon(col, colIndex) : '', "</div></td>");
6362
+ headerHtml += "><div style='".concat(divStyle, "'>").concat(col.name).concat(col.searchable === true ? _this37.buildSearchIcon(col, colIndex) : '', "</div></td>");
6359
6363
  });
6360
6364
  headerHtml += "</tr>";
6361
6365
  });
6362
6366
  var dropdownEl = document.getElementById("".concat(this.elementId, "_dropdownContainer"));
6363
6367
  this.options.columns[this.options.columns.length - 1].forEach(function (c, i) {
6364
6368
  if (c.searchable && c.isExternalSearch === true) {
6365
- var testEl = document.getElementById("".concat(_this38.elementId, "_columnSearch_").concat(c.dimId || i));
6369
+ var testEl = document.getElementById("".concat(_this37.elementId, "_columnSearch_").concat(c.dimId || i));
6366
6370
 
6367
6371
  if (!testEl) {
6368
6372
  var newE = document.createElement('div');
6369
- newE.id = "".concat(_this38.elementId, "_columnSearch_").concat(c.dimId || i);
6373
+ newE.id = "".concat(_this37.elementId, "_columnSearch_").concat(c.dimId || i);
6370
6374
  newE.className = 'websy-modal-dropdown';
6371
6375
  dropdownEl.appendChild(newE);
6372
6376
  }
@@ -6382,7 +6386,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
6382
6386
  }, {
6383
6387
  key: "buildTotalHtml",
6384
6388
  value: function buildTotalHtml() {
6385
- var _this39 = this;
6389
+ var _this38 = this;
6386
6390
 
6387
6391
  var useWidths = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
6388
6392
 
@@ -6395,7 +6399,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
6395
6399
  totalHtml += "<td \n class='websy-table-cell'\n colspan='".concat(col.colspan || 1, "'\n rowspan='").concat(col.rowspan || 1, "'\n ");
6396
6400
 
6397
6401
  if (useWidths === true) {
6398
- totalHtml += "\n style='width: ".concat(_this39.options.columns[_this39.options.columns.length - 1][colIndex].width || _this39.options.columns[_this39.options.columns.length - 1][colIndex].actualWidth, "px'\n width='").concat(col.width || col.actualWidth, "'\n ");
6402
+ totalHtml += "\n style='width: ".concat(_this38.options.columns[_this38.options.columns.length - 1][colIndex].width || _this38.options.columns[_this38.options.columns.length - 1][colIndex].actualWidth, "px'\n width='").concat(col.width || col.actualWidth, "'\n ");
6399
6403
  }
6400
6404
 
6401
6405
  totalHtml += " \n >\n ".concat(col.value, "\n </td>");
@@ -6406,7 +6410,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
6406
6410
  }, {
6407
6411
  key: "calculateSizes",
6408
6412
  value: function calculateSizes() {
6409
- var _this40 = this;
6413
+ var _this39 = this;
6410
6414
 
6411
6415
  var sample = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
6412
6416
  var totalRowCount = arguments.length > 1 ? arguments[1] : undefined;
@@ -6449,32 +6453,32 @@ var WebsyTable3 = /*#__PURE__*/function () {
6449
6453
  rows.forEach(function (row, rowIndex) {
6450
6454
  Array.from(row.children).forEach(function (col, colIndex) {
6451
6455
  var colSize = col.getBoundingClientRect();
6452
- _this40.sizes.cellHeight = colSize.height;
6456
+ _this39.sizes.cellHeight = colSize.height;
6453
6457
 
6454
- if (_this40.options.columns[_this40.options.columns.length - 1][colIndex]) {
6455
- if (!_this40.options.columns[_this40.options.columns.length - 1][colIndex].actualWidth) {
6456
- _this40.options.columns[_this40.options.columns.length - 1][colIndex].actualWidth = 0;
6458
+ if (_this39.options.columns[_this39.options.columns.length - 1][colIndex]) {
6459
+ if (!_this39.options.columns[_this39.options.columns.length - 1][colIndex].actualWidth) {
6460
+ _this39.options.columns[_this39.options.columns.length - 1][colIndex].actualWidth = 0;
6457
6461
  }
6458
6462
 
6459
- _this40.options.columns[_this40.options.columns.length - 1][colIndex].actualWidth = Math.min(Math.max(_this40.options.columns[_this40.options.columns.length - 1][colIndex].actualWidth, colSize.width), maxWidth);
6460
- _this40.options.columns[_this40.options.columns.length - 1][colIndex].cellHeight = colSize.height;
6463
+ _this39.options.columns[_this39.options.columns.length - 1][colIndex].actualWidth = Math.min(Math.max(_this39.options.columns[_this39.options.columns.length - 1][colIndex].actualWidth, colSize.width), maxWidth);
6464
+ _this39.options.columns[_this39.options.columns.length - 1][colIndex].cellHeight = colSize.height;
6461
6465
 
6462
- if (colIndex >= _this40.pinnedColumns) {
6463
- firstNonPinnedColumnWidth = _this40.options.columns[_this40.options.columns.length - 1][colIndex].actualWidth;
6466
+ if (colIndex >= _this39.pinnedColumns) {
6467
+ firstNonPinnedColumnWidth = _this39.options.columns[_this39.options.columns.length - 1][colIndex].actualWidth;
6464
6468
  }
6465
6469
  }
6466
6470
  });
6467
6471
  });
6468
6472
  this.options.columns[this.options.columns.length - 1].forEach(function (col, colIndex) {
6469
- if (colIndex < _this40.pinnedColumns) {
6470
- _this40.sizes.scrollableWidth -= col.actualWidth;
6473
+ if (colIndex < _this39.pinnedColumns) {
6474
+ _this39.sizes.scrollableWidth -= col.actualWidth;
6471
6475
  }
6472
6476
  });
6473
6477
  this.sizes.totalWidth = this.options.columns[this.options.columns.length - 1].reduce(function (a, b) {
6474
6478
  return a + (b.width || b.actualWidth);
6475
6479
  }, 0);
6476
6480
  this.sizes.totalNonPinnedWidth = this.options.columns[this.options.columns.length - 1].filter(function (c, i) {
6477
- return i >= _this40.pinnedColumns;
6481
+ return i >= _this39.pinnedColumns;
6478
6482
  }).reduce(function (a, b) {
6479
6483
  return a + (b.width || b.actualWidth);
6480
6484
  }, 0);
@@ -6495,10 +6499,10 @@ var WebsyTable3 = /*#__PURE__*/function () {
6495
6499
  c.actualWidth += equalWidth; // }
6496
6500
  // }
6497
6501
 
6498
- _this40.sizes.totalWidth += c.width || c.actualWidth;
6502
+ _this39.sizes.totalWidth += c.width || c.actualWidth;
6499
6503
 
6500
- if (i < _this40.pinnedColumns) {
6501
- _this40.sizes.totalNonPinnedWidth += c.width || c.actualWidth;
6504
+ if (i < _this39.pinnedColumns) {
6505
+ _this39.sizes.totalNonPinnedWidth += c.width || c.actualWidth;
6502
6506
  } // equalWidth = (outerSize.width - this.sizes.totalWidth) / (this.options.columns[this.options.columns.length - 1].length - (i + 1))
6503
6507
 
6504
6508
  });
@@ -6555,7 +6559,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
6555
6559
  }, {
6556
6560
  key: "createSample",
6557
6561
  value: function createSample(data) {
6558
- var _this41 = this;
6562
+ var _this40 = this;
6559
6563
 
6560
6564
  var output = [];
6561
6565
  this.options.columns[this.options.columns.length - 1].forEach(function (col, colIndex) {
@@ -6567,7 +6571,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
6567
6571
  var longest = '';
6568
6572
 
6569
6573
  for (var i = 0; i < Math.min(data.length, 1000); i++) {
6570
- if (data[i].length === _this41.options.columns[_this41.options.columns.length - 1].length) {
6574
+ if (data[i].length === _this40.options.columns[_this40.options.columns.length - 1].length) {
6571
6575
  if (longest.length < data[i][colIndex].value.length) {
6572
6576
  longest = data[i][colIndex].value;
6573
6577
  }
@@ -6962,7 +6966,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
6962
6966
 
6963
6967
  var WebsyChart = /*#__PURE__*/function () {
6964
6968
  function WebsyChart(elementId, options) {
6965
- var _this42 = this;
6969
+ var _this41 = this;
6966
6970
 
6967
6971
  _classCallCheck(this, WebsyChart);
6968
6972
 
@@ -7013,22 +7017,22 @@ var WebsyChart = /*#__PURE__*/function () {
7013
7017
  this.invertOverride = function (input, input2) {
7014
7018
  var xAxis = 'bottomAxis';
7015
7019
 
7016
- if (_this42.options.orientation === 'horizontal') {
7020
+ if (_this41.options.orientation === 'horizontal') {
7017
7021
  xAxis = 'leftAxis';
7018
7022
  }
7019
7023
 
7020
- var width = _this42[xAxis].step();
7024
+ var width = _this41[xAxis].step();
7021
7025
 
7022
7026
  var output;
7023
7027
 
7024
- var domain = _toConsumableArray(_this42[xAxis].domain());
7028
+ var domain = _toConsumableArray(_this41[xAxis].domain());
7025
7029
 
7026
- if (_this42.options.orientation === 'horizontal') {
7030
+ if (_this41.options.orientation === 'horizontal') {
7027
7031
  domain = domain.reverse();
7028
7032
  }
7029
7033
 
7030
7034
  for (var j = 0; j < domain.length; j++) {
7031
- var breakA = _this42[xAxis](domain[j]) - width / 2;
7035
+ var breakA = _this41[xAxis](domain[j]) - width / 2;
7032
7036
  var breakB = breakA + width;
7033
7037
 
7034
7038
  if (input > breakA && input <= breakB) {
@@ -7128,10 +7132,10 @@ var WebsyChart = /*#__PURE__*/function () {
7128
7132
  }, {
7129
7133
  key: "handleEventMouseMove",
7130
7134
  value: function handleEventMouseMove(event, d) {
7131
- var _this43 = this;
7135
+ var _this42 = this;
7132
7136
 
7133
7137
  var bisectDate = d3.bisector(function (d) {
7134
- return _this43.parseX(d.x.value);
7138
+ return _this42.parseX(d.x.value);
7135
7139
  }).left;
7136
7140
 
7137
7141
  if (this.options.showTrackingLine === true && d3.pointer(event)) {
@@ -7170,8 +7174,8 @@ var WebsyChart = /*#__PURE__*/function () {
7170
7174
  }
7171
7175
 
7172
7176
  this.options.data.series.forEach(function (s) {
7173
- if (_this43.options.data[xData].scale !== 'Time') {
7174
- xPoint = _this43[xAxis](_this43.parseX(xLabel));
7177
+ if (_this42.options.data[xData].scale !== 'Time') {
7178
+ xPoint = _this42[xAxis](_this42.parseX(xLabel));
7175
7179
  s.data.forEach(function (d) {
7176
7180
  if (d.x.value === xLabel) {
7177
7181
  if (!tooltipTitle) {
@@ -7190,13 +7194,13 @@ var WebsyChart = /*#__PURE__*/function () {
7190
7194
  var pointA = s.data[index - 1];
7191
7195
  var pointB = s.data[index];
7192
7196
 
7193
- if (_this43.options.orientation === 'horizontal') {
7197
+ if (_this42.options.orientation === 'horizontal') {
7194
7198
  pointA = _toConsumableArray(s.data).reverse()[index - 1];
7195
7199
  pointB = _toConsumableArray(s.data).reverse()[index];
7196
7200
  }
7197
7201
 
7198
7202
  if (pointA && !pointB) {
7199
- xPoint = _this43[xAxis](_this43.parseX(pointA.x.value));
7203
+ xPoint = _this42[xAxis](_this42.parseX(pointA.x.value));
7200
7204
  tooltipTitle = pointA.x.value;
7201
7205
 
7202
7206
  if (!pointA.y.color) {
@@ -7206,12 +7210,12 @@ var WebsyChart = /*#__PURE__*/function () {
7206
7210
  tooltipData.push(pointA.y);
7207
7211
 
7208
7212
  if (typeof pointA.x.value.getTime !== 'undefined') {
7209
- tooltipTitle = d3.timeFormat(_this43.options.dateFormat || _this43.options.calculatedTimeFormatPattern)(pointA.x.value);
7213
+ tooltipTitle = d3.timeFormat(_this42.options.dateFormat || _this42.options.calculatedTimeFormatPattern)(pointA.x.value);
7210
7214
  }
7211
7215
  }
7212
7216
 
7213
7217
  if (pointB && !pointA) {
7214
- xPoint = _this43[xAxis](_this43.parseX(pointB.x.value));
7218
+ xPoint = _this42[xAxis](_this42.parseX(pointB.x.value));
7215
7219
  tooltipTitle = pointB.x.value;
7216
7220
 
7217
7221
  if (!pointB.y.color) {
@@ -7221,14 +7225,14 @@ var WebsyChart = /*#__PURE__*/function () {
7221
7225
  tooltipData.push(pointB.y);
7222
7226
 
7223
7227
  if (typeof pointB.x.value.getTime !== 'undefined') {
7224
- tooltipTitle = d3.timeFormat(_this43.options.dateFormat || _this43.options.calculatedTimeFormatPattern)(pointB.x.value);
7228
+ tooltipTitle = d3.timeFormat(_this42.options.dateFormat || _this42.options.calculatedTimeFormatPattern)(pointB.x.value);
7225
7229
  }
7226
7230
  }
7227
7231
 
7228
7232
  if (pointA && pointB) {
7229
- var d0 = _this43[xAxis](_this43.parseX(pointA.x.value));
7233
+ var d0 = _this42[xAxis](_this42.parseX(pointA.x.value));
7230
7234
 
7231
- var d1 = _this43[xAxis](_this43.parseX(pointB.x.value));
7235
+ var d1 = _this42[xAxis](_this42.parseX(pointB.x.value));
7232
7236
 
7233
7237
  var mid = Math.abs(d0 - d1) / 2;
7234
7238
 
@@ -7237,7 +7241,7 @@ var WebsyChart = /*#__PURE__*/function () {
7237
7241
  tooltipTitle = pointB.x.value;
7238
7242
 
7239
7243
  if (typeof pointB.x.value.getTime !== 'undefined') {
7240
- tooltipTitle = d3.timeFormat(_this43.options.dateFormat || _this43.options.calculatedTimeFormatPattern)(pointB.x.value);
7244
+ tooltipTitle = d3.timeFormat(_this42.options.dateFormat || _this42.options.calculatedTimeFormatPattern)(pointB.x.value);
7241
7245
  }
7242
7246
 
7243
7247
  if (!pointB.y.color) {
@@ -7250,7 +7254,7 @@ var WebsyChart = /*#__PURE__*/function () {
7250
7254
  tooltipTitle = pointA.x.value;
7251
7255
 
7252
7256
  if (typeof pointB.x.value.getTime !== 'undefined') {
7253
- tooltipTitle = d3.timeFormat(_this43.options.dateFormat || _this43.options.calculatedTimeFormatPattern)(pointB.x.value);
7257
+ tooltipTitle = d3.timeFormat(_this42.options.dateFormat || _this42.options.calculatedTimeFormatPattern)(pointB.x.value);
7254
7258
  }
7255
7259
 
7256
7260
  if (!pointA.y.color) {
@@ -7364,7 +7368,7 @@ var WebsyChart = /*#__PURE__*/function () {
7364
7368
  }, {
7365
7369
  key: "render",
7366
7370
  value: function render(options) {
7367
- var _this44 = this;
7371
+ var _this43 = this;
7368
7372
 
7369
7373
  /* global d3 options WebsyUtils */
7370
7374
  if (typeof options !== 'undefined') {
@@ -7433,7 +7437,7 @@ var WebsyChart = /*#__PURE__*/function () {
7433
7437
  var legendData = this.options.data.series.map(function (s, i) {
7434
7438
  return {
7435
7439
  value: s.label || s.key,
7436
- color: s.color || _this44.options.colors[i % _this44.options.colors.length]
7440
+ color: s.color || _this43.options.colors[i % _this43.options.colors.length]
7437
7441
  };
7438
7442
  });
7439
7443
 
@@ -7715,7 +7719,7 @@ var WebsyChart = /*#__PURE__*/function () {
7715
7719
 
7716
7720
  if (this.options.data.bottom.formatter) {
7717
7721
  bAxisFunc.tickFormat(function (d) {
7718
- return _this44.options.data.bottom.formatter(d);
7722
+ return _this43.options.data.bottom.formatter(d);
7719
7723
  });
7720
7724
  }
7721
7725
 
@@ -7741,8 +7745,8 @@ var WebsyChart = /*#__PURE__*/function () {
7741
7745
 
7742
7746
  if (this.options.margin.axisLeft > 0) {
7743
7747
  this.leftAxisLayer.call(d3.axisLeft(this.leftAxis).ticks(this.options.data.left.ticks || 5).tickFormat(function (d) {
7744
- if (_this44.options.data.left.formatter) {
7745
- d = _this44.options.data.left.formatter(d);
7748
+ if (_this43.options.data.left.formatter) {
7749
+ d = _this43.options.data.left.formatter(d);
7746
7750
  }
7747
7751
 
7748
7752
  return d;
@@ -7779,8 +7783,8 @@ var WebsyChart = /*#__PURE__*/function () {
7779
7783
 
7780
7784
  if (this.options.margin.axisRight > 0 && (this.options.data.right.min !== 0 || this.options.data.right.max !== 0)) {
7781
7785
  this.rightAxisLayer.call(d3.axisRight(this.rightAxis).ticks(this.options.data.left.ticks || 5).tickFormat(function (d) {
7782
- if (_this44.options.data.right.formatter) {
7783
- d = _this44.options.data.right.formatter(d);
7786
+ if (_this43.options.data.right.formatter) {
7787
+ d = _this43.options.data.right.formatter(d);
7784
7788
  }
7785
7789
 
7786
7790
  return d;
@@ -7819,18 +7823,18 @@ var WebsyChart = /*#__PURE__*/function () {
7819
7823
  this.renderedKeys = {};
7820
7824
  this.options.data.series.forEach(function (series, index) {
7821
7825
  if (!series.key) {
7822
- series.key = _this44.createIdentity();
7826
+ series.key = _this43.createIdentity();
7823
7827
  }
7824
7828
 
7825
7829
  if (!series.color) {
7826
- series.color = _this44.options.colors[index % _this44.options.colors.length];
7830
+ series.color = _this43.options.colors[index % _this43.options.colors.length];
7827
7831
  }
7828
7832
 
7829
- _this44["render".concat(series.type || 'bar')](series, index);
7833
+ _this43["render".concat(series.type || 'bar')](series, index);
7830
7834
 
7831
- _this44.renderLabels(series, index);
7835
+ _this43.renderLabels(series, index);
7832
7836
 
7833
- _this44.renderedKeys[series.key] = series.type;
7837
+ _this43.renderedKeys[series.key] = series.type;
7834
7838
  });
7835
7839
  }
7836
7840
  }
@@ -7838,17 +7842,17 @@ var WebsyChart = /*#__PURE__*/function () {
7838
7842
  }, {
7839
7843
  key: "renderarea",
7840
7844
  value: function renderarea(series, index) {
7841
- var _this45 = this;
7845
+ var _this44 = this;
7842
7846
 
7843
7847
  /* global d3 series index */
7844
7848
  var drawArea = function drawArea(xAxis, yAxis, curveStyle) {
7845
7849
  return d3.area().x(function (d) {
7846
- return _this45[xAxis](_this45.parseX(d.x.value));
7850
+ return _this44[xAxis](_this44.parseX(d.x.value));
7847
7851
  }).y0(function (d) {
7848
- return _this45[yAxis](0);
7852
+ return _this44[yAxis](0);
7849
7853
  }).y1(function (d) {
7850
- return _this45[yAxis](isNaN(d.y.value) ? 0 : d.y.value);
7851
- }).curve(d3[curveStyle || _this45.options.curveStyle]);
7854
+ return _this44[yAxis](isNaN(d.y.value) ? 0 : d.y.value);
7855
+ }).curve(d3[curveStyle || _this44.options.curveStyle]);
7852
7856
  };
7853
7857
 
7854
7858
  var xAxis = 'bottomAxis';
@@ -7971,7 +7975,7 @@ var WebsyChart = /*#__PURE__*/function () {
7971
7975
  }, {
7972
7976
  key: "renderLabels",
7973
7977
  value: function renderLabels(series, index) {
7974
- var _this46 = this;
7978
+ var _this45 = this;
7975
7979
 
7976
7980
  /* global series index d3 WebsyDesigns */
7977
7981
  var xAxis = 'bottomAxis';
@@ -7990,11 +7994,11 @@ var WebsyChart = /*#__PURE__*/function () {
7990
7994
  var labels = this.labelLayer.selectAll(".label_".concat(series.key)).data(series.data);
7991
7995
  labels.exit().transition(this.transition).style('stroke-opacity', 1e-6).remove();
7992
7996
  labels.attr('x', function (d) {
7993
- return getLabelX.call(_this46, d, series.labelPosition);
7997
+ return getLabelX.call(_this45, d, series.labelPosition);
7994
7998
  }).attr('y', function (d) {
7995
- return getLabelY.call(_this46, d, series.labelPosition);
7999
+ return getLabelY.call(_this45, d, series.labelPosition);
7996
8000
  }).attr('class', "label_".concat(series.key)).attr('fill', function (d) {
7997
- return _this46.options.labelColor || WebsyDesigns.WebsyUtils.getLightDark(d.y.color || d.color || series.color);
8001
+ return _this45.options.labelColor || WebsyDesigns.WebsyUtils.getLightDark(d.y.color || d.color || series.color);
7998
8002
  }).style('font-size', "".concat(this.options.labelSize || this.options.fontSize, "px")).transition(this.transition).text(function (d) {
7999
8003
  return d.y.label || d.y.value;
8000
8004
  }).each(function (d, i) {
@@ -8019,11 +8023,11 @@ var WebsyChart = /*#__PURE__*/function () {
8019
8023
  }
8020
8024
  });
8021
8025
  labels.enter().append('text').attr('class', "label_".concat(series.key)).attr('x', function (d) {
8022
- return getLabelX.call(_this46, d, series.labelPosition);
8026
+ return getLabelX.call(_this45, d, series.labelPosition);
8023
8027
  }).attr('y', function (d) {
8024
- return getLabelY.call(_this46, d, series.labelPosition);
8028
+ return getLabelY.call(_this45, d, series.labelPosition);
8025
8029
  }).attr('alignment-baseline', 'central').attr('text-anchor', this.options.orientation === 'horizontal' ? 'left' : 'middle').attr('fill', function (d) {
8026
- return _this46.options.labelColor || WebsyDesigns.WebsyUtils.getLightDark(d.y.color || d.color || series.color);
8030
+ return _this45.options.labelColor || WebsyDesigns.WebsyUtils.getLightDark(d.y.color || d.color || series.color);
8027
8031
  }).style('font-size', "".concat(this.options.labelSize || this.options.fontSize, "px")).text(function (d) {
8028
8032
  return d.y.label || d.y.value;
8029
8033
  }).each(function (d, i) {
@@ -8080,16 +8084,16 @@ var WebsyChart = /*#__PURE__*/function () {
8080
8084
  }, {
8081
8085
  key: "renderline",
8082
8086
  value: function renderline(series, index) {
8083
- var _this47 = this;
8087
+ var _this46 = this;
8084
8088
 
8085
8089
  /* global series index d3 */
8086
8090
  var drawLine = function drawLine(xAxis, yAxis, curveStyle) {
8087
8091
  return d3.line().x(function (d) {
8088
- var adjustment = _this47.options.data[xAxis].scale === 'Time' ? 0 : _this47["".concat(xAxis, "Axis")].bandwidth() / 2;
8089
- return _this47["".concat(xAxis, "Axis")](_this47.parseX(d.x.value)) + adjustment;
8092
+ var adjustment = _this46.options.data[xAxis].scale === 'Time' ? 0 : _this46["".concat(xAxis, "Axis")].bandwidth() / 2;
8093
+ return _this46["".concat(xAxis, "Axis")](_this46.parseX(d.x.value)) + adjustment;
8090
8094
  }).y(function (d) {
8091
- return _this47["".concat(yAxis, "Axis")](isNaN(d.y.value) ? 0 : d.y.value);
8092
- }).curve(d3[curveStyle || _this47.options.curveStyle]);
8095
+ return _this46["".concat(yAxis, "Axis")](isNaN(d.y.value) ? 0 : d.y.value);
8096
+ }).curve(d3[curveStyle || _this46.options.curveStyle]);
8093
8097
  };
8094
8098
 
8095
8099
  var xAxis = 'bottom';
@@ -8133,14 +8137,14 @@ var WebsyChart = /*#__PURE__*/function () {
8133
8137
  }, {
8134
8138
  key: "rendersymbol",
8135
8139
  value: function rendersymbol(series, index) {
8136
- var _this48 = this;
8140
+ var _this47 = this;
8137
8141
 
8138
8142
  /* global d3 series index series.key */
8139
8143
  var drawSymbol = function drawSymbol(size) {
8140
8144
  return d3.symbol() // .type(d => {
8141
8145
  // return d3.symbols[0]
8142
8146
  // })
8143
- .size(size || _this48.options.symbolSize);
8147
+ .size(size || _this47.options.symbolSize);
8144
8148
  };
8145
8149
 
8146
8150
  var xAxis = 'bottomAxis';
@@ -8158,7 +8162,7 @@ var WebsyChart = /*#__PURE__*/function () {
8158
8162
  symbols.attr('d', function (d) {
8159
8163
  return drawSymbol(d.y.size || series.symbolSize)(d);
8160
8164
  }).transition(this.transition).attr('fill', 'white').attr('stroke', series.color).attr('transform', function (d) {
8161
- return "translate(".concat(_this48[xAxis](_this48.parseX(d.x.value)), ", ").concat(_this48[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
8165
+ return "translate(".concat(_this47[xAxis](_this47.parseX(d.x.value)), ", ").concat(_this47[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
8162
8166
  }); // Enter
8163
8167
 
8164
8168
  symbols.enter().append('path').attr('d', function (d) {
@@ -8167,7 +8171,7 @@ var WebsyChart = /*#__PURE__*/function () {
8167
8171
  .attr('fill', 'white').attr('stroke', series.color).attr('class', function (d) {
8168
8172
  return "symbol symbol_".concat(series.key);
8169
8173
  }).attr('transform', function (d) {
8170
- return "translate(".concat(_this48[xAxis](_this48.parseX(d.x.value)), ", ").concat(_this48[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
8174
+ return "translate(".concat(_this47[xAxis](_this47.parseX(d.x.value)), ", ").concat(_this47[yAxis](isNaN(d.y.value) ? 0 : d.y.value), ")");
8171
8175
  });
8172
8176
  }
8173
8177
  }, {
@@ -8322,7 +8326,7 @@ var WebsyLegend = /*#__PURE__*/function () {
8322
8326
  }, {
8323
8327
  key: "resize",
8324
8328
  value: function resize() {
8325
- var _this49 = this;
8329
+ var _this48 = this;
8326
8330
 
8327
8331
  var el = document.getElementById(this.elementId);
8328
8332
 
@@ -8335,7 +8339,7 @@ var WebsyLegend = /*#__PURE__*/function () {
8335
8339
  // }
8336
8340
  var html = "\n <div class='text-".concat(this.options.align, "'>\n ");
8337
8341
  html += this._data.map(function (d, i) {
8338
- return _this49.getLegendItemHTML(d);
8342
+ return _this48.getLegendItemHTML(d);
8339
8343
  }).join('');
8340
8344
  html += "\n <div>\n ";
8341
8345
  el.innerHTML = html;
@@ -8507,7 +8511,7 @@ var WebsyMap = /*#__PURE__*/function () {
8507
8511
  }, {
8508
8512
  key: "render",
8509
8513
  value: function render() {
8510
- var _this50 = this;
8514
+ var _this49 = this;
8511
8515
 
8512
8516
  var mapEl = document.getElementById("".concat(this.elementId, "_map"));
8513
8517
  var legendEl = document.getElementById("".concat(this.elementId, "_map"));
@@ -8516,7 +8520,7 @@ var WebsyMap = /*#__PURE__*/function () {
8516
8520
  var legendData = this.options.data.polygons.map(function (s, i) {
8517
8521
  return {
8518
8522
  value: s.label || s.key,
8519
- color: s.color || _this50.options.colors[i % _this50.options.colors.length]
8523
+ color: s.color || _this49.options.colors[i % _this49.options.colors.length]
8520
8524
  };
8521
8525
  });
8522
8526
  var longestValue = legendData.map(function (s) {
@@ -8580,7 +8584,7 @@ var WebsyMap = /*#__PURE__*/function () {
8580
8584
 
8581
8585
  if (this.polygons) {
8582
8586
  this.polygons.forEach(function (p) {
8583
- return _this50.map.removeLayer(p);
8587
+ return _this49.map.removeLayer(p);
8584
8588
  });
8585
8589
  }
8586
8590
 
@@ -8638,18 +8642,18 @@ var WebsyMap = /*#__PURE__*/function () {
8638
8642
  }
8639
8643
 
8640
8644
  if (!p.options.color) {
8641
- p.options.color = _this50.options.colors[i % _this50.options.colors.length];
8645
+ p.options.color = _this49.options.colors[i % _this49.options.colors.length];
8642
8646
  }
8643
8647
 
8644
8648
  var pol = L.polygon(p.data.map(function (c) {
8645
8649
  return c.map(function (d) {
8646
8650
  return [d.Latitude, d.Longitude];
8647
8651
  });
8648
- }), p.options).addTo(_this50.map);
8652
+ }), p.options).addTo(_this49.map);
8649
8653
 
8650
- _this50.polygons.push(pol);
8654
+ _this49.polygons.push(pol);
8651
8655
 
8652
- _this50.map.fitBounds(pol.getBounds());
8656
+ _this49.map.fitBounds(pol.getBounds());
8653
8657
  });
8654
8658
  } // if (this.data.markers.length > 0) {
8655
8659
  // el.classList.remove('hidden')