mobx-view-model-devtools 0.0.21 → 0.0.23
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 +2 -1
- package/index.cjs +2 -1
- package/index.d.ts +38 -20
- package/index.js +38837 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as mobx from 'mobx';
|
|
2
2
|
import { ObservableSet } from 'mobx';
|
|
3
|
-
import {
|
|
3
|
+
import { ViewModelStoreBase, AnyViewModel, AnyViewModelSimple } from 'mobx-view-model';
|
|
4
4
|
import { VirtualizerHandle } from 'virtua';
|
|
5
5
|
import { Ref } from 'yummies/mobx';
|
|
6
6
|
import { Maybe, AnyObject, Defined } from 'yummies/types';
|
|
7
7
|
import { KeyboardHandler as KeyboardHandler$1, KeyboardHandlerAction } from 'mobx-swiss-knife';
|
|
8
|
+
import * as react from 'react';
|
|
9
|
+
import { ComponentType } from 'react';
|
|
8
10
|
|
|
9
11
|
declare class KeyboardHandler extends KeyboardHandler$1<KeyboardHandlerAction> {
|
|
10
12
|
constructor(devtools: ViewModelDevtools);
|
|
@@ -28,6 +30,12 @@ declare abstract class ListItem<T> {
|
|
|
28
30
|
get isFitted(): boolean;
|
|
29
31
|
abstract get depth(): number;
|
|
30
32
|
get depthLine(): string;
|
|
33
|
+
get stringifiedData(): string;
|
|
34
|
+
get operations(): {
|
|
35
|
+
title: string;
|
|
36
|
+
icon: ComponentType;
|
|
37
|
+
action: VoidFunction;
|
|
38
|
+
}[];
|
|
31
39
|
expandKey: string;
|
|
32
40
|
constructor(devtools: ViewModelDevtools, key: string, _data: T, getChildren?: ((item: ListItem<T>) => ListItem<any>[]) | undefined, cache?: Map<string, any>);
|
|
33
41
|
}
|
|
@@ -50,30 +58,19 @@ declare class PropertyListItem extends ListItem<any> {
|
|
|
50
58
|
get searchData(): {
|
|
51
59
|
property: string;
|
|
52
60
|
};
|
|
61
|
+
private failedStringify;
|
|
62
|
+
get isCopiable(): boolean;
|
|
63
|
+
get stringifiedData(): string;
|
|
64
|
+
get operations(): {
|
|
65
|
+
title: string;
|
|
66
|
+
icon: (props: react.SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
67
|
+
action: () => Promise<void>;
|
|
68
|
+
}[];
|
|
53
69
|
protected constructor(devtools: ViewModelDevtools, property: Maybe<string>, path: string, order: number, parent: ListItem<any>);
|
|
54
70
|
static createKey(parent: ListItem<any>, property: Maybe<string>): string;
|
|
55
71
|
static create(devtools: ViewModelDevtools, property: Maybe<string>, path: string, order: number, parent: ListItem<any>): PropertyListItem;
|
|
56
72
|
}
|
|
57
73
|
|
|
58
|
-
type AnyVM = AnyViewModelSimple | AnyViewModel;
|
|
59
|
-
|
|
60
|
-
declare class VMListItem extends ListItem<AnyVM> {
|
|
61
|
-
private allVms;
|
|
62
|
-
private parent?;
|
|
63
|
-
private get childVMListItems();
|
|
64
|
-
get isFitted(): boolean;
|
|
65
|
-
private get propertyListItems();
|
|
66
|
-
get children(): ListItem<any>[];
|
|
67
|
-
private getVmParams;
|
|
68
|
-
get depth(): number;
|
|
69
|
-
searchData: {
|
|
70
|
-
name: string;
|
|
71
|
-
id: string;
|
|
72
|
-
};
|
|
73
|
-
displayName: string;
|
|
74
|
-
constructor(devtools: ViewModelDevtools, vm: AnyVM, allVms: AnyVM[], parent?: VMListItem | undefined);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
74
|
interface FocusableRef<T extends HTMLElement = HTMLElement> extends Ref<T, {
|
|
78
75
|
focused: boolean;
|
|
79
76
|
}> {
|
|
@@ -113,6 +110,7 @@ declare class ViewModelDevtools {
|
|
|
113
110
|
keyboardHandler: KeyboardHandler;
|
|
114
111
|
searchEngine: SearchEngine;
|
|
115
112
|
presentationMode: 'tree' | 'list';
|
|
113
|
+
sortPropertiesBy: 'asc' | 'desc' | 'none';
|
|
116
114
|
position: Defined<ViewModelDevtoolsConfig['position']>;
|
|
117
115
|
scrollListRef: Ref<VirtualizerHandle>;
|
|
118
116
|
anyCache: mobx.ObservableMap<string, any>;
|
|
@@ -134,6 +132,7 @@ declare class ViewModelDevtools {
|
|
|
134
132
|
setStore(viewModels: ViewModelStoreBase<AnyViewModel> | undefined): void;
|
|
135
133
|
setExtras(extras: Maybe<AnyObject>): void;
|
|
136
134
|
handleChangePresentationMode: (mode: string) => void;
|
|
135
|
+
handleSortPropertiesChange: (sortBy: string) => void;
|
|
137
136
|
expandAllVMs(): void;
|
|
138
137
|
collapseAllVms(): void;
|
|
139
138
|
showPopup(): void;
|
|
@@ -149,4 +148,23 @@ declare class ViewModelDevtools {
|
|
|
149
148
|
static connectExtras(extras: AnyObject): ViewModelDevtools;
|
|
150
149
|
}
|
|
151
150
|
|
|
151
|
+
declare class VMListItem extends ListItem<AnyVM> {
|
|
152
|
+
private allVms;
|
|
153
|
+
private parent?;
|
|
154
|
+
private get childVMListItems();
|
|
155
|
+
get isFitted(): boolean;
|
|
156
|
+
private get propertyListItems();
|
|
157
|
+
get children(): ListItem<any>[];
|
|
158
|
+
private getVmParams;
|
|
159
|
+
get depth(): number;
|
|
160
|
+
searchData: {
|
|
161
|
+
name: string;
|
|
162
|
+
id: string;
|
|
163
|
+
};
|
|
164
|
+
displayName: string;
|
|
165
|
+
constructor(devtools: ViewModelDevtools, vm: AnyVM, allVms: AnyVM[], parent?: VMListItem | undefined);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
type AnyVM = AnyViewModelSimple | AnyViewModel;
|
|
169
|
+
|
|
152
170
|
export { ViewModelDevtools };
|