@stonecrop/desktop 0.12.0 → 0.12.2
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/dist/desktop.css +1 -1
- package/dist/desktop.js +789 -781
- package/dist/desktop.js.map +1 -1
- package/package.json +7 -7
- package/src/components/Desktop.vue +17 -16
- package/src/components/SheetNav.vue +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/desktop",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"**/*.css"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@stonecrop/
|
|
36
|
-
"@stonecrop/
|
|
37
|
-
"@stonecrop/
|
|
38
|
-
"@stonecrop/
|
|
39
|
-
"@stonecrop/
|
|
35
|
+
"@stonecrop/atable": "0.12.2",
|
|
36
|
+
"@stonecrop/schema": "0.12.2",
|
|
37
|
+
"@stonecrop/stonecrop": "0.12.2",
|
|
38
|
+
"@stonecrop/aform": "0.12.2",
|
|
39
|
+
"@stonecrop/themes": "0.12.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"vue": "^3.5.33"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
|
-
"node": ">=
|
|
73
|
+
"node": ">=24.0.0"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
76
|
"_phase:build": "heft build && vite build && rushx docs",
|
|
@@ -330,7 +330,7 @@ const navigationBreadcrumbs = computed(() => {
|
|
|
330
330
|
} else if (currentView.value === 'record' && routeDoctype.value) {
|
|
331
331
|
const recordPath = currentRecordId.value
|
|
332
332
|
? `/${routeDoctype.value}/${currentRecordId.value}`
|
|
333
|
-
: route.value?.fullPath ?? ''
|
|
333
|
+
: (route.value?.fullPath ?? '')
|
|
334
334
|
breadcrumbs.push(
|
|
335
335
|
{ title: 'Home', to: '/' },
|
|
336
336
|
{ title: formatDoctypeName(routeDoctype.value), to: `/${routeDoctype.value}` },
|
|
@@ -678,23 +678,24 @@ const handleClick = async (event: Event) => {
|
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
680
|
|
|
681
|
-
const loadRecordData = () => {
|
|
682
|
-
if (!stonecrop.value || !currentDoctype.value) return
|
|
681
|
+
const loadRecordData = async () => {
|
|
682
|
+
if (!stonecrop.value || !currentDoctype.value || isNewRecord.value) return
|
|
683
683
|
|
|
684
|
-
|
|
684
|
+
// Record already in HST — nothing to fetch.
|
|
685
|
+
if (stonecrop.value.getRecordById(currentDoctype.value, currentRecordId.value)) return
|
|
685
686
|
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
687
|
+
// Record absent and a client is configured — fetch directly so the form
|
|
688
|
+
// populates even when the list view was never visited (direct URL navigation).
|
|
689
|
+
if (stonecrop.value.getClient()) {
|
|
690
|
+
loading.value = true
|
|
691
|
+
try {
|
|
692
|
+
await stonecrop.value.getRecord(currentDoctype.value, currentRecordId.value)
|
|
693
|
+
} catch (error) {
|
|
694
|
+
// eslint-disable-next-line no-console
|
|
695
|
+
console.warn('Error fetching record:', error)
|
|
696
|
+
} finally {
|
|
697
|
+
loading.value = false
|
|
691
698
|
}
|
|
692
|
-
// For new records, currentViewData computed property will return {} automatically.
|
|
693
|
-
} catch (error) {
|
|
694
|
-
// eslint-disable-next-line no-console
|
|
695
|
-
console.warn('Error loading record data:', error)
|
|
696
|
-
} finally {
|
|
697
|
-
loading.value = false
|
|
698
699
|
}
|
|
699
700
|
}
|
|
700
701
|
|
|
@@ -708,7 +709,7 @@ watch(
|
|
|
708
709
|
} else if (currentView.value === 'record' && currentDoctype.value && currentRecordId.value) {
|
|
709
710
|
// Emit load-record event so host app can fetch and populate HST
|
|
710
711
|
emit('load-record', { doctype: currentDoctype.value, recordId: currentRecordId.value })
|
|
711
|
-
loadRecordData()
|
|
712
|
+
void loadRecordData()
|
|
712
713
|
}
|
|
713
714
|
},
|
|
714
715
|
{ immediate: true }
|
|
@@ -246,7 +246,10 @@ a:focus {
|
|
|
246
246
|
overflow: hidden;
|
|
247
247
|
/* Animation for smooth expand/collapse */
|
|
248
248
|
max-width: 2.4rem;
|
|
249
|
-
transition:
|
|
249
|
+
transition:
|
|
250
|
+
max-width 0.35s ease-in-out,
|
|
251
|
+
padding 0.35s ease-in-out,
|
|
252
|
+
background 0.2s ease;
|
|
250
253
|
}
|
|
251
254
|
|
|
252
255
|
.searchtab .search-icon {
|