This is multi-pronged: firstly to fix multiple existing vulnerabilities in nested dependencies: - upgraded vitepress which had vulnerable dependencies - removed unplugin-fonts which had vulnerabilities; loading fonts directly from index file now - removed vitepress-plugin-mermaid because incompatible with upgraded vitepress - replaced above with vitepress-mermaid-viewer, and using dagre to solve rendering issue - vitepress-mermaid-viewer required a peer dependency override, ideally temporary secondly to install requirement for future security features: dompurify after the above, no vulnerabilities detected by npm audit
1.4 KiB
1.4 KiB
| layout |
|---|
| doc |
Component Hierarchy
A VueJS application is made up of a hierarchy of components, with parent components instantiating any number or kind of child components based on defined logic and user interactions. The diagram below shows how shacl-vue is put together.
By default, a child component is instantiated by its parent using the appropriate component tag, which is based on the component filename, e.g. <NodeShapeEditor></NodeShapeEditor> for NodeShapeEditor.vue. The exception would be when dynamic programmatic component instantiation is used via the component tag and :is binding, e.g.:
<component :is="myComponent"></component>
This approach is used in shacl-vue for dynamically matching the appropriate editor component for a given sh:PropertyShape.
flowchart TD
0[App.vue]
A(ShaclVue)
A2{user selects data type}
A31(AppHeader)
A32(AppFooter)
D(NodeShapeViewer)
D21(BlankNodeViewer)
D22(LiteralNodeViewer)
D23(NamedNodeViewer)
E(FormEditor)
F(NodeShapeEditor)
G(PropertyShapeEditor)
H(Matched editor component)
0 --> |config| A
A --> A2
A --> A31
A --> A32
A2 --> D
A2 --> |add record| E
D --> |edit record| E
D --> D21
D --> D22
D --> D23
E --> |exactly one instance| F
F --> |one instance per property| G
G --> |runs matching code| H