mountain-ui 1.0.178 → 1.0.179
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/package.json +1 -1
- package/src/lib/registry/EntryTabTypesRegistry/EntryTabTypes/Email/Button.svelte +21 -0
- package/src/lib/registry/EntryTabTypesRegistry/EntryTabTypes/Email/Page.svelte +192 -0
- package/src/lib/registry/EntryTabTypesRegistry/EntryTabTypes/Email/index.js +38 -0
- package/src/lib/registry/EntryTabTypesRegistry/EntryTabTypes/Link/Button.svelte +22 -0
- package/src/lib/registry/EntryTabTypesRegistry/EntryTabTypes/Link/Page.svelte +57 -0
- package/src/lib/registry/EntryTabTypesRegistry/EntryTabTypes/Link/index.js +60 -0
- package/src/lib/registry/EntryTabTypesRegistry/EntryTabTypes/Pdf/Button.svelte +23 -0
- package/src/lib/registry/EntryTabTypesRegistry/EntryTabTypes/Pdf/Page.svelte +14 -0
- package/src/lib/registry/EntryTabTypesRegistry/EntryTabTypes/Pdf/index.js +38 -0
- package/src/lib/registry/EntryTabTypesRegistry/components/EntryTabTypeButton.svelte +12 -0
- package/src/lib/registry/EntryTabTypesRegistry/createEntryTabType.js +17 -0
- package/src/lib/registry/EntryTabTypesRegistry/registerDefaultEntryTabTypes.js +17 -0
- package/src/lib/registry/EntryTabTypesRegistry/registry.svelte.js +44 -0
- package/src/lib/registry/EntryTabsRegistry/components/ViewEntriesTypeButton.svelte +28 -0
- package/src/lib/registry/EntryTabsRegistry/components/ViewEntriesTypeComponent.svelte +30 -0
- package/src/lib/registry/EntryTabsRegistry/components/ViewEntriesTypeDropdown.svelte +32 -0
- package/src/lib/registry/EntryTabsRegistry/components/ViewEntriesTypeIcon.svelte +9 -0
- package/src/lib/registry/EntryTabsRegistry/createEntryTab.js +13 -0
- package/src/lib/registry/EntryTabsRegistry/registerDefaultEntryTabs.js +13 -0
- package/src/lib/registry/EntryTabsRegistry/registry.svelte.js +49 -0
- package/src/lib/registry/navigationRegistry/components/Navbar.svelte +1 -0
- package/src/lib/registry/projectRegistry/createProject.js +2 -0
- package/src/routes/exemple/[project_normalized_name]/[entity_slug]/[entry_id]/+page.svelte +31 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mountain-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.179",
|
|
5
5
|
"description": "A comprehensive UI component library for ERP systems with field types, entities, and registry management built with Svelte",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "index.js",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { projectRegistry } from "$lib/registry/projectRegistry/registry.svelte";
|
|
3
|
+
import { Tabs } from "hamzus-ui";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
startUrl,
|
|
7
|
+
label,
|
|
8
|
+
slug,
|
|
9
|
+
} = $props()
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<Tabs.Trigger
|
|
13
|
+
value="{startUrl}/{slug}"
|
|
14
|
+
href="{startUrl}/{slug}"
|
|
15
|
+
>
|
|
16
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
17
|
+
<path opacity="0.4" d="M17 20.5H7C4 20.5 2 19 2 15.5V8.5C2 5 4 3.5 7 3.5H17C20 3.5 22 5 22 8.5V15.5C22 19 20 20.5 17 20.5Z" fill="#292D32"/>
|
|
18
|
+
<path d="M12.0008 12.87C11.1608 12.87 10.3108 12.61 9.66076 12.08L6.53075 9.57997C6.21075 9.31997 6.15076 8.84997 6.41076 8.52997C6.67076 8.20997 7.14076 8.14997 7.46076 8.40997L10.5908 10.91C11.3508 11.52 12.6407 11.52 13.4007 10.91L16.5308 8.40997C16.8508 8.14997 17.3308 8.19997 17.5808 8.52997C17.8408 8.84997 17.7908 9.32997 17.4608 9.57997L14.3308 12.08C13.6908 12.61 12.8408 12.87 12.0008 12.87Z" fill="#292D32"/>
|
|
19
|
+
</svg>
|
|
20
|
+
<h5>{label}</h5>
|
|
21
|
+
</Tabs.Trigger>
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
config,
|
|
5
|
+
Dialog,
|
|
6
|
+
DropdownMenu,
|
|
7
|
+
Form,
|
|
8
|
+
getCookie,
|
|
9
|
+
IconButton,
|
|
10
|
+
Input
|
|
11
|
+
} from 'hamzus-ui';
|
|
12
|
+
import { page } from '$app/stores';
|
|
13
|
+
import EmailViewer from '../../routes/[lang]/[project_slug]/[origin]/layout/EmailViewer.svelte';
|
|
14
|
+
import { onMount } from 'svelte';
|
|
15
|
+
import { afterNavigate } from '$app/navigation';
|
|
16
|
+
import { getEmails } from '@utils/Emails/emails';
|
|
17
|
+
import Emails from '@utils/Integration/EmailSmtpImap/components/Emails.svelte';
|
|
18
|
+
|
|
19
|
+
let { entity_slug, entry_id, entry_tab_slug } = $props();
|
|
20
|
+
|
|
21
|
+
let actions = null;
|
|
22
|
+
|
|
23
|
+
let targetActions = null;
|
|
24
|
+
|
|
25
|
+
let forceClose = false;
|
|
26
|
+
|
|
27
|
+
let emails = $state([]);
|
|
28
|
+
|
|
29
|
+
let isOpen = $derived(targetActions !== null);
|
|
30
|
+
|
|
31
|
+
$effect(() => {
|
|
32
|
+
if (isOpen) {
|
|
33
|
+
emails = [''];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
onMount(getData);
|
|
38
|
+
|
|
39
|
+
afterNavigate(getData);
|
|
40
|
+
|
|
41
|
+
async function getData() {
|
|
42
|
+
actions = null;
|
|
43
|
+
|
|
44
|
+
actions = await getEmails();
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<Dialog bind:isOpen>
|
|
49
|
+
<div style="display:flex;row-gap:var(--pad-m);flex-direction:column;">
|
|
50
|
+
<h3>Envoyer l'email</h3>
|
|
51
|
+
{#each emails as email, index}
|
|
52
|
+
<Input name="email[]" value={email} onChange={(val)=>{emails[index] = val;emails = [...emails]}} placeholder="exemple{index + 1}@exemple.com">
|
|
53
|
+
<div slot="endContent" class="btn">
|
|
54
|
+
{#if index > 0}
|
|
55
|
+
<IconButton
|
|
56
|
+
variant="destructive"
|
|
57
|
+
onClick={() => {
|
|
58
|
+
emails.splice(index, 1);
|
|
59
|
+
emails = [...emails];
|
|
60
|
+
}}
|
|
61
|
+
><svg
|
|
62
|
+
width="24"
|
|
63
|
+
height="24"
|
|
64
|
+
viewBox="0 0 24 24"
|
|
65
|
+
fill="none"
|
|
66
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
67
|
+
>
|
|
68
|
+
<path
|
|
69
|
+
d="M20.9997 6.72998C20.9797 6.72998 20.9497 6.72998 20.9197 6.72998C15.6297 6.19998 10.3497 5.99998 5.11967 6.52998L3.07967 6.72998C2.65967 6.76998 2.28967 6.46998 2.24967 6.04998C2.20967 5.62998 2.50967 5.26998 2.91967 5.22998L4.95967 5.02998C10.2797 4.48998 15.6697 4.69998 21.0697 5.22998C21.4797 5.26998 21.7797 5.63998 21.7397 6.04998C21.7097 6.43998 21.3797 6.72998 20.9997 6.72998Z"
|
|
70
|
+
fill="#292D32"
|
|
71
|
+
/>
|
|
72
|
+
<path
|
|
73
|
+
d="M8.50074 5.72C8.46074 5.72 8.42074 5.72 8.37074 5.71C7.97074 5.64 7.69074 5.25 7.76074 4.85L7.98074 3.54C8.14074 2.58 8.36074 1.25 10.6907 1.25H13.3107C15.6507 1.25 15.8707 2.63 16.0207 3.55L16.2407 4.85C16.3107 5.26 16.0307 5.65 15.6307 5.71C15.2207 5.78 14.8307 5.5 14.7707 5.1L14.5507 3.8C14.4107 2.93 14.3807 2.76 13.3207 2.76H10.7007C9.64074 2.76 9.62074 2.9 9.47074 3.79L9.24074 5.09C9.18074 5.46 8.86074 5.72 8.50074 5.72Z"
|
|
74
|
+
fill="#292D32"
|
|
75
|
+
/>
|
|
76
|
+
<path
|
|
77
|
+
d="M15.2104 22.7501H8.79039C5.30039 22.7501 5.16039 20.8201 5.05039 19.2601L4.40039 9.19007C4.37039 8.78007 4.69039 8.42008 5.10039 8.39008C5.52039 8.37008 5.87039 8.68008 5.90039 9.09008L6.55039 19.1601C6.66039 20.6801 6.70039 21.2501 8.79039 21.2501H15.2104C17.3104 21.2501 17.3504 20.6801 17.4504 19.1601L18.1004 9.09008C18.1304 8.68008 18.4904 8.37008 18.9004 8.39008C19.3104 8.42008 19.6304 8.77007 19.6004 9.19007L18.9504 19.2601C18.8404 20.8201 18.7004 22.7501 15.2104 22.7501Z"
|
|
78
|
+
fill="#292D32"
|
|
79
|
+
/>
|
|
80
|
+
<path
|
|
81
|
+
d="M13.6601 17.25H10.3301C9.92008 17.25 9.58008 16.91 9.58008 16.5C9.58008 16.09 9.92008 15.75 10.3301 15.75H13.6601C14.0701 15.75 14.4101 16.09 14.4101 16.5C14.4101 16.91 14.0701 17.25 13.6601 17.25Z"
|
|
82
|
+
fill="#292D32"
|
|
83
|
+
/>
|
|
84
|
+
<path
|
|
85
|
+
d="M14.5 13.25H9.5C9.09 13.25 8.75 12.91 8.75 12.5C8.75 12.09 9.09 11.75 9.5 11.75H14.5C14.91 11.75 15.25 12.09 15.25 12.5C15.25 12.91 14.91 13.25 14.5 13.25Z"
|
|
86
|
+
fill="#292D32"
|
|
87
|
+
/>
|
|
88
|
+
</svg>
|
|
89
|
+
</IconButton>
|
|
90
|
+
{/if}
|
|
91
|
+
</div>
|
|
92
|
+
</Input>
|
|
93
|
+
{/each}
|
|
94
|
+
<div class="add">
|
|
95
|
+
<IconButton
|
|
96
|
+
variant="ghost"
|
|
97
|
+
onClick={() => {
|
|
98
|
+
emails.push('');
|
|
99
|
+
emails = [...emails];
|
|
100
|
+
}}
|
|
101
|
+
>
|
|
102
|
+
<svg
|
|
103
|
+
width="24"
|
|
104
|
+
height="24"
|
|
105
|
+
viewBox="0 0 24 24"
|
|
106
|
+
fill="none"
|
|
107
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
108
|
+
>
|
|
109
|
+
<path
|
|
110
|
+
d="M18 12.75H6C5.59 12.75 5.25 12.41 5.25 12C5.25 11.59 5.59 11.25 6 11.25H18C18.41 11.25 18.75 11.59 18.75 12C18.75 12.41 18.41 12.75 18 12.75Z"
|
|
111
|
+
fill="#292D32"
|
|
112
|
+
/>
|
|
113
|
+
<path
|
|
114
|
+
d="M12 18.75C11.59 18.75 11.25 18.41 11.25 18V6C11.25 5.59 11.59 5.25 12 5.25C12.41 5.25 12.75 5.59 12.75 6V18C12.75 18.41 12.41 18.75 12 18.75Z"
|
|
115
|
+
fill="#292D32"
|
|
116
|
+
/>
|
|
117
|
+
</svg>
|
|
118
|
+
</IconButton>
|
|
119
|
+
</div>
|
|
120
|
+
<Button
|
|
121
|
+
onClick={() => {
|
|
122
|
+
targetActions.actionFunction(
|
|
123
|
+
$page.params.interface_slug.split('-')[1],
|
|
124
|
+
$page.params.id,
|
|
125
|
+
emails
|
|
126
|
+
);
|
|
127
|
+
}}>envoyer</Button
|
|
128
|
+
>
|
|
129
|
+
</div>
|
|
130
|
+
</Dialog>
|
|
131
|
+
<div class="container">
|
|
132
|
+
<div class="title">
|
|
133
|
+
<h3>Email</h3>
|
|
134
|
+
{#if actions}
|
|
135
|
+
<DropdownMenu.Root direction="bottom" bind:forceClose>
|
|
136
|
+
<DropdownMenu.Trigger slot="trigger">
|
|
137
|
+
<IconButton
|
|
138
|
+
><svg
|
|
139
|
+
width="24"
|
|
140
|
+
height="24"
|
|
141
|
+
viewBox="0 0 24 24"
|
|
142
|
+
fill="none"
|
|
143
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
144
|
+
>
|
|
145
|
+
<path
|
|
146
|
+
d="M14.2209 21.6301C13.0409 21.6301 11.3709 20.8001 10.0509 16.8301L9.33086 14.6701L7.17086 13.9501C3.21086 12.6301 2.38086 10.9601 2.38086 9.78007C2.38086 8.61007 3.21086 6.93007 7.17086 5.60007L15.6609 2.77007C17.7809 2.06007 19.5509 2.27007 20.6409 3.35007C21.7309 4.43007 21.9409 6.21007 21.2309 8.33007L18.4009 16.8201C17.0709 20.8001 15.4009 21.6301 14.2209 21.6301ZM7.64086 7.03007C4.86086 7.96007 3.87086 9.06007 3.87086 9.78007C3.87086 10.5001 4.86086 11.6001 7.64086 12.5201L10.1609 13.3601C10.3809 13.4301 10.5609 13.6101 10.6309 13.8301L11.4709 16.3501C12.3909 19.1301 13.5009 20.1201 14.2209 20.1201C14.9409 20.1201 16.0409 19.1301 16.9709 16.3501L19.8009 7.86007C20.3109 6.32007 20.2209 5.06007 19.5709 4.41007C18.9209 3.76007 17.6609 3.68007 16.1309 4.19007L7.64086 7.03007Z"
|
|
147
|
+
fill="#292D32"
|
|
148
|
+
/>
|
|
149
|
+
<path
|
|
150
|
+
d="M10.1108 14.4C9.92078 14.4 9.73078 14.33 9.58078 14.18C9.29078 13.89 9.29078 13.41 9.58078 13.12L13.1608 9.53C13.4508 9.24 13.9308 9.24 14.2208 9.53C14.5108 9.82 14.5108 10.3 14.2208 10.59L10.6408 14.18C10.5008 14.33 10.3008 14.4 10.1108 14.4Z"
|
|
151
|
+
fill="#292D32"
|
|
152
|
+
/>
|
|
153
|
+
</svg>
|
|
154
|
+
</IconButton>
|
|
155
|
+
</DropdownMenu.Trigger>
|
|
156
|
+
<DropdownMenu.Content slot="content" width="250px">
|
|
157
|
+
<Emails
|
|
158
|
+
{actions}
|
|
159
|
+
onClick={(action) => {
|
|
160
|
+
targetActions = action;
|
|
161
|
+
forceClose = true;
|
|
162
|
+
}}
|
|
163
|
+
></Emails>
|
|
164
|
+
</DropdownMenu.Content>
|
|
165
|
+
</DropdownMenu.Root>
|
|
166
|
+
{/if}
|
|
167
|
+
</div>
|
|
168
|
+
<EmailViewer entryId={$page.params.id} emailLinkId={$page.params.interface_slug.split('-')[1]}
|
|
169
|
+
></EmailViewer>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<style>
|
|
173
|
+
.container {
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
height: calc(100vh - 99px);
|
|
177
|
+
width: 100%;
|
|
178
|
+
padding: var(--pad-m);
|
|
179
|
+
}
|
|
180
|
+
.title {
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
justify-content: space-between;
|
|
184
|
+
padding: var(--pad-m);
|
|
185
|
+
}
|
|
186
|
+
.add {
|
|
187
|
+
width: 100%;
|
|
188
|
+
display: flex;
|
|
189
|
+
align-items: center;
|
|
190
|
+
justify-content: right;
|
|
191
|
+
}
|
|
192
|
+
</style>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createEntryTab } from '$lib/registry/EntryTabsRegistry/createEntryTab';
|
|
2
|
+
import { sendRequest } from 'hamzus-ui';
|
|
3
|
+
|
|
4
|
+
import Button from './Button.svelte'
|
|
5
|
+
import Page from './Page.svelte'
|
|
6
|
+
import { createEntryTabType } from '../../createEntryTabType';
|
|
7
|
+
|
|
8
|
+
export default createEntryTabType({
|
|
9
|
+
name: "Onglet d'email",
|
|
10
|
+
type: "email",
|
|
11
|
+
onLoad: async (entitySlug) => {
|
|
12
|
+
// recuperer les liens pdfs de la structure a partir de son slug
|
|
13
|
+
const request = await sendRequest({
|
|
14
|
+
path: '/get-all-email-links-from-slug',
|
|
15
|
+
data: {
|
|
16
|
+
entitySlug: entitySlug
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
if (request.statusType === "error") return []
|
|
21
|
+
|
|
22
|
+
let tabs = []
|
|
23
|
+
|
|
24
|
+
for (const link of request.data) {
|
|
25
|
+
tabs.push(createEntryTab({
|
|
26
|
+
label: link.name,
|
|
27
|
+
slug: "email-" + link.id,
|
|
28
|
+
type:"email",
|
|
29
|
+
}))
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return tabs
|
|
33
|
+
},
|
|
34
|
+
components: {
|
|
35
|
+
button: Button,
|
|
36
|
+
page: Page,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { projectRegistry } from "$lib/registry/projectRegistry/registry.svelte";
|
|
3
|
+
import { Tabs } from "hamzus-ui";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
startUrl,
|
|
7
|
+
label,
|
|
8
|
+
slug,
|
|
9
|
+
} = $props()
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<Tabs.Trigger
|
|
13
|
+
value="{startUrl}/{slug}"
|
|
14
|
+
href="{startUrl}/{slug}"
|
|
15
|
+
>
|
|
16
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
17
|
+
<path opacity="0.4" d="M16.1898 2H7.81978C4.17978 2 2.00977 4.17 2.00977 7.81V16.18C2.00977 19.82 4.17978 21.99 7.81978 21.99H16.1898C19.8298 21.99 21.9998 19.82 21.9998 16.18V7.81C21.9998 4.17 19.8298 2 16.1898 2Z" fill="#292D32"/>
|
|
18
|
+
<path d="M8.1796 16.7701C8.1596 16.7701 8.12961 16.7701 8.10961 16.7701C7.13961 16.6801 6.22961 16.2301 5.54961 15.5101C3.94961 13.8301 3.94961 11.1001 5.54961 9.4201L7.73961 7.12009C8.51961 6.30009 9.56961 5.84009 10.6896 5.84009C11.8096 5.84009 12.8596 6.29009 13.6396 7.12009C15.2396 8.80009 15.2396 11.5301 13.6396 13.2101L12.5496 14.3601C12.2596 14.6601 11.7896 14.6701 11.4896 14.3901C11.1896 14.1001 11.1796 13.6301 11.4596 13.3301L12.5496 12.1801C13.6096 11.0701 13.6096 9.2601 12.5496 8.1601C11.5596 7.1201 9.81961 7.1201 8.81961 8.1601L6.62961 10.4601C5.56961 11.5701 5.56961 13.3801 6.62961 14.4801C7.05961 14.9401 7.63961 15.2201 8.24961 15.2801C8.65961 15.3201 8.9596 15.6901 8.9196 16.1001C8.8896 16.4801 8.5596 16.7701 8.1796 16.7701Z" fill="#292D32"/>
|
|
19
|
+
<path d="M13.3102 18.1601C12.1902 18.1601 11.1402 17.7101 10.3602 16.8801C8.76016 15.2001 8.76016 12.4701 10.3602 10.7902L11.4502 9.64016C11.7402 9.34016 12.2102 9.33013 12.5102 9.61013C12.8102 9.90013 12.8201 10.3702 12.5401 10.6702L11.4502 11.8201C10.3902 12.9301 10.3902 14.7401 11.4502 15.8401C12.4402 16.8801 14.1801 16.8901 15.1801 15.8401L17.3702 13.5402C18.4302 12.4302 18.4302 10.6201 17.3702 9.52013C16.9402 9.06013 16.3602 8.78014 15.7502 8.72014C15.3402 8.68014 15.0402 8.31014 15.0802 7.90014C15.1202 7.49014 15.4801 7.18015 15.9001 7.23015C16.8701 7.33015 17.7802 7.77013 18.4602 8.49013C20.0602 10.1701 20.0602 12.9001 18.4602 14.5801L16.2702 16.8801C15.4802 17.7101 14.4302 18.1601 13.3102 18.1601Z" fill="#292D32"/>
|
|
20
|
+
</svg>
|
|
21
|
+
<h5>{label}</h5>
|
|
22
|
+
</Tabs.Trigger>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { page } from '$app/stores';
|
|
3
|
+
import { RotativeLoader, sendRequest } from 'hamzus-ui';
|
|
4
|
+
import { onMount } from 'svelte';
|
|
5
|
+
import StructureTableContainer from '@utils/viewConfigurator/StructureTable/StructureTableContainer.svelte';
|
|
6
|
+
import { structures } from '../../routes/[lang]/[project_slug]/[origin]/structure';
|
|
7
|
+
import { structure } from '../../routes/[lang]/[project_slug]/[origin]/[structure_slug]/structure';
|
|
8
|
+
|
|
9
|
+
let targetEntity = null;
|
|
10
|
+
|
|
11
|
+
let wheres = {}
|
|
12
|
+
|
|
13
|
+
onMount(getData);
|
|
14
|
+
|
|
15
|
+
async function getData() {
|
|
16
|
+
targetEntity = null;
|
|
17
|
+
|
|
18
|
+
for (const entity of $structures) {
|
|
19
|
+
if (entity.slug === $page.params.interface_slug) {
|
|
20
|
+
|
|
21
|
+
// parourir ses champs pour etablir le filtre
|
|
22
|
+
for (const field of entity.fields) {
|
|
23
|
+
if (field.type === "link") {
|
|
24
|
+
if (field.props.linkId == $structure.id) {
|
|
25
|
+
wheres[field.normalized_name] = $page.params.id
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
targetEntity = entity;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
{#if targetEntity !== null}
|
|
41
|
+
<StructureTableContainer invisibleWheres={wheres} slug={$page.params.interface_slug} structureId={targetEntity.id} columns={targetEntity.fields}
|
|
42
|
+
></StructureTableContainer>
|
|
43
|
+
{:else}
|
|
44
|
+
<div class="loader">
|
|
45
|
+
<RotativeLoader></RotativeLoader>
|
|
46
|
+
</div>
|
|
47
|
+
{/if}
|
|
48
|
+
|
|
49
|
+
<style>
|
|
50
|
+
.loader {
|
|
51
|
+
width: 100%;
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
padding: 60px var(--pad-m);
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { createEntryTab } from '$lib/registry/EntryTabsRegistry/createEntryTab';
|
|
2
|
+
import { sendRequest } from 'hamzus-ui';
|
|
3
|
+
|
|
4
|
+
import Button from './Button.svelte'
|
|
5
|
+
import Page from './Page.svelte'
|
|
6
|
+
import { createEntryTabType } from '../../createEntryTabType';
|
|
7
|
+
import { entityRegistry } from '$lib/registry/entityRegistry/registry.svelte';
|
|
8
|
+
import { get } from 'svelte/store';
|
|
9
|
+
|
|
10
|
+
export default createEntryTabType({
|
|
11
|
+
name: "Onglet de liens",
|
|
12
|
+
type: "link",
|
|
13
|
+
onLoad: async (entitySlug) => {
|
|
14
|
+
const structures = get(entityRegistry.getAll())
|
|
15
|
+
|
|
16
|
+
let structureId = null
|
|
17
|
+
|
|
18
|
+
for (const structure of structures) {
|
|
19
|
+
if (structure.slug !== entitySlug) continue
|
|
20
|
+
|
|
21
|
+
structureId = structure.id
|
|
22
|
+
break
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
let tabs = []
|
|
26
|
+
|
|
27
|
+
// parcourir toute les colonnes des autres structure et verifié si il y a un type link
|
|
28
|
+
for (const structure of structures) {
|
|
29
|
+
|
|
30
|
+
if (structure.id === structureId) continue;
|
|
31
|
+
|
|
32
|
+
const structureName = structure.plural_name
|
|
33
|
+
const structureSlug = structure.slug
|
|
34
|
+
|
|
35
|
+
for (const column of structure.fields) {
|
|
36
|
+
|
|
37
|
+
if (column.type !== "link") continue;
|
|
38
|
+
if (column.props.linkId != structureId) continue
|
|
39
|
+
|
|
40
|
+
// récuperer le nom de la tabs
|
|
41
|
+
for (const structure of structures) {
|
|
42
|
+
|
|
43
|
+
if (structure.id !== column.props.linkId) continue;
|
|
44
|
+
|
|
45
|
+
tabs.push(createEntryTab({
|
|
46
|
+
label: structureName,
|
|
47
|
+
slug: structureSlug,
|
|
48
|
+
type: "link",
|
|
49
|
+
}))
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return tabs
|
|
55
|
+
},
|
|
56
|
+
components: {
|
|
57
|
+
button: Button,
|
|
58
|
+
page: Page,
|
|
59
|
+
},
|
|
60
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { projectRegistry } from "$lib/registry/projectRegistry/registry.svelte";
|
|
3
|
+
import { Tabs } from "hamzus-ui";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
startUrl,
|
|
7
|
+
label,
|
|
8
|
+
slug,
|
|
9
|
+
} = $props()
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<Tabs.Trigger
|
|
13
|
+
value="{startUrl}/{slug}"
|
|
14
|
+
href="{startUrl}/{slug}"
|
|
15
|
+
>
|
|
16
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
17
|
+
<path opacity="0.4" d="M20.5 10.19H17.61C15.24 10.19 13.31 8.26 13.31 5.89V3C13.31 2.45 12.86 2 12.31 2H8.07C4.99 2 2.5 4 2.5 7.57V16.43C2.5 20 4.99 22 8.07 22H15.93C19.01 22 21.5 20 21.5 16.43V11.19C21.5 10.64 21.05 10.19 20.5 10.19Z" fill="#292D32"/>
|
|
18
|
+
<path d="M15.7997 2.20999C15.3897 1.79999 14.6797 2.07999 14.6797 2.64999V6.13999C14.6797 7.59999 15.9197 8.80999 17.4297 8.80999C18.3797 8.81999 19.6997 8.81999 20.8297 8.81999C21.3997 8.81999 21.6997 8.14999 21.2997 7.74999C19.8597 6.29999 17.2797 3.68999 15.7997 2.20999Z" fill="#292D32"/>
|
|
19
|
+
<path d="M13.5 13.75H7.5C7.09 13.75 6.75 13.41 6.75 13C6.75 12.59 7.09 12.25 7.5 12.25H13.5C13.91 12.25 14.25 12.59 14.25 13C14.25 13.41 13.91 13.75 13.5 13.75Z" fill="#292D32"/>
|
|
20
|
+
<path d="M11.5 17.75H7.5C7.09 17.75 6.75 17.41 6.75 17C6.75 16.59 7.09 16.25 7.5 16.25H11.5C11.91 16.25 12.25 16.59 12.25 17C12.25 17.41 11.91 17.75 11.5 17.75Z" fill="#292D32"/>
|
|
21
|
+
</svg>
|
|
22
|
+
<h5>{label}</h5>
|
|
23
|
+
</Tabs.Trigger>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { config, getCookie } from "hamzus-ui";
|
|
3
|
+
import PdfViewer from "../../routes/[lang]/[project_slug]/[origin]/layout/PdfViewer.svelte";
|
|
4
|
+
import { page } from "$app/stores";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
entity_slug,
|
|
8
|
+
entry_id,
|
|
9
|
+
entry_tab_slug,
|
|
10
|
+
} = $props()
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<PdfViewer url="{config.url}/view-pdf-link?__project_normalized_name={$page.params.project_slug}&entitySlug={entity_slug}&entryId={entry_id}&pdfLinkId={entry_tab_slug.split("-")[1]}"></PdfViewer>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createEntryTab } from '$lib/registry/EntryTabsRegistry/createEntryTab';
|
|
2
|
+
import { sendRequest } from 'hamzus-ui';
|
|
3
|
+
|
|
4
|
+
import Button from './Button.svelte'
|
|
5
|
+
import Page from './Page.svelte'
|
|
6
|
+
import { createEntryTabType } from '../../createEntryTabType';
|
|
7
|
+
|
|
8
|
+
export default createEntryTabType({
|
|
9
|
+
name: "Onglet de pdf",
|
|
10
|
+
type: "pdf",
|
|
11
|
+
onLoad: async (entitySlug) => {
|
|
12
|
+
// recuperer les liens pdfs de la structure a partir de son slug
|
|
13
|
+
const request = await sendRequest({
|
|
14
|
+
path: '/get-all-pdf-links-from-entity-slug',
|
|
15
|
+
data: {
|
|
16
|
+
entitySlug: entitySlug
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
if (request.statusType === "error") return []
|
|
21
|
+
|
|
22
|
+
let tabs = []
|
|
23
|
+
|
|
24
|
+
for (const link of request.data) {
|
|
25
|
+
tabs.push(createEntryTab({
|
|
26
|
+
label: link.name,
|
|
27
|
+
slug: "pdf-" + link.id,
|
|
28
|
+
type:"pdf",
|
|
29
|
+
}))
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return tabs
|
|
33
|
+
},
|
|
34
|
+
components: {
|
|
35
|
+
button: Button,
|
|
36
|
+
page: Page,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { entryTabTypeRegistry } from "../registry.svelte";
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
type,
|
|
6
|
+
...props
|
|
7
|
+
} = $props()
|
|
8
|
+
|
|
9
|
+
const entryTabType = $derived(entryTabTypeRegistry.get(type))
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<svelte:component this={entryTabType.components.button} {...props}></svelte:component>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function createEntryTabType(config = {}) {
|
|
2
|
+
const entryTabType = {
|
|
3
|
+
type:"",
|
|
4
|
+
name:"",
|
|
5
|
+
onLoad:(entitySlug)=>{},
|
|
6
|
+
components : {
|
|
7
|
+
button:null,
|
|
8
|
+
page:null,
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
Object.assign(entryTabType, config);
|
|
13
|
+
|
|
14
|
+
// entryTabType.get = () => "test";
|
|
15
|
+
|
|
16
|
+
return entryTabType;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { entryTabTypeRegistry } from './registry.svelte';
|
|
2
|
+
import Email from './EntryTabTypes/Email';
|
|
3
|
+
import Pdf from './EntryTabTypes/Pdf';
|
|
4
|
+
import Link from './EntryTabTypes/Link';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
let isLoaded = false
|
|
8
|
+
|
|
9
|
+
export function registerDefaultEntryTabTypes() {
|
|
10
|
+
if (isLoaded) return
|
|
11
|
+
|
|
12
|
+
entryTabTypeRegistry.register(Pdf)
|
|
13
|
+
entryTabTypeRegistry.register(Email)
|
|
14
|
+
entryTabTypeRegistry.register(Link)
|
|
15
|
+
|
|
16
|
+
isLoaded = true
|
|
17
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { writable, derived, get } from 'svelte/store';
|
|
2
|
+
|
|
3
|
+
function createEntryTabTypesRegistry() {
|
|
4
|
+
const store = writable({});
|
|
5
|
+
|
|
6
|
+
const all = derived(store, ($entryTabTypes) => Object.values($entryTabTypes));
|
|
7
|
+
|
|
8
|
+
return {
|
|
9
|
+
subscribe: store.subscribe,
|
|
10
|
+
|
|
11
|
+
register(entryTabType) {
|
|
12
|
+
store.update((entryTabTypes) => ({
|
|
13
|
+
...entryTabTypes,
|
|
14
|
+
[entryTabType.type]: entryTabType
|
|
15
|
+
}));
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
unregister(type) {
|
|
19
|
+
store.update((entryTabTypes) => {
|
|
20
|
+
const copy = { ...entryTabTypes };
|
|
21
|
+
|
|
22
|
+
delete copy[type];
|
|
23
|
+
|
|
24
|
+
return copy;
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
get(type) {
|
|
29
|
+
return get(store)[type];
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
select(type) {
|
|
33
|
+
return derived(store, ($entryTabTypes) => $entryTabTypes[type]);
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
getAll() {
|
|
39
|
+
return all;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const entryTabTypeRegistry = createEntryTabTypesRegistry();
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { Button } from 'hamzus-ui';
|
|
3
|
+
import { viewEntriesTypeRegistry } from '../registry.svelte';
|
|
4
|
+
import ViewEntriesTypeIcon from './ViewEntriesTypeIcon.svelte';
|
|
5
|
+
|
|
6
|
+
let { type, variant = 'ghost', ...props } = $props();
|
|
7
|
+
|
|
8
|
+
const viewType = viewEntriesTypeRegistry.get(type);
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
{#if viewType}
|
|
12
|
+
<Button {...props} {variant} style="padding:var(--pad-s) var(--pad-l) var(--pad-s) var(--pad-m);width:100%;">
|
|
13
|
+
<div class="ico">
|
|
14
|
+
<ViewEntriesTypeIcon {type}></ViewEntriesTypeIcon>
|
|
15
|
+
</div>
|
|
16
|
+
<h5>{viewType.name}</h5>
|
|
17
|
+
</Button>
|
|
18
|
+
{/if}
|
|
19
|
+
|
|
20
|
+
<style>
|
|
21
|
+
.ico {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
width: 16px;
|
|
26
|
+
height: 16px;
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { Button, RotativeLoader } from 'hamzus-ui';
|
|
3
|
+
import { viewEntriesTypeRegistry } from '../registry.svelte';
|
|
4
|
+
|
|
5
|
+
let { type, ...props } = $props();
|
|
6
|
+
|
|
7
|
+
const viewType = $derived(viewEntriesTypeRegistry.get(type));
|
|
8
|
+
|
|
9
|
+
const ViewTypeComponent = $derived(viewType?.components?.component ?? null)
|
|
10
|
+
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
{#if viewType}
|
|
14
|
+
<ViewTypeComponent {...props}><slot name="actions" slot="actions"/></ViewTypeComponent>
|
|
15
|
+
{:else}
|
|
16
|
+
<div class="loader">
|
|
17
|
+
<RotativeLoader></RotativeLoader>
|
|
18
|
+
</div>
|
|
19
|
+
{/if}
|
|
20
|
+
|
|
21
|
+
<style>
|
|
22
|
+
|
|
23
|
+
.loader {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
padding: 60px var(--pad-m);
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
30
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { Button, DropdownMenu } from 'hamzus-ui';
|
|
3
|
+
import { viewEntriesTypeRegistry } from '../registry.svelte';
|
|
4
|
+
import ViewTypeButton from './ViewEntriesTypeButton.svelte';
|
|
5
|
+
|
|
6
|
+
let { onChange = (type) => {}, type = null } = $props();
|
|
7
|
+
|
|
8
|
+
const viewTypes = viewEntriesTypeRegistry.getAll();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<DropdownMenu.Root direction="bottom">
|
|
12
|
+
<DropdownMenu.Trigger slot="trigger">
|
|
13
|
+
{#if type !== null}
|
|
14
|
+
<ViewTypeButton variant="secondary" {type}></ViewTypeButton>
|
|
15
|
+
{:else}
|
|
16
|
+
<Button variant="secondary" style="width:100%">
|
|
17
|
+
<h5>selectionner un type de vue</h5>
|
|
18
|
+
</Button>
|
|
19
|
+
{/if}
|
|
20
|
+
</DropdownMenu.Trigger>
|
|
21
|
+
<DropdownMenu.Content slot="content" width="250px">
|
|
22
|
+
{#each $viewTypes as viewType}
|
|
23
|
+
<ViewTypeButton
|
|
24
|
+
variant={viewType.type === type ? 'secondary' : 'ghost'}
|
|
25
|
+
onClick={() => {
|
|
26
|
+
onChange(viewType.type);
|
|
27
|
+
}}
|
|
28
|
+
type={viewType.type}
|
|
29
|
+
></ViewTypeButton>
|
|
30
|
+
{/each}
|
|
31
|
+
</DropdownMenu.Content>
|
|
32
|
+
</DropdownMenu.Root>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { entryTabRegistry } from './registry.svelte';
|
|
2
|
+
import Email from './entryTabs/Email';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
let isLoaded = false
|
|
6
|
+
|
|
7
|
+
export function registerDefaultEntryTabs() {
|
|
8
|
+
if (isLoaded) return
|
|
9
|
+
|
|
10
|
+
entryTabRegistry.register(Email)
|
|
11
|
+
|
|
12
|
+
isLoaded = true
|
|
13
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { writable, derived, get } from 'svelte/store';
|
|
2
|
+
|
|
3
|
+
function createEntryTabsRegistry() {
|
|
4
|
+
const store = writable({});
|
|
5
|
+
|
|
6
|
+
const all = derived(store, ($entryTabs) => Object.values($entryTabs));
|
|
7
|
+
|
|
8
|
+
return {
|
|
9
|
+
subscribe: store.subscribe,
|
|
10
|
+
|
|
11
|
+
register(entryTab) {
|
|
12
|
+
store.update((entryTabs) => ({
|
|
13
|
+
...entryTabs,
|
|
14
|
+
[entryTab.slug]: entryTab
|
|
15
|
+
}));
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
unregister(slug) {
|
|
19
|
+
store.update((entryTabs) => {
|
|
20
|
+
const copy = { ...entryTabs };
|
|
21
|
+
|
|
22
|
+
delete copy[slug];
|
|
23
|
+
|
|
24
|
+
return copy;
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
unregisterAll() {
|
|
28
|
+
store.update((entryTabs) => {
|
|
29
|
+
return {};
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
get(slug) {
|
|
34
|
+
return get(store)[slug];
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
select(slug) {
|
|
38
|
+
return derived(store, ($entryTabs) => $entryTabs[slug]);
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
getAll() {
|
|
44
|
+
return all;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const entryTabRegistry = createEntryTabsRegistry();
|
|
@@ -7,6 +7,7 @@ import { navigationRegistry } from "../navigationRegistry/registry.svelte";
|
|
|
7
7
|
import { registerNavigation } from "../navigationRegistry/registerNavigation";
|
|
8
8
|
import { registerWidgetTypes } from "../widgetTypeRegistry/registerWidgetTypes";
|
|
9
9
|
import { get } from "svelte/store";
|
|
10
|
+
import { registerDefaultEntryTabTypes } from "../EntryTabTypesRegistry/registerDefaultEntryTabTypes";
|
|
10
11
|
|
|
11
12
|
export function createProject(config = {}) {
|
|
12
13
|
const project = {
|
|
@@ -102,6 +103,7 @@ export function createProject(config = {}) {
|
|
|
102
103
|
registerDefaultFieldTypes();
|
|
103
104
|
registerDefaultViewEntriesTypes();
|
|
104
105
|
registerWidgetTypes()
|
|
106
|
+
registerDefaultEntryTabTypes()
|
|
105
107
|
// charger les constant
|
|
106
108
|
|
|
107
109
|
// charger les entité
|
|
@@ -7,11 +7,18 @@
|
|
|
7
7
|
import { entryActionRegistry } from '$lib/registry/entryActionRegistry/registry.svelte';
|
|
8
8
|
import { registerDefaultEntryActionTypes } from '$lib/registry/entryActionTypeRegistry/registerDefaultEntryActionTypes';
|
|
9
9
|
import { entryActionTypeRegistry } from '$lib/registry/entryActionTypeRegistry/registry.svelte';
|
|
10
|
+
import { entryTabRegistry } from '$lib/registry/EntryTabsRegistry/registry.svelte';
|
|
11
|
+
import EntryTabTypeButton from '$lib/registry/EntryTabTypesRegistry/components/EntryTabTypeButton.svelte';
|
|
12
|
+
import { entryTabTypeRegistry } from '$lib/registry/EntryTabTypesRegistry/registry.svelte';
|
|
13
|
+
import { projectRegistry } from '$lib/registry/projectRegistry/registry.svelte';
|
|
10
14
|
import { Button, sendRequest } from 'hamzus-ui';
|
|
11
15
|
import { onMount } from 'svelte';
|
|
12
16
|
|
|
13
17
|
const entity = $derived(entityRegistry.getFromSlug($page.params.entity_slug));
|
|
14
18
|
|
|
19
|
+
const entryTabTypes = $derived(entryTabTypeRegistry.getAll())
|
|
20
|
+
const entryTabs = $derived(entryTabRegistry.getAll())
|
|
21
|
+
|
|
15
22
|
let ctx = $state(null);
|
|
16
23
|
|
|
17
24
|
let flatCtx = $state(null);
|
|
@@ -51,12 +58,29 @@
|
|
|
51
58
|
})
|
|
52
59
|
);
|
|
53
60
|
}
|
|
61
|
+
|
|
62
|
+
// vider le registry des tabs
|
|
63
|
+
entryTabRegistry.unregisterAll()
|
|
64
|
+
|
|
65
|
+
for (const tabType of $entryTabTypes) {
|
|
66
|
+
let newTabs = await tabType.onLoad(entity.slug)
|
|
67
|
+
for (const newTab of newTabs) {
|
|
68
|
+
entryTabRegistry.register(newTab)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
console.log($entryTabs);
|
|
54
73
|
|
|
55
74
|
});
|
|
56
75
|
|
|
57
76
|
</script>
|
|
58
77
|
|
|
59
78
|
{#if entity}
|
|
79
|
+
<div class="tabs">
|
|
80
|
+
{#each $entryTabs as entryTab}
|
|
81
|
+
<EntryTabTypeButton startUrl="{projectRegistry.getTargetProjectHref()}/{$page.params.entity_slug}" {...entryTab}></EntryTabTypeButton>
|
|
82
|
+
{/each}
|
|
83
|
+
</div>
|
|
60
84
|
<div class="page">
|
|
61
85
|
<EntryPage bind:ctx entityId={entity.id} entryId={$page.params.entry_id}>
|
|
62
86
|
<div>
|
|
@@ -69,6 +93,13 @@
|
|
|
69
93
|
{/if}
|
|
70
94
|
|
|
71
95
|
<style>
|
|
96
|
+
.tabs {
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
column-gap: var(--pad-m);
|
|
100
|
+
width: 100%;
|
|
101
|
+
padding: var(--pad-s);
|
|
102
|
+
}
|
|
72
103
|
.page {
|
|
73
104
|
display: flex;
|
|
74
105
|
flex-direction: column;
|