@websy/websy-designs 1.4.30 → 1.4.32

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.
@@ -2517,8 +2517,13 @@ class WebsyNavigationMenu {
2517
2517
  let parent = el.parentElement
2518
2518
  while (parent) {
2519
2519
  if (parent.tagName === 'UL') {
2520
- parent.classList.remove('websy-menu-collapsed')
2521
- parent = parent.parentElement
2520
+ parent.classList.remove('websy-menu-collapsed')
2521
+ const pathEnd = parent.getAttribute('data-path').split('::').pop()
2522
+ let neighborEl = document.getElementById(pathEnd)
2523
+ if (neighborEl && neighborEl.classList.contains('websy-menu-header')) {
2524
+ neighborEl.classList.add('menu-open')
2525
+ }
2526
+ parent = parent.parentElement
2522
2527
  }
2523
2528
  else if (parent.tagName === 'LI') {
2524
2529
  parent = parent.parentElement
@@ -2592,6 +2597,7 @@ class WebsyNavigationMenu {
2592
2597
  const textEls = el.querySelectorAll(`div.websy-menu-header`)
2593
2598
  for (let t = 0; t < textEls.length; t++) {
2594
2599
  textEls[t].classList[defaultMethod]('websy-hidden')
2600
+ textEls[t].classList.remove('menu-open')
2595
2601
  }
2596
2602
  const listEls = el.querySelectorAll(`ul.websy-child-list`)
2597
2603
  for (let l = 0; l < listEls.length; l++) {
@@ -2604,7 +2610,8 @@ class WebsyNavigationMenu {
2604
2610
  pathParts.forEach(p => {
2605
2611
  const textEl = document.getElementById(p)
2606
2612
  if (textEl) {
2607
- textEl.classList.remove('websy-hidden')
2613
+ textEl.classList.remove('websy-hidden')
2614
+ textEl.classList.add('menu-open')
2608
2615
  }
2609
2616
  const listEl = document.getElementById(`${p}_list`)
2610
2617
  if (listEl) {
@@ -2663,6 +2670,11 @@ class WebsyNavigationMenu {
2663
2670
  while (parent) {
2664
2671
  if (parent.tagName === 'UL') {
2665
2672
  parent.classList.remove('websy-menu-collapsed')
2673
+ const pathEnd = parent.getAttribute('data-path').split('::').pop()
2674
+ let neighborEl = document.getElementById(pathEnd)
2675
+ if (neighborEl && neighborEl.classList.contains('websy-menu-header')) {
2676
+ neighborEl.classList.add('menu-open')
2677
+ }
2666
2678
  parent = parent.parentElement
2667
2679
  }
2668
2680
  else if (parent.tagName === 'LI') {
@@ -6208,7 +6220,7 @@ class WebsyTable3 {
6208
6220
  // out of box function
6209
6221
  }
6210
6222
  }
6211
- if (event.target.classList.contains('websy-table-cell-expand')) {
6223
+ else if (event.target.classList.contains('websy-table-cell-expand')) {
6212
6224
  if (this.options.onExpandCell) {
6213
6225
  this.options.onExpandCell(event, +rowIndex, +colIndex)
6214
6226
  }
@@ -6216,7 +6228,7 @@ class WebsyTable3 {
6216
6228
  // out of box function
6217
6229
  }
6218
6230
  }
6219
- if (event.target.classList.contains('sortable-column')) {
6231
+ else if (event.target.classList.contains('sortable-column')) {
6220
6232
  // const sortIndex = +event.target.getAttribute('data-sort-index')
6221
6233
  const column = this.options.columns[this.options.columns.length - 1][colIndex]
6222
6234
  if (this.options.onSort) {
@@ -6226,7 +6238,7 @@ class WebsyTable3 {
6226
6238
  this.internalSort(column, colIndex)
6227
6239
  }
6228
6240
  }
6229
- if (event.target.classList.contains('websy-table-cell-content')) {
6241
+ else if (event.target.classList.contains('websy-table-cell-content') || event.target.classList.contains('websy-table-cell')) {
6230
6242
  if (this.options.onCellSelect) {
6231
6243
  this.options.onCellSelect(event, {
6232
6244
  cellIndex,
@@ -2653,6 +2653,13 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
2653
2653
  while (parent) {
2654
2654
  if (parent.tagName === 'UL') {
2655
2655
  parent.classList.remove('websy-menu-collapsed');
2656
+ var pathEnd = parent.getAttribute('data-path').split('::').pop();
2657
+ var neighborEl = document.getElementById(pathEnd);
2658
+
2659
+ if (neighborEl && neighborEl.classList.contains('websy-menu-header')) {
2660
+ neighborEl.classList.add('menu-open');
2661
+ }
2662
+
2656
2663
  parent = parent.parentElement;
2657
2664
  } else if (parent.tagName === 'LI') {
2658
2665
  parent = parent.parentElement;
@@ -2754,6 +2761,7 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
2754
2761
 
2755
2762
  for (var t = 0; t < textEls.length; t++) {
2756
2763
  textEls[t].classList[defaultMethod]('websy-hidden');
2764
+ textEls[t].classList.remove('menu-open');
2757
2765
  }
2758
2766
 
2759
2767
  var listEls = el.querySelectorAll("ul.websy-child-list");
@@ -2771,6 +2779,7 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
2771
2779
 
2772
2780
  if (textEl) {
2773
2781
  textEl.classList.remove('websy-hidden');
2782
+ textEl.classList.add('menu-open');
2774
2783
  }
2775
2784
 
2776
2785
  var listEl = document.getElementById("".concat(p, "_list"));
@@ -2830,6 +2839,13 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
2830
2839
  while (parent) {
2831
2840
  if (parent.tagName === 'UL') {
2832
2841
  parent.classList.remove('websy-menu-collapsed');
2842
+ var pathEnd = parent.getAttribute('data-path').split('::').pop();
2843
+ var neighborEl = document.getElementById(pathEnd);
2844
+
2845
+ if (neighborEl && neighborEl.classList.contains('websy-menu-header')) {
2846
+ neighborEl.classList.add('menu-open');
2847
+ }
2848
+
2833
2849
  parent = parent.parentElement;
2834
2850
  } else if (parent.tagName === 'LI') {
2835
2851
  parent = parent.parentElement;
@@ -6746,16 +6762,12 @@ var WebsyTable3 = /*#__PURE__*/function () {
6746
6762
  this.options.onCollapseCell(event, +rowIndex, +colIndex);
6747
6763
  } else {// out of box function
6748
6764
  }
6749
- }
6750
-
6751
- if (event.target.classList.contains('websy-table-cell-expand')) {
6765
+ } else if (event.target.classList.contains('websy-table-cell-expand')) {
6752
6766
  if (this.options.onExpandCell) {
6753
6767
  this.options.onExpandCell(event, +rowIndex, +colIndex);
6754
6768
  } else {// out of box function
6755
6769
  }
6756
- }
6757
-
6758
- if (event.target.classList.contains('sortable-column')) {
6770
+ } else if (event.target.classList.contains('sortable-column')) {
6759
6771
  // const sortIndex = +event.target.getAttribute('data-sort-index')
6760
6772
  var column = this.options.columns[this.options.columns.length - 1][colIndex];
6761
6773
 
@@ -6764,9 +6776,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
6764
6776
  } else {
6765
6777
  this.internalSort(column, colIndex);
6766
6778
  }
6767
- }
6768
-
6769
- if (event.target.classList.contains('websy-table-cell-content')) {
6779
+ } else if (event.target.classList.contains('websy-table-cell-content') || event.target.classList.contains('websy-table-cell')) {
6770
6780
  if (this.options.onCellSelect) {
6771
6781
  this.options.onCellSelect(event, {
6772
6782
  cellIndex: cellIndex,