firstly 0.0.12 → 0.0.13
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/CHANGELOG.md +8 -0
- package/esm/api/index.d.ts +1 -0
- package/esm/api/index.js +3 -1
- package/esm/auth/server/AuthController.server.d.ts +1 -1
- package/esm/auth/server/AuthController.server.js +19 -19
- package/esm/auth/server/handleGuard.d.ts +16 -0
- package/esm/auth/server/handleGuard.js +67 -0
- package/esm/auth/server/index.d.ts +3 -1
- package/esm/auth/server/index.js +3 -1
- package/esm/auth/server/module.d.ts +102 -83
- package/esm/auth/server/module.js +55 -42
- package/esm/auth/server/providers/github.d.ts +2 -1
- package/esm/auth/server/providers/github.js +1 -1
- package/esm/auth/static/assets/Page-BUfjaN-D.d.ts +5 -0
- package/esm/auth/static/assets/Page-BUfjaN-D.js +19 -0
- package/esm/auth/static/assets/Page-CJ58H1vl.css +1 -0
- package/esm/auth/static/assets/Page-CaDAqmBS.d.ts +5 -0
- package/esm/auth/static/assets/Page-CaDAqmBS.js +1 -0
- package/esm/auth/static/assets/Page-DhdZddzJ.d.ts +5 -0
- package/esm/auth/static/assets/Page-DhdZddzJ.js +1 -0
- package/esm/auth/static/assets/index-BDy4A_14.css +4 -0
- package/esm/auth/static/assets/index-D-Ztdt2o.d.ts +54 -0
- package/esm/auth/static/assets/index-D-Ztdt2o.js +2 -0
- package/esm/auth/static/index.html +11 -11
- package/esm/bin/cmd.js +119 -48
- package/esm/cellsBuildor.js +1 -1
- package/esm/common.d.ts +5 -0
- package/esm/common.js +8 -0
- package/esm/cron/server/index.js +1 -1
- package/esm/feedback/FeedbackController.js +1 -2
- package/esm/feedback/ui/DialogIssue.svelte +52 -56
- package/esm/feedback/ui/DialogIssues.svelte +71 -71
- package/esm/feedback/ui/DialogMilestones.svelte +22 -22
- package/esm/index.d.ts +2 -5
- package/esm/index.js +2 -8
- package/esm/mail/templates/DefaultMail.svelte +17 -17
- package/esm/storeItem.d.ts +1 -4
- package/esm/storeItem.js +1 -1
- package/esm/storeList.d.ts +1 -4
- package/esm/sveltekit/server/index.d.ts +3 -0
- package/esm/sveltekit/server/index.js +3 -0
- package/esm/ui/Button.svelte +33 -33
- package/esm/ui/Button.svelte.d.ts +2 -2
- package/esm/ui/Clipboardable.svelte +6 -6
- package/esm/ui/Clipboardable.svelte.d.ts +4 -4
- package/esm/ui/Field.svelte +139 -149
- package/esm/ui/Field.svelte.d.ts +2 -2
- package/esm/ui/FieldGroup.svelte +38 -38
- package/esm/ui/Grid.svelte +212 -222
- package/esm/ui/GridLoading.svelte +18 -22
- package/esm/ui/GridPaginate.svelte +38 -38
- package/esm/ui/Icon.svelte +50 -49
- package/esm/ui/Icon.svelte.d.ts +18 -18
- package/esm/ui/Loading.svelte +5 -5
- package/esm/ui/Tooltip.svelte +16 -16
- package/esm/ui/dialog/DialogForm.svelte +22 -22
- package/esm/ui/dialog/DialogManagement.svelte +74 -74
- package/esm/ui/dialog/DialogPrimitive.svelte +50 -50
- package/esm/ui/dialog/FormEditAction.svelte +34 -34
- package/esm/ui/dialog/dialog.d.ts +1 -4
- package/esm/ui/internals/FieldContainer.svelte +11 -11
- package/esm/ui/internals/FieldContainer.svelte.d.ts +3 -3
- package/esm/ui/internals/Input.svelte +25 -25
- package/esm/ui/internals/Input.svelte.d.ts +1 -1
- package/esm/ui/internals/Textarea.svelte +21 -21
- package/esm/ui/internals/Textarea.svelte.d.ts +2 -2
- package/esm/ui/internals/select/MultiSelectMelt.svelte +69 -73
- package/esm/ui/internals/select/SelectMelt.svelte +86 -86
- package/esm/ui/internals/select/SelectRadio.svelte +22 -22
- package/esm/ui/link/Link.svelte +14 -14
- package/esm/ui/link/Link.svelte.d.ts +3 -4
- package/esm/ui/link/LinkPlus.svelte +33 -35
- package/package.json +14 -18
- package/esm/auth/static/assets/Page-Bb8bFlrP.d.ts +0 -4
- package/esm/auth/static/assets/Page-Bb8bFlrP.js +0 -1
- package/esm/auth/static/assets/Page-BxomFlZ8.d.ts +0 -4
- package/esm/auth/static/assets/Page-BxomFlZ8.js +0 -1
- package/esm/auth/static/assets/Page-CaIYu0-y.d.ts +0 -6
- package/esm/auth/static/assets/Page-CaIYu0-y.js +0 -19
- package/esm/auth/static/assets/Page-MkYglNtu.css +0 -1
- package/esm/auth/static/assets/index-Bl0Bk5u0.d.ts +0 -64
- package/esm/auth/static/assets/index-Bl0Bk5u0.js +0 -2
- package/esm/auth/static/assets/index-R27C_TlP.css +0 -4
package/esm/ui/Icon.svelte
CHANGED
|
@@ -29,57 +29,58 @@ const getInfoProps = (props, i = 0) => {
|
|
|
29
29
|
}
|
|
30
30
|
return props ?? "";
|
|
31
31
|
};
|
|
32
|
+
const role = "img";
|
|
32
33
|
</script>
|
|
33
34
|
|
|
34
35
|
{#if BROWSER || ssr}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
36
|
+
{#if svg || $$slots.default}
|
|
37
|
+
<span
|
|
38
|
+
class={getInfoProps(className)}
|
|
39
|
+
style={getInfoProps(style)}
|
|
40
|
+
style:width
|
|
41
|
+
style:height
|
|
42
|
+
{role}
|
|
43
|
+
on:click
|
|
44
|
+
>
|
|
45
|
+
<slot>
|
|
46
|
+
{@html svg ?? ''}
|
|
47
|
+
</slot>
|
|
48
|
+
</span>
|
|
49
|
+
{:else}
|
|
50
|
+
<svg
|
|
51
|
+
{width}
|
|
52
|
+
{height}
|
|
53
|
+
{viewBox}
|
|
54
|
+
class={getInfoProps(className)}
|
|
55
|
+
style={getInfoProps(style)}
|
|
56
|
+
{role}
|
|
57
|
+
on:click
|
|
58
|
+
>
|
|
59
|
+
{#each Array.isArray(path) ? path : [path] as d, i}
|
|
60
|
+
<path
|
|
61
|
+
{d}
|
|
62
|
+
fill="currentColor"
|
|
63
|
+
class={getInfoProps(className, i)}
|
|
64
|
+
style={getInfoProps(style, i)}
|
|
65
|
+
/>
|
|
66
|
+
{/each}
|
|
67
|
+
</svg>
|
|
68
|
+
{/if}
|
|
68
69
|
{:else}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
70
|
+
<svg
|
|
71
|
+
{width}
|
|
72
|
+
{height}
|
|
73
|
+
{viewBox}
|
|
74
|
+
class={getInfoProps(className)}
|
|
75
|
+
style={getInfoProps(style)}
|
|
76
|
+
{role}
|
|
77
|
+
on:click
|
|
78
|
+
>
|
|
79
|
+
<path
|
|
80
|
+
d={LibIcon_Empty}
|
|
81
|
+
fill="currentColor"
|
|
82
|
+
class={getInfoProps(className)}
|
|
83
|
+
style={getInfoProps(style)}
|
|
84
|
+
/>
|
|
85
|
+
</svg>
|
|
85
86
|
{/if}
|
package/esm/ui/Icon.svelte.d.ts
CHANGED
|
@@ -3,27 +3,27 @@ import './LibIcon';
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
* directly <svg ... /> or d of <path ... />
|
|
7
|
+
*
|
|
8
|
+
* with \@mdi/js
|
|
9
|
+
* ```js
|
|
10
|
+
* import { mdiAccountTieWoman } from "@mdi/js";
|
|
11
|
+
* <Icon data={mdiAccountTieWoman} style="background-color: blue;" size={"4rem"}></Icon>
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* with \@iconify-json/mdi && unplugin-icons with Icons({ compiler: "raw" })
|
|
15
|
+
* ```js
|
|
16
|
+
* import Woman from "virtual:icons/mdi/account-tie-woman";
|
|
17
|
+
* <Icon data={mdiAccountTieWoman} style="background-color: blue;" size={"4rem"}></Icon>
|
|
18
|
+
* ```
|
|
19
|
+
*/ data?: string | string[];
|
|
20
20
|
size?: string | number;
|
|
21
21
|
caption?: string | undefined;
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
* By default, svg are not rendered on the server side.
|
|
24
|
+
* But the size will be respected to not have glitch on the client side when the icon is coming.
|
|
25
|
+
* @default false
|
|
26
|
+
*/ ssr?: boolean;
|
|
27
27
|
class?: string | string[] | undefined;
|
|
28
28
|
style?: string | string[] | undefined;
|
|
29
29
|
};
|
package/esm/ui/Loading.svelte
CHANGED
|
@@ -5,10 +5,10 @@ let extraClass = "";
|
|
|
5
5
|
|
|
6
6
|
<!-- To fix one capa & cadb are on the same css -->
|
|
7
7
|
<div
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
class={tw(
|
|
9
|
+
'skeleton bg-base-content/20 flex h-4 w-full items-center justify-center rounded-lg',
|
|
10
|
+
extraClass,
|
|
11
|
+
)}
|
|
12
12
|
>
|
|
13
|
-
|
|
13
|
+
<slot />
|
|
14
14
|
</div>
|
package/esm/ui/Tooltip.svelte
CHANGED
|
@@ -20,23 +20,23 @@ const {
|
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<button type="button" class="trigger" {...$trigger} use:trigger aria-label="Add">
|
|
23
|
-
|
|
23
|
+
<slot />
|
|
24
24
|
</button>
|
|
25
25
|
<!-- {hideTooltip} -->
|
|
26
26
|
{#if $open && !hideTooltip && (text || $$slots.tooltip)}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
<div
|
|
28
|
+
{...$content}
|
|
29
|
+
use:content
|
|
30
|
+
transition:fade={{ duration: 100 }}
|
|
31
|
+
class="bg-base-300 z-30 rounded-lg ring-1 ring-black"
|
|
32
|
+
>
|
|
33
|
+
<div {...$arrow} use:arrow></div>
|
|
34
|
+
<div class="px-4 py-1">
|
|
35
|
+
{#if $$slots.tooltip}
|
|
36
|
+
<slot name="tooltip" />
|
|
37
|
+
{:else}
|
|
38
|
+
{@html text}
|
|
39
|
+
{/if}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
42
|
{/if}
|
|
@@ -42,28 +42,28 @@ const onDelete = async () => {
|
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
44
|
<DialogPrimitive
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
detail={toShow.detail}
|
|
46
|
+
open
|
|
47
|
+
classes={{ root: toShow.classes?.root }}
|
|
48
|
+
on:change={() => dialog.close(toShow.id, { success: false })}
|
|
49
49
|
>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
<form on:submit|preventDefault={onInsert}>
|
|
51
|
+
<div class="grid {toShow.classes?.formGrid ?? ''} gap-4 pb-4">
|
|
52
|
+
<FieldGroup
|
|
53
|
+
focusKey={toShow.focusKey}
|
|
54
|
+
{cells}
|
|
55
|
+
{store}
|
|
56
|
+
mode={toShow.type === 'view' ? 'view' : 'edit'}
|
|
57
|
+
on:createRequest={onCreate}
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
<FormEditAction
|
|
62
|
+
type={toShow.type}
|
|
63
|
+
wDelete={toShow.wDelete}
|
|
64
|
+
{store}
|
|
65
|
+
on:delete={onDelete}
|
|
66
|
+
textCreate={toShow.topicPrefixText}
|
|
67
|
+
></FormEditAction>
|
|
68
|
+
</form>
|
|
69
69
|
</DialogPrimitive>
|
|
@@ -1,87 +1,87 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import Button from '../Button.svelte'
|
|
3
|
+
import { dialog } from './dialog'
|
|
4
|
+
import DialogForm from './DialogForm.svelte'
|
|
5
|
+
import DialogPrimitive from './DialogPrimitive.svelte'
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
$: dialogSorted = $dialog.sort((a, b) => a.id - b.id)
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
{#each dialogSorted as toShow}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
11
|
+
{#if toShow.type === 'confirm'}
|
|
12
|
+
<DialogPrimitive
|
|
13
|
+
detail={toShow.detail}
|
|
14
|
+
open
|
|
15
|
+
on:change={() => dialog.close(toShow.id, { success: false })}
|
|
16
|
+
>
|
|
17
|
+
{@html toShow.children}
|
|
18
|
+
<svelte:fragment slot="actions">
|
|
19
|
+
<Button class="text-white" on:click={() => dialog.close(toShow.id, { success: true })}
|
|
20
|
+
>Confirmer</Button
|
|
21
|
+
>
|
|
22
|
+
</svelte:fragment>
|
|
23
|
+
</DialogPrimitive>
|
|
24
|
+
{:else if toShow.type === 'confirmDelete'}
|
|
25
|
+
<DialogPrimitive
|
|
26
|
+
detail={toShow.detail}
|
|
27
|
+
open
|
|
28
|
+
on:change={() => dialog.close(toShow.id, { success: false })}
|
|
29
|
+
>
|
|
30
|
+
{@html toShow.children}
|
|
31
|
+
<svelte:fragment slot="actions">
|
|
32
|
+
<Button
|
|
33
|
+
class="btn-outline btn-error"
|
|
34
|
+
on:click={() => dialog.close(toShow.id, { success: true })}
|
|
35
|
+
>
|
|
36
|
+
Confirmer
|
|
37
|
+
</Button>
|
|
38
|
+
</svelte:fragment>
|
|
39
|
+
</DialogPrimitive>
|
|
40
|
+
{:else if toShow.type === 'insert' || toShow.type === 'update' || toShow.type === 'view'}
|
|
41
|
+
<DialogForm {toShow}></DialogForm>
|
|
42
|
+
{:else if toShow.component && toShow.children}
|
|
43
|
+
<DialogPrimitive
|
|
44
|
+
detail={toShow.detail}
|
|
45
|
+
open
|
|
46
|
+
on:change={() => dialog.close(toShow.id, { success: false })}
|
|
47
|
+
>
|
|
48
|
+
<svelte:component this={toShow.component} {...toShow.props} dialogId={toShow.id}>
|
|
49
|
+
{#if toShow.children}
|
|
50
|
+
{@html toShow.children}
|
|
51
|
+
{/if}
|
|
52
|
+
</svelte:component>
|
|
53
|
+
</DialogPrimitive>
|
|
54
|
+
{:else if toShow.component}
|
|
55
|
+
<DialogPrimitive
|
|
56
|
+
detail={toShow.detail}
|
|
57
|
+
open
|
|
58
|
+
classes={{ root: toShow.classes?.root }}
|
|
59
|
+
on:change={() => dialog.close(toShow.id, { success: false })}
|
|
60
|
+
>
|
|
61
|
+
<svelte:component this={toShow.component} {...toShow.props} dialogId={toShow.id}
|
|
62
|
+
></svelte:component>
|
|
63
|
+
</DialogPrimitive>
|
|
64
|
+
{:else}
|
|
65
|
+
<DialogPrimitive
|
|
66
|
+
detail={toShow.detail}
|
|
67
|
+
open
|
|
68
|
+
on:change={() => dialog.close(toShow.id, { success: false })}
|
|
69
|
+
>
|
|
70
|
+
<div class="grid gap-2">
|
|
71
|
+
<p>Hey 🫵 developer, you are missing a few things 🤡!</p>
|
|
72
|
+
<p>Or use use one of the custom built in dialog like</p>
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
<pre class="bg-base-300 mt-2 p-2 text-xs">await dialog.confirmDelete('The Car')</pre>
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
<p>Or pass you own component</p>
|
|
77
|
+
<pre class="bg-base-300 mt-2 p-2 text-xs">{`await dialog.show({
|
|
78
78
|
detail: { caption: 'Interlocuteur' },
|
|
79
79
|
component: CreateCarForm,
|
|
80
80
|
props: { isEdit: false },
|
|
81
81
|
})`}</pre>
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
<p>Good luck 🚀</p>
|
|
84
|
+
</div>
|
|
85
|
+
</DialogPrimitive>
|
|
86
|
+
{/if}
|
|
87
87
|
{/each}
|
|
@@ -27,58 +27,58 @@ function dispatchChange(_data) {
|
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<div
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
{...$portalled}
|
|
31
|
+
use:$portalled.action
|
|
32
|
+
class="fixed top-0 z-50 flex h-full w-full items-center justify-center"
|
|
33
33
|
>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
34
|
+
{#if $localOpen}
|
|
35
|
+
<div
|
|
36
|
+
{...$overlay}
|
|
37
|
+
use:$overlay.action
|
|
38
|
+
class="bg-base-300/80 fixed inset-0 z-40 blur-sm"
|
|
39
|
+
transition:fade={{ duration: 150 }}
|
|
40
|
+
></div>
|
|
41
|
+
<div
|
|
42
|
+
class={tw(
|
|
43
|
+
`border-base-content/60 bg-base-100 relative z-40 max-h-[90vh] overflow-auto rounded-xl border p-6 shadow-lg`,
|
|
44
|
+
classes.root,
|
|
45
|
+
)}
|
|
46
|
+
transition:flyAndScale={{
|
|
47
|
+
duration: 150,
|
|
48
|
+
y: 8,
|
|
49
|
+
start: 0.96,
|
|
50
|
+
}}
|
|
51
|
+
{...$content}
|
|
52
|
+
use:$content.action
|
|
53
|
+
>
|
|
54
|
+
<div class="left-0 top-0 mb-4 w-full">
|
|
55
|
+
<h2 {...$localTitle} use:$localTitle.action class="m-0 text-lg font-medium">
|
|
56
|
+
<div class="flex items-center justify-between gap-4">
|
|
57
|
+
<LinkPlus item={detail}></LinkPlus>
|
|
58
|
+
<button
|
|
59
|
+
{...$close}
|
|
60
|
+
use:$close.action
|
|
61
|
+
aria-label="close"
|
|
62
|
+
class="btn btn-circle btn-outline btn-lg
|
|
63
63
|
h-max min-h-0 w-max border-none"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
>
|
|
65
|
+
<Icon data={LibIcon_Cross}></Icon>
|
|
66
|
+
</button>
|
|
67
|
+
</div>
|
|
68
|
+
</h2>
|
|
69
|
+
</div>
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
<div class="flex h-full min-w-[25rem] flex-col gap-4">
|
|
72
|
+
<!-- <div class="overflow-y-auto"> -->
|
|
73
|
+
<slot />
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
{#if $$slots.actions}
|
|
76
|
+
<div class="mt-2 flex items-end justify-end">
|
|
77
|
+
<slot name="actions" />
|
|
78
|
+
</div>
|
|
79
|
+
{/if}
|
|
80
|
+
<!-- </div> -->
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
{/if}
|
|
84
84
|
</div>
|
|
@@ -13,42 +13,42 @@ function dispatchDelete() {
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<div class="mt-2 flex items-center justify-between">
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
{#if type === 'update'}
|
|
17
|
+
<div class="flex items-center justify-start">
|
|
18
|
+
{#if wDelete}
|
|
19
|
+
<Button
|
|
20
|
+
type="button"
|
|
21
|
+
on:click={dispatchDelete}
|
|
22
|
+
class="btn-outline btn-error mr-4 text-white"
|
|
23
|
+
isLoading={$store.loading}
|
|
24
|
+
>
|
|
25
|
+
<Icon data={LibIcon_Delete} />
|
|
26
|
+
</Button>
|
|
27
|
+
{/if}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
<div>
|
|
30
|
+
{#if $store.globalError}
|
|
31
|
+
<span class="text-error text-xs">{$store.globalError}</span>
|
|
32
|
+
{/if}
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
<Button class="text-white" {...$$restProps} isLoading={$store.loading}>
|
|
37
|
+
<Icon data={LibIcon_Check} />
|
|
38
|
+
<p>Sauvegarder</p>
|
|
39
|
+
</Button>
|
|
40
|
+
{/if}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
{#if type === 'insert'}
|
|
43
|
+
<div>
|
|
44
|
+
{#if $store.globalError}
|
|
45
|
+
<span class="text-error text-xs">{$store.globalError}</span>
|
|
46
|
+
{/if}
|
|
47
|
+
</div>
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
<Button class="text-white" {...$$restProps} isLoading={$store.loading}>
|
|
50
|
+
<Icon data={LibIcon_Add} />
|
|
51
|
+
<p>{textCreate}</p>
|
|
52
|
+
</Button>
|
|
53
|
+
{/if}
|
|
54
54
|
</div>
|
|
@@ -50,9 +50,6 @@ export declare const dialog: {
|
|
|
50
50
|
show: (dialog: DialogMetaData) => Promise<ResultClose<any>>;
|
|
51
51
|
close: (id: number, result: ResultClose) => void;
|
|
52
52
|
closeAll: () => void;
|
|
53
|
-
subscribe:
|
|
54
|
-
(this: void, run: import("svelte/store").Subscriber<DialogMetaDataInternal<any>[]>, invalidate?: import("svelte/store").Invalidator<DialogMetaDataInternal<any>[]> | undefined): import("svelte/store").Unsubscriber;
|
|
55
|
-
(this: void, run: import("svelte/store").Subscriber<DialogMetaDataInternal<any>[]>, invalidate?: (() => void) | undefined): import("svelte/store").Unsubscriber;
|
|
56
|
-
};
|
|
53
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<DialogMetaDataInternal<any>[]>, invalidate?: import("svelte/store").Invalidator<DialogMetaDataInternal<any>[]> | undefined) => import("svelte/store").Unsubscriber;
|
|
57
54
|
};
|
|
58
55
|
export {};
|
|
@@ -7,15 +7,15 @@ export let classes = {};
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<div class="form-control w-full">
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
<label for={forId} class={tw(`label flex gap-1 px-2 pb-1`, classes.label)}>
|
|
11
|
+
<span class="label-text text-base-content/60 pl-2 text-xs">
|
|
12
|
+
{label}{required ? ' *' : ''}
|
|
13
|
+
</span>
|
|
14
|
+
{#if error}
|
|
15
|
+
<span class="label-text-alt text-error truncate">{error}</span>
|
|
16
|
+
{/if}
|
|
17
|
+
</label>
|
|
18
|
+
<div class={tw('grid h-12 w-full', classes.slot)}>
|
|
19
|
+
<slot />
|
|
20
|
+
</div>
|
|
21
21
|
</div>
|