firstly 0.0.11 → 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 +16 -0
- package/esm/BaseEnum.d.ts +2 -0
- package/esm/BaseEnum.js +2 -0
- package/esm/FF_Fields.js +0 -1
- package/esm/ROUTES.d.ts +2 -2
- package/esm/ROUTES.js +10 -5
- package/esm/SqlDatabase/FF_LogToConsole.d.ts +1 -0
- package/esm/SqlDatabase/FF_LogToConsole.js +22 -16
- package/esm/api/index.d.ts +20 -21
- package/esm/api/index.js +74 -62
- package/esm/auth/{client/Auth.d.ts → AuthController.d.ts} +18 -25
- package/esm/auth/{client/Auth.js → AuthController.js} +48 -44
- package/esm/auth/{client/Entities.d.ts → Entities.d.ts} +4 -3
- package/esm/auth/{client/Entities.js → Entities.js} +7 -7
- package/esm/auth/README.md +0 -10
- package/esm/auth/index.d.ts +5 -149
- package/esm/auth/index.js +5 -316
- package/esm/auth/{AuthController.server.d.ts → server/AuthController.server.d.ts} +10 -10
- package/esm/auth/{AuthController.server.js → server/AuthController.server.js} +133 -171
- package/esm/auth/server/handleAuth.d.ts +2 -0
- package/esm/auth/server/handleAuth.js +140 -0
- package/esm/auth/server/handleGuard.d.ts +16 -0
- package/esm/auth/server/handleGuard.js +67 -0
- package/esm/auth/server/helperDb.d.ts +10 -0
- package/esm/auth/server/helperDb.js +56 -0
- package/esm/auth/server/helperFirstly.d.ts +1 -0
- package/esm/auth/server/helperFirstly.js +8 -0
- package/esm/auth/server/helperOslo.d.ts +7 -0
- package/esm/auth/server/helperOslo.js +24 -0
- package/esm/auth/server/helperRemultServer.d.ts +5 -0
- package/esm/auth/server/helperRemultServer.js +44 -0
- package/esm/auth/{RoleHelpers.d.ts → server/helperRole.d.ts} +1 -1
- package/esm/auth/{RoleHelpers.js → server/helperRole.js} +1 -1
- package/esm/auth/server/index.d.ts +7 -0
- package/esm/auth/server/index.js +7 -0
- package/esm/auth/server/module.d.ts +257 -0
- package/esm/auth/server/module.js +197 -0
- package/esm/auth/{providers → server/providers}/github.d.ts +6 -4
- package/esm/auth/{providers → server/providers}/github.js +29 -20
- package/esm/auth/{providers/index.d.ts → server/providers/helperProvider.d.ts} +0 -2
- package/esm/auth/{providers/index.js → server/providers/helperProvider.js} +5 -6
- 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/auth/types.d.ts +5 -0
- package/esm/bin/cmd.js +122 -54
- package/esm/cellsBuildor.js +7 -7
- package/esm/changeLog/index.d.ts +0 -36
- package/esm/changeLog/index.js +3 -43
- package/esm/changeLog/server/index.d.ts +36 -0
- package/esm/changeLog/server/index.js +42 -0
- package/esm/common.d.ts +5 -0
- package/esm/common.js +8 -0
- package/esm/cron/{index.d.ts → server/index.d.ts} +1 -1
- package/esm/cron/server/index.js +103 -0
- package/esm/feedback/FeedbackController.js +4 -5
- package/esm/feedback/index.d.ts +0 -16
- package/esm/feedback/index.js +0 -11
- package/esm/feedback/server/index.d.ts +17 -0
- package/esm/feedback/server/index.js +13 -0
- 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/helper.js +3 -3
- package/esm/index.d.ts +3 -20
- package/esm/index.js +3 -10
- package/esm/mail/index.d.ts +2 -30
- package/esm/mail/index.js +2 -79
- package/esm/mail/server/index.d.ts +31 -0
- package/esm/mail/server/index.js +88 -0
- package/esm/mail/templates/DefaultMail.svelte +17 -17
- package/esm/storeItem.js +8 -2
- package/esm/storeList.d.ts +1 -1
- package/esm/storeList.js +1 -1
- package/esm/sveltekit/server/index.d.ts +14 -0
- package/esm/sveltekit/server/index.js +24 -0
- package/esm/ui/Button.svelte +33 -33
- package/esm/ui/Button.svelte.d.ts +2 -2
- package/esm/ui/Clipboardable.svelte +11 -8
- package/esm/ui/Clipboardable.svelte.d.ts +4 -4
- package/esm/ui/Field.svelte +142 -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 -2
- package/esm/ui/Tooltip.svelte +16 -16
- package/esm/ui/dialog/DialogForm.svelte +23 -23
- package/esm/ui/dialog/DialogManagement.svelte +74 -74
- package/esm/ui/dialog/DialogPrimitive.svelte +50 -51
- package/esm/ui/dialog/FormEditAction.svelte +34 -34
- package/esm/ui/dialog/dialog.d.ts +2 -2
- package/esm/ui/dialog/dialog.js +1 -1
- package/esm/ui/internals/FieldContainer.svelte +11 -12
- 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/esm/vite/index.js +24 -25
- package/package.json +50 -42
- package/esm/auth/Adapter.d.ts +0 -10
- package/esm/auth/Adapter.js +0 -50
- package/esm/auth/client/index.d.ts +0 -7
- package/esm/auth/client/index.js +0 -7
- package/esm/auth/helper.d.ts +0 -6
- package/esm/auth/helper.js +0 -14
- package/esm/auth/providers/strava.d.ts +0 -30
- package/esm/auth/providers/strava.js +0 -60
- package/esm/auth/static/assets/Page-BEFYPjis.d.ts +0 -4
- package/esm/auth/static/assets/Page-BEFYPjis.js +0 -1
- package/esm/auth/static/assets/Page-BGTO8LC5.css +0 -1
- package/esm/auth/static/assets/Page-Cfysx_UV.d.ts +0 -6
- package/esm/auth/static/assets/Page-Cfysx_UV.js +0 -18
- package/esm/auth/static/assets/Page-DtgkOCJs.d.ts +0 -4
- package/esm/auth/static/assets/Page-DtgkOCJs.js +0 -1
- package/esm/auth/static/assets/index-CR_3yNaJ.css +0 -4
- package/esm/auth/static/assets/index-QypqCYwC.d.ts +0 -63
- package/esm/auth/static/assets/index-QypqCYwC.js +0 -2
- package/esm/cron/index.js +0 -102
- package/esm/handle/index.d.ts +0 -7
- package/esm/handle/index.js +0 -40
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,7 +5,10 @@ let extraClass = "";
|
|
|
5
5
|
|
|
6
6
|
<!-- To fix one capa & cadb are on the same css -->
|
|
7
7
|
<div
|
|
8
|
-
|
|
8
|
+
class={tw(
|
|
9
|
+
'skeleton bg-base-content/20 flex h-4 w-full items-center justify-center rounded-lg',
|
|
10
|
+
extraClass,
|
|
11
|
+
)}
|
|
9
12
|
>
|
|
10
|
-
|
|
13
|
+
<slot />
|
|
11
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}
|
|
@@ -25,7 +25,7 @@ const onInsert = async () => {
|
|
|
25
25
|
dialog.close(toShow.id, { success: true, item: result });
|
|
26
26
|
}
|
|
27
27
|
} catch (e) {
|
|
28
|
-
if (
|
|
28
|
+
if (toShow.reThrow) {
|
|
29
29
|
throw e;
|
|
30
30
|
}
|
|
31
31
|
} finally {
|
|
@@ -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,59 +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
|
-
|
|
74
|
-
<slot />
|
|
71
|
+
<div class="flex h-full min-w-[25rem] flex-col gap-4">
|
|
72
|
+
<!-- <div class="overflow-y-auto"> -->
|
|
73
|
+
<slot />
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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}
|
|
85
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>
|
|
@@ -19,7 +19,7 @@ export type DialogMetaData<entityType = any> = {
|
|
|
19
19
|
component?: new (...args: any[]) => SvelteComponent;
|
|
20
20
|
props?: any;
|
|
21
21
|
children?: any;
|
|
22
|
-
|
|
22
|
+
reThrow?: boolean;
|
|
23
23
|
wDelete?: boolean;
|
|
24
24
|
focusKey?: string;
|
|
25
25
|
topicPrefixText?: string;
|
|
@@ -33,7 +33,7 @@ export type DialogFormType<entityType> = {
|
|
|
33
33
|
cells?: CellsInput<entityType>;
|
|
34
34
|
defaults?: Partial<entityType>;
|
|
35
35
|
classes?: DialogClasses;
|
|
36
|
-
|
|
36
|
+
reThrow?: boolean;
|
|
37
37
|
wDelete?: boolean;
|
|
38
38
|
topicPrefixText?: string;
|
|
39
39
|
focusKey?: string;
|
package/esm/ui/dialog/dialog.js
CHANGED
|
@@ -62,7 +62,7 @@ const createDialogManagement = () => {
|
|
|
62
62
|
cells: settings.cells ?? [],
|
|
63
63
|
defaults: settings?.defaults,
|
|
64
64
|
classes: settings?.classes,
|
|
65
|
-
|
|
65
|
+
reThrow: settings?.reThrow,
|
|
66
66
|
wDelete: settings?.wDelete,
|
|
67
67
|
focusKey: settings?.focusKey,
|
|
68
68
|
topicPrefixText,
|