mobx-view-model-devtools 0.0.34 → 0.0.36

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/index.d.ts CHANGED
@@ -1,23 +1,33 @@
1
+ import * as mobx_view_model from 'mobx-view-model';
2
+ import { ViewModelStoreBase, AnyViewModel, AnyViewModelSimple } from 'mobx-view-model';
1
3
  import * as mobx from 'mobx';
2
4
  import { ObservableSet } from 'mobx';
3
- import { ViewModelStoreBase, AnyViewModel, AnyViewModelSimple } from 'mobx-view-model';
4
5
  import { VirtualizerHandle } from 'virtua';
5
6
  import { Ref } from 'yummies/mobx';
6
7
  import { Maybe, AnyObject, Defined } from 'yummies/types';
7
8
  import { KeyboardHandler as KeyboardHandler$1, KeyboardHandlerAction } from 'mobx-swiss-knife';
8
- import * as react from 'react';
9
- import { ComponentType } from 'react';
9
+ import { ComponentType, ChangeEventHandler } from 'react';
10
10
 
11
11
  declare class KeyboardHandler extends KeyboardHandler$1<KeyboardHandlerAction> {
12
12
  constructor(devtools: ViewModelDevtools);
13
13
  }
14
14
 
15
+ type ListItemViewProps<T extends ListItem<any>> = {
16
+ item: T;
17
+ };
18
+ type ListItemOperation<T> = {
19
+ title: string;
20
+ icon: ComponentType;
21
+ action: VoidFunction;
22
+ } | ComponentType<ListItemViewProps<ListItem<T>>>;
15
23
  declare abstract class ListItem<T> {
16
24
  devtools: ViewModelDevtools;
17
25
  key: string;
18
26
  private _data;
19
27
  private getChildren?;
20
28
  cache: Map<string, any>;
29
+ protected tempVarName: string;
30
+ protected dataWatchAtom: mobx.IAtom;
21
31
  get isExpanded(): boolean;
22
32
  get children(): ListItem<any>[];
23
33
  get isExpandable(): boolean;
@@ -31,11 +41,8 @@ declare abstract class ListItem<T> {
31
41
  abstract get depth(): number;
32
42
  get depthLine(): string;
33
43
  get stringifiedData(): string;
34
- get operations(): {
35
- title: string;
36
- icon: ComponentType;
37
- action: VoidFunction;
38
- }[];
44
+ get operations(): ListItemOperation<T>[];
45
+ getSavedTempVarNotification(tempVarName: string): string;
39
46
  expandKey: string;
40
47
  constructor(devtools: ViewModelDevtools, key: string, _data: T, getChildren?: ((item: ListItem<T>) => ListItem<any>[]) | undefined, cache?: Map<string, any>);
41
48
  }
@@ -45,7 +52,10 @@ declare class PropertyListItem extends ListItem<any> {
45
52
  path: string;
46
53
  order: number;
47
54
  private parent;
55
+ editContent: string;
56
+ isEditMode: boolean;
48
57
  get data(): any;
58
+ get descriptor(): PropertyDescriptor | null | undefined;
49
59
  get dataType(): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
50
60
  get stringifiedDataType(): string;
51
61
  get type(): "array" | "instance" | "function" | "object" | "primitive";
@@ -61,11 +71,9 @@ declare class PropertyListItem extends ListItem<any> {
61
71
  private failedStringify;
62
72
  get isCopiable(): boolean;
63
73
  get stringifiedData(): string;
64
- get operations(): {
65
- title: string;
66
- icon: (props: react.SVGProps<SVGSVGElement>) => React.JSX.Element;
67
- action: () => Promise<void>;
68
- }[];
74
+ get operations(): ListItemOperation<any>[];
75
+ handleChangeEditContent: ChangeEventHandler<HTMLInputElement>;
76
+ getSavedTempVarNotification(tempVarName: string): string;
69
77
  protected constructor(devtools: ViewModelDevtools, property: Maybe<string>, path: string, order: number, parent: ListItem<any>);
70
78
  static createKey(parent: ListItem<any>, property: Maybe<string>): string;
71
79
  static create(devtools: ViewModelDevtools, property: Maybe<string>, path: string, order: number, parent: ListItem<any>): PropertyListItem;
@@ -137,6 +145,7 @@ declare class ViewModelDevtools {
137
145
  expandAllVMs(): void;
138
146
  collapseAllVms(): void;
139
147
  showPopup(): void;
148
+ get notifications(): AnyViewModel | mobx_view_model.AnyViewModelSimple;
140
149
  hidePopup(): void;
141
150
  private init;
142
151
  private isInitialized;
@@ -157,6 +166,8 @@ declare class VMListItem extends ListItem<AnyVM> {
157
166
  private get propertyListItems();
158
167
  get children(): ListItem<any>[];
159
168
  private getVmParams;
169
+ getSavedTempVarNotification(tempVarName: string): string;
170
+ get operations(): ListItemOperation<any>[];
160
171
  get depth(): number;
161
172
  searchData: {
162
173
  name: string;