@xy-planning-network/trees 0.6.2-rc-8 → 0.6.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xy-planning-network/trees",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "github:xy-planning-network/trees",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"typecheck:docs": "vue-tsc -p dev --noEmit"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
+
"@point-hub/vue-highlight": "^0.1.4",
|
|
36
37
|
"@tailwindcss/forms": "^0.5.3",
|
|
37
38
|
"@tailwindcss/line-clamp": "^0.4.2",
|
|
38
39
|
"@tailwindcss/typography": "^0.5.7",
|
|
@@ -114,11 +114,11 @@ const nameAttr = computed(() => {
|
|
|
114
114
|
v-slot="{ active, checked, disabled }"
|
|
115
115
|
>
|
|
116
116
|
<div
|
|
117
|
+
class="relative bg-white border rounded-lg shadow-sm p-4 flex cursor-pointer focus:outline-none"
|
|
117
118
|
:class="[
|
|
118
119
|
checked ? 'border-transparent' : 'border-gray-300',
|
|
119
120
|
active ? 'border-blue-500 ring-2 ring-blue-500' : '',
|
|
120
|
-
|
|
121
|
-
disabled ? 'opacity-75' : '',
|
|
121
|
+
disabled ? 'cursor-not-allowed opacity-75' : '',
|
|
122
122
|
]"
|
|
123
123
|
>
|
|
124
124
|
<div class="flex-1 flex pr-1">
|
|
@@ -89,8 +89,8 @@ const isActive = (url: string): boolean => {
|
|
|
89
89
|
<div class="shrink-0 flex justify-center px-4">
|
|
90
90
|
<img class="w-auto h-12" :src="iconURL" alt="Logo" />
|
|
91
91
|
</div>
|
|
92
|
-
<div class="mt-5 flex-1 h-0 overflow-y-auto">
|
|
93
|
-
<nav class="px-2 space-y-1">
|
|
92
|
+
<div class="mt-5 flex flex-col flex-1 h-0 overflow-y-auto">
|
|
93
|
+
<nav class="flex-1 px-2 space-y-1">
|
|
94
94
|
<a
|
|
95
95
|
v-for="item in navigation"
|
|
96
96
|
:key="item.name"
|
|
@@ -116,6 +116,11 @@ const isActive = (url: string): boolean => {
|
|
|
116
116
|
{{ item.name }}
|
|
117
117
|
</a>
|
|
118
118
|
</nav>
|
|
119
|
+
<div v-if="$slots['sidebar-bottom']" class="mt-auto">
|
|
120
|
+
<div class="mt-6 px-2">
|
|
121
|
+
<slot name="sidebar-bottom" />
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
119
124
|
</div>
|
|
120
125
|
</div>
|
|
121
126
|
</TransitionChild>
|
|
@@ -162,6 +167,12 @@ const isActive = (url: string): boolean => {
|
|
|
162
167
|
{{ item.name }}
|
|
163
168
|
</a>
|
|
164
169
|
</nav>
|
|
170
|
+
|
|
171
|
+
<div v-if="$slots['sidebar-bottom']" class="mt-atuo">
|
|
172
|
+
<div class="mt-6 px-2">
|
|
173
|
+
<slot name="sidebar-bottom" />
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
165
176
|
</div>
|
|
166
177
|
</div>
|
|
167
178
|
</div>
|
package/types/api/client.d.ts
CHANGED
|
@@ -43,12 +43,40 @@ export interface HttpPromise<T = any> extends Promise<T> {
|
|
|
43
43
|
/**
|
|
44
44
|
* TrailsPromise
|
|
45
45
|
* The successfully resolved interface of an http client request returned by @xy-planning-network/Trails.
|
|
46
|
+
*
|
|
47
|
+
* Example Usage:
|
|
48
|
+
* interface User {
|
|
49
|
+
* id: number
|
|
50
|
+
* email: string
|
|
51
|
+
* }
|
|
52
|
+
*
|
|
53
|
+
* const UsersAPI = {
|
|
54
|
+
* update(
|
|
55
|
+
* id: number,
|
|
56
|
+
* data: ReqPayload,
|
|
57
|
+
* opts?: ReqOptions
|
|
58
|
+
* ): TrailsPromise<User> {
|
|
59
|
+
* return BaseAPI.put<TrailsResp<User>>(`/users/${id}`, data, opts)
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
46
62
|
*/
|
|
47
63
|
export interface TrailsPromise<T = any> extends Promise<TrailsResp<T>> {
|
|
48
64
|
}
|
|
49
65
|
/**
|
|
50
66
|
* TrailsPromisePaged
|
|
51
67
|
* The successfully resolved interface of a paged http client request returned by @xy-planning-network/Trails.
|
|
68
|
+
*
|
|
69
|
+
* Example Usage:
|
|
70
|
+
* interface User {
|
|
71
|
+
* id: number
|
|
72
|
+
* email: string
|
|
73
|
+
* }
|
|
74
|
+
*
|
|
75
|
+
* const UsersAPI = {
|
|
76
|
+
* index(opts?: ReqOptions, params?: QueryParams): TrailsPromisePaged<User> {
|
|
77
|
+
* return BaseAPI.get<TrailsRespPaged<User>>("/users", opts, params)
|
|
78
|
+
* }
|
|
79
|
+
* }
|
|
52
80
|
*/
|
|
53
81
|
export interface TrailsPromisePaged<T = any> extends Promise<TrailsRespPaged<T>> {
|
|
54
82
|
}
|
|
@@ -50,7 +50,7 @@ export interface UseBaseAPI<T> {
|
|
|
50
50
|
* Manually call the axios request
|
|
51
51
|
* can be used multiple times
|
|
52
52
|
*/
|
|
53
|
-
execute: (
|
|
53
|
+
execute: (payload?: ReqPayload, opts?: ReqOptions) => HttpPromise<T>;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* useBaseAPI is a composable wrapper of BaseAPI
|