@finema/finework-layer 0.2.94 → 0.2.95
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.95](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.94...0.2.95) (2025-12-24)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* infoedit type wysiwyg ([fe857c9](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/fe857c9ee5e494647a30b77e3648df13fa8ea893))
|
|
8
|
+
|
|
3
9
|
## [0.2.94](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.93...0.2.94) (2025-12-24)
|
|
4
10
|
|
|
5
11
|
## [0.2.93](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.92...0.2.93) (2025-12-22)
|
|
@@ -96,6 +96,15 @@
|
|
|
96
96
|
:label="item.label"
|
|
97
97
|
class="pointer-events-none"
|
|
98
98
|
/>
|
|
99
|
+
<span
|
|
100
|
+
v-else-if="!shouldTruncateText(item) && item.type === TYPE_INFO_ITEM.WYSIWYG"
|
|
101
|
+
:class="[
|
|
102
|
+
{
|
|
103
|
+
'font-bold': item.label,
|
|
104
|
+
},
|
|
105
|
+
]"
|
|
106
|
+
v-html="getTextFromHTML(getValue(item))"
|
|
107
|
+
/>
|
|
99
108
|
<span
|
|
100
109
|
v-else-if="!shouldTruncateText(item)"
|
|
101
110
|
:class="[
|
|
@@ -122,6 +131,7 @@ enum TYPE_INFO_ITEM {
|
|
|
122
131
|
DATE = 'date',
|
|
123
132
|
DATE_TIME = 'date_time',
|
|
124
133
|
BOOLEAN = 'boolean',
|
|
134
|
+
WYSIWYG = 'wysiwyg',
|
|
125
135
|
}
|
|
126
136
|
|
|
127
137
|
defineProps<{
|
|
@@ -144,6 +154,13 @@ defineProps<{
|
|
|
144
154
|
|
|
145
155
|
const expandedItems = reactive<Record<string, boolean>>({})
|
|
146
156
|
|
|
157
|
+
const getTextFromHTML = (html: string) => {
|
|
158
|
+
const parser = new DOMParser()
|
|
159
|
+
const doc = parser.parseFromString(html, 'text/html')
|
|
160
|
+
|
|
161
|
+
return doc.body.textContent
|
|
162
|
+
}
|
|
163
|
+
|
|
147
164
|
const shouldTruncateText = (item: any): boolean => {
|
|
148
165
|
return item.max && item.value && item.value.length > item.max
|
|
149
166
|
}
|