firstly 0.0.12 → 0.0.14

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.
Files changed (120) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/esm/ROUTES.d.ts +2 -0
  3. package/esm/ROUTES.js +1 -0
  4. package/esm/api/index.d.ts +9 -0
  5. package/esm/api/index.js +3 -1
  6. package/esm/auth/AuthController.d.ts +12 -23
  7. package/esm/auth/AuthController.js +12 -31
  8. package/esm/auth/server/AuthController.server.d.ts +11 -11
  9. package/esm/auth/server/AuthController.server.js +99 -34
  10. package/esm/auth/server/handleGuard.d.ts +16 -0
  11. package/esm/auth/server/handleGuard.js +67 -0
  12. package/esm/auth/server/helperFirstly.d.ts +1 -1
  13. package/esm/auth/server/helperFirstly.js +1 -0
  14. package/esm/auth/server/index.d.ts +3 -1
  15. package/esm/auth/server/index.js +3 -1
  16. package/esm/auth/server/module.d.ts +105 -89
  17. package/esm/auth/server/module.js +55 -42
  18. package/esm/auth/server/providers/github.d.ts +4 -2
  19. package/esm/auth/server/providers/github.js +2 -2
  20. package/esm/auth/static/assets/Page-B0XXxe0N.d.ts +6 -0
  21. package/esm/auth/static/assets/Page-B0XXxe0N.js +1 -0
  22. package/esm/auth/static/assets/Page-DdKMiUZn.d.ts +6 -0
  23. package/esm/auth/static/assets/Page-DdKMiUZn.js +20 -0
  24. package/esm/auth/static/assets/Page-UV_hqY7I.d.ts +6 -0
  25. package/esm/auth/static/assets/Page-UV_hqY7I.js +1 -0
  26. package/esm/auth/static/assets/Page-mK42zGEw.css +1 -0
  27. package/esm/auth/static/assets/index-C9jzxOBu.d.ts +151 -0
  28. package/esm/auth/static/assets/index-C9jzxOBu.js +42 -0
  29. package/esm/auth/static/assets/index-DKWpA6v7.css +4 -0
  30. package/esm/auth/static/index.html +11 -11
  31. package/esm/auth/types.d.ts +26 -3
  32. package/esm/bin/cmd.js +423 -152
  33. package/esm/cellsBuildor.js +1 -1
  34. package/esm/common.d.ts +5 -0
  35. package/esm/common.js +8 -0
  36. package/esm/cron/server/index.js +1 -1
  37. package/esm/feedback/FeedbackController.js +58 -53
  38. package/esm/feedback/server/index.d.ts +6 -15
  39. package/esm/feedback/server/index.js +4 -5
  40. package/esm/feedback/types.d.ts +14 -0
  41. package/esm/feedback/types.js +4 -0
  42. package/esm/feedback/ui/DialogIssue.svelte +131 -119
  43. package/esm/feedback/ui/DialogIssue.svelte.d.ts +20 -18
  44. package/esm/feedback/ui/DialogIssues.svelte +108 -99
  45. package/esm/feedback/ui/DialogIssues.svelte.d.ts +20 -18
  46. package/esm/feedback/ui/DialogMilestones.svelte +40 -34
  47. package/esm/feedback/ui/DialogMilestones.svelte.d.ts +18 -16
  48. package/esm/feedback/ui/Feedback.svelte +11 -9
  49. package/esm/feedback/ui/Feedback.svelte.d.ts +16 -14
  50. package/esm/index.d.ts +2 -5
  51. package/esm/index.js +2 -8
  52. package/esm/mail/server/index.d.ts +9 -2
  53. package/esm/mail/server/index.js +3 -1
  54. package/esm/mail/templates/DefaultMail.svelte +81 -61
  55. package/esm/mail/templates/DefaultMail.svelte.d.ts +28 -26
  56. package/esm/server/index.d.ts +0 -0
  57. package/esm/server/index.js +1 -0
  58. package/esm/storeItem.d.ts +1 -4
  59. package/esm/storeItem.js +1 -1
  60. package/esm/storeList.d.ts +1 -4
  61. package/esm/sveltekit/server/index.d.ts +3 -9
  62. package/esm/sveltekit/server/index.js +3 -0
  63. package/esm/ui/Button.svelte +112 -89
  64. package/esm/ui/Button.svelte.d.ts +34 -24
  65. package/esm/ui/Clipboardable.svelte +24 -17
  66. package/esm/ui/Clipboardable.svelte.d.ts +34 -23
  67. package/esm/ui/Field.svelte +328 -285
  68. package/esm/ui/Field.svelte.d.ts +15 -8
  69. package/esm/ui/FieldGroup.svelte +112 -91
  70. package/esm/ui/FieldGroup.svelte.d.ts +17 -6
  71. package/esm/ui/Grid.svelte +322 -308
  72. package/esm/ui/Grid.svelte.d.ts +17 -6
  73. package/esm/ui/GridLoading.svelte +28 -27
  74. package/esm/ui/GridLoading.svelte.d.ts +19 -17
  75. package/esm/ui/GridPaginate.svelte +68 -61
  76. package/esm/ui/GridPaginate.svelte.d.ts +21 -19
  77. package/esm/ui/Icon.svelte +116 -80
  78. package/esm/ui/Icon.svelte.d.ts +52 -43
  79. package/esm/ui/Loading.svelte +10 -8
  80. package/esm/ui/Loading.svelte.d.ts +29 -18
  81. package/esm/ui/Tooltip.svelte +38 -35
  82. package/esm/ui/Tooltip.svelte.d.ts +30 -20
  83. package/esm/ui/dialog/DialogForm.svelte +70 -63
  84. package/esm/ui/dialog/DialogForm.svelte.d.ts +18 -16
  85. package/esm/ui/dialog/DialogManagement.svelte +74 -74
  86. package/esm/ui/dialog/DialogManagement.svelte.d.ts +22 -21
  87. package/esm/ui/dialog/DialogPrimitive.svelte +82 -76
  88. package/esm/ui/dialog/DialogPrimitive.svelte.d.ts +35 -25
  89. package/esm/ui/dialog/FormEditAction.svelte +58 -50
  90. package/esm/ui/dialog/FormEditAction.svelte.d.ts +13 -6
  91. package/esm/ui/dialog/dialog.d.ts +1 -4
  92. package/esm/ui/internals/FieldContainer.svelte +24 -17
  93. package/esm/ui/internals/FieldContainer.svelte.d.ts +37 -28
  94. package/esm/ui/internals/Input.svelte +136 -102
  95. package/esm/ui/internals/Input.svelte.d.ts +34 -32
  96. package/esm/ui/internals/Textarea.svelte +60 -52
  97. package/esm/ui/internals/Textarea.svelte.d.ts +31 -28
  98. package/esm/ui/internals/select/MultiSelectMelt.svelte +243 -199
  99. package/esm/ui/internals/select/MultiSelectMelt.svelte.d.ts +29 -27
  100. package/esm/ui/internals/select/SelectMelt.svelte +254 -219
  101. package/esm/ui/internals/select/SelectMelt.svelte.d.ts +34 -32
  102. package/esm/ui/internals/select/SelectRadio.svelte +39 -33
  103. package/esm/ui/internals/select/SelectRadio.svelte.d.ts +24 -22
  104. package/esm/ui/link/Link.svelte +25 -20
  105. package/esm/ui/link/Link.svelte.d.ts +31 -23
  106. package/esm/ui/link/LinkPlus.svelte +52 -51
  107. package/esm/ui/link/LinkPlus.svelte.d.ts +20 -18
  108. package/esm/vite/index.d.ts +2 -3
  109. package/esm/vite/index.js +33 -26
  110. package/package.json +16 -20
  111. package/esm/auth/static/assets/Page-Bb8bFlrP.d.ts +0 -4
  112. package/esm/auth/static/assets/Page-Bb8bFlrP.js +0 -1
  113. package/esm/auth/static/assets/Page-BxomFlZ8.d.ts +0 -4
  114. package/esm/auth/static/assets/Page-BxomFlZ8.js +0 -1
  115. package/esm/auth/static/assets/Page-CaIYu0-y.d.ts +0 -6
  116. package/esm/auth/static/assets/Page-CaIYu0-y.js +0 -19
  117. package/esm/auth/static/assets/Page-MkYglNtu.css +0 -1
  118. package/esm/auth/static/assets/index-Bl0Bk5u0.d.ts +0 -64
  119. package/esm/auth/static/assets/index-Bl0Bk5u0.js +0 -2
  120. package/esm/auth/static/assets/index-R27C_TlP.css +0 -4
@@ -1,105 +1,114 @@
1
- <script>import { onMount } from "svelte";
2
- import { FeedbackController } from "..";
3
- import {
4
- Button,
5
- dialog,
6
- Icon,
7
- LibIcon_Add,
8
- LibIcon_Check,
9
- LibIcon_Search,
10
- Loading
11
- } from "../..";
12
- import DialogIssue from "./DialogIssue.svelte";
13
- export let dialogId;
14
- const rmvWarning = dialogId;
15
- export let milestoneNumber;
16
- export let milestoneId;
17
- let state = "loading";
18
- let issueState = "OPEN";
19
- let issues = [];
20
- const update = async (_issueState) => {
21
- issueState = _issueState;
22
- state = "loading";
23
- issues = await FeedbackController.getIssues(milestoneNumber, issueState);
24
- state = "done";
25
- };
26
- onMount(async () => {
27
- await update(issueState);
28
- });
1
+ <script lang="ts">
2
+ import { onMount } from 'svelte'
3
+
4
+ import { FeedbackController } from '..'
5
+ import {
6
+ Button,
7
+ dialog,
8
+ Icon,
9
+ LibIcon_Add,
10
+ LibIcon_Check,
11
+ LibIcon_Search,
12
+ Loading,
13
+ type ResolvedType,
14
+ } from '../..'
15
+ import DialogIssue from './DialogIssue.svelte'
16
+
17
+ export let dialogId: number
18
+ const rmvWarning = dialogId
19
+
20
+ export let milestoneNumber: number
21
+ export let milestoneId: string
22
+
23
+ let state: 'loading' | 'done' = 'loading'
24
+ let issueState: 'OPEN' | 'CLOSED' = 'OPEN'
25
+
26
+ let issues: ResolvedType<ReturnType<typeof FeedbackController.getIssues>> = []
27
+
28
+ const update = async (_issueState: 'OPEN' | 'CLOSED') => {
29
+ issueState = _issueState
30
+ state = 'loading'
31
+ issues = await FeedbackController.getIssues(milestoneNumber, issueState)
32
+ state = 'done'
33
+ }
34
+
35
+ onMount(async () => {
36
+ await update(issueState)
37
+ })
29
38
  </script>
30
39
 
31
40
  <div class="mb-4 grid gap-4">
32
- <div class="flex justify-between">
33
- <div>
34
- <Button
35
- class={issueState === 'OPEN' ? 'btn-primary' : 'btn-ghost'}
36
- on:click={() => update('OPEN')}>En cours</Button
37
- >
38
- <Button
39
- class={issueState === 'CLOSED' ? 'btn-primary' : 'btn-ghost'}
40
- on:click={() => update('CLOSED')}>Clos</Button
41
- >
42
- </div>
41
+ <div class="flex justify-between">
42
+ <div>
43
+ <Button
44
+ class={issueState === 'OPEN' ? 'btn-primary' : 'btn-ghost'}
45
+ on:click={() => update('OPEN')}>En cours</Button
46
+ >
47
+ <Button
48
+ class={issueState === 'CLOSED' ? 'btn-primary' : 'btn-ghost'}
49
+ on:click={() => update('CLOSED')}>Clos</Button
50
+ >
51
+ </div>
43
52
 
44
- <Button
45
- on:click={async () => {
46
- await dialog.show({
47
- component: DialogIssue,
48
- classes: { root: 'overflow-auto w-[80vh] h-[80vh]' },
49
- props: { issueNumber: null, milestoneId },
50
- detail: {
51
- caption: 'Nouveau Feedback',
52
- icon: { data: LibIcon_Search },
53
- },
54
- })
55
- await update(issueState)
56
- }}
57
- >
58
- <Icon data={LibIcon_Add}></Icon>
59
- </Button>
60
- </div>
53
+ <Button
54
+ on:click={async () => {
55
+ await dialog.show({
56
+ component: DialogIssue,
57
+ classes: { root: 'overflow-auto w-[80vh] h-[80vh]' },
58
+ props: { issueNumber: null, milestoneId },
59
+ detail: {
60
+ caption: 'Nouveau Feedback',
61
+ icon: { data: LibIcon_Search },
62
+ },
63
+ })
64
+ await update(issueState)
65
+ }}
66
+ >
67
+ <Icon data={LibIcon_Add}></Icon>
68
+ </Button>
69
+ </div>
61
70
 
62
- {#each issues as issue}
63
- <Button
64
- on:click={async () => {
65
- await dialog.show({
66
- component: DialogIssue,
67
- classes: { root: 'overflow-auto w-[80vh] h-[80vh]' },
68
- props: { issueNumber: issue.number, milestoneId },
69
- detail: {
70
- caption: '#' + issue.number + ' - ' + issue.titleHTML,
71
- icon: { data: issue.state === 'OPEN' ? LibIcon_Search : LibIcon_Check },
72
- },
73
- })
74
- await update(issueState)
75
- }}
76
- class="btn-neutral"
77
- >
78
- <div class="flex w-full justify-center justify-items-center text-left">
79
- <div class="flex-grow">
80
- <span class="text-base-content/60 mr-2 inline-block w-8 text-right text-xs italic"
81
- >#{issue.number}</span
82
- >
83
- {@html issue.titleHTML}
84
- </div>
85
- {#if issue.highlight}
86
- <span class="badge badge-warning">En attente de réponse</span>
87
- {/if}
88
- </div>
89
- </Button>
90
- {:else}
91
- {#if state === 'loading'}
92
- <Loading class="h-12"></Loading>
93
- <Loading class="h-12"></Loading>
94
- <Loading class="h-12"></Loading>
95
- {:else}
96
- <div class="flex flex-col items-center justify-center p-8 text-center text-gray-500">
97
- <div class="mb-4">
98
- <Icon data={LibIcon_Search} size="4rem"></Icon>
99
- </div>
100
- <p class="text-lg font-medium">Aucun feedback <b>{issueState}</b> pour le moment</p>
101
- <p class="mt-2 text-sm">Soyez le premier à donner votre avis sur cette version !</p>
102
- </div>
103
- {/if}
104
- {/each}
71
+ {#each issues as issue}
72
+ <Button
73
+ on:click={async () => {
74
+ await dialog.show({
75
+ component: DialogIssue,
76
+ classes: { root: 'overflow-auto w-[80vh] h-[80vh]' },
77
+ props: { issueNumber: issue.number, milestoneId },
78
+ detail: {
79
+ caption: '#' + issue.number + ' - ' + issue.titleHTML,
80
+ icon: { data: issue.state === 'OPEN' ? LibIcon_Search : LibIcon_Check },
81
+ },
82
+ })
83
+ await update(issueState)
84
+ }}
85
+ class="btn-neutral"
86
+ >
87
+ <div class="flex w-full justify-center justify-items-center text-left">
88
+ <div class="flex-grow">
89
+ <span class="text-base-content/60 mr-2 inline-block w-8 text-right text-xs italic"
90
+ >#{issue.number}</span
91
+ >
92
+ {@html issue.titleHTML}
93
+ </div>
94
+ {#if issue.highlight}
95
+ <span class="badge badge-warning">En attente de réponse</span>
96
+ {/if}
97
+ </div>
98
+ </Button>
99
+ {:else}
100
+ {#if state === 'loading'}
101
+ <Loading class="h-12"></Loading>
102
+ <Loading class="h-12"></Loading>
103
+ <Loading class="h-12"></Loading>
104
+ {:else}
105
+ <div class="flex flex-col items-center justify-center p-8 text-center text-gray-500">
106
+ <div class="mb-4">
107
+ <Icon data={LibIcon_Search} size="4rem"></Icon>
108
+ </div>
109
+ <p class="text-lg font-medium">Aucun feedback <b>{issueState}</b> pour le moment</p>
110
+ <p class="mt-2 text-sm">Soyez le premier à donner votre avis sur cette version !</p>
111
+ </div>
112
+ {/if}
113
+ {/each}
105
114
  </div>
@@ -1,20 +1,22 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- dialogId: number;
5
- milestoneNumber: number;
6
- milestoneId: string;
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
7
11
  };
8
- events: {
9
- [evt: string]: CustomEvent<any>;
10
- };
11
- slots: {};
12
- exports?: {} | undefined;
13
- bindings?: string | undefined;
14
- };
15
- export type DialogIssuesProps = typeof __propDef.props;
16
- export type DialogIssuesEvents = typeof __propDef.events;
17
- export type DialogIssuesSlots = typeof __propDef.slots;
18
- export default class DialogIssues extends SvelteComponent<DialogIssuesProps, DialogIssuesEvents, DialogIssuesSlots> {
12
+ z_$$bindings?: Bindings;
19
13
  }
20
- export {};
14
+ declare const DialogIssues: $$__sveltets_2_IsomorphicComponent<{
15
+ dialogId: number;
16
+ milestoneNumber: number;
17
+ milestoneId: string;
18
+ }, {
19
+ [evt: string]: CustomEvent<any>;
20
+ }, {}, {}, string>;
21
+ type DialogIssues = InstanceType<typeof DialogIssues>;
22
+ export default DialogIssues;
@@ -1,38 +1,44 @@
1
- <script>import { onMount } from "svelte";
2
- import { FeedbackController } from "..";
3
- import { Button, dialog, Loading } from "../..";
4
- import DialogIssues from "./DialogIssues.svelte";
5
- export let dialogId;
6
- const rmvWarning = dialogId;
7
- let state = "loading";
8
- let milestones = [];
9
- onMount(async () => {
10
- milestones = await FeedbackController.getMilestones();
11
- state = "done";
12
- });
1
+ <script lang="ts">
2
+ import { onMount } from 'svelte'
3
+
4
+ import { FeedbackController } from '..'
5
+ import type { ResolvedType } from '../..'
6
+ import { Button, dialog, Loading } from '../..'
7
+ import DialogIssues from './DialogIssues.svelte'
8
+
9
+ export let dialogId: number
10
+ const rmvWarning = dialogId
11
+
12
+ let state: 'loading' | 'done' = 'loading'
13
+
14
+ let milestones: ResolvedType<ReturnType<typeof FeedbackController.getMilestones>> = []
15
+ onMount(async () => {
16
+ milestones = await FeedbackController.getMilestones()
17
+ state = 'done'
18
+ })
13
19
  </script>
14
20
 
15
21
  <div class="mb-4 grid gap-4">
16
- {#each milestones as milestone}
17
- <Button
18
- on:click={() =>
19
- dialog.show({
20
- component: DialogIssues,
21
- classes: { root: 'overflow-auto w-[85vh] h-[85vh]' },
22
- props: { milestoneNumber: milestone.number, milestoneId: milestone.id },
23
- detail: { caption: milestone.title },
24
- })}
25
- class="btn-neutral"
26
- >
27
- {milestone.title}
28
- </Button>
29
- {:else}
30
- {#if state === 'loading'}
31
- <Loading class="h-12"></Loading>
32
- <Loading class="h-12"></Loading>
33
- <Loading class="h-12"></Loading>
34
- {:else}
35
- <p>No milestones found / Filter too strict!</p>
36
- {/if}
37
- {/each}
22
+ {#each milestones as milestone}
23
+ <Button
24
+ on:click={() =>
25
+ dialog.show({
26
+ component: DialogIssues,
27
+ classes: { root: 'overflow-auto w-[85vh] h-[85vh]' },
28
+ props: { milestoneNumber: milestone.number, milestoneId: milestone.id },
29
+ detail: { caption: milestone.title },
30
+ })}
31
+ class="btn-neutral"
32
+ >
33
+ {milestone.title}
34
+ </Button>
35
+ {:else}
36
+ {#if state === 'loading'}
37
+ <Loading class="h-12"></Loading>
38
+ <Loading class="h-12"></Loading>
39
+ <Loading class="h-12"></Loading>
40
+ {:else}
41
+ <p>No milestones found / Filter too strict!</p>
42
+ {/if}
43
+ {/each}
38
44
  </div>
@@ -1,18 +1,20 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- dialogId: number;
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
5
11
  };
6
- events: {
7
- [evt: string]: CustomEvent<any>;
8
- };
9
- slots: {};
10
- exports?: {} | undefined;
11
- bindings?: string | undefined;
12
- };
13
- export type DialogMilestonesProps = typeof __propDef.props;
14
- export type DialogMilestonesEvents = typeof __propDef.events;
15
- export type DialogMilestonesSlots = typeof __propDef.slots;
16
- export default class DialogMilestones extends SvelteComponent<DialogMilestonesProps, DialogMilestonesEvents, DialogMilestonesSlots> {
12
+ z_$$bindings?: Bindings;
17
13
  }
18
- export {};
14
+ declare const DialogMilestones: $$__sveltets_2_IsomorphicComponent<{
15
+ dialogId: number;
16
+ }, {
17
+ [evt: string]: CustomEvent<any>;
18
+ }, {}, {}, string>;
19
+ type DialogMilestones = InstanceType<typeof DialogMilestones>;
20
+ export default DialogMilestones;
@@ -1,12 +1,14 @@
1
- <script>import { dialog } from "../../";
2
- import DialogMilestones from "./DialogMilestones.svelte";
3
- const list = async () => {
4
- await dialog.show({
5
- component: DialogMilestones,
6
- classes: { root: "overflow-auto w-[90vh] h-[90vh]" },
7
- detail: { caption: "Feedback" }
8
- });
9
- };
1
+ <script lang="ts">
2
+ import { dialog } from '../../'
3
+ import DialogMilestones from './DialogMilestones.svelte'
4
+
5
+ const list = async () => {
6
+ await dialog.show({
7
+ component: DialogMilestones,
8
+ classes: { root: 'overflow-auto w-[90vh] h-[90vh]' },
9
+ detail: { caption: 'Feedback' },
10
+ })
11
+ }
10
12
  </script>
11
13
 
12
14
  <button class="text-secondary" on:click={list}>Feedback</button>
@@ -1,16 +1,18 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: Record<string, never>;
4
- events: {
5
- [evt: string]: CustomEvent<any>;
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
6
11
  };
7
- slots: {};
8
- exports?: {} | undefined;
9
- bindings?: string | undefined;
10
- };
11
- export type FeedbackProps = typeof __propDef.props;
12
- export type FeedbackEvents = typeof __propDef.events;
13
- export type FeedbackSlots = typeof __propDef.slots;
14
- export default class Feedback extends SvelteComponent<FeedbackProps, FeedbackEvents, FeedbackSlots> {
12
+ z_$$bindings?: Bindings;
15
13
  }
16
- export {};
14
+ declare const Feedback: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type Feedback = InstanceType<typeof Feedback>;
18
+ export default Feedback;
package/esm/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { FindOptionsBase } from 'remult';
2
- import { Log } from '@kitql/helpers';
3
2
  import type { BaseEnum, BaseItem, FF_Icon } from './BaseEnum.js';
4
3
  import type { CellsInput as CellsInput_ForExport } from './cellsBuildor.js';
5
4
  import type { ColumnDeciderArgs } from './changeLog/index.js';
@@ -22,10 +21,8 @@ import { default as LinkPlus } from './ui/link/LinkPlus.svelte';
22
21
  import { default as Loading } from './ui/Loading.svelte';
23
22
  import { default as Tooltip } from './ui/Tooltip.svelte';
24
23
  export { Field, FormEditAction, Grid, GridPaginate, FieldGroup, Icon, Link, LinkPlus, Loading, Button, Tooltip, DialogManagement, FieldContainer, SelectMelt, Clipboardable, };
25
- export declare const ff_Log: Log;
26
- export declare const FF_Role: {
27
- readonly FF_Role_Admin: "FF_Role.Admin";
28
- };
24
+ export { FF_Role } from './common.js';
25
+ export { ff_Log } from './common.js';
29
26
  export type { BaseEnumOptions } from './BaseEnum.js';
30
27
  export type { BaseItem };
31
28
  export type BaseItemLight = Partial<BaseItem>;
package/esm/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import { Log } from '@kitql/helpers';
2
1
  import { storeItem } from './storeItem.js';
3
2
  import { storeList } from './storeList.js';
4
3
  import { default as Button } from './ui/Button.svelte';
@@ -20,13 +19,8 @@ import { default as Tooltip } from './ui/Tooltip.svelte';
20
19
  // Svelte Components
21
20
  // ******************************
22
21
  export { Field, FormEditAction, Grid, GridPaginate, FieldGroup, Icon, Link, LinkPlus, Loading, Button, Tooltip, DialogManagement, FieldContainer, SelectMelt, Clipboardable, };
23
- // ******************************
24
- // Objects
25
- // ******************************
26
- export const ff_Log = new Log('firstly');
27
- export const FF_Role = {
28
- FF_Role_Admin: 'FF_Role.Admin',
29
- };
22
+ export { FF_Role } from './common.js';
23
+ export { ff_Log } from './common.js';
30
24
  // ******************************
31
25
  // Helpers
32
26
  // ******************************
@@ -9,7 +9,7 @@ import type StreamTransport from 'nodemailer/lib/stream-transport';
9
9
  import type { ComponentProps, ComponentType, SvelteComponent } from 'svelte';
10
10
  import { Module } from '../../api';
11
11
  import { default as DefaultMail } from '../templates/DefaultMail.svelte';
12
- export type TransportTypes = SMTPTransport | SMTPTransport.Options | string | SMTPPool | SMTPPool.Options | SendmailTransport | SendmailTransport.Options | StreamTransport | StreamTransport.Options | JSONTransport | JSONTransport.Options | SESTransport | SESTransport.Options | typeNodemailer.Transport<any> | typeNodemailer.TransportOptions;
12
+ export type TransportTypes = SMTPTransport | SMTPPool | SendmailTransport | StreamTransport | JSONTransport | SESTransport | typeNodemailer.Transport<any> | DefaultOptions;
13
13
  export type DefaultOptions = SMTPTransport.Options | SMTPPool.Options | SendmailTransport.Options | StreamTransport.Options | JSONTransport.Options | SESTransport.Options | typeNodemailer.TransportOptions;
14
14
  export type MailOptions<ComponentTemplateDefault extends SvelteComponent> = {
15
15
  from?: Mail.Options['from'];
@@ -22,7 +22,14 @@ export type MailOptions<ComponentTemplateDefault extends SvelteComponent> = {
22
22
  apiUrl?: Parameters<typeof typeNodemailer.createTestAccount>[0];
23
23
  };
24
24
  declare let transporter: ReturnType<typeof typeNodemailer.createTransport>;
25
- export declare const sendMail: <ComponentTemplateDefault extends SvelteComponent = DefaultMail>(
25
+ declare module 'remult' {
26
+ interface RemultContext {
27
+ /** Better checking is it's present or not, that's why it's "?" */
28
+ sendMail?: SendMail;
29
+ }
30
+ }
31
+ export type SendMail = typeof sendMail;
32
+ declare const sendMail: <ComponentTemplateDefault extends SvelteComponent = DefaultMail>(
26
33
  /** usefull for logs, it has NO impact on the mail itself */
27
34
  topic: string, mailOptions: Parameters<typeof transporter.sendMail>[0] & {
28
35
  templateProps?: ComponentProps<ComponentTemplateDefault> | undefined;
@@ -1,5 +1,6 @@
1
1
  import nodemailer from 'nodemailer';
2
2
  import { render } from 'svelty-email';
3
+ import { remult } from 'remult';
3
4
  import { cyan, green, magenta, red, sleep, white } from '@kitql/helpers';
4
5
  import { Module } from '../../api';
5
6
  import { default as DefaultMail } from '../templates/DefaultMail.svelte';
@@ -35,7 +36,7 @@ const initMail = async (o) => {
35
36
  }
36
37
  }
37
38
  };
38
- export const sendMail = async (topic, mailOptions) => {
39
+ const sendMail = async (topic, mailOptions) => {
39
40
  // if the transporter is not ready, wait for it! (it can happen only if nothing is set...)
40
41
  for (let i = 0; i < 30; i++) {
41
42
  if (transporter !== undefined) {
@@ -83,6 +84,7 @@ const mailModule = new Module({
83
84
  export const mail = (o) => {
84
85
  mailModule.initApi = () => {
85
86
  initMail(o);
87
+ remult.context.sendMail = sendMail;
86
88
  };
87
89
  return mailModule;
88
90
  };