@antelopejs/dms-database 0.0.4 → 0.0.6
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.
|
@@ -49,14 +49,20 @@ const computedPath = computed<[string, number, number]>(() => {
|
|
|
49
49
|
:marker-end="markerEnd"
|
|
50
50
|
:marker-start="markerStart"
|
|
51
51
|
:style="style"
|
|
52
|
-
:label="label"
|
|
53
52
|
:label-x="computedPath[1]"
|
|
54
53
|
:label-y="computedPath[2]"
|
|
55
|
-
:label
|
|
56
|
-
:label-show-bg="labelShowBg"
|
|
57
|
-
:label-bg-style="labelBgStyle"
|
|
58
|
-
:label-bg-padding="labelBgPadding"
|
|
59
|
-
:label-bg-border-radius="labelBgBorderRadius"
|
|
54
|
+
:label="undefined"
|
|
60
55
|
:interaction-width="interactionWidth"
|
|
61
56
|
/>
|
|
57
|
+
<text
|
|
58
|
+
v-if="label"
|
|
59
|
+
class="vue-flow__edge-text"
|
|
60
|
+
:x="computedPath[1]"
|
|
61
|
+
:y="computedPath[2]"
|
|
62
|
+
text-anchor="middle"
|
|
63
|
+
dominant-baseline="middle"
|
|
64
|
+
:style="labelStyle"
|
|
65
|
+
>
|
|
66
|
+
{{ label }}
|
|
67
|
+
</text>
|
|
62
68
|
</template>
|
|
@@ -201,16 +201,16 @@ useTableViewRowClick<TableListRow>(COMPONENT_ID, openInspector);
|
|
|
201
201
|
/>
|
|
202
202
|
</div>
|
|
203
203
|
|
|
204
|
-
<!--
|
|
204
|
+
<!-- DmsClientOnly: vue-flow is not SSR-safe. Kept mounted (v-show) so toggling
|
|
205
205
|
List/Diagram preserves un-applied diagram edits and avoids a blocking
|
|
206
206
|
confirm dialog on every switch. -->
|
|
207
|
-
<
|
|
207
|
+
<DmsClientOnly>
|
|
208
208
|
<DmsDatabaseSchemaDiagram
|
|
209
209
|
v-show="view === 'diagram'"
|
|
210
210
|
:schema-id="selectedSchemaId"
|
|
211
211
|
:active="view === 'diagram'"
|
|
212
212
|
@inspect-table="openInspectorByName"
|
|
213
213
|
/>
|
|
214
|
-
</
|
|
214
|
+
</DmsClientOnly>
|
|
215
215
|
</div>
|
|
216
216
|
</template>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"packageManager": "pnpm@10.6.5",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"dev": "pnpm --dir ../playground frontend:dev",
|
|
10
|
-
"build": "pnpm --dir ../playground exec ajs
|
|
10
|
+
"build": "pnpm --dir ../playground exec ajs dms build",
|
|
11
11
|
"typecheck": "pnpm --dir \"${DMS_FRONTEND_WORKSPACE:?Set DMS_FRONTEND_WORKSPACE to the generated Inertia workspace}\" typecheck",
|
|
12
12
|
"format": "prettier --write .",
|
|
13
13
|
"lint": "eslint .",
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import { expect, it, vi } from 'vitest'
|
|
2
|
+
import { readFileSync } from 'node:fs'
|
|
2
3
|
import frontendModule from '../dms.frontend'
|
|
3
4
|
|
|
5
|
+
const schemasPage = readFileSync(
|
|
6
|
+
new URL('../app/custom-pages/database/schemas.vue', import.meta.url),
|
|
7
|
+
'utf8',
|
|
8
|
+
)
|
|
9
|
+
const relationEdge = readFileSync(
|
|
10
|
+
new URL('../app/components/DiagramRelationEdge.vue', import.meta.url),
|
|
11
|
+
'utf8',
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
it('uses the DMS client-only wrapper for the Vue Flow schema diagram', () => {
|
|
15
|
+
expect(schemasPage).toContain('<DmsClientOnly>')
|
|
16
|
+
expect(schemasPage).not.toContain('<ClientOnly>')
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
it('does not route relation labels through Vue Flow EdgeText measurement', () => {
|
|
20
|
+
expect(relationEdge).toContain(':label="undefined"')
|
|
21
|
+
expect(relationEdge).toContain('<text')
|
|
22
|
+
})
|
|
23
|
+
|
|
4
24
|
it('preserves all database page keys, component aliases and preloaders', async () => {
|
|
5
25
|
const registerComponent = vi.fn()
|
|
6
26
|
const registerPage = vi.fn()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms-database",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@antelopejs/interface-dms": ">=0.0.1 <1.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@antelopejs/core": "
|
|
53
|
+
"@antelopejs/core": ">=1.8.0 <2",
|
|
54
54
|
"@antelopejs/tooling-configs": ">=0.0.6 <1.0.0",
|
|
55
55
|
"@types/chai": "^5.2.3",
|
|
56
56
|
"@types/mocha": "^10.0.10",
|