@finema/finework-layer 0.2.93 → 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.
@@ -56,8 +56,9 @@
56
56
  value: 'Active',
57
57
  },
58
58
  {
59
- label: '',
60
- value: '42',
59
+ label: '12',
60
+ value: '<b>123123</b>',
61
+ type: 'wysiwyg',
61
62
  },
62
63
  ]"
63
64
  />
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
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
+
9
+ ## [0.2.94](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.93...0.2.94) (2025-12-24)
10
+
3
11
  ## [0.2.93](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.92...0.2.93) (2025-12-22)
4
12
 
5
13
  ## [0.2.92](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.91...0.2.92) (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
  }
package/bun.lock CHANGED
@@ -4,7 +4,7 @@
4
4
  "": {
5
5
  "name": "@finema/finework-layer",
6
6
  "dependencies": {
7
- "@finema/core": "^3.5.1",
7
+ "@finema/core": "^3.5.2",
8
8
  },
9
9
  "devDependencies": {
10
10
  "@finema/eslint-config": "^2.0.3",
@@ -187,7 +187,7 @@
187
187
 
188
188
  "@eslint/plugin-kit": ["@eslint/plugin-kit@0.4.0", "", { "dependencies": { "@eslint/core": "^0.16.0", "levn": "^0.4.1" } }, "sha512-sB5uyeq+dwCWyPi31B2gQlVlo+j5brPlWx4yZBrEaRo/nhdDE8Xke1gsGgtiBdaBTxuTkceLVuVt/pclrasb0A=="],
189
189
 
190
- "@finema/core": ["@finema/core@3.5.1", "", { "dependencies": { "@iconify-json/heroicons": "^1.2.2", "@iconify-json/ph": "^1.2.2", "@iconify-json/svg-spinners": "^1.2.2", "@nuxt/kit": "^4.1.3", "@nuxt/ui": "^4.1.0", "@pinia/nuxt": "^0.11.0", "@tailwindcss/typography": "^0.5.0-alpha.3", "@tiptap/extension-image": "^3.0.7", "@tiptap/extension-link": "^3.0.7", "@tiptap/extension-text-align": "^3.0.7", "@tiptap/extension-text-style": "^3.0.7", "@tiptap/extension-underline": "^3.0.7", "@tiptap/extension-youtube": "^3.0.7", "@tiptap/pm": "^3.0.7", "@tiptap/starter-kit": "^3.0.7", "@tiptap/vue-3": "^3.0.7", "@vee-validate/nuxt": "^4.15.1", "@vee-validate/valibot": "^4.15.1", "@vuepic/vue-datepicker": "^11.0.2", "@vueuse/components": "^13.9.0", "@vueuse/core": "^13.9.0", "@wdns/vue-code-block": "^2.3.5", "axios": "^1.10.0", "date-fns": "^4.1.0", "date-fns-tz": "^3.2.0", "defu": "^6.1.4", "lodash-es": "^4.17.21", "maska": "^3.1.1", "url-join": "^5.0.0" } }, "sha512-XkmPXRbXvKckTshnITxj/PCd/xRI62i74d+4kM4Kc9elVmrxKabsJwNXva8Lt2jNkdLMRmqifHZAmP1OthmTSA=="],
190
+ "@finema/core": ["@finema/core@3.5.2", "", { "dependencies": { "@iconify-json/heroicons": "^1.2.2", "@iconify-json/ph": "^1.2.2", "@iconify-json/svg-spinners": "^1.2.2", "@nuxt/kit": "^4.1.3", "@nuxt/ui": "^4.1.0", "@pinia/nuxt": "^0.11.0", "@tailwindcss/typography": "^0.5.0-alpha.3", "@tiptap/extension-image": "^3.0.7", "@tiptap/extension-link": "^3.0.7", "@tiptap/extension-text-align": "^3.0.7", "@tiptap/extension-text-style": "^3.0.7", "@tiptap/extension-underline": "^3.0.7", "@tiptap/extension-youtube": "^3.0.7", "@tiptap/pm": "^3.0.7", "@tiptap/starter-kit": "^3.0.7", "@tiptap/vue-3": "^3.0.7", "@vee-validate/nuxt": "^4.15.1", "@vee-validate/valibot": "^4.15.1", "@vuepic/vue-datepicker": "^11.0.2", "@vueuse/components": "^13.9.0", "@vueuse/core": "^13.9.0", "@wdns/vue-code-block": "^2.3.5", "axios": "^1.10.0", "date-fns": "^4.1.0", "date-fns-tz": "^3.2.0", "defu": "^6.1.4", "lodash-es": "^4.17.21", "maska": "^3.1.1", "url-join": "^5.0.0" } }, "sha512-MH+E1dw+KL2BsyBMJrx5Mo+iC8aZSgzM+dAQ+hIdw/hooaxtrTgzDqGG/f4f0foeTc4EbRqLvX+NyYuhuW3ohg=="],
191
191
 
192
192
  "@finema/eslint-config": ["@finema/eslint-config@2.0.3", "", { "dependencies": { "eslint-plugin-better-tailwindcss": "^3.7.10", "eslint-plugin-tailwindcss": "^3.18.2", "eslint-plugin-unused-imports": "^4.2.0" }, "peerDependencies": { "eslint": "^9.37.0" } }, "sha512-cKayHHZLTp/cA1q9ohowBcNWqpMZcA3zYcw8W7JkB89B+cyT1hYUOIi046cUEW23mFTfsSKUVIeW/C+BKpXuXQ=="],
193
193
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@finema/finework-layer",
3
3
  "type": "module",
4
- "version": "0.2.93",
4
+ "version": "0.2.95",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground -o",
@@ -30,7 +30,7 @@
30
30
  "vue": "latest"
31
31
  },
32
32
  "dependencies": {
33
- "@finema/core": "^3.5.1"
33
+ "@finema/core": "^3.5.2"
34
34
  },
35
35
  "lint-staged": {
36
36
  "*": "eslint"