@tekkare/romulus 0.1.328 → 0.1.330
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 +1 -1
- package/dist/runtime/components/ChaptersNav.vue +19 -0
- package/dist/runtime/components/ShareDialog.vue +7 -2
- package/layer/app/components/layout/tool/views.vue +3 -9
- package/layer/app/components/layout/viewEmptyState.vue +4 -3
- package/layer/app/composables/useViewCardActions.ts +19 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -96,12 +96,31 @@ function select(chapter: RmChapter) {
|
|
|
96
96
|
emit('select', chapter.value)
|
|
97
97
|
const section = document.getElementById(chapter.value)
|
|
98
98
|
if (!section) return
|
|
99
|
+
// Dans le cadre OIP 7 la fenetre ne defile pas : c'est la zone principale
|
|
100
|
+
// (`.rm-shell__main`, overflow auto) qui porte le defilement. On fait donc
|
|
101
|
+
// defiler le premier ancetre qui defile vraiment, la fenetre a defaut.
|
|
102
|
+
const scroller = scrollParent(section)
|
|
103
|
+
if (scroller) {
|
|
104
|
+
scroller.scrollTo({
|
|
105
|
+
top: section.getBoundingClientRect().top - scroller.getBoundingClientRect().top + scroller.scrollTop - props.offset,
|
|
106
|
+
behavior: 'smooth',
|
|
107
|
+
})
|
|
108
|
+
return
|
|
109
|
+
}
|
|
99
110
|
window.scrollTo({
|
|
100
111
|
top: section.getBoundingClientRect().top + window.scrollY - props.offset,
|
|
101
112
|
behavior: 'smooth',
|
|
102
113
|
})
|
|
103
114
|
}
|
|
104
115
|
|
|
116
|
+
function scrollParent(el: HTMLElement): HTMLElement | null {
|
|
117
|
+
for (let node = el.parentElement; node && node !== document.body; node = node.parentElement) {
|
|
118
|
+
const { overflowY } = getComputedStyle(node)
|
|
119
|
+
if ((overflowY === 'auto' || overflowY === 'scroll') && node.scrollHeight > node.clientHeight) return node
|
|
120
|
+
}
|
|
121
|
+
return null
|
|
122
|
+
}
|
|
123
|
+
|
|
105
124
|
onMounted(() => {
|
|
106
125
|
observe()
|
|
107
126
|
placeBar()
|
|
@@ -366,10 +366,15 @@ const scopes = computed<Array<{ key: RmShareScope; icon: string; label: string;
|
|
|
366
366
|
</script>
|
|
367
367
|
|
|
368
368
|
<template>
|
|
369
|
+
<!--
|
|
370
|
+
Taille fixe des que la portee « template » est proposee : sa liste
|
|
371
|
+
d'espaces et de personnes change a chaque frappe, et la modale en mode
|
|
372
|
+
libre grandissait et retrecissait avec elle. Le corps defile a la place.
|
|
373
|
+
-->
|
|
369
374
|
<RmModal
|
|
370
375
|
:model-value="modelValue"
|
|
371
|
-
size="sm"
|
|
372
|
-
mode="free"
|
|
376
|
+
:size="canTemplate ? 'md' : 'sm'"
|
|
377
|
+
:mode="canTemplate ? 'fixed' : 'free'"
|
|
373
378
|
:label="T.heading"
|
|
374
379
|
@update:model-value="close"
|
|
375
380
|
>
|
|
@@ -198,7 +198,7 @@ function metaOf(scope: any) {
|
|
|
198
198
|
*/
|
|
199
199
|
const {
|
|
200
200
|
menuOf,
|
|
201
|
-
|
|
201
|
+
stripOf,
|
|
202
202
|
onAction: onCardAction,
|
|
203
203
|
rename,
|
|
204
204
|
star,
|
|
@@ -223,14 +223,8 @@ function cardsOf(items: any[]) {
|
|
|
223
223
|
active: selected.value?.id === scope.id,
|
|
224
224
|
starred: scope.starred === true,
|
|
225
225
|
isDefault: scope.isDefault === true,
|
|
226
|
-
// Le bandeau de la carte
|
|
227
|
-
|
|
228
|
-
sharedBy: mine ? undefined : (scope.ownerName ?? undefined),
|
|
229
|
-
shared: mine && isShared(scope),
|
|
230
|
-
// Un template reste prive au sens du partage : sans sa propre marque,
|
|
231
|
-
// sa carte serait celle d'une vue que personne ne voit.
|
|
232
|
-
isTemplate: mine && scope.isTemplate === true,
|
|
233
|
-
templateTargets: scope.targetWorkspaces?.length ?? 0,
|
|
226
|
+
// Le bandeau de la carte : d'ou vient la vue, partage, template.
|
|
227
|
+
...stripOf(scope),
|
|
234
228
|
// Un menu par carte : le lecteur d'une vue recue ne peut ni la renommer,
|
|
235
229
|
// ni la partager, ni la supprimer.
|
|
236
230
|
menu: menuOf(scope),
|
|
@@ -70,6 +70,7 @@ const filterLabel = useViewFilterLabels(() => source.value?.filterNamespace);
|
|
|
70
70
|
*/
|
|
71
71
|
const {
|
|
72
72
|
menuOf,
|
|
73
|
+
stripOf,
|
|
73
74
|
onAction,
|
|
74
75
|
rename,
|
|
75
76
|
sharing,
|
|
@@ -130,9 +131,9 @@ const savedViews = computed(() =>
|
|
|
130
131
|
renamable: scope.isOwner !== false,
|
|
131
132
|
starred: scope.starred === true,
|
|
132
133
|
// Les vues qu'on nous a partagees s'activent ici comme les autres : la
|
|
133
|
-
// carte dit
|
|
134
|
-
//
|
|
135
|
-
|
|
134
|
+
// carte dit d'ou elles viennent (et si je l'ai partagee ou publiee en
|
|
135
|
+
// template), meme bandeau que dans le panneau « Mes vues ».
|
|
136
|
+
...stripOf(scope),
|
|
136
137
|
config: criteria.length
|
|
137
138
|
? [
|
|
138
139
|
{
|
|
@@ -161,6 +161,24 @@ function isShared(scope: any): boolean {
|
|
|
161
161
|
return scope.visibility === "workspace" || (scope.sharedWith?.length ?? 0) > 0;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
+
/**
|
|
165
|
+
* Le bandeau d'une carte de vue : d'ou elle vient (recue de quelqu'un, ou a
|
|
166
|
+
* moi mais ouverte a d'autres) et si je l'ai publiee comme template. Un seul
|
|
167
|
+
* calcul pour toutes les listes de cartes : l'etat vide « Aucune vue active »
|
|
168
|
+
* refaisait le sien et oubliait le partage et le template.
|
|
169
|
+
*/
|
|
170
|
+
function stripOf(scope: any) {
|
|
171
|
+
const mine = scope.isOwner !== false;
|
|
172
|
+
return {
|
|
173
|
+
sharedBy: mine ? undefined : (scope.ownerName ?? undefined),
|
|
174
|
+
shared: mine && isShared(scope),
|
|
175
|
+
// Un template reste prive au sens du partage : sans sa propre marque,
|
|
176
|
+
// sa carte serait celle d'une vue que personne ne voit.
|
|
177
|
+
isTemplate: mine && scope.isTemplate === true,
|
|
178
|
+
templateTargets: scope.targetWorkspaces?.length ?? 0,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
164
182
|
// ------------------------------------------------------------------- partage
|
|
165
183
|
|
|
166
184
|
const elysia = useOipApi();
|
|
@@ -503,6 +521,7 @@ function menuOf(scope: any) {
|
|
|
503
521
|
return {
|
|
504
522
|
menuOf,
|
|
505
523
|
isShared,
|
|
524
|
+
stripOf,
|
|
506
525
|
onAction,
|
|
507
526
|
rename,
|
|
508
527
|
star,
|