fastapi-voyager 0.15.0__py3-none-any.whl → 0.15.1__py3-none-any.whl
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.
- fastapi_voyager/er_diagram.py +57 -109
- fastapi_voyager/render.py +12 -2
- fastapi_voyager/server.py +1 -0
- fastapi_voyager/templates/dot/er_diagram.j2 +29 -0
- fastapi_voyager/version.py +1 -1
- fastapi_voyager/web/component/demo.js +5 -5
- fastapi_voyager/web/component/render-graph.js +60 -61
- fastapi_voyager/web/component/route-code-display.js +35 -37
- fastapi_voyager/web/component/schema-code-display.js +50 -53
- fastapi_voyager/web/graph-ui.js +90 -101
- fastapi_voyager/web/graphviz.svg.css +10 -10
- fastapi_voyager/web/graphviz.svg.js +306 -316
- fastapi_voyager/web/icon/site.webmanifest +11 -1
- fastapi_voyager/web/index.html +225 -109
- fastapi_voyager/web/store.js +107 -111
- fastapi_voyager/web/vue-main.js +287 -258
- {fastapi_voyager-0.15.0.dist-info → fastapi_voyager-0.15.1.dist-info}/METADATA +16 -4
- {fastapi_voyager-0.15.0.dist-info → fastapi_voyager-0.15.1.dist-info}/RECORD +21 -20
- {fastapi_voyager-0.15.0.dist-info → fastapi_voyager-0.15.1.dist-info}/WHEEL +0 -0
- {fastapi_voyager-0.15.0.dist-info → fastapi_voyager-0.15.1.dist-info}/entry_points.txt +0 -0
- {fastapi_voyager-0.15.0.dist-info → fastapi_voyager-0.15.1.dist-info}/licenses/LICENSE +0 -0
fastapi_voyager/web/store.js
CHANGED
|
@@ -1,119 +1,115 @@
|
|
|
1
|
-
const { reactive } = window.Vue
|
|
1
|
+
const { reactive } = window.Vue
|
|
2
2
|
|
|
3
3
|
const state = reactive({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
4
|
+
item: {
|
|
5
|
+
count: 0,
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
version: "",
|
|
9
|
+
config: {
|
|
10
|
+
initial_page_policy: "first",
|
|
11
|
+
has_er_diagram: false,
|
|
12
|
+
enable_pydantic_resolve_meta: false,
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
mode: "voyager", // voyager / er-diagram
|
|
16
|
+
|
|
17
|
+
previousTagRoute: {
|
|
18
|
+
// for shift + click, store previous tag/route, and populate back when needed
|
|
19
|
+
hasValue: false,
|
|
20
|
+
tag: null,
|
|
21
|
+
routeId: null,
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
swagger: {
|
|
25
|
+
url: "",
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
rightDrawer: {
|
|
29
|
+
drawer: false,
|
|
30
|
+
width: 300,
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
fieldOptions: [
|
|
34
|
+
{ label: "No field", value: "single" },
|
|
35
|
+
{ label: "Object fields", value: "object" },
|
|
36
|
+
{ label: "All fields", value: "all" },
|
|
37
|
+
],
|
|
38
|
+
|
|
39
|
+
// tags and routes
|
|
40
|
+
leftPanel: {
|
|
41
|
+
width: 300,
|
|
42
|
+
previousWidth: 300,
|
|
43
|
+
tags: null,
|
|
44
|
+
tag: null,
|
|
45
|
+
_tag: null,
|
|
46
|
+
routeId: null,
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
graph: {
|
|
50
|
+
schemaId: null,
|
|
51
|
+
schemaKeys: new Set(),
|
|
52
|
+
schemaMap: {},
|
|
53
|
+
routeItems: [],
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
// schema options, schema, fields
|
|
57
|
+
search: {
|
|
58
|
+
mode: false,
|
|
59
|
+
invisible: false,
|
|
60
|
+
schemaName: null,
|
|
61
|
+
fieldName: null,
|
|
62
|
+
schemaOptions: [],
|
|
63
|
+
fieldOptions: [],
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
// route information
|
|
67
|
+
routeDetail: {
|
|
68
|
+
show: false,
|
|
69
|
+
routeCodeId: "",
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
// schema information
|
|
73
|
+
schemaDetail: {
|
|
74
|
+
show: false,
|
|
75
|
+
schemaCodeName: "",
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
searchDialog: {
|
|
79
|
+
show: false,
|
|
80
|
+
schema: null,
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
// global status
|
|
84
|
+
status: {
|
|
85
|
+
generating: false,
|
|
86
|
+
loading: false,
|
|
87
|
+
initializing: true,
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
// brief, hide primitive ...
|
|
91
|
+
modeControl: {
|
|
92
|
+
focus: false, // control the schema param
|
|
93
|
+
briefModeEnabled: false, // show brief mode toggle
|
|
94
|
+
pydanticResolveMetaEnabled: false, // show pydantic resolve meta toggle
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
// api filters
|
|
98
|
+
filter: {
|
|
99
|
+
hidePrimitiveRoute: false,
|
|
100
|
+
showFields: "object",
|
|
101
|
+
brief: false,
|
|
102
|
+
showModule: false,
|
|
103
|
+
},
|
|
106
104
|
})
|
|
107
105
|
|
|
108
|
-
|
|
109
106
|
const mutations = {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
increment() {
|
|
108
|
+
state.item.count += 1
|
|
109
|
+
},
|
|
113
110
|
}
|
|
114
111
|
|
|
115
|
-
|
|
116
112
|
export const store = {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
113
|
+
state,
|
|
114
|
+
mutations,
|
|
115
|
+
}
|