fastapi-voyager 0.15.0__py3-none-any.whl → 0.15.2__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 +263 -110
- fastapi_voyager/web/store.js +109 -111
- fastapi_voyager/web/vue-main.js +329 -263
- {fastapi_voyager-0.15.0.dist-info → fastapi_voyager-0.15.2.dist-info}/METADATA +16 -4
- {fastapi_voyager-0.15.0.dist-info → fastapi_voyager-0.15.2.dist-info}/RECORD +21 -20
- {fastapi_voyager-0.15.0.dist-info → fastapi_voyager-0.15.2.dist-info}/WHEEL +0 -0
- {fastapi_voyager-0.15.0.dist-info → fastapi_voyager-0.15.2.dist-info}/entry_points.txt +0 -0
- {fastapi_voyager-0.15.0.dist-info → fastapi_voyager-0.15.2.dist-info}/licenses/LICENSE +0 -0
fastapi_voyager/web/store.js
CHANGED
|
@@ -1,119 +1,117 @@
|
|
|
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
|
+
fullTagsCache: null, // Cache for full tags (before search)
|
|
45
|
+
tag: null,
|
|
46
|
+
_tag: null,
|
|
47
|
+
routeId: null,
|
|
48
|
+
collapsed: false,
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
graph: {
|
|
52
|
+
schemaId: null,
|
|
53
|
+
schemaKeys: new Set(),
|
|
54
|
+
schemaMap: {},
|
|
55
|
+
routeItems: [],
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
// schema options, schema, fields
|
|
59
|
+
search: {
|
|
60
|
+
mode: false,
|
|
61
|
+
invisible: false,
|
|
62
|
+
schemaName: null,
|
|
63
|
+
fieldName: null,
|
|
64
|
+
schemaOptions: [],
|
|
65
|
+
fieldOptions: [],
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
// route information
|
|
69
|
+
routeDetail: {
|
|
70
|
+
show: false,
|
|
71
|
+
routeCodeId: "",
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
// schema information
|
|
75
|
+
schemaDetail: {
|
|
76
|
+
show: false,
|
|
77
|
+
schemaCodeName: "",
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
searchDialog: {
|
|
81
|
+
show: false,
|
|
82
|
+
schema: null,
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
// global status
|
|
86
|
+
status: {
|
|
87
|
+
generating: false,
|
|
88
|
+
loading: false,
|
|
89
|
+
initializing: true,
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
// brief, hide primitive ...
|
|
93
|
+
modeControl: {
|
|
94
|
+
focus: false, // control the schema param
|
|
95
|
+
briefModeEnabled: false, // show brief mode toggle
|
|
96
|
+
pydanticResolveMetaEnabled: false, // show pydantic resolve meta toggle
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
// api filters
|
|
100
|
+
filter: {
|
|
101
|
+
hidePrimitiveRoute: false,
|
|
102
|
+
showFields: "object",
|
|
103
|
+
brief: false,
|
|
104
|
+
showModule: false,
|
|
105
|
+
},
|
|
106
106
|
})
|
|
107
107
|
|
|
108
|
-
|
|
109
108
|
const mutations = {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
increment() {
|
|
110
|
+
state.item.count += 1
|
|
111
|
+
},
|
|
113
112
|
}
|
|
114
113
|
|
|
115
|
-
|
|
116
114
|
export const store = {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
115
|
+
state,
|
|
116
|
+
mutations,
|
|
117
|
+
}
|