mgv-backoffice 1.36.1 → 1.36.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/dist/components/BaseBadge.vue.d.ts +1 -11
- package/dist/components/BaseDropdown.vue.d.ts +1 -1
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +934 -942
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +14 -13
- package/src/components/BaseBadge.vue +12 -2
- package/src/components/BaseSidebar.vue +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mgv-backoffice",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.3",
|
|
4
4
|
"description": "Shared Vue 3 UI component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/ui-lib.umd.cjs",
|
|
@@ -37,18 +37,19 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@heroicons/vue": "^2.2.0",
|
|
40
|
-
"@tailwindcss/vite": "^4.3.
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@vue/
|
|
40
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
41
|
+
"@typescript/typescript6": "^6.0.2",
|
|
42
|
+
"@vitejs/plugin-vue": "^6.0.9",
|
|
43
|
+
"@vue/language-core": "^3.3.11",
|
|
44
|
+
"@vue/test-utils": "^2.5.1",
|
|
44
45
|
"jsdom": "^29.1.1",
|
|
45
|
-
"sass": "^1.
|
|
46
|
-
"tailwindcss": "^4.3.
|
|
47
|
-
"typescript": "^
|
|
48
|
-
"vite": "^8.1
|
|
49
|
-
"vite-plugin-dts": "^5.
|
|
50
|
-
"vitest": "^
|
|
51
|
-
"vue": "^3.5.
|
|
52
|
-
"vue-router": "^5.1
|
|
46
|
+
"sass": "^1.105.0",
|
|
47
|
+
"tailwindcss": "^4.3.3",
|
|
48
|
+
"typescript": "^7.0.2",
|
|
49
|
+
"vite": "^8.3.1",
|
|
50
|
+
"vite-plugin-dts": "^5.1.1",
|
|
51
|
+
"vitest": "^5.0.2",
|
|
52
|
+
"vue": "^3.5.43",
|
|
53
|
+
"vue-router": "^5.3.1"
|
|
53
54
|
}
|
|
54
55
|
}
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span v-if="hasDefaultSlot" :class="badgeClasses">
|
|
3
|
-
<
|
|
3
|
+
<BadgeContent />
|
|
4
4
|
</span>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
|
-
import { computed, useSlots } from 'vue'
|
|
8
|
+
import { computed, createTextVNode, Text, useSlots } from 'vue'
|
|
9
9
|
import { ColorsEnums } from "../enums/ColorsEnums";
|
|
10
10
|
|
|
11
11
|
const slots = useSlots()
|
|
12
12
|
const hasDefaultSlot = computed(() => !!slots.default)
|
|
13
13
|
|
|
14
|
+
// Badge labels are often raw enum names (PROFIT_TARGET, RSI_REVERT); render
|
|
15
|
+
// their underscores as spaces so callers don't have to humanize at every call
|
|
16
|
+
// site. Only plain text nodes are rewritten — element children pass through.
|
|
17
|
+
const BadgeContent = () =>
|
|
18
|
+
(slots.default?.() ?? []).map((node) =>
|
|
19
|
+
node.type === Text && typeof node.children === 'string'
|
|
20
|
+
? createTextVNode(node.children.replace(/_/g, ' '))
|
|
21
|
+
: node
|
|
22
|
+
)
|
|
23
|
+
|
|
14
24
|
const props = defineProps({
|
|
15
25
|
color: {
|
|
16
26
|
type: String,
|
|
@@ -304,7 +304,7 @@ function navigate(name: string) {
|
|
|
304
304
|
class="flex items-center justify-center gap-2 text-xs"
|
|
305
305
|
:class="isDark ? 'text-gray-500' : 'text-gray-500'"
|
|
306
306
|
>
|
|
307
|
-
<span>{{ appName }}<template v-if="appName && version"> </template><template v-if="version">v{{ version }}</template></span>
|
|
307
|
+
<span>{{ appName }}<template v-if="appName && version">{{ ' ' }}</template><template v-if="version">v{{ version }}</template></span>
|
|
308
308
|
</div>
|
|
309
309
|
</slot>
|
|
310
310
|
</div>
|