@stonecrop/desktop 0.4.37 → 0.6.0
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.d.ts +3 -5
- package/dist/desktop.js +2626 -8835
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.umd.cjs +84 -17
- package/dist/desktop.umd.cjs.map +1 -1
- package/dist/index.js +2 -3
- package/dist/plugins/index.js +2 -4
- package/dist/src/index.d.ts +2 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/plugins/index.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +6 -7
- package/src/components/ActionSet.vue +43 -14
- package/src/components/Desktop.vue +1066 -2
- package/src/components/SheetNav.vue +40 -27
- package/src/index.ts +2 -3
- package/src/plugins/index.ts +2 -4
- package/src/types/index.ts +1 -0
- package/src/components/Doctype.vue +0 -45
- package/src/components/Records.vue +0 -20
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
:style="{ display: breadcrumbsVisibile ? 'block' : 'none' }"
|
|
10
10
|
@click="navigateHome"
|
|
11
11
|
@keydown.enter="navigateHome">
|
|
12
|
-
<router-link to="/
|
|
12
|
+
<router-link to="/" tabindex="0">
|
|
13
13
|
<svg
|
|
14
14
|
id="Capa_1"
|
|
15
15
|
version="1.1"
|
|
@@ -94,7 +94,7 @@ const toggleBreadcrumbs = () => {
|
|
|
94
94
|
const toggleSearch = async () => {
|
|
95
95
|
searchVisibile.value = !searchVisibile.value
|
|
96
96
|
await nextTick(() => {
|
|
97
|
-
inputRef.value
|
|
97
|
+
inputRef.value?.focus()
|
|
98
98
|
})
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -120,17 +120,22 @@ footer {
|
|
|
120
120
|
bottom: 0px;
|
|
121
121
|
width: 100%;
|
|
122
122
|
background-color: transparent;
|
|
123
|
-
height:
|
|
123
|
+
height: auto; /* Allow footer to grow with content */
|
|
124
|
+
min-height: 2rem;
|
|
124
125
|
z-index: 100;
|
|
125
126
|
text-align: left;
|
|
126
127
|
font-size: 100%;
|
|
127
128
|
display: flex;
|
|
128
129
|
justify-content: right;
|
|
129
|
-
padding-
|
|
130
|
+
padding-right: 2rem; /* Match view-wrapper horizontal padding */
|
|
131
|
+
box-sizing: border-box; /* Include padding in width calculation */
|
|
130
132
|
}
|
|
131
133
|
ul {
|
|
132
134
|
display: flex;
|
|
133
135
|
flex-direction: row-reverse;
|
|
136
|
+
margin: 0;
|
|
137
|
+
padding: 0;
|
|
138
|
+
list-style: none;
|
|
134
139
|
}
|
|
135
140
|
|
|
136
141
|
.tabs li {
|
|
@@ -144,7 +149,12 @@ ul {
|
|
|
144
149
|
}
|
|
145
150
|
.tabs a {
|
|
146
151
|
float: left;
|
|
147
|
-
padding:
|
|
152
|
+
padding: 0.5rem 1.5rem; /* Reduced padding for reasonable tab height */
|
|
153
|
+
height: 2.25rem; /* Fixed height for consistency across all tabs */
|
|
154
|
+
box-sizing: border-box; /* Include padding in height calculation */
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
justify-content: center;
|
|
148
158
|
text-decoration: none;
|
|
149
159
|
color: black;
|
|
150
160
|
background: #aaa;
|
|
@@ -243,14 +253,16 @@ ul {
|
|
|
243
253
|
right: -20px;
|
|
244
254
|
}
|
|
245
255
|
.hidebreadcrumbs a {
|
|
246
|
-
width:
|
|
247
|
-
|
|
256
|
+
min-width: 2.5rem;
|
|
257
|
+
width: 2.5rem;
|
|
258
|
+
height: 2.25rem; /* Fixed height for consistency */
|
|
248
259
|
background-color: #ffffff;
|
|
249
|
-
padding
|
|
250
|
-
|
|
251
|
-
padding-top: 3px;
|
|
252
|
-
font-size: 150%;
|
|
260
|
+
padding: 0.5rem;
|
|
261
|
+
font-size: 1.25rem;
|
|
253
262
|
text-align: center;
|
|
263
|
+
display: flex;
|
|
264
|
+
align-items: center;
|
|
265
|
+
justify-content: center;
|
|
254
266
|
}
|
|
255
267
|
.rotated {
|
|
256
268
|
/* border: 1px solid red; */
|
|
@@ -286,38 +298,39 @@ a:focus {
|
|
|
286
298
|
z-index: 3;
|
|
287
299
|
}
|
|
288
300
|
.hometab a {
|
|
289
|
-
width:
|
|
290
|
-
|
|
301
|
+
min-width: 2.5rem;
|
|
302
|
+
height: 2.25rem; /* Fixed height for consistency */
|
|
291
303
|
background-color: #ffffff;
|
|
292
|
-
padding
|
|
293
|
-
padding-right: 2ch;
|
|
294
|
-
padding-top: 6px;
|
|
304
|
+
padding: 0.5rem;
|
|
295
305
|
text-align: center;
|
|
306
|
+
display: flex;
|
|
307
|
+
align-items: center;
|
|
308
|
+
justify-content: center;
|
|
296
309
|
}
|
|
297
310
|
.hometab svg {
|
|
298
|
-
height:
|
|
299
|
-
width:
|
|
311
|
+
height: 1rem;
|
|
312
|
+
width: 1rem;
|
|
300
313
|
}
|
|
301
314
|
.searchtab a {
|
|
302
|
-
|
|
303
|
-
|
|
315
|
+
min-width: 2.5rem;
|
|
316
|
+
height: 2.25rem; /* Fixed height for consistency */
|
|
304
317
|
background-color: #ffffff;
|
|
305
|
-
padding
|
|
306
|
-
|
|
307
|
-
padding-top: 11px;
|
|
308
|
-
font-size: 150%;
|
|
318
|
+
padding: 0.5rem;
|
|
319
|
+
display: flex;
|
|
309
320
|
align-items: center;
|
|
321
|
+
justify-content: center;
|
|
310
322
|
}
|
|
311
323
|
.searchtab svg {
|
|
312
|
-
|
|
324
|
+
width: 0.875rem;
|
|
325
|
+
height: 0.875rem;
|
|
313
326
|
}
|
|
314
327
|
.searchtab input {
|
|
315
|
-
margin-top: -4px;
|
|
316
328
|
outline: none;
|
|
317
329
|
border: none;
|
|
318
330
|
border-bottom: 1.5px solid black;
|
|
319
331
|
background-color: transparent;
|
|
320
332
|
text-align: right;
|
|
321
|
-
font-size:
|
|
333
|
+
font-size: 0.875rem;
|
|
334
|
+
padding: 0.25rem;
|
|
322
335
|
}
|
|
323
336
|
</style>
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import ActionSet from './components/ActionSet.vue'
|
|
2
2
|
import CommandPalette from './components/CommandPalette.vue'
|
|
3
|
-
import
|
|
4
|
-
import Records from './components/Records.vue'
|
|
3
|
+
import Desktop from './components/Desktop.vue'
|
|
5
4
|
import SheetNav from './components/SheetNav.vue'
|
|
6
5
|
import StonecropDesktop from './plugins'
|
|
7
6
|
export type * from './types'
|
|
8
7
|
|
|
9
|
-
export { ActionSet, CommandPalette,
|
|
8
|
+
export { ActionSet, CommandPalette, Desktop, SheetNav, StonecropDesktop }
|
package/src/plugins/index.ts
CHANGED
|
@@ -2,8 +2,7 @@ import { App, type Plugin } from 'vue'
|
|
|
2
2
|
|
|
3
3
|
import ActionSet from '../components/ActionSet.vue'
|
|
4
4
|
import CommandPalette from '../components/CommandPalette.vue'
|
|
5
|
-
import
|
|
6
|
-
import Records from '../components/Records.vue'
|
|
5
|
+
import Desktop from '../components/Desktop.vue'
|
|
7
6
|
import SheetNav from '../components/SheetNav.vue'
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -14,8 +13,7 @@ const plugin: Plugin = {
|
|
|
14
13
|
install: (app: App) => {
|
|
15
14
|
app.component('ActionSet', ActionSet)
|
|
16
15
|
app.component('CommandPalette', CommandPalette)
|
|
17
|
-
app.component('
|
|
18
|
-
app.component('Records', Records)
|
|
16
|
+
app.component('Desktop', Desktop)
|
|
19
17
|
app.component('SheetNav', SheetNav)
|
|
20
18
|
},
|
|
21
19
|
}
|
package/src/types/index.ts
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<AForm v-model="schema" class="aform-main" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script setup lang="ts">
|
|
6
|
-
import { ref, watch } from 'vue'
|
|
7
|
-
// import { useRoute } from 'vue-router'
|
|
8
|
-
|
|
9
|
-
import { AForm } from '@stonecrop/aform'
|
|
10
|
-
import type { SchemaTypes } from '@stonecrop/aform'
|
|
11
|
-
import { /* DoctypeMeta, */ useStonecrop } from '@stonecrop/stonecrop'
|
|
12
|
-
|
|
13
|
-
const { stonecrop } = useStonecrop()
|
|
14
|
-
const schema = ref<SchemaTypes[]>([])
|
|
15
|
-
|
|
16
|
-
watch(stonecrop, () => {
|
|
17
|
-
if (stonecrop.value) {
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
19
|
-
let newSchema = stonecrop.value.schema?.schema.toArray()
|
|
20
|
-
if (!newSchema) {
|
|
21
|
-
newSchema = []
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
25
|
-
newSchema.forEach((item, index) => {
|
|
26
|
-
const record = stonecrop.value?.store.record
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
28
|
-
const fieldValue = record?.[item.fieldname]
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
30
|
-
newSchema[index].value = fieldValue
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
schema.value = newSchema
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
// const route = useRoute()
|
|
38
|
-
// const doctypeSlug = route.params.records?.toString().toLowerCase()
|
|
39
|
-
// const recordId = route.params.record?.toString().toLowerCase()
|
|
40
|
-
|
|
41
|
-
// const saveRecord = async () => {
|
|
42
|
-
// const doctype: DoctypeMeta = await stonecrop.value.registry.getMeta(doctypeSlug)
|
|
43
|
-
// stonecrop.value.runAction(doctype, 'save', recordId ? [recordId] : [])
|
|
44
|
-
// }
|
|
45
|
-
</script>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ATable v-model:rows="rows" v-model:columns="columns" :config="config" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script setup lang="ts">
|
|
6
|
-
import { ATable, TableColumn } from '@stonecrop/atable'
|
|
7
|
-
import { useStonecrop } from '@stonecrop/stonecrop'
|
|
8
|
-
import { computed } from 'vue'
|
|
9
|
-
|
|
10
|
-
// TODO: use component if provided else call to Records Schema endpoint/ table / lookup
|
|
11
|
-
// alteratively: a view: component map, eg records: Records, gantt: GanttView
|
|
12
|
-
// default_view key in schema
|
|
13
|
-
// last_used_view_type in application state
|
|
14
|
-
|
|
15
|
-
const { stonecrop } = useStonecrop()
|
|
16
|
-
const rows = computed(() => stonecrop.value?.store.records)
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
18
|
-
const columns = computed((): TableColumn[] => stonecrop.value?.schema?.schema?.toArray())
|
|
19
|
-
const config = { view: 'list' }
|
|
20
|
-
</script>
|