firstly 0.2.0 → 0.3.0
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 +23 -0
- package/esm/bin/cmd.js +3 -158
- package/esm/changeLog/index.d.ts +1 -6
- package/esm/feedback/FeedbackController.d.ts +6 -2
- package/esm/feedback/FeedbackController.js +145 -143
- package/esm/feedback/server/index.d.ts +2 -2
- package/esm/feedback/server/index.js +3 -3
- package/esm/feedback/types.d.ts +5 -0
- package/esm/feedback/ui/DialogIssue.svelte +5 -5
- package/esm/feedback/ui/DialogIssues.svelte +5 -5
- package/esm/feedback/ui/DialogMilestones.svelte +1 -1
- package/esm/internals/BaseEnum.d.ts +2 -1
- package/esm/internals/FF_Entity.js +1 -17
- package/esm/internals/FF_Fields.d.ts +4 -3
- package/esm/internals/FF_Fields.js +14 -55
- package/esm/internals/cellsBuildor.d.ts +2 -1
- package/esm/internals/cellsBuildor.js +5 -4
- package/esm/internals/index.d.ts +7 -12
- package/esm/internals/storeItem.d.ts +12 -20
- package/esm/internals/storeItem.js +20 -6
- package/esm/mail/server/index.d.ts +8 -2
- package/esm/mail/server/index.js +35 -7
- package/esm/server/index.d.ts +1 -1
- package/esm/svelte/FF_Cell.svelte +3 -5
- package/esm/svelte/FF_Cell.svelte.d.ts +4 -2
- package/esm/svelte/FF_Form.svelte +4 -5
- package/esm/svelte/FF_Grid.svelte +2 -2
- package/esm/svelte/FF_Layout.svelte +3 -3
- package/esm/svelte/FF_Repo.svelte.d.ts +9 -0
- package/esm/svelte/FF_Repo.svelte.js +39 -0
- package/esm/svelte/class/SP.svelte.js +14 -2
- package/esm/svelte/dialog/DialogManagement.svelte +2 -5
- package/esm/svelte/dialog/DialogPrimitive.svelte +1 -2
- package/esm/svelte/dialog/dialog.js +2 -2
- package/esm/svelte/ff_Config.svelte.js +2 -2
- package/esm/svelte/index.d.ts +2 -7
- package/esm/svelte/index.js +2 -7
- package/esm/ui/Button.svelte +34 -66
- package/esm/ui/Button.svelte.d.ts +9 -35
- package/esm/ui/Clipboardable.svelte +13 -17
- package/esm/ui/Clipboardable.svelte.d.ts +9 -33
- package/esm/ui/Field.svelte +48 -9
- package/esm/ui/FieldGroup.svelte.d.ts +1 -1
- package/esm/ui/Grid.svelte +13 -87
- package/esm/ui/Grid.svelte.d.ts +0 -1
- package/esm/ui/Grid2.svelte +26 -90
- package/esm/ui/Grid2.svelte.d.ts +1 -2
- package/esm/ui/GridPaginate.svelte +1 -1
- package/esm/ui/GridPaginate2.svelte +2 -2
- package/esm/ui/Icon.svelte +2 -18
- package/esm/ui/Icon.svelte.d.ts +0 -2
- package/esm/ui/LibIcon.js +2 -2
- package/esm/ui/Loading.svelte +1 -1
- package/esm/ui/dialog/DialogManagement.svelte +14 -5
- package/esm/ui/dialog/DialogPrimitive.svelte +3 -3
- package/esm/ui/dialog/FormEditAction.svelte +4 -4
- package/esm/ui/dialog/dialog.d.ts +5 -2
- package/esm/ui/dialog/dialog.js +2 -2
- package/esm/ui/index.d.ts +1 -0
- package/esm/ui/index.js +1 -0
- package/esm/ui/internals/FieldContainer.svelte +25 -14
- package/esm/ui/internals/FieldContainer.svelte.d.ts +9 -30
- package/esm/ui/internals/Input.svelte.d.ts +1 -1
- package/esm/ui/internals/Textarea.svelte +2 -5
- package/esm/ui/internals/select/MultiSelectMelt.svelte +10 -8
- package/esm/ui/internals/select/MultiSelectMelt.svelte.d.ts +1 -1
- package/esm/ui/internals/select/Select2.svelte +88 -0
- package/esm/ui/internals/select/Select2.svelte.d.ts +12 -0
- package/esm/ui/internals/select/SelectMelt.svelte +33 -24
- package/esm/ui/internals/select/SelectMelt.svelte.d.ts +1 -1
- package/esm/ui/internals/select/SelectRadio.svelte +2 -2
- package/esm/ui/internals/select/SelectRadio.svelte.d.ts +1 -1
- package/esm/ui/link/Link.svelte +1 -1
- package/esm/ui/link/LinkPlus.svelte +9 -5
- package/esm/ui/link/LinkPlus.svelte.d.ts +5 -19
- package/esm/virtual/Customer.js +1 -2
- package/esm/virtual/UIEntity.js +9 -5
- package/package.json +11 -25
- package/esm/auth/AuthController.d.ts +0 -58
- package/esm/auth/AuthController.js +0 -114
- package/esm/auth/Entities.d.ts +0 -47
- package/esm/auth/Entities.js +0 -182
- package/esm/auth/README.md +0 -3
- package/esm/auth/index.d.ts +0 -5
- package/esm/auth/index.js +0 -5
- package/esm/auth/server/AuthController.server.d.ts +0 -58
- package/esm/auth/server/AuthController.server.js +0 -498
- package/esm/auth/server/handleAuth.d.ts +0 -4
- package/esm/auth/server/handleAuth.js +0 -142
- package/esm/auth/server/handleGuard.d.ts +0 -22
- package/esm/auth/server/handleGuard.js +0 -34
- package/esm/auth/server/helperDb.d.ts +0 -10
- package/esm/auth/server/helperDb.js +0 -56
- package/esm/auth/server/helperFirstly.d.ts +0 -1
- package/esm/auth/server/helperFirstly.js +0 -9
- package/esm/auth/server/helperOslo.d.ts +0 -7
- package/esm/auth/server/helperOslo.js +0 -24
- package/esm/auth/server/helperRemultServer.d.ts +0 -5
- package/esm/auth/server/helperRemultServer.js +0 -44
- package/esm/auth/server/helperRole.d.ts +0 -19
- package/esm/auth/server/helperRole.js +0 -57
- package/esm/auth/server/index.d.ts +0 -8
- package/esm/auth/server/index.js +0 -8
- package/esm/auth/server/module.d.ts +0 -300
- package/esm/auth/server/module.js +0 -230
- package/esm/auth/server/providers/github.d.ts +0 -33
- package/esm/auth/server/providers/github.js +0 -87
- package/esm/auth/server/providers/helperProvider.d.ts +0 -1
- package/esm/auth/server/providers/helperProvider.js +0 -25
- package/esm/auth/static/assets/Page-9Ytj29NS.d.ts +0 -2
- package/esm/auth/static/assets/Page-9Ytj29NS.js +0 -1
- package/esm/auth/static/assets/Page-BHW08QWz.css +0 -1
- package/esm/auth/static/assets/Page-C1pM-UDt.d.ts +0 -2
- package/esm/auth/static/assets/Page-C1pM-UDt.js +0 -20
- package/esm/auth/static/assets/Page-CPz6KCw_.d.ts +0 -2
- package/esm/auth/static/assets/Page-CPz6KCw_.js +0 -1
- package/esm/auth/static/assets/index-AoBb9Ds5.d.ts +0 -232
- package/esm/auth/static/assets/index-AoBb9Ds5.js +0 -2
- package/esm/auth/static/assets/index-DKWpA6v7.css +0 -4
- package/esm/auth/static/favicon.svg +0 -79
- package/esm/auth/static/index.html +0 -13
- package/esm/auth/types.d.ts +0 -73
- package/esm/auth/types.js +0 -1
- package/esm/svelte/FF_Display.svelte +0 -51
- package/esm/svelte/FF_Display.svelte.d.ts +0 -29
- package/esm/svelte/FF_Edit.svelte +0 -104
- package/esm/svelte/FF_Edit.svelte.d.ts +0 -32
- package/esm/svelte/FF_Error.svelte +0 -23
- package/esm/svelte/FF_Error.svelte.d.ts +0 -29
- package/esm/svelte/FF_Field.svelte +0 -62
- package/esm/svelte/FF_Field.svelte.d.ts +0 -29
- package/esm/svelte/FF_Hint.svelte +0 -21
- package/esm/svelte/FF_Hint.svelte.d.ts +0 -29
- package/esm/svelte/FF_Label.svelte +0 -23
- package/esm/svelte/FF_Label.svelte.d.ts +0 -29
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Svelecte from 'svelecte'
|
|
3
|
+
|
|
4
|
+
import { LibIcon_Search, type BaseItem } from '../../../internals'
|
|
5
|
+
import Icon from '../../Icon.svelte'
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
value?: string | undefined
|
|
9
|
+
clearable?: boolean
|
|
10
|
+
items?: BaseItem[] | undefined
|
|
11
|
+
placeholder?: string | undefined
|
|
12
|
+
|
|
13
|
+
onChange?: (value: string | undefined) => void
|
|
14
|
+
|
|
15
|
+
multiple?: boolean
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
value = $bindable(undefined),
|
|
20
|
+
clearable = false,
|
|
21
|
+
items = [],
|
|
22
|
+
placeholder = '',
|
|
23
|
+
multiple = false,
|
|
24
|
+
onChange,
|
|
25
|
+
}: Props = $props()
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<Svelecte
|
|
29
|
+
i18n={{
|
|
30
|
+
nomatch: 'Aucun résultat',
|
|
31
|
+
}}
|
|
32
|
+
options={items}
|
|
33
|
+
bind:value
|
|
34
|
+
{clearable}
|
|
35
|
+
{placeholder}
|
|
36
|
+
{multiple}
|
|
37
|
+
{onChange}
|
|
38
|
+
>
|
|
39
|
+
{#snippet prepend()}
|
|
40
|
+
{value}
|
|
41
|
+
<Icon data={LibIcon_Search} class="mr-2 ml-3"></Icon>
|
|
42
|
+
{/snippet}
|
|
43
|
+
|
|
44
|
+
{#snippet option(opt, inputValue)}
|
|
45
|
+
{@const item = opt as BaseItem}
|
|
46
|
+
<div class="flex items-center">
|
|
47
|
+
<Icon data={item.icon?.data} class="mr-2"></Icon>
|
|
48
|
+
{item.caption}
|
|
49
|
+
</div>
|
|
50
|
+
{/snippet}
|
|
51
|
+
</Svelecte>
|
|
52
|
+
|
|
53
|
+
<style>
|
|
54
|
+
:global(.svelecte) {
|
|
55
|
+
--sv-min-height: 3rem;
|
|
56
|
+
--sv-bg: var(--color-base-100, #fff);
|
|
57
|
+
--sv-disabled-bg: #eee;
|
|
58
|
+
--sv-border: 1px solid #414a54;
|
|
59
|
+
--sv-border-radius: var(--radius-field, 4px);
|
|
60
|
+
--sv-general-padding: 4px;
|
|
61
|
+
--sv-control-bg: var(--sv-bg);
|
|
62
|
+
--sv-item-wrap-padding: 3px 3px 3px 6px;
|
|
63
|
+
--sv-item-selected-bg: var(--color-base-200, #efefef);
|
|
64
|
+
--sv-item-btn-color: var(--color-base-content, #000);
|
|
65
|
+
--sv-item-btn-color-hover: #777; /* same as icon-color-hover in default theme */
|
|
66
|
+
--sv-item-btn-bg: var(--color-base-100, #efefef);
|
|
67
|
+
--sv-item-btn-bg-hover: var(--color-base-200, #ddd);
|
|
68
|
+
--sv-icon-color: var(--color-base-content, #efefef);
|
|
69
|
+
--sv-icon-color-hover: #777;
|
|
70
|
+
--sv-icon-bg: transparent;
|
|
71
|
+
--sv-icon-size: 20px;
|
|
72
|
+
--sv-separator-bg: var(--color-neutral-content, #ccc);
|
|
73
|
+
--sv-btn-border: 0;
|
|
74
|
+
--sv-placeholder-color: #ccccd6;
|
|
75
|
+
--sv-dropdown-bg: var(--sv-bg);
|
|
76
|
+
--sv-dropdown-offset: 1px;
|
|
77
|
+
--sv-dropdown-border: 1px solid rgba(0, 0, 0, 0.15);
|
|
78
|
+
--sv-dropdown-width: auto;
|
|
79
|
+
--sv-dropdown-shadow: 0 6px 12px #0000002d;
|
|
80
|
+
--sv-dropdown-height: 320px;
|
|
81
|
+
--sv-dropdown-active-bg: var(--color-primary, #f2f5f8);
|
|
82
|
+
--sv-dropdown-selected-bg: var(--color-neutral);
|
|
83
|
+
--sv-create-kbd-border: var(--border, 1px) solid var(--color-base-200, #efefef);
|
|
84
|
+
--sv-create-kbd-bg: var(--color-base-100, #fff);
|
|
85
|
+
--sv-create-disabled-bg: var(--color-error, #fcbaba);
|
|
86
|
+
--sv-loader-border: var(--border, 2px) solid var(--color-base-200, #ccc);
|
|
87
|
+
}
|
|
88
|
+
</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type BaseItem } from '../../../internals';
|
|
2
|
+
interface Props {
|
|
3
|
+
value?: string | undefined;
|
|
4
|
+
clearable?: boolean;
|
|
5
|
+
items?: BaseItem[] | undefined;
|
|
6
|
+
placeholder?: string | undefined;
|
|
7
|
+
onChange?: (value: string | undefined) => void;
|
|
8
|
+
multiple?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Select2: import("svelte").Component<Props, {}, "value">;
|
|
11
|
+
type Select2 = ReturnType<typeof Select2>;
|
|
12
|
+
export default Select2;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
export let loadOptions:
|
|
34
34
|
| ((str: string) => Promise<{ items: BaseItem[]; totalCount: number }>)
|
|
35
35
|
| undefined = undefined
|
|
36
|
-
export let value: string | undefined = undefined
|
|
36
|
+
export let value: string | null | undefined = undefined
|
|
37
37
|
export let clearable = false
|
|
38
38
|
export let createOptionWhenNoResult = false
|
|
39
39
|
export let default_select_if_one_item = false
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
sync.selected(getDefaultValue(value))
|
|
71
71
|
})
|
|
72
72
|
|
|
73
|
-
const getDefaultValue = (_selectedValue: string | undefined) => {
|
|
73
|
+
const getDefaultValue = (_selectedValue: string | null | undefined) => {
|
|
74
74
|
if (!items) {
|
|
75
75
|
return
|
|
76
76
|
}
|
|
@@ -129,8 +129,15 @@
|
|
|
129
129
|
value = v?.value?.id
|
|
130
130
|
})
|
|
131
131
|
|
|
132
|
+
// Helper to strip HTML tags from caption for display in input
|
|
133
|
+
const stripHtml = (html: string): string => {
|
|
134
|
+
const tmp = document.createElement('div')
|
|
135
|
+
tmp.innerHTML = html
|
|
136
|
+
return tmp.textContent || tmp.innerText || ''
|
|
137
|
+
}
|
|
138
|
+
|
|
132
139
|
$: if (!$open) {
|
|
133
|
-
$inputValue = $localSelected?.label
|
|
140
|
+
$inputValue = $localSelected?.label ? stripHtml($localSelected.label) : ''
|
|
134
141
|
}
|
|
135
142
|
|
|
136
143
|
$: filteredItems = items
|
|
@@ -165,7 +172,7 @@
|
|
|
165
172
|
$: calcFilteredItems($touchedInput, $inputValue, value)
|
|
166
173
|
</script>
|
|
167
174
|
|
|
168
|
-
<div class="input
|
|
175
|
+
<div class="input flex w-full min-w-0 items-center {disabled && 'opacity-40'}">
|
|
169
176
|
<div class="relative">
|
|
170
177
|
{#if $localSelected?.value?.icon?.data}
|
|
171
178
|
<Icon
|
|
@@ -182,7 +189,7 @@
|
|
|
182
189
|
<input
|
|
183
190
|
{...$input}
|
|
184
191
|
use:$input.action
|
|
185
|
-
class="-
|
|
192
|
+
class="-mr-5 -ml-8 h-full min-w-0 flex-grow bg-transparent px-10"
|
|
186
193
|
{placeholder}
|
|
187
194
|
use:focusNow
|
|
188
195
|
/>
|
|
@@ -213,28 +220,30 @@
|
|
|
213
220
|
<li
|
|
214
221
|
{...$option(toOption(item))}
|
|
215
222
|
use:$option.action
|
|
216
|
-
class="relative flex cursor-pointer scroll-my-2 items-
|
|
223
|
+
class="relative flex cursor-pointer scroll-my-2 items-start rounded-md px-1
|
|
217
224
|
py-2
|
|
225
|
+
data-[disabled]:opacity-50
|
|
218
226
|
data-[highlighted]:bg-primary
|
|
219
|
-
|
|
220
|
-
data-[disabled]:opacity-50"
|
|
227
|
+
data-[highlighted]:text-primary-content"
|
|
221
228
|
>
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
229
|
+
<div class="flex items-center">
|
|
230
|
+
{#if $localSelected?.value?.id === item.id}
|
|
231
|
+
<Icon data={LibIcon_Check} class="w-6"></Icon>
|
|
232
|
+
{:else}
|
|
233
|
+
<!-- just to book the place -->
|
|
234
|
+
<span class="w-6"></span>
|
|
235
|
+
{/if}
|
|
236
|
+
{#if item.icon?.data}
|
|
237
|
+
<Icon
|
|
238
|
+
data={item.icon.data}
|
|
239
|
+
class={tw(['flex-shrink-0', item.icon.class])}
|
|
240
|
+
style={item.icon.style}
|
|
241
|
+
size={item.icon.size}
|
|
242
|
+
></Icon>
|
|
243
|
+
{/if}
|
|
244
|
+
</div>
|
|
236
245
|
<div class="pl-2">
|
|
237
|
-
<span class="font-medium">{item.caption}</span>
|
|
246
|
+
<span class="font-medium">{@html item.caption}</span>
|
|
238
247
|
</div>
|
|
239
248
|
</li>
|
|
240
249
|
{:else}
|
|
@@ -243,7 +252,7 @@
|
|
|
243
252
|
<div class="p-4">
|
|
244
253
|
<Button
|
|
245
254
|
class="w-full"
|
|
246
|
-
|
|
255
|
+
onclick={async () => {
|
|
247
256
|
createRequest?.({ input: $inputValue, id })
|
|
248
257
|
$open = false
|
|
249
258
|
}}
|
|
@@ -22,7 +22,7 @@ declare const SelectMelt: $$__sveltets_2_IsomorphicComponent<{
|
|
|
22
22
|
items: BaseItem[];
|
|
23
23
|
totalCount: number;
|
|
24
24
|
}>) | undefined;
|
|
25
|
-
value?: string | undefined;
|
|
25
|
+
value?: string | null | undefined;
|
|
26
26
|
clearable?: boolean;
|
|
27
27
|
createOptionWhenNoResult?: boolean;
|
|
28
28
|
default_select_if_one_item?: boolean;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
export let disabled: boolean = false
|
|
9
9
|
export let placeholder: string = ''
|
|
10
10
|
export let items: BaseItem[] = []
|
|
11
|
-
export let value: string | number | undefined = undefined
|
|
11
|
+
export let value: string | number | null | undefined = undefined
|
|
12
12
|
|
|
13
13
|
const dispatch = createEventDispatcher()
|
|
14
14
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
|
-
<div {id} class="input
|
|
20
|
+
<div {id} class="input flex w-fit min-w-0 items-center">
|
|
21
21
|
<div class="-mx-2 flex gap-2" title={placeholder}>
|
|
22
22
|
{#each items as item}
|
|
23
23
|
<button
|
|
@@ -17,7 +17,7 @@ declare const SelectRadio: $$__sveltets_2_IsomorphicComponent<{
|
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
placeholder?: string;
|
|
19
19
|
items?: BaseItem[];
|
|
20
|
-
value?: string | number | undefined;
|
|
20
|
+
value?: string | number | null | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
selected: CustomEvent<any>;
|
|
23
23
|
} & {
|
package/esm/ui/link/Link.svelte
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<a
|
|
15
|
-
class={`${daisy[kind]}
|
|
15
|
+
class={`${daisy[kind]} inline-block link text-left no-underline hover:underline ${className ?? ''}`}
|
|
16
16
|
{href}
|
|
17
17
|
rel="noopener"
|
|
18
18
|
{target}
|
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
import Tooltip from '../Tooltip.svelte'
|
|
5
5
|
import Link from './Link.svelte'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
interface Props {
|
|
8
|
+
item: BaseItemLight | undefined
|
|
9
|
+
noIcon?: boolean
|
|
10
|
+
captionSubStyle?: 'under' | 'inline' | 'none'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { item, noIcon = false, captionSubStyle = 'under' }: Props = $props()
|
|
10
14
|
|
|
11
15
|
const hasSomethingToDisplay = (item: BaseItemLight) => {
|
|
12
16
|
if (item.href) {
|
|
@@ -39,7 +43,7 @@
|
|
|
39
43
|
<div>
|
|
40
44
|
<Link href={item.href}>{item.caption}</Link>
|
|
41
45
|
{#if item.captionSub && captionSubStyle === 'inline'}
|
|
42
|
-
<span class="text-xs
|
|
46
|
+
<span class="text-xs text-base-content/70 italic">{item.captionSub}</span>
|
|
43
47
|
{/if}
|
|
44
48
|
</div>
|
|
45
49
|
{:else}
|
|
@@ -51,7 +55,7 @@
|
|
|
51
55
|
</span>
|
|
52
56
|
{/if}
|
|
53
57
|
{#if item.captionSub && captionSubStyle === 'under'}
|
|
54
|
-
<span class="text-xs
|
|
58
|
+
<span class="text-xs text-base-content/70 italic">{item.captionSub}</span>
|
|
55
59
|
{/if}
|
|
56
60
|
</div>
|
|
57
61
|
{/if}
|
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import { type BaseItemLight } from '../../internals';
|
|
2
|
-
interface
|
|
3
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
-
$$bindings?: Bindings;
|
|
5
|
-
} & Exports;
|
|
6
|
-
(internal: unknown, props: Props & {
|
|
7
|
-
$$events?: Events;
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const LinkPlus: $$__sveltets_2_IsomorphicComponent<{
|
|
2
|
+
interface Props {
|
|
16
3
|
item: BaseItemLight | undefined;
|
|
17
4
|
noIcon?: boolean;
|
|
18
|
-
captionSubStyle?:
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
type LinkPlus = InstanceType<typeof LinkPlus>;
|
|
5
|
+
captionSubStyle?: 'under' | 'inline' | 'none';
|
|
6
|
+
}
|
|
7
|
+
declare const LinkPlus: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type LinkPlus = ReturnType<typeof LinkPlus>;
|
|
23
9
|
export default LinkPlus;
|
package/esm/virtual/Customer.js
CHANGED
|
@@ -5,7 +5,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { Entity, Fields } from 'remult';
|
|
8
|
-
import { FF_Fields } from '../internals/FF_Fields';
|
|
9
8
|
let Customer = class Customer {
|
|
10
9
|
id;
|
|
11
10
|
name;
|
|
@@ -14,7 +13,7 @@ __decorate([
|
|
|
14
13
|
Fields.id()
|
|
15
14
|
], Customer.prototype, "id", void 0);
|
|
16
15
|
__decorate([
|
|
17
|
-
|
|
16
|
+
Fields.string({ required: true, caption: 'Nom de la société', placeholder: 'Dynamic Process' })
|
|
18
17
|
], Customer.prototype, "name", void 0);
|
|
19
18
|
Customer = __decorate([
|
|
20
19
|
Entity('customers', {
|
package/esm/virtual/UIEntity.js
CHANGED
|
@@ -5,7 +5,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { Entity, Field, Fields } from 'remult';
|
|
8
|
-
import { FF_Fields } from '../internals/FF_Fields.js';
|
|
9
8
|
import { StateDemoEnum } from './StateDemoEnum.js';
|
|
10
9
|
let UIEntity = class UIEntity {
|
|
11
10
|
id;
|
|
@@ -39,19 +38,24 @@ __decorate([
|
|
|
39
38
|
Fields.updatedAt()
|
|
40
39
|
], UIEntity.prototype, "updatedAt", void 0);
|
|
41
40
|
__decorate([
|
|
42
|
-
|
|
41
|
+
Fields.string({
|
|
42
|
+
required: true,
|
|
43
|
+
caption: "Nom de l'utilisateur",
|
|
44
|
+
placeholder: 'Jean-Yves',
|
|
45
|
+
suffix: 'SUF!',
|
|
46
|
+
})
|
|
43
47
|
], UIEntity.prototype, "username", void 0);
|
|
44
48
|
__decorate([
|
|
45
49
|
Fields.string({ caption: 'E Mail', inputType: 'email', placeholder: 'prénom.nom@se.com' })
|
|
46
50
|
], UIEntity.prototype, "email", void 0);
|
|
47
51
|
__decorate([
|
|
48
|
-
|
|
52
|
+
Fields.string({
|
|
49
53
|
caption: 'Mot de passe',
|
|
50
54
|
inputType: 'password',
|
|
51
55
|
placeholder: '********',
|
|
52
56
|
includeInApi: false,
|
|
53
57
|
minLength: 6,
|
|
54
|
-
|
|
58
|
+
required: true,
|
|
55
59
|
})
|
|
56
60
|
], UIEntity.prototype, "password", void 0);
|
|
57
61
|
__decorate([
|
|
@@ -73,7 +77,7 @@ __decorate([
|
|
|
73
77
|
Fields.date({ allowNull: true, allowApiUpdate: false })
|
|
74
78
|
], UIEntity.prototype, "arrivalDate", void 0);
|
|
75
79
|
__decorate([
|
|
76
|
-
|
|
80
|
+
Fields.dateOnly({ allowNull: true })
|
|
77
81
|
], UIEntity.prototype, "arrivalDateOnly", void 0);
|
|
78
82
|
UIEntity = __decorate([
|
|
79
83
|
Entity('uiEntities', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firstly",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Firstly, an opinionated Remult setup!",
|
|
6
6
|
"funding": "https://github.com/sponsors/jycouet",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@sveltejs/kit": ">=1.0.0 <3.0.0",
|
|
19
|
-
"remult": ">=3.
|
|
19
|
+
"remult": ">=3.3.2",
|
|
20
20
|
"svelte": ">=5"
|
|
21
21
|
},
|
|
22
22
|
"peerDependenciesMeta": {
|
|
@@ -32,28 +32,22 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@clack/prompts": "0.11.0",
|
|
35
|
-
"@kitql/internals": "0.
|
|
35
|
+
"@kitql/internals": "0.11.0",
|
|
36
36
|
"@layerstack/svelte-actions": "1.0.0",
|
|
37
37
|
"@layerstack/utils": "1.0.0",
|
|
38
38
|
"@mdi/js": "7.4.47",
|
|
39
|
+
"@types/nodemailer": "7.0.2",
|
|
39
40
|
"@melt-ui/svelte": "0.86.6",
|
|
40
|
-
"@oslojs/crypto": "1.0.1",
|
|
41
|
-
"@oslojs/encoding": "1.1.0",
|
|
42
|
-
"@oslojs/otp": "1.1.0",
|
|
43
|
-
"@types/nodemailer": "6.4.17",
|
|
44
|
-
"arctic": "3.7.0",
|
|
45
|
-
"bcryptjs": "3.0.2",
|
|
46
41
|
"clsx": "2.1.1",
|
|
47
|
-
"cron": "4.
|
|
48
|
-
"daisyui": "
|
|
42
|
+
"cron": "4.4.0",
|
|
43
|
+
"daisyui": "5.5.3",
|
|
49
44
|
"esm-env": "1.2.2",
|
|
50
|
-
"mjml": "4.15.3",
|
|
51
45
|
"nodemailer": "7.0.4",
|
|
52
|
-
"
|
|
53
|
-
"tailwind-merge": "
|
|
54
|
-
"tailwindcss": "
|
|
55
|
-
"vite-plugin-kit-routes": "1.0.
|
|
56
|
-
"vite-plugin-stripper": "0.
|
|
46
|
+
"svelecte": "5.3.0",
|
|
47
|
+
"tailwind-merge": "3.5.0",
|
|
48
|
+
"tailwindcss": "4.1.14",
|
|
49
|
+
"vite-plugin-kit-routes": "1.0.3",
|
|
50
|
+
"vite-plugin-stripper": "0.10.0"
|
|
57
51
|
},
|
|
58
52
|
"sideEffects": false,
|
|
59
53
|
"bin": "./esm/bin/cmd.js",
|
|
@@ -87,14 +81,6 @@
|
|
|
87
81
|
"types": "./esm/formats/index.d.ts",
|
|
88
82
|
"default": "./esm/formats/index.js"
|
|
89
83
|
},
|
|
90
|
-
"./auth": {
|
|
91
|
-
"types": "./esm/auth/index.d.ts",
|
|
92
|
-
"default": "./esm/auth/index.js"
|
|
93
|
-
},
|
|
94
|
-
"./auth/server": {
|
|
95
|
-
"types": "./esm/auth/server/index.d.ts",
|
|
96
|
-
"default": "./esm/auth/server/index.js"
|
|
97
|
-
},
|
|
98
84
|
"./changeLog": {
|
|
99
85
|
"types": "./esm/changeLog/index.d.ts",
|
|
100
86
|
"default": "./esm/changeLog/index.js"
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { AuthServerAbstraction, ProviderConfigured } from './types';
|
|
2
|
-
export declare class AuthController {
|
|
3
|
-
#private;
|
|
4
|
-
static _setAbstraction(impl: AuthServerAbstraction): void;
|
|
5
|
-
/**
|
|
6
|
-
* Sign out the current user
|
|
7
|
-
*/
|
|
8
|
-
static signOut(): Promise<import("./types").AuthResponse>;
|
|
9
|
-
/**
|
|
10
|
-
* Sign in with a demo account
|
|
11
|
-
* _(The easiest way to demo & test your application)_
|
|
12
|
-
*/
|
|
13
|
-
static signInDemo(name: string): Promise<import("./types").AuthResponse>;
|
|
14
|
-
/**
|
|
15
|
-
* This is for login / password authentication Invite someone
|
|
16
|
-
*/
|
|
17
|
-
static invite(email: string): Promise<import("./types").AuthResponse>;
|
|
18
|
-
/**
|
|
19
|
-
* This is for login / password authentication SignUp
|
|
20
|
-
*/
|
|
21
|
-
static signUpPassword(email: string, password: string): Promise<import("./types").AuthResponse>;
|
|
22
|
-
/**
|
|
23
|
-
* This is for login / password authentication SignIn
|
|
24
|
-
*/
|
|
25
|
-
static signInPassword(email: string, password: string): Promise<import("./types").AuthResponse>;
|
|
26
|
-
/**
|
|
27
|
-
* Forgot your password ? Send a mail to reset it.
|
|
28
|
-
*/
|
|
29
|
-
static forgotPassword(email: string): Promise<import("./types").AuthResponse>;
|
|
30
|
-
/**
|
|
31
|
-
* Reset your password with a token
|
|
32
|
-
*/
|
|
33
|
-
static resetPassword(token: string, password: string): Promise<import("./types").AuthResponse>;
|
|
34
|
-
/** OTP */
|
|
35
|
-
static signInOTP(email: string): Promise<import("./types").AuthResponse>;
|
|
36
|
-
/**
|
|
37
|
-
* Verify the OTP code
|
|
38
|
-
*/
|
|
39
|
-
static verifyOtp(email: string, otp: string): Promise<import("./types").AuthResponse>;
|
|
40
|
-
/** OAUTH */
|
|
41
|
-
/**
|
|
42
|
-
* The the url to redirect to for the OAuth provider
|
|
43
|
-
* @param provider Has to mach one of `AUTH_OPTIONS.providers.oAuths` your configured
|
|
44
|
-
*
|
|
45
|
-
* To be used like this for example:
|
|
46
|
-
* ```
|
|
47
|
-
* const url = await Auth.signInOAuthGetUrl('github')
|
|
48
|
-
* window.location.href = url
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* _(popup example should work too, and a nice example/componant would be appreciated)_
|
|
52
|
-
*/
|
|
53
|
-
static signInOAuthGetUrl<T extends keyof ProviderConfigured>(o: {
|
|
54
|
-
provider: T;
|
|
55
|
-
options?: ProviderConfigured[T];
|
|
56
|
-
redirect?: string;
|
|
57
|
-
}): Promise<string>;
|
|
58
|
-
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { BackendMethod } from 'remult';
|
|
8
|
-
import { FF_Role_Auth } from './Entities';
|
|
9
|
-
export class AuthController {
|
|
10
|
-
static #server;
|
|
11
|
-
// Internal setter method that can be used by the module
|
|
12
|
-
static _setAbstraction(impl) {
|
|
13
|
-
this.#server = impl;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Sign out the current user
|
|
17
|
-
*/
|
|
18
|
-
static async signOut() {
|
|
19
|
-
return await AuthController.#server.signOut();
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Sign in with a demo account
|
|
23
|
-
* _(The easiest way to demo & test your application)_
|
|
24
|
-
*/
|
|
25
|
-
static async signInDemo(name) {
|
|
26
|
-
return await AuthController.#server.signInDemo(name);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* This is for login / password authentication Invite someone
|
|
30
|
-
*/
|
|
31
|
-
static async invite(email) {
|
|
32
|
-
return await AuthController.#server.invite(email);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* This is for login / password authentication SignUp
|
|
36
|
-
*/
|
|
37
|
-
static async signUpPassword(email, password) {
|
|
38
|
-
return await AuthController.#server.signUpPassword(email, password);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* This is for login / password authentication SignIn
|
|
42
|
-
*/
|
|
43
|
-
static async signInPassword(email, password) {
|
|
44
|
-
return await AuthController.#server.signInPassword(email, password);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Forgot your password ? Send a mail to reset it.
|
|
48
|
-
*/
|
|
49
|
-
static async forgotPassword(email) {
|
|
50
|
-
return await AuthController.#server.forgotPassword(email);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Reset your password with a token
|
|
54
|
-
*/
|
|
55
|
-
static async resetPassword(token, password) {
|
|
56
|
-
return await AuthController.#server.resetPassword(token, password);
|
|
57
|
-
}
|
|
58
|
-
/** OTP */
|
|
59
|
-
static async signInOTP(email) {
|
|
60
|
-
return await AuthController.#server.signInOTP(email);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Verify the OTP code
|
|
64
|
-
*/
|
|
65
|
-
static async verifyOtp(email, otp) {
|
|
66
|
-
return await AuthController.#server.verifyOtp(email, otp);
|
|
67
|
-
}
|
|
68
|
-
/** OAUTH */
|
|
69
|
-
/**
|
|
70
|
-
* The the url to redirect to for the OAuth provider
|
|
71
|
-
* @param provider Has to mach one of `AUTH_OPTIONS.providers.oAuths` your configured
|
|
72
|
-
*
|
|
73
|
-
* To be used like this for example:
|
|
74
|
-
* ```
|
|
75
|
-
* const url = await Auth.signInOAuthGetUrl('github')
|
|
76
|
-
* window.location.href = url
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* _(popup example should work too, and a nice example/componant would be appreciated)_
|
|
80
|
-
*/
|
|
81
|
-
static async signInOAuthGetUrl(o) {
|
|
82
|
-
return await AuthController.#server.signInOAuthGetUrl(o);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
__decorate([
|
|
86
|
-
BackendMethod({ allowed: true })
|
|
87
|
-
], AuthController, "signOut", null);
|
|
88
|
-
__decorate([
|
|
89
|
-
BackendMethod({ allowed: true })
|
|
90
|
-
], AuthController, "signInDemo", null);
|
|
91
|
-
__decorate([
|
|
92
|
-
BackendMethod({ allowed: FF_Role_Auth.FF_Role_Auth_Invite })
|
|
93
|
-
], AuthController, "invite", null);
|
|
94
|
-
__decorate([
|
|
95
|
-
BackendMethod({ allowed: true })
|
|
96
|
-
], AuthController, "signUpPassword", null);
|
|
97
|
-
__decorate([
|
|
98
|
-
BackendMethod({ allowed: true })
|
|
99
|
-
], AuthController, "signInPassword", null);
|
|
100
|
-
__decorate([
|
|
101
|
-
BackendMethod({ allowed: true })
|
|
102
|
-
], AuthController, "forgotPassword", null);
|
|
103
|
-
__decorate([
|
|
104
|
-
BackendMethod({ allowed: true })
|
|
105
|
-
], AuthController, "resetPassword", null);
|
|
106
|
-
__decorate([
|
|
107
|
-
BackendMethod({ allowed: true })
|
|
108
|
-
], AuthController, "signInOTP", null);
|
|
109
|
-
__decorate([
|
|
110
|
-
BackendMethod({ allowed: true })
|
|
111
|
-
], AuthController, "verifyOtp", null);
|
|
112
|
-
__decorate([
|
|
113
|
-
BackendMethod({ allowed: true })
|
|
114
|
-
], AuthController, "signInOAuthGetUrl", null);
|
package/esm/auth/Entities.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { OAuth2Tokens } from 'arctic';
|
|
2
|
-
import { BaseEnum } from '../internals';
|
|
3
|
-
import type { BaseEnumOptions } from '../internals';
|
|
4
|
-
import type { OAuth2UserInfo } from './types';
|
|
5
|
-
export declare const FF_Role_Auth: {
|
|
6
|
-
readonly FF_Role_Auth_Admin: "FF_Role_Auth.Admin";
|
|
7
|
-
readonly FF_Role_Auth_Invite: "FF_Role_Auth.Invite";
|
|
8
|
-
};
|
|
9
|
-
export declare class FFAuthUser {
|
|
10
|
-
id: string;
|
|
11
|
-
createdAt: Date;
|
|
12
|
-
updatedAt?: Date;
|
|
13
|
-
name: string;
|
|
14
|
-
roles: string[];
|
|
15
|
-
accounts: FFAuthAccount[];
|
|
16
|
-
sessions: FFAuthUserSession[];
|
|
17
|
-
}
|
|
18
|
-
export declare class FFAuthAccount {
|
|
19
|
-
id: string;
|
|
20
|
-
createdAt: Date;
|
|
21
|
-
updatedAt?: Date;
|
|
22
|
-
userId: string;
|
|
23
|
-
user: FFAuthUser;
|
|
24
|
-
provider: string;
|
|
25
|
-
providerUserId: string;
|
|
26
|
-
email?: string | null;
|
|
27
|
-
hashPassword?: string;
|
|
28
|
-
token?: string;
|
|
29
|
-
expiresAt?: Date;
|
|
30
|
-
lastVerifiedAt?: Date;
|
|
31
|
-
metadata?: OAuth2UserInfo & {
|
|
32
|
-
tokens_data: OAuth2Tokens['data'];
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export declare class FFAuthUserSession {
|
|
36
|
-
id: string;
|
|
37
|
-
expiresAt: Date;
|
|
38
|
-
userId: string;
|
|
39
|
-
user: FFAuthUser;
|
|
40
|
-
}
|
|
41
|
-
export declare class FFAuthProvider extends BaseEnum {
|
|
42
|
-
static DEMO: FFAuthProvider;
|
|
43
|
-
static PASSWORD: FFAuthProvider;
|
|
44
|
-
static OTP: FFAuthProvider;
|
|
45
|
-
static OAUTH: FFAuthProvider;
|
|
46
|
-
constructor(id: string, o?: BaseEnumOptions);
|
|
47
|
-
}
|