@finema/finework-layer 0.2.135 → 0.2.137
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,22 +49,30 @@
|
|
|
49
49
|
color="neutral"
|
|
50
50
|
icon="ph:trash"
|
|
51
51
|
/>
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
52
|
+
<Card>
|
|
53
|
+
<InfoItemList
|
|
54
|
+
:inline="true"
|
|
55
|
+
:vertical="true"
|
|
56
|
+
class="mb-6"
|
|
57
|
+
label-width="150"
|
|
58
|
+
:items="[
|
|
59
|
+
{
|
|
60
|
+
label: 'Status:',
|
|
61
|
+
value: `ActiveasdasdsadasdadasdasdadadsadsadasdsadActiveasdasdsad
|
|
62
|
+
asdadasdasdadadsadsadasdsadActiveasdasdsadasdadasdasdadadsadsadasdsad`,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: '12asdasdasdasdasd',
|
|
66
|
+
value: '<p>123123</p>',
|
|
67
|
+
type: 'link',
|
|
68
|
+
linkProps: {
|
|
69
|
+
to: 'https://www.google.com',
|
|
70
|
+
target: '_blank',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
]"
|
|
74
|
+
/>
|
|
75
|
+
</Card>
|
|
68
76
|
<PortalApp />
|
|
69
77
|
</LayoutAdmin>
|
|
70
78
|
</template>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.137](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.136...0.2.137) (2026-02-11)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* infoitemlist type image ([de07039](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/de07039c52f30cba02699155eff027cd2d8bee44))
|
|
8
|
+
|
|
9
|
+
## [0.2.136](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.135...0.2.136) (2026-02-11)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* update InfoItemList to support link type and improve layout in layout-admin ([0ea8595](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/0ea8595496748f9815103055ec1f934f59adf364))
|
|
14
|
+
|
|
3
15
|
## [0.2.135](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.134...0.2.135) (2026-02-11)
|
|
4
16
|
|
|
5
17
|
### Bug Fixes
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
'mb-1 block text-sm text-gray-500': !inline,
|
|
31
31
|
'mr-2 text-gray-500': inline,
|
|
32
32
|
'font-bold text-black!': item.label && titleBold,
|
|
33
|
+
'flex-shrink-0': inline,
|
|
33
34
|
},
|
|
34
35
|
]"
|
|
35
36
|
:style="inline && labelWidth ? { width: `${labelWidth}px` } : undefined"
|
|
@@ -51,7 +52,12 @@
|
|
|
51
52
|
/>
|
|
52
53
|
<div
|
|
53
54
|
v-else
|
|
54
|
-
class="
|
|
55
|
+
:class="[
|
|
56
|
+
'break-words whitespace-pre-line text-gray-900',
|
|
57
|
+
{
|
|
58
|
+
'min-w-0 flex-1': inline,
|
|
59
|
+
},
|
|
60
|
+
]"
|
|
55
61
|
>
|
|
56
62
|
<span
|
|
57
63
|
v-if="shouldTruncateText(item)"
|
|
@@ -89,6 +95,12 @@
|
|
|
89
95
|
:label="item.label"
|
|
90
96
|
class="pointer-events-none"
|
|
91
97
|
/>
|
|
98
|
+
<img
|
|
99
|
+
v-else-if="item.type === TYPE_INFO_ITEM.IMAGE && item.value"
|
|
100
|
+
:src="typeof item.value === 'string' ? item.value : item.value?.url"
|
|
101
|
+
:alt="item.label"
|
|
102
|
+
class="max-w-md rounded-lg object-cover"
|
|
103
|
+
/>
|
|
92
104
|
<span
|
|
93
105
|
v-else-if="!shouldTruncateText(item) && item.type === TYPE_INFO_ITEM.HTML"
|
|
94
106
|
:class="[
|
|
@@ -98,6 +110,18 @@
|
|
|
98
110
|
]"
|
|
99
111
|
v-html="getValue(item)"
|
|
100
112
|
/>
|
|
113
|
+
<NuxtLink
|
|
114
|
+
v-else-if="item.type === TYPE_INFO_ITEM.LINK && item.linkProps"
|
|
115
|
+
v-bind="item.linkProps"
|
|
116
|
+
:class="[
|
|
117
|
+
'text-primary hover:underline',
|
|
118
|
+
{
|
|
119
|
+
'font-bold': item.label && !titleBold,
|
|
120
|
+
},
|
|
121
|
+
]"
|
|
122
|
+
>
|
|
123
|
+
{{ item.value || '-' }}
|
|
124
|
+
</NuxtLink>
|
|
101
125
|
<span
|
|
102
126
|
v-else-if="!shouldTruncateText(item)"
|
|
103
127
|
:class="[
|
|
@@ -116,6 +140,8 @@
|
|
|
116
140
|
|
|
117
141
|
<script lang="ts" setup>
|
|
118
142
|
import { reactive } from 'vue'
|
|
143
|
+
import type { ComponentProps } from 'vue-component-type-helpers'
|
|
144
|
+
import NuxtLink from '#app/components/nuxt-link'
|
|
119
145
|
|
|
120
146
|
enum TYPE_INFO_ITEM {
|
|
121
147
|
TEXT = 'text',
|
|
@@ -125,6 +151,8 @@ enum TYPE_INFO_ITEM {
|
|
|
125
151
|
DATE_TIME = 'date_time',
|
|
126
152
|
BOOLEAN = 'boolean',
|
|
127
153
|
HTML = 'html',
|
|
154
|
+
LINK = 'link',
|
|
155
|
+
IMAGE = 'image',
|
|
128
156
|
}
|
|
129
157
|
|
|
130
158
|
defineProps<{
|
|
@@ -138,6 +166,7 @@ defineProps<{
|
|
|
138
166
|
type?: TYPE_INFO_ITEM
|
|
139
167
|
customClass?: string
|
|
140
168
|
hide?: boolean
|
|
169
|
+
linkProps?: ComponentProps<typeof NuxtLink>
|
|
141
170
|
}>
|
|
142
171
|
vertical?: boolean
|
|
143
172
|
inline?: boolean
|