@websy/websy-designs 1.6.2 → 1.6.3

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.
@@ -4445,6 +4445,9 @@ class WebsyRouter {
4445
4445
  }
4446
4446
  }
4447
4447
  showView (view, params, group) {
4448
+ if (view === '/' || view === '') {
4449
+ view = this.options.defaultView || ''
4450
+ }
4448
4451
  this.activateItem(view, this.options.triggerClass)
4449
4452
  this.activateItem(view, this.options.viewClass)
4450
4453
  let children = this.getActiveViewsFromParent(view)
@@ -4751,14 +4754,14 @@ class WebsySearch {
4751
4754
  if (event.target.value.length >= this.options.minLength) {
4752
4755
  this.searchTimeoutFn = setTimeout(() => {
4753
4756
  if (this.options.onSearch) {
4754
- this.options.onSearch(event.target.value)
4757
+ this.options.onSearch(event.target.value, event)
4755
4758
  }
4756
4759
  }, this.options.searchTimeout)
4757
4760
  }
4758
4761
  else {
4759
4762
  if (this.options.onSearch && (event.key === 'Delete' || event.key === 'Backspace')) {
4760
4763
  if (this.options.onSearch) {
4761
- this.options.onSearch('')
4764
+ this.options.onSearch('', event)
4762
4765
  }
4763
4766
  }
4764
4767
  }
@@ -4892,6 +4892,10 @@ var WebsyRouter = /*#__PURE__*/function () {
4892
4892
  }, {
4893
4893
  key: "showView",
4894
4894
  value: function showView(view, params, group) {
4895
+ if (view === '/' || view === '') {
4896
+ view = this.options.defaultView || '';
4897
+ }
4898
+
4895
4899
  this.activateItem(view, this.options.triggerClass);
4896
4900
  this.activateItem(view, this.options.viewClass);
4897
4901
  var children = this.getActiveViewsFromParent(view);
@@ -5262,13 +5266,13 @@ var WebsySearch = /*#__PURE__*/function () {
5262
5266
  if (event.target.value.length >= this.options.minLength) {
5263
5267
  this.searchTimeoutFn = setTimeout(function () {
5264
5268
  if (_this31.options.onSearch) {
5265
- _this31.options.onSearch(event.target.value);
5269
+ _this31.options.onSearch(event.target.value, event);
5266
5270
  }
5267
5271
  }, this.options.searchTimeout);
5268
5272
  } else {
5269
5273
  if (this.options.onSearch && (event.key === 'Delete' || event.key === 'Backspace')) {
5270
5274
  if (this.options.onSearch) {
5271
- this.options.onSearch('');
5275
+ this.options.onSearch('', event);
5272
5276
  }
5273
5277
  }
5274
5278
  }