@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.
|
@@ -2776,8 +2776,13 @@ class WebsyNavigationMenu {
|
|
|
2776
2776
|
let parent = el.parentElement
|
|
2777
2777
|
while (parent) {
|
|
2778
2778
|
if (parent.tagName === 'UL') {
|
|
2779
|
-
parent.classList.remove('websy-menu-collapsed')
|
|
2780
|
-
|
|
2779
|
+
parent.classList.remove('websy-menu-collapsed')
|
|
2780
|
+
const pathEnd = parent.getAttribute('data-path').split('::').pop()
|
|
2781
|
+
let neighborEl = document.getElementById(pathEnd)
|
|
2782
|
+
if (neighborEl && neighborEl.classList.contains('websy-menu-header')) {
|
|
2783
|
+
neighborEl.classList.add('menu-open')
|
|
2784
|
+
}
|
|
2785
|
+
parent = parent.parentElement
|
|
2781
2786
|
}
|
|
2782
2787
|
else if (parent.tagName === 'LI') {
|
|
2783
2788
|
parent = parent.parentElement
|
|
@@ -2851,6 +2856,7 @@ class WebsyNavigationMenu {
|
|
|
2851
2856
|
const textEls = el.querySelectorAll(`div.websy-menu-header`)
|
|
2852
2857
|
for (let t = 0; t < textEls.length; t++) {
|
|
2853
2858
|
textEls[t].classList[defaultMethod]('websy-hidden')
|
|
2859
|
+
textEls[t].classList.remove('menu-open')
|
|
2854
2860
|
}
|
|
2855
2861
|
const listEls = el.querySelectorAll(`ul.websy-child-list`)
|
|
2856
2862
|
for (let l = 0; l < listEls.length; l++) {
|
|
@@ -2863,7 +2869,8 @@ class WebsyNavigationMenu {
|
|
|
2863
2869
|
pathParts.forEach(p => {
|
|
2864
2870
|
const textEl = document.getElementById(p)
|
|
2865
2871
|
if (textEl) {
|
|
2866
|
-
textEl.classList.remove('websy-hidden')
|
|
2872
|
+
textEl.classList.remove('websy-hidden')
|
|
2873
|
+
textEl.classList.add('menu-open')
|
|
2867
2874
|
}
|
|
2868
2875
|
const listEl = document.getElementById(`${p}_list`)
|
|
2869
2876
|
if (listEl) {
|
|
@@ -2922,6 +2929,11 @@ class WebsyNavigationMenu {
|
|
|
2922
2929
|
while (parent) {
|
|
2923
2930
|
if (parent.tagName === 'UL') {
|
|
2924
2931
|
parent.classList.remove('websy-menu-collapsed')
|
|
2932
|
+
const pathEnd = parent.getAttribute('data-path').split('::').pop()
|
|
2933
|
+
let neighborEl = document.getElementById(pathEnd)
|
|
2934
|
+
if (neighborEl && neighborEl.classList.contains('websy-menu-header')) {
|
|
2935
|
+
neighborEl.classList.add('menu-open')
|
|
2936
|
+
}
|
|
2925
2937
|
parent = parent.parentElement
|
|
2926
2938
|
}
|
|
2927
2939
|
else if (parent.tagName === 'LI') {
|
|
@@ -6620,7 +6632,7 @@ class WebsyTable3 {
|
|
|
6620
6632
|
// out of box function
|
|
6621
6633
|
}
|
|
6622
6634
|
}
|
|
6623
|
-
if (event.target.classList.contains('websy-table-cell-expand')) {
|
|
6635
|
+
else if (event.target.classList.contains('websy-table-cell-expand')) {
|
|
6624
6636
|
if (this.options.onExpandCell) {
|
|
6625
6637
|
this.options.onExpandCell(event, +rowIndex, +colIndex)
|
|
6626
6638
|
}
|
|
@@ -6628,7 +6640,7 @@ class WebsyTable3 {
|
|
|
6628
6640
|
// out of box function
|
|
6629
6641
|
}
|
|
6630
6642
|
}
|
|
6631
|
-
if (event.target.classList.contains('sortable-column')) {
|
|
6643
|
+
else if (event.target.classList.contains('sortable-column')) {
|
|
6632
6644
|
// const sortIndex = +event.target.getAttribute('data-sort-index')
|
|
6633
6645
|
const column = this.options.columns[this.options.columns.length - 1][colIndex]
|
|
6634
6646
|
if (this.options.onSort) {
|
|
@@ -6638,7 +6650,7 @@ class WebsyTable3 {
|
|
|
6638
6650
|
this.internalSort(column, colIndex)
|
|
6639
6651
|
}
|
|
6640
6652
|
}
|
|
6641
|
-
if (event.target.classList.contains('websy-table-cell-content')) {
|
|
6653
|
+
else if (event.target.classList.contains('websy-table-cell-content') || event.target.classList.contains('websy-table-cell')) {
|
|
6642
6654
|
if (this.options.onCellSelect) {
|
|
6643
6655
|
this.options.onCellSelect(event, {
|
|
6644
6656
|
cellIndex,
|
package/dist/websy-designs.js
CHANGED
|
@@ -2955,6 +2955,13 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
|
|
|
2955
2955
|
while (parent) {
|
|
2956
2956
|
if (parent.tagName === 'UL') {
|
|
2957
2957
|
parent.classList.remove('websy-menu-collapsed');
|
|
2958
|
+
var pathEnd = parent.getAttribute('data-path').split('::').pop();
|
|
2959
|
+
var neighborEl = document.getElementById(pathEnd);
|
|
2960
|
+
|
|
2961
|
+
if (neighborEl && neighborEl.classList.contains('websy-menu-header')) {
|
|
2962
|
+
neighborEl.classList.add('menu-open');
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2958
2965
|
parent = parent.parentElement;
|
|
2959
2966
|
} else if (parent.tagName === 'LI') {
|
|
2960
2967
|
parent = parent.parentElement;
|
|
@@ -3056,6 +3063,7 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
|
|
|
3056
3063
|
|
|
3057
3064
|
for (var t = 0; t < textEls.length; t++) {
|
|
3058
3065
|
textEls[t].classList[defaultMethod]('websy-hidden');
|
|
3066
|
+
textEls[t].classList.remove('menu-open');
|
|
3059
3067
|
}
|
|
3060
3068
|
|
|
3061
3069
|
var listEls = el.querySelectorAll("ul.websy-child-list");
|
|
@@ -3073,6 +3081,7 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
|
|
|
3073
3081
|
|
|
3074
3082
|
if (textEl) {
|
|
3075
3083
|
textEl.classList.remove('websy-hidden');
|
|
3084
|
+
textEl.classList.add('menu-open');
|
|
3076
3085
|
}
|
|
3077
3086
|
|
|
3078
3087
|
var listEl = document.getElementById("".concat(p, "_list"));
|
|
@@ -3132,6 +3141,13 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
|
|
|
3132
3141
|
while (parent) {
|
|
3133
3142
|
if (parent.tagName === 'UL') {
|
|
3134
3143
|
parent.classList.remove('websy-menu-collapsed');
|
|
3144
|
+
var pathEnd = parent.getAttribute('data-path').split('::').pop();
|
|
3145
|
+
var neighborEl = document.getElementById(pathEnd);
|
|
3146
|
+
|
|
3147
|
+
if (neighborEl && neighborEl.classList.contains('websy-menu-header')) {
|
|
3148
|
+
neighborEl.classList.add('menu-open');
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3135
3151
|
parent = parent.parentElement;
|
|
3136
3152
|
} else if (parent.tagName === 'LI') {
|
|
3137
3153
|
parent = parent.parentElement;
|
|
@@ -7222,16 +7238,12 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
7222
7238
|
this.options.onCollapseCell(event, +rowIndex, +colIndex);
|
|
7223
7239
|
} else {// out of box function
|
|
7224
7240
|
}
|
|
7225
|
-
}
|
|
7226
|
-
|
|
7227
|
-
if (event.target.classList.contains('websy-table-cell-expand')) {
|
|
7241
|
+
} else if (event.target.classList.contains('websy-table-cell-expand')) {
|
|
7228
7242
|
if (this.options.onExpandCell) {
|
|
7229
7243
|
this.options.onExpandCell(event, +rowIndex, +colIndex);
|
|
7230
7244
|
} else {// out of box function
|
|
7231
7245
|
}
|
|
7232
|
-
}
|
|
7233
|
-
|
|
7234
|
-
if (event.target.classList.contains('sortable-column')) {
|
|
7246
|
+
} else if (event.target.classList.contains('sortable-column')) {
|
|
7235
7247
|
// const sortIndex = +event.target.getAttribute('data-sort-index')
|
|
7236
7248
|
var column = this.options.columns[this.options.columns.length - 1][colIndex];
|
|
7237
7249
|
|
|
@@ -7240,9 +7252,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
7240
7252
|
} else {
|
|
7241
7253
|
this.internalSort(column, colIndex);
|
|
7242
7254
|
}
|
|
7243
|
-
}
|
|
7244
|
-
|
|
7245
|
-
if (event.target.classList.contains('websy-table-cell-content')) {
|
|
7255
|
+
} else if (event.target.classList.contains('websy-table-cell-content') || event.target.classList.contains('websy-table-cell')) {
|
|
7246
7256
|
if (this.options.onCellSelect) {
|
|
7247
7257
|
this.options.onCellSelect(event, {
|
|
7248
7258
|
cellIndex: cellIndex,
|