reneco-hierarchized-picker 0.5.3 → 0.5.4-beta.1

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.
@@ -298,6 +298,13 @@ Tree.prototype.bindEvent = function (ele) {
298
298
  if (!this.options.parentApi.isDisabled) {
299
299
  const contextMenu = this.options.parentApi.theOptions.contextMenu;
300
300
  if ((_a = contextMenu === null || contextMenu === void 0 ? void 0 : contextMenu.items) === null || _a === void 0 ? void 0 : _a.length) {
301
+ ele.addEventListener('contextmenu', async (e) => {
302
+ if (this.options.parentApi.theOptions.multiple) {
303
+ e.preventDefault();
304
+ e.stopImmediatePropagation();
305
+ return false;
306
+ }
307
+ });
301
308
  new VanillaContextMenu(Object.assign(Object.assign({}, contextMenu), { scope: ele, menuItems: contextMenu.items.map(item => {
302
309
  return typeof item === 'string'
303
310
  ? item
@@ -19542,7 +19549,7 @@ const HierarchizedPickerComponent = class {
19542
19549
  if (searched) {
19543
19550
  this.setSearchResults(treeToDisplay);
19544
19551
  }
19545
- this.displayTree(treeToDisplay, searched != null);
19552
+ this.displayTree(treeToDisplay);
19546
19553
  }
19547
19554
  deactivateNodesOutOfDepthSettings() {
19548
19555
  if (this.optionsManager.getOptions().maxDepth != undefined || this.optionsManager.getOptions().minDepth != undefined) {
@@ -802,7 +802,7 @@ export class HierarchizedPickerComponent {
802
802
  if (searched) {
803
803
  this.setSearchResults(treeToDisplay);
804
804
  }
805
- this.displayTree(treeToDisplay, searched != null);
805
+ this.displayTree(treeToDisplay);
806
806
  }
807
807
  deactivateNodesOutOfDepthSettings() {
808
808
  if (this.optionsManager.getOptions().maxDepth != undefined || this.optionsManager.getOptions().minDepth != undefined) {
@@ -154,6 +154,13 @@ Tree.prototype.bindEvent = function (ele) {
154
154
  if (!this.options.parentApi.isDisabled) {
155
155
  const contextMenu = this.options.parentApi.theOptions.contextMenu;
156
156
  if ((_a = contextMenu === null || contextMenu === void 0 ? void 0 : contextMenu.items) === null || _a === void 0 ? void 0 : _a.length) {
157
+ ele.addEventListener('contextmenu', async (e) => {
158
+ if (this.options.parentApi.theOptions.multiple) {
159
+ e.preventDefault();
160
+ e.stopImmediatePropagation();
161
+ return false;
162
+ }
163
+ });
157
164
  new VanillaContextMenu(Object.assign(Object.assign({}, contextMenu), { scope: ele, menuItems: contextMenu.items.map(item => {
158
165
  return typeof item === 'string'
159
166
  ? item
@@ -295,6 +295,13 @@ Tree.prototype.bindEvent = function (ele) {
295
295
  if (!this.options.parentApi.isDisabled) {
296
296
  const contextMenu = this.options.parentApi.theOptions.contextMenu;
297
297
  if ((_a = contextMenu === null || contextMenu === void 0 ? void 0 : contextMenu.items) === null || _a === void 0 ? void 0 : _a.length) {
298
+ ele.addEventListener('contextmenu', async (e) => {
299
+ if (this.options.parentApi.theOptions.multiple) {
300
+ e.preventDefault();
301
+ e.stopImmediatePropagation();
302
+ return false;
303
+ }
304
+ });
298
305
  new VanillaContextMenu(Object.assign(Object.assign({}, contextMenu), { scope: ele, menuItems: contextMenu.items.map(item => {
299
306
  return typeof item === 'string'
300
307
  ? item
@@ -19540,7 +19547,7 @@ const HierarchizedPickerComponent = class extends HTMLElement {
19540
19547
  if (searched) {
19541
19548
  this.setSearchResults(treeToDisplay);
19542
19549
  }
19543
- this.displayTree(treeToDisplay, searched != null);
19550
+ this.displayTree(treeToDisplay);
19544
19551
  }
19545
19552
  deactivateNodesOutOfDepthSettings() {
19546
19553
  if (this.optionsManager.getOptions().maxDepth != undefined || this.optionsManager.getOptions().minDepth != undefined) {
@@ -294,6 +294,13 @@ Tree.prototype.bindEvent = function (ele) {
294
294
  if (!this.options.parentApi.isDisabled) {
295
295
  const contextMenu = this.options.parentApi.theOptions.contextMenu;
296
296
  if ((_a = contextMenu === null || contextMenu === void 0 ? void 0 : contextMenu.items) === null || _a === void 0 ? void 0 : _a.length) {
297
+ ele.addEventListener('contextmenu', async (e) => {
298
+ if (this.options.parentApi.theOptions.multiple) {
299
+ e.preventDefault();
300
+ e.stopImmediatePropagation();
301
+ return false;
302
+ }
303
+ });
297
304
  new VanillaContextMenu(Object.assign(Object.assign({}, contextMenu), { scope: ele, menuItems: contextMenu.items.map(item => {
298
305
  return typeof item === 'string'
299
306
  ? item
@@ -19538,7 +19545,7 @@ const HierarchizedPickerComponent = class {
19538
19545
  if (searched) {
19539
19546
  this.setSearchResults(treeToDisplay);
19540
19547
  }
19541
- this.displayTree(treeToDisplay, searched != null);
19548
+ this.displayTree(treeToDisplay);
19542
19549
  }
19543
19550
  deactivateNodesOutOfDepthSettings() {
19544
19551
  if (this.optionsManager.getOptions().maxDepth != undefined || this.optionsManager.getOptions().minDepth != undefined) {