@websy/websy-designs 1.11.8 → 1.11.10

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.
@@ -267,6 +267,9 @@ class ButtonGroup {
267
267
  this.options.activeItem = -1
268
268
  event.target.classList.remove('active')
269
269
  }
270
+ if (this.options.onClick) {
271
+ this.options.onClick(this.options.items[index], index, event, this)
272
+ }
270
273
  }
271
274
  }
272
275
  on (event, fn) {
@@ -4851,6 +4854,9 @@ class WebsyRouter {
4851
4854
  if (this.options.views[view].load) {
4852
4855
  this.options.views[view].load(callbackFn)
4853
4856
  }
4857
+ else if (callbackFn) {
4858
+ callbackFn()
4859
+ }
4854
4860
  }
4855
4861
  initView (view) {
4856
4862
  return new Promise((resolve, reject) => {
@@ -5742,13 +5748,12 @@ class WebsyTable {
5742
5748
  let html = `
5743
5749
  <td
5744
5750
  `
5745
- if (!this.options.columns[i].showAsImage && c.value.indexOf('<svg') === -1 && c.value.indexOf('<img') === -1) {
5751
+ if (!this.options.columns[i].showAsImage && c.value && c.value.indexOf && c.value.indexOf('<svg') === -1 && c.value.indexOf('<img') === -1) {
5746
5752
  html += `
5747
5753
  data-info='${info}'
5748
5754
  `
5749
5755
  }
5750
5756
  html += `
5751
- data-info='${info}'
5752
5757
  data-row-index='${this.rowCount + rowIndex}'
5753
5758
  data-col-index='${i}'
5754
5759
  class='${this.options.columns[i].classes || ''}'
@@ -312,6 +312,9 @@ var ButtonGroup = /*#__PURE__*/function () {
312
312
  this.options.activeItem = -1;
313
313
  event.target.classList.remove('active');
314
314
  }
315
+ if (this.options.onClick) {
316
+ this.options.onClick(this.options.items[index], index, event, this);
317
+ }
315
318
  }
316
319
  }
317
320
  }, {
@@ -4680,6 +4683,8 @@ var WebsyRouter = /*#__PURE__*/function () {
4680
4683
  value: function preloadView(view, callbackFn) {
4681
4684
  if (this.options.views[view].load) {
4682
4685
  this.options.views[view].load(callbackFn);
4686
+ } else if (callbackFn) {
4687
+ callbackFn();
4683
4688
  }
4684
4689
  }
4685
4690
  }, {
@@ -5579,10 +5584,10 @@ var WebsyTable = /*#__PURE__*/function () {
5579
5584
  c.value = "\n <img src='".concat(c.value, "'>\n ");
5580
5585
  }
5581
5586
  var html = "\n <td \n ";
5582
- if (!_this38.options.columns[i].showAsImage && c.value.indexOf('<svg') === -1 && c.value.indexOf('<img') === -1) {
5587
+ if (!_this38.options.columns[i].showAsImage && c.value && c.value.indexOf && c.value.indexOf('<svg') === -1 && c.value.indexOf('<img') === -1) {
5583
5588
  html += "\n data-info='".concat(info, "'\n ");
5584
5589
  }
5585
- html += "\n data-info='".concat(info, "' \n data-row-index='").concat(_this38.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this38.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 ");
5590
+ html += "\n data-row-index='".concat(_this38.rowCount + rowIndex, "' \n data-col-index='").concat(i, "' \n class='").concat(_this38.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 ");
5586
5591
  return html;
5587
5592
  }
5588
5593
  }