mobx-view-model-devtools 0.0.19 → 0.0.20

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.
package/auto.global.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode(".root_Xsw1F{display:contents}.root_Xsw1F *{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:14px}.vmButton_Xr1Q6{position:fixed;z-index:999999;width:36px;height:36px;cursor:pointer;border-radius:8px;transition:all .15s ease-in-out}.vmButton_Xr1Q6[data-position=top-right],.vmButton_Xr1Q6[data-position=undefined]{top:12px;right:12px}.vmButton_Xr1Q6[data-position=top-right].opened_gewqL,.vmButton_Xr1Q6[data-position=undefined].opened_gewqL{top:-40px}.vmButton_Xr1Q6[data-position=top-left]{top:12px;left:12px}.vmButton_Xr1Q6[data-position=top-left].opened_gewqL{top:-40px}.vmButton_Xr1Q6[data-position=bottom-left]{bottom:12px;left:12px}.vmButton_Xr1Q6[data-position=bottom-left].opened_gewqL{bottom:-40px}.vmButton_Xr1Q6[data-position=bottom-right]{bottom:12px;right:12px}.vmButton_Xr1Q6[data-position=bottom-right].opened_gewqL{bottom:-40px}.vmButton_Xr1Q6>img{pointer-events:none;position:absolute;inset:0;border-radius:8px}.vmButton_Xr1Q6>div{transition:all .15s ease-in-out;position:absolute;inset:0;border-radius:8px;border:2px solid #00000057}.vmButton_Xr1Q6>span{left:-4px;top:-4px;pointer-events:none;position:absolute;display:flex;border-radius:8px;background:#005c26cf;padding:2px;font-weight:600;font-size:12px;line-height:12px;color:#2aff0a}.vmButton_Xr1Q6.opened_gewqL{pointer-events:none}.vmButton_Xr1Q6:not(.isConnected_tjs3F){filter:grayscale(1)}.closePopupButton_-08HG{width:28px;padding:6px}.hierarchyButton_h3FD7{width:18px;height:18px;padding:2px;border-radius:6px}.hierarchyButton_h3FD7.active_4JTx5{background:#f0f0f01f}.vmPopup_Q4l4j{position:fixed;z-index:999999;width:520px;border-radius:8px;height:calc(100vh - 24px);width:calc(100vw - 34px);max-width:520px}.vmPopup_Q4l4j[data-position=top-right],.vmPopup_Q4l4j[data-position=undefined]{top:12px;right:12px}.vmPopup_Q4l4j[data-position=top-left]{top:12px;left:12px}.vmPopup_Q4l4j[data-position=bottom-left]{bottom:12px;left:12px}.vmPopup_Q4l4j[data-position=bottom-right]{bottom:12px;right:12px}.treeItemHeader_9gR6Q{display:flex;align-items:center;gap:4px;margin:auto 0;cursor:pointer;background:#1e1e1e;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.treeItemLabel_eiMgP{padding:0 4px;border-radius:4px}.treeItemMetaText_cmfX0{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.treeItem_sRXPA{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:pre;background:#1e1e1e;height:22px;display:flex;flex-direction:row;align-items:center;padding-left:calc(0px + (var(--level) * 20px));position:sticky;top:-8px;z-index:1}.treeItem_sRXPA:not([data-fitted=true])>header{opacity:.6}.vmTreeItem_t-7jc .treeItemLabel_eiMgP{background:#0f6013}.vmTreeItem_t-7jc .treeItemMetaText_cmfX0{color:#5ab65e}.extrasItem_MI9Fa .treeItemLabel_eiMgP{background:#6b6902}.expandButton_EObqt{color:#a0a0a0;opacity:1!important;width:16px;height:16px;font-weight:700;cursor:pointer}.expandButton_EObqt.expanded_uFpb7{color:#b8b8b8;transform:rotate(90deg)}.expandButton_EObqt.disabled_IDojS{opacity:.35!important}.iconToggleButton_R48wm{display:flex;align-items:center;gap:2px;position:relative;height:20px;outline:none}.activePosition_IXsRn{position:absolute;height:16px;width:16px;padding:1px;box-sizing:content-box;background:#515151;border-radius:4px;transition:all 149ms ease;transform:translate(calc(20px * var(--index)))}.option_a5IcR{padding:1px;z-index:1;width:18px;height:18px;display:flex;align-items:center;justify-content:center}.option_a5IcR>svg{width:14px;height:14px}.property_tyrFk{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:pre;background:#1e1e1e;height:22px;display:flex;flex-direction:row;align-items:center;position:relative;color:#616161;padding-left:calc(28px + (var(--level) * 15px))}.property_tyrFk.expandable_ZtNTw{cursor:pointer}.property_tyrFk[data-fitted=false]{opacity:.5}.property_tyrFk.instance_aPKFv{--value-color: rgb(186 130 190)}.property_tyrFk.primitive_mOPtu.boolean_H-c-u,.property_tyrFk.primitive_mOPtu.number_Mk-lR,.property_tyrFk.primitive_mOPtu.object_rbtD2,.property_tyrFk.primitive_mOPtu.undefined_xHzJR,.property_tyrFk.primitive_mOPtu.bigint_vEvWZ,.property_tyrFk.primitive_mOPtu.symbol_izwyn{--value-color: rgb(89, 153, 205)}.primitive_mOPtu.string_qjuUu{--value-color: #af7249}.propertyName_gpj0H{color:#ccc}.propertyMeta_xSfkm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.propertyValue_QT-FH{color:var(--value-color, #616161);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.propertyValue_QT-FH:has(+.propertyName_gpj0H){margin-right:4px}.vmContent_TIK57{color:#ccc;background:#1e1e1e;overflow:auto;display:flex;flex-direction:column}.vmContentHeader_M1JNM{display:flex;justify-content:space-between;align-items:center;height:32px;padding-left:8px;font-weight:600}.vmContentHeaderLogo_FRJDO{width:16px;margin-right:6px}.vmContentHeaderTitle_lYmde{font-size:16px;margin-right:auto}.vmContentControlPanel_CgUN9{padding:0 8px;width:100%;background:#1e1e1e;display:flex;flex-direction:row;gap:4px}.vmContentControlPanelActions_lONbA{display:flex;flex-direction:row;align-items:center}.hiearchyToggleButton_0FTG-{display:flex}.vmContentHeaderBaseActions_qc7CI{display:flex;flex-direction:row;gap:4px;height:16px;align-items:center;margin-left:6px;margin-right:auto}.vmContentInput_29GM1{display:flex;position:relative;flex:1}.vmContentInput_29GM1>svg{position:absolute;width:16px;inset:50% 0;transform:translate(6px,-50%);pointer-events:none;opacity:.7}.vmContentInput_29GM1>input{background:#343434;border-radius:4px;outline:0;width:100%;padding:3px 26px;font-size:14px;text-overflow:ellipsis}.vmContentInput_29GM1>button{position:absolute;right:6px;width:16px;transform:translate(4px,-50%);top:50%;opacity:.6;display:none}.vmContentInput_29GM1.filled_6JZa0>svg{opacity:.9}.vmContentInput_29GM1.filled_6JZa0>button{display:block}.vmContentTree_BETR6{display:flex;flex-direction:column;padding:8px;overflow:auto;scrollbar-width:thin;scrollbar-color:#81818170 #1e1e1e}.vmContentTree_BETR6:hover{scrollbar-color:#818181 #1e1e1e}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode(".root_Xsw1F{display:contents}.root_Xsw1F *{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:14px}.vmButton_Xr1Q6{position:fixed;z-index:999999;width:36px;height:36px;cursor:pointer;border-radius:8px;outline:0;transition:all .15s ease-in-out}.vmButton_Xr1Q6[data-position=top-right],.vmButton_Xr1Q6[data-position=undefined]{top:12px;right:12px}.vmButton_Xr1Q6[data-position=top-right].opened_gewqL,.vmButton_Xr1Q6[data-position=undefined].opened_gewqL{top:-40px}.vmButton_Xr1Q6[data-position=top-left]{top:12px;left:12px}.vmButton_Xr1Q6[data-position=top-left].opened_gewqL{top:-40px}.vmButton_Xr1Q6[data-position=bottom-left]{bottom:12px;left:12px}.vmButton_Xr1Q6[data-position=bottom-left].opened_gewqL{bottom:-40px}.vmButton_Xr1Q6[data-position=bottom-right]{bottom:12px;right:12px}.vmButton_Xr1Q6[data-position=bottom-right].opened_gewqL{bottom:-40px}.vmButton_Xr1Q6>img{pointer-events:none;position:absolute;inset:0;border-radius:8px}.vmButton_Xr1Q6>div{transition:all .15s ease-in-out;position:absolute;inset:0;border-radius:8px;border:2px solid #00000057}.vmButton_Xr1Q6>span{left:-4px;top:-4px;pointer-events:none;position:absolute;display:flex;border-radius:8px;background:#005c26cf;padding:2px;font-weight:600;font-size:12px;line-height:12px;color:#2aff0a}.vmButton_Xr1Q6.opened_gewqL{pointer-events:none}.vmButton_Xr1Q6:not(.isConnected_tjs3F){filter:grayscale(1)}.closePopupButton_-08HG{width:28px;padding:6px}.hierarchyButton_h3FD7{width:18px;height:18px;padding:2px;border-radius:6px}.hierarchyButton_h3FD7.active_4JTx5{background:#f0f0f01f}.vmPopup_Q4l4j{position:fixed;z-index:999999;width:520px;border-radius:8px;height:calc(100vh - 24px);width:calc(100vw - 34px);max-width:520px}.vmPopup_Q4l4j[data-position=top-right],.vmPopup_Q4l4j[data-position=undefined]{top:12px;right:12px}.vmPopup_Q4l4j[data-position=top-left]{top:12px;left:12px}.vmPopup_Q4l4j[data-position=bottom-left]{bottom:12px;left:12px}.vmPopup_Q4l4j[data-position=bottom-right]{bottom:12px;right:12px}.treeItemHeader_9gR6Q{display:flex;align-items:center;gap:4px;margin:auto 0;cursor:pointer;background:#1e1e1e;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.treeItemLabel_eiMgP{padding:0 4px;border-radius:4px}.treeItemMetaText_cmfX0{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.treeItem_sRXPA{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:pre;background:#1e1e1e;height:22px;display:flex;flex-direction:row;align-items:center;padding-left:calc(0px + (var(--level) * 20px));position:sticky;top:-8px;z-index:1}.treeItem_sRXPA:not([data-fitted=true])>header{opacity:.6}.vmTreeItem_t-7jc .treeItemLabel_eiMgP{background:#0f6013}.vmTreeItem_t-7jc .treeItemMetaText_cmfX0{color:#5ab65e}.extrasItem_MI9Fa .treeItemLabel_eiMgP{background:#6b6902}.expandButton_EObqt{color:#a0a0a0;opacity:1!important;width:16px;height:16px;font-weight:700;cursor:pointer}.expandButton_EObqt.expanded_uFpb7{color:#b8b8b8;transform:rotate(90deg)}.expandButton_EObqt.disabled_IDojS{opacity:.35!important}.iconToggleButton_R48wm{display:flex;align-items:center;gap:2px;position:relative;height:20px;outline:none}.activePosition_IXsRn{position:absolute;height:16px;width:16px;padding:1px;box-sizing:content-box;background:#515151;border-radius:4px;transition:all 149ms ease;transform:translate(calc(20px * var(--index)))}.option_a5IcR{padding:1px;z-index:1;width:18px;height:18px;display:flex;align-items:center;justify-content:center}.option_a5IcR>svg{width:14px;height:14px}.property_tyrFk{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:pre;background:#1e1e1e;height:22px;display:flex;flex-direction:row;align-items:center;position:relative;color:#616161;padding-left:calc(28px + (var(--level) * 15px))}.property_tyrFk.expandable_ZtNTw{cursor:pointer}.property_tyrFk[data-fitted=false]{opacity:.5}.property_tyrFk.instance_aPKFv{--value-color: rgb(186 130 190)}.property_tyrFk.primitive_mOPtu.boolean_H-c-u,.property_tyrFk.primitive_mOPtu.number_Mk-lR,.property_tyrFk.primitive_mOPtu.object_rbtD2,.property_tyrFk.primitive_mOPtu.undefined_xHzJR,.property_tyrFk.primitive_mOPtu.bigint_vEvWZ,.property_tyrFk.primitive_mOPtu.symbol_izwyn{--value-color: rgb(89, 153, 205)}.primitive_mOPtu.string_qjuUu{--value-color: #af7249}.propertyName_gpj0H{color:#ccc}.propertyMeta_xSfkm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.propertyValue_QT-FH{color:var(--value-color, #616161);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.propertyValue_QT-FH:has(+.propertyName_gpj0H){margin-right:4px}.vmContent_TIK57{color:#ccc;background:#1e1e1e;overflow:auto;display:flex;flex-direction:column}.vmContentHeader_M1JNM{display:flex;justify-content:space-between;align-items:center;height:32px;padding-left:8px;font-weight:600}.vmContentHeaderLogo_FRJDO{width:16px;margin-right:6px}.vmContentHeaderTitle_lYmde{font-size:16px;margin-right:auto}.vmContentControlPanel_CgUN9{padding:0 8px;width:100%;background:#1e1e1e;display:flex;flex-direction:row;gap:4px}.vmContentControlPanelActions_lONbA{display:flex;flex-direction:row;align-items:center}.hiearchyToggleButton_0FTG-{display:flex}.vmContentHeaderBaseActions_qc7CI{display:flex;flex-direction:row;gap:4px;height:16px;align-items:center;margin-left:6px;margin-right:auto}.vmContentInput_29GM1{display:flex;position:relative;flex:1}.vmContentInput_29GM1>svg{position:absolute;width:16px;inset:50% 0;transform:translate(6px,-50%);pointer-events:none;opacity:.7}.vmContentInput_29GM1>input{background:#343434;border-radius:4px;outline:0;width:100%;padding:3px 26px;font-size:14px;text-overflow:ellipsis}.vmContentInput_29GM1>button{position:absolute;right:6px;width:16px;transform:translate(4px,-50%);top:50%;opacity:.6;display:none}.vmContentInput_29GM1.filled_6JZa0>svg{opacity:.9}.vmContentInput_29GM1.filled_6JZa0>button{display:block}.vmContentTree_BETR6{display:flex;flex-direction:column;padding:8px;overflow:auto;scrollbar-width:thin;scrollbar-color:#81818170 #1e1e1e}.vmContentTree_BETR6:hover{scrollbar-color:#818181 #1e1e1e}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
2
2
  function getDefaultExportFromCjs(x2) {
3
3
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
4
4
  }
@@ -31321,10 +31321,14 @@ class ExtrasItemRenderVM extends ViewModelImpl {
31321
31321
  class DevtoolsClientVM extends ViewModelImpl {
31322
31322
  devtools = this.payload.devtools;
31323
31323
  handleToggleOpen = () => {
31324
- this.devtools.isPopupOpened = !this.devtools.isPopupOpened;
31324
+ if (this.devtools.isPopupOpened) {
31325
+ this.devtools.hidePopup();
31326
+ } else {
31327
+ this.devtools.showPopup();
31328
+ }
31325
31329
  };
31326
31330
  handleClosePopupClick = () => {
31327
- this.devtools.isPopupOpened = false;
31331
+ this.devtools.hidePopup();
31328
31332
  };
31329
31333
  willMount() {
31330
31334
  makeObservable(this, {
@@ -36937,25 +36941,29 @@ class KeyboardHandler2 extends KeyboardHandler$1 {
36937
36941
  {
36938
36942
  shortcuts: ["Ctrl+F12"],
36939
36943
  action: () => {
36940
- devtools.isPopupOpened = !devtools.isPopupOpened;
36944
+ if (devtools.isPopupOpened) {
36945
+ devtools.hidePopup();
36946
+ } else {
36947
+ devtools.showPopup();
36948
+ }
36941
36949
  }
36942
36950
  },
36943
36951
  {
36944
36952
  shortcuts: ["Escape"],
36945
36953
  action: () => {
36946
- devtools.isPopupOpened = false;
36954
+ devtools.hidePopup();
36947
36955
  }
36948
36956
  },
36949
36957
  {
36950
36958
  shortcuts: ["Ctrl+ArrowLeft"],
36951
36959
  action: () => {
36952
- devtools.isAllVmsExpandedByDefault = false;
36960
+ devtools.collapseAllVms();
36953
36961
  }
36954
36962
  },
36955
36963
  {
36956
36964
  shortcuts: ["Ctrl+ArrowRight"],
36957
36965
  action: () => {
36958
- devtools.isAllVmsExpandedByDefault = true;
36966
+ devtools.expandAllVMs();
36959
36967
  }
36960
36968
  },
36961
36969
  {
@@ -37212,11 +37220,10 @@ class ViewModelDevtools {
37212
37220
  this.config = config;
37213
37221
  this.isPopupOpened = !!this.config.defaultIsOpened;
37214
37222
  this.displayType = "popup";
37215
- this.extras = this.config.extras;
37216
37223
  this.vmStore = new ViewModelStoreImpl();
37217
- this.projectVmStore = this.config.viewModels;
37218
- this.expandedVmsSet = observable.set();
37219
- this.isAllVmsExpandedByDefault = true;
37224
+ this.setExtras(this.config.extras);
37225
+ this.setStore(this.config.viewModels);
37226
+ this.expandedVmsMap = observable.map();
37220
37227
  this.presentationMode = "tree";
37221
37228
  this.expandedVmItemsPaths = observable.set();
37222
37229
  this.logoUrl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAACTFBMVEUvEQFCGQIuEQFAGALpZhjoZhlgJANAGALrZhiAMAR1KwNKHAJXIAM4FQFsKgWUNgL09PYvEQCgPARoJwNRHgL////U0dCoSRGSPgzFTQljKwl5MggjDQHm5ORWsU2JNATWWBC4SQxsMQysQAX6+vra2NbMUQtRJQxWLgu/S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ikzlb5DxswBjAAhvFX2+2UrRgIyHDtwzGMoFexFZto/HbAJBdFwHOYAAAAASUVORK5CYII=";
@@ -37227,18 +37234,21 @@ class ViewModelDevtools {
37227
37234
  this.searchEngine = new SearchEngine();
37228
37235
  makeObservable(this, {
37229
37236
  isPopupOpened: observable.ref,
37230
- isAllVmsExpandedByDefault: observable,
37231
37237
  projectVmStore: observable.ref,
37232
37238
  presentationMode: observable.ref,
37233
37239
  extras: observable.ref,
37234
37240
  setStore: action,
37235
37241
  setExtras: action,
37242
+ showPopup: action,
37243
+ hidePopup: action,
37236
37244
  handleChangePresentationMode: action,
37237
37245
  handleExpandVmPropertyClick: action,
37246
+ expandAllVMs: action,
37247
+ collapseAllVms: action,
37238
37248
  handleExpandExtraPropertyClick: action,
37239
37249
  allVms: computed.struct,
37240
37250
  isActive: computed,
37241
- vmTree: computed.struct,
37251
+ vmsData: computed.struct,
37242
37252
  rootVms: computed.struct
37243
37253
  });
37244
37254
  this.render();
@@ -37248,7 +37258,6 @@ class ViewModelDevtools {
37248
37258
  vmStore;
37249
37259
  projectVmStore;
37250
37260
  extras;
37251
- isAllVmsExpandedByDefault;
37252
37261
  expandedVmItemsPaths;
37253
37262
  logoUrl;
37254
37263
  inputRef;
@@ -37256,7 +37265,7 @@ class ViewModelDevtools {
37256
37265
  keyboardHandler;
37257
37266
  searchEngine;
37258
37267
  presentationMode;
37259
- expandedVmsSet;
37268
+ expandedVmsMap;
37260
37269
  scrollListRef;
37261
37270
  autoscrollTimeout;
37262
37271
  get allVms() {
@@ -37272,14 +37281,12 @@ class ViewModelDevtools {
37272
37281
  return !vmParams || vmParams.parentViewModel == null;
37273
37282
  });
37274
37283
  }
37275
- get vmTree() {
37276
- const flattenTreeItems = [];
37277
- const result = [];
37284
+ get vmsData() {
37285
+ const flatten = [];
37286
+ const tree = [];
37278
37287
  const createTreeItem = (vm, inputDepth) => {
37279
37288
  const depth = this.presentationMode === "list" ? 0 : inputDepth;
37280
- const alreadyExistVmTreeItem = flattenTreeItems.find(
37281
- (it) => it.vm === vm
37282
- );
37289
+ const alreadyExistVmTreeItem = flatten.find((it) => it.vm === vm);
37283
37290
  if (alreadyExistVmTreeItem) {
37284
37291
  return alreadyExistVmTreeItem;
37285
37292
  }
@@ -37299,7 +37306,14 @@ class ViewModelDevtools {
37299
37306
  id: (vm.id || "").toLowerCase().trim()
37300
37307
  }
37301
37308
  };
37302
- flattenTreeItems.push(treeItem2);
37309
+ untracked(() => {
37310
+ if (!this.expandedVmsMap.has(treeItem2.key)) {
37311
+ runInAction(() => {
37312
+ this.expandedVmsMap.set(treeItem2.key, true);
37313
+ });
37314
+ }
37315
+ });
37316
+ flatten.push(treeItem2);
37303
37317
  const collectedChildren = this.allVms.filter((maybeChildVm) => {
37304
37318
  const params = this.getVmParams(maybeChildVm);
37305
37319
  return params?.parentViewModel && params.parentViewModel === vm;
@@ -37310,10 +37324,16 @@ class ViewModelDevtools {
37310
37324
  this.rootVms.forEach((vm) => {
37311
37325
  const item = createTreeItem(vm, 0);
37312
37326
  if (item) {
37313
- result.push(item);
37327
+ tree.push(item);
37314
37328
  }
37315
37329
  });
37316
- return result;
37330
+ return {
37331
+ flatten,
37332
+ tree
37333
+ };
37334
+ }
37335
+ get vmTree() {
37336
+ return this.vmsData.tree;
37317
37337
  }
37318
37338
  get isActive() {
37319
37339
  return !!this.projectVmStore || Object.keys(this.extras || {}).length > 0;
@@ -37322,7 +37342,7 @@ class ViewModelDevtools {
37322
37342
  return this.config.containerId ?? "view-model-devtools";
37323
37343
  }
37324
37344
  isExpanded(vmItem) {
37325
- return this.expandedVmsSet.has(vmItem.key) || this.searchEngine.isActive || this.isAllVmsExpandedByDefault;
37345
+ return this.expandedVmsMap.get(vmItem.key) || this.searchEngine.isActive;
37326
37346
  }
37327
37347
  checkIsVmPathExpanded(vmItem, path) {
37328
37348
  const searchResult = this.searchEngine.getSearchResult({
@@ -37363,11 +37383,7 @@ class ViewModelDevtools {
37363
37383
  }
37364
37384
  }
37365
37385
  handleVmItemHeaderClick(vmItem) {
37366
- if (this.isExpanded(vmItem)) {
37367
- this.expandedVmsSet.delete(vmItem.key);
37368
- } else {
37369
- this.expandedVmsSet.add(vmItem.key);
37370
- }
37386
+ this.expandedVmsMap.set(vmItem.key, !this.isExpanded(vmItem));
37371
37387
  }
37372
37388
  isExpandable(vmItem) {
37373
37389
  return vmItem.children.length > 0 && this.presentationMode !== "list";
@@ -37386,10 +37402,24 @@ class ViewModelDevtools {
37386
37402
  }
37387
37403
  handleChangePresentationMode = (mode) => {
37388
37404
  this.presentationMode = mode === "list" ? "list" : "tree";
37389
- this.isAllVmsExpandedByDefault = true;
37390
37405
  this.expandedVmItemsPaths.clear();
37391
- this.expandedVmsSet.clear();
37406
+ this.expandedVmsMap.clear();
37392
37407
  };
37408
+ expandAllVMs() {
37409
+ this.expandedVmsMap.replace(
37410
+ this.vmsData.flatten.map((it) => [it.key, true])
37411
+ );
37412
+ }
37413
+ collapseAllVms() {
37414
+ this.expandedVmsMap.clear();
37415
+ }
37416
+ showPopup() {
37417
+ this.isPopupOpened = true;
37418
+ this.expandAllVMs();
37419
+ }
37420
+ hidePopup() {
37421
+ this.isPopupOpened = false;
37422
+ }
37393
37423
  init() {
37394
37424
  reaction(
37395
37425
  () => this.searchEngine.formattedSearchText,