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/common.js
ADDED
package/esm/cron/server/index.js
CHANGED
|
@@ -58,7 +58,7 @@ export const cron = (jobsInfos) => {
|
|
|
58
58
|
l.push(message);
|
|
59
59
|
if (with_metadata) {
|
|
60
60
|
// If the job is "stopped", there will still be a next date, but it will not fire it. The job has to start.
|
|
61
|
-
l.push(`(${job.
|
|
61
|
+
l.push(`(${job.isActive ? green('running') : red('stopped')}, next at ${yellow(job.nextDate().toISO())})`);
|
|
62
62
|
}
|
|
63
63
|
if (isSuccess) {
|
|
64
64
|
m.log.success(l.join(' '));
|
|
@@ -200,8 +200,7 @@ export class FeedbackController {
|
|
|
200
200
|
items[items.length - 1].public = true;
|
|
201
201
|
}
|
|
202
202
|
else {
|
|
203
|
-
const nbEye = comments[i].reactionGroups.find((c) => c.content === 'EYES')?.reactors
|
|
204
|
-
.totalCount;
|
|
203
|
+
const nbEye = comments[i].reactionGroups.find((c) => c.content === 'EYES')?.reactors.totalCount;
|
|
205
204
|
items.push({
|
|
206
205
|
bodyHTML: comments[i].bodyHTML,
|
|
207
206
|
createdAt: new Date(comments[i].createdAt),
|
|
@@ -63,61 +63,57 @@ const disableButton = (issueNumber2, title2, content2) => {
|
|
|
63
63
|
</script>
|
|
64
64
|
|
|
65
65
|
<div class="mb-4 grid gap-4">
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
66
|
+
{#if state === 'loading'}
|
|
67
|
+
<Loading class="h-12"></Loading>
|
|
68
|
+
<Loading class="h-12"></Loading>
|
|
69
|
+
<Loading class="h-12"></Loading>
|
|
70
|
+
{:else}
|
|
71
|
+
{#each issue?.items ?? [] as item}
|
|
72
|
+
<div class="chat {item.who ? 'chat-start' : 'chat-end'}">
|
|
73
|
+
<div class="avatar chat-image">
|
|
74
|
+
<div class="w-10 rounded-full">
|
|
75
|
+
<div class="h-10 w-10 {item.who ? 'bg-primary' : 'bg-secondary'}"></div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="chat-header">
|
|
79
|
+
{item.who ?? 'Support'}
|
|
80
|
+
<time class="text-xs opacity-50"
|
|
81
|
+
>{new Date(item.createdAt).toLocaleDateString()} - {new Date(
|
|
82
|
+
item.createdAt,
|
|
83
|
+
).toLocaleTimeString()}</time
|
|
84
|
+
>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="chat-bubble prose">{@html item.bodyHTML}</div>
|
|
87
|
+
<!-- <div class="chat-footer opacity-50">Delivered</div> -->
|
|
88
|
+
</div>
|
|
89
|
+
{/each}
|
|
90
|
+
{#if issue?.highlight && issue.state === 'OPEN'}
|
|
91
|
+
<span class="badge badge-warning">En attente de réponse de TA part 😉, oui 🫵!</span>
|
|
92
|
+
{/if}
|
|
93
|
+
{#if issueNumber}
|
|
94
|
+
<button on:click={update} aria-label="Actualiser" class="divider"></button>
|
|
95
|
+
{/if}
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
>
|
|
120
|
-
</div>
|
|
121
|
-
{/if}
|
|
122
|
-
{/if}
|
|
97
|
+
{#if issue?.state === 'CLOSED'}
|
|
98
|
+
<div class="flex justify-end">
|
|
99
|
+
<Button on:click={reOpen} class="btn-neutral">Re Ouvrir</Button>
|
|
100
|
+
</div>
|
|
101
|
+
{:else}
|
|
102
|
+
{#if issueNumber === null}
|
|
103
|
+
<Field cell={cellBuildor(repo(FilterEntity), 'title')} bind:value={title} />
|
|
104
|
+
{/if}
|
|
105
|
+
<Textarea
|
|
106
|
+
bind:value={content}
|
|
107
|
+
placeholder="Un peu de détail c'est pas mal... Fais toi Plaiz' (Tu as même le droit d'utiliser le format markdown!)"
|
|
108
|
+
></Textarea>
|
|
109
|
+
<div class="flex justify-between">
|
|
110
|
+
{#if issueNumber}
|
|
111
|
+
<Button on:click={close} tabIndex={-1} class="btn-outline btn-error">Clore le feedback</Button>
|
|
112
|
+
{:else}
|
|
113
|
+
<div></div>
|
|
114
|
+
{/if}
|
|
115
|
+
<Button on:click={send} disabled={disableButton(issueNumber, title, content)}>Envoyer</Button>
|
|
116
|
+
</div>
|
|
117
|
+
{/if}
|
|
118
|
+
{/if}
|
|
123
119
|
</div>
|
|
@@ -29,77 +29,77 @@ onMount(async () => {
|
|
|
29
29
|
</script>
|
|
30
30
|
|
|
31
31
|
<div class="mb-4 grid gap-4">
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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>
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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>
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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}
|
|
105
105
|
</div>
|
|
@@ -13,26 +13,26 @@ onMount(async () => {
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<div class="mb-4 grid gap-4">
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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}
|
|
38
38
|
</div>
|
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
|
|
26
|
-
export
|
|
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
|
-
|
|
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
|
// ******************************
|
|
@@ -45,22 +45,22 @@ const button = {
|
|
|
45
45
|
</script>
|
|
46
46
|
|
|
47
47
|
<Html>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
<Head />
|
|
49
|
+
<Preview preview={previewText ?? title + '...'} />
|
|
50
|
+
<Section style={main}>
|
|
51
|
+
<Container style={container}>
|
|
52
|
+
{#if title}
|
|
53
|
+
<Heading style={heading}>{title}</Heading>
|
|
54
|
+
{/if}
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
{#each sections as s}
|
|
57
|
+
<Text style={s.highlighted ? highlighted : paragraph}>
|
|
58
|
+
{s.text}
|
|
59
|
+
</Text>
|
|
60
|
+
{#if s.cta}
|
|
61
|
+
<Button pY={19} style={button} href={s.cta.link}>{s.cta.text}</Button>
|
|
62
|
+
{/if}
|
|
63
|
+
{/each}
|
|
64
|
+
</Container>
|
|
65
|
+
</Section>
|
|
66
66
|
</Html>
|
package/esm/storeItem.d.ts
CHANGED
|
@@ -6,10 +6,7 @@ type TheStoreItem<T> = {
|
|
|
6
6
|
globalError?: string | undefined;
|
|
7
7
|
};
|
|
8
8
|
export declare const storeItem: <T>(repo: Repository<T>, initValues?: TheStoreItem<T>) => {
|
|
9
|
-
subscribe:
|
|
10
|
-
(this: void, run: import("svelte/store").Subscriber<TheStoreItem<T>>, invalidate?: import("svelte/store").Invalidator<TheStoreItem<T>> | undefined): import("svelte/store").Unsubscriber;
|
|
11
|
-
(this: void, run: import("svelte/store").Subscriber<TheStoreItem<T>>, invalidate?: (() => void) | undefined): import("svelte/store").Unsubscriber;
|
|
12
|
-
};
|
|
9
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<TheStoreItem<T>>, invalidate?: import("svelte/store").Invalidator<TheStoreItem<T>> | undefined) => import("svelte/store").Unsubscriber;
|
|
13
10
|
create: (item: Partial<T>) => void;
|
|
14
11
|
set: (newItem: TheStoreItem<T>) => void;
|
|
15
12
|
/**
|
package/esm/storeItem.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BROWSER } from 'esm-env';
|
|
2
2
|
import { derived, get, writable } from 'svelte/store';
|
|
3
|
-
import { ff_Log } from './';
|
|
3
|
+
import { ff_Log } from './common.js';
|
|
4
4
|
import { isError } from './helper';
|
|
5
5
|
export const storeItem = (repo, initValues = {
|
|
6
6
|
item: undefined,
|
package/esm/storeList.d.ts
CHANGED
|
@@ -25,10 +25,7 @@ export type FF_FindOptions<T> = FindOptions<T> & {
|
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
export declare const storeList: <T>(repo: Repository<T>, initValues?: TheStoreList<T>) => {
|
|
28
|
-
subscribe:
|
|
29
|
-
(this: void, run: import("svelte/store").Subscriber<TheStoreList<T>>, invalidate?: import("svelte/store").Invalidator<TheStoreList<T>> | undefined): import("svelte/store").Unsubscriber;
|
|
30
|
-
(this: void, run: import("svelte/store").Subscriber<TheStoreList<T>>, invalidate?: (() => void) | undefined): import("svelte/store").Unsubscriber;
|
|
31
|
-
};
|
|
28
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<TheStoreList<T>>, invalidate?: import("svelte/store").Invalidator<TheStoreList<T>> | undefined) => import("svelte/store").Unsubscriber;
|
|
32
29
|
manualSet: (info: TheStoreList<T>) => void;
|
|
33
30
|
fetch: (options?: FF_FindOptions<T>, onNewData?: (items?: T[], totalCount?: number) => void) => Promise<void>;
|
|
34
31
|
listen: (options?: FF_FindOptions<T>) => Promise<void>;
|
package/esm/ui/Button.svelte
CHANGED
|
@@ -57,44 +57,44 @@ const {
|
|
|
57
57
|
</script>
|
|
58
58
|
|
|
59
59
|
<button
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
{...$trigger}
|
|
61
|
+
use:trigger
|
|
62
|
+
use:isAllowed={{ permission }}
|
|
63
|
+
on:click
|
|
64
|
+
{...$$restProps}
|
|
65
|
+
class={tw(['btn text-white', disabled ? '' : 'btn-primary', className])}
|
|
66
|
+
{disabled}
|
|
67
67
|
>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
<!-- btn-outline -->
|
|
69
|
+
<slot />
|
|
70
|
+
{#if triggerAnnimation && isLoading}
|
|
71
|
+
<div in:fly={{ x: -20 }}>
|
|
72
|
+
<span class="loading loading-spinner"></span>
|
|
73
|
+
</div>
|
|
74
|
+
{/if}
|
|
75
75
|
</button>
|
|
76
76
|
|
|
77
77
|
{#if $open && (disabledWhy || $$slots.tooltip)}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
78
|
+
<div
|
|
79
|
+
{...$content}
|
|
80
|
+
use:content
|
|
81
|
+
transition:fade={{ duration: 100 }}
|
|
82
|
+
class="bg-base-300 z-30 rounded-lg ring-1 ring-black"
|
|
83
|
+
>
|
|
84
|
+
<div {...$arrow} use:arrow></div>
|
|
85
|
+
<div class="px-4 py-1">
|
|
86
|
+
{#if $$slots.tooltip}
|
|
87
|
+
<slot name="tooltip" />
|
|
88
|
+
{:else}
|
|
89
|
+
{disabledWhy}
|
|
90
|
+
{/if}
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
93
|
{/if}
|
|
94
94
|
|
|
95
95
|
<style>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
.btn[disabled] {
|
|
97
|
+
pointer-events: all;
|
|
98
|
+
cursor: not-allowed;
|
|
99
|
+
}
|
|
100
100
|
</style>
|
|
@@ -4,8 +4,8 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
isLoading?: boolean | undefined;
|
|
7
|
-
class?: string | undefined | null;
|
|
8
|
-
permission?: BaseEnum
|
|
7
|
+
class?: string | undefined | null | undefined;
|
|
8
|
+
permission?: BaseEnum<any> | BaseEnum<any>[] | undefined;
|
|
9
9
|
};
|
|
10
10
|
events: {
|
|
11
11
|
click: MouseEvent;
|
|
@@ -12,11 +12,11 @@ async function clip(_value) {
|
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<span
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
role="button"
|
|
16
|
+
tabindex="0"
|
|
17
|
+
on:keyup={() => {}}
|
|
18
|
+
on:click={() => clip(value)}
|
|
19
|
+
class={`${value ? 'cursor-copy' : ''} ${extraClass}`}
|
|
20
20
|
>
|
|
21
|
-
|
|
21
|
+
<slot />
|
|
22
22
|
</span>
|
|
@@ -2,10 +2,10 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
* @param value to set in the clipboard if not null.
|
|
6
|
+
*
|
|
7
|
+
* Don't put this on an input, if not, when a user will select the input via the mouse, this clipboard will be copied (usually you wanted to paste)!
|
|
8
|
+
*/ value: string | null;
|
|
9
9
|
class?: string;
|
|
10
10
|
};
|
|
11
11
|
events: {
|