@tekkare/romulus 0.1.364 → 0.1.366
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/module.json
CHANGED
|
@@ -99,6 +99,8 @@ watch(() => props.modelValue, (open) => { if (open) fitRail() }, { immediate: tr
|
|
|
99
99
|
|
|
100
100
|
const sideOffset = computed(() => props.offset ?? railFit.value?.offset ?? '0px')
|
|
101
101
|
const edgeInset = computed(() => props.inset ?? railFit.value?.inset)
|
|
102
|
+
/** Le voile s'arrete au rail : le tiroir pose a cote, le rail reste net et cliquable. */
|
|
103
|
+
const overlayStyle = computed(() => [layer.value, railFit.value ? { right: railFit.value.offset } : {}])
|
|
102
104
|
</script>
|
|
103
105
|
|
|
104
106
|
<template>
|
|
@@ -107,7 +109,7 @@ const edgeInset = computed(() => props.inset ?? railFit.value?.inset)
|
|
|
107
109
|
<div
|
|
108
110
|
v-if="modelValue && overlay"
|
|
109
111
|
class="rm-drawer-overlay"
|
|
110
|
-
:style="
|
|
112
|
+
:style="overlayStyle"
|
|
111
113
|
@click="close"
|
|
112
114
|
/>
|
|
113
115
|
</Transition>
|
|
@@ -88,6 +88,16 @@ function barWidth(row: RmHybridRow) {
|
|
|
88
88
|
return `${Math.min((share(row) * 100) / reference.value, 100)}%`
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Une colonne `extra` arrive souvent deja formatee, part comprise :
|
|
93
|
+
* "53 298 (11.3 %)". La part finale entre parentheses est detachee pour
|
|
94
|
+
* prendre le meme gris que celle de la colonne valeur.
|
|
95
|
+
*/
|
|
96
|
+
function splitShare(cell: string | number) {
|
|
97
|
+
const match = String(cell).match(/^(.*?)\s*(\([^()]*%\))$/)
|
|
98
|
+
return match ? { value: match[1], share: match[2] } : { value: cell, share: '' }
|
|
99
|
+
}
|
|
100
|
+
|
|
91
101
|
function toggle() {
|
|
92
102
|
showAll.value = !showAll.value
|
|
93
103
|
emit('showState', showAll.value)
|
|
@@ -117,7 +127,8 @@ function toggle() {
|
|
|
117
127
|
</span>
|
|
118
128
|
</td>
|
|
119
129
|
<td v-for="(cell, cellIndex) in row.extra ?? []" :key="cellIndex" class="rm-hybrid__value">
|
|
120
|
-
{{ cell }}
|
|
130
|
+
{{ splitShare(cell).value }}
|
|
131
|
+
<span v-if="splitShare(cell).share" class="rm-hybrid__share">{{ splitShare(cell).share }}</span>
|
|
121
132
|
</td>
|
|
122
133
|
</tr>
|
|
123
134
|
</tbody>
|