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
|
@@ -7,16 +7,15 @@ export let classes = {};
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<div class="form-control w-full">
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</div>
|
|
10
|
+
<label for={forId} class={tw(`label flex gap-1 px-2 pb-1`, classes.label)}>
|
|
11
|
+
<span class="label-text text-base-content/60 pl-2 text-xs">
|
|
12
|
+
{label}{required ? ' *' : ''}
|
|
13
|
+
</span>
|
|
14
|
+
{#if error}
|
|
15
|
+
<span class="label-text-alt text-error truncate">{error}</span>
|
|
16
|
+
{/if}
|
|
17
|
+
</label>
|
|
18
|
+
<div class={tw('grid h-12 w-full', classes.slot)}>
|
|
19
|
+
<slot />
|
|
20
|
+
</div>
|
|
22
21
|
</div>
|
|
@@ -6,9 +6,9 @@ declare const __propDef: {
|
|
|
6
6
|
required?: boolean;
|
|
7
7
|
error?: string;
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
* example usage for paginate
|
|
10
|
+
* classes={{ label: 'justify-end' }}
|
|
11
|
+
*/ classes?: {
|
|
12
12
|
label?: string;
|
|
13
13
|
slot?: string;
|
|
14
14
|
};
|
|
@@ -77,33 +77,33 @@ const handleKeyup = (event) => {
|
|
|
77
77
|
</script>
|
|
78
78
|
|
|
79
79
|
<input
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
80
|
+
use:focusNow
|
|
81
|
+
class={tw('w-full px-2', className)}
|
|
82
|
+
on:input={handleInput}
|
|
83
|
+
bind:value
|
|
84
|
+
on:blur
|
|
85
|
+
on:change
|
|
86
|
+
on:click
|
|
87
|
+
on:focus
|
|
88
|
+
on:keydown
|
|
89
|
+
on:keypress
|
|
90
|
+
on:keyup={handleKeyup}
|
|
91
|
+
on:mouseover
|
|
92
|
+
on:mouseenter
|
|
93
|
+
on:mouseleave
|
|
94
|
+
on:paste
|
|
95
|
+
{...$$restProps}
|
|
96
96
|
/>
|
|
97
97
|
|
|
98
98
|
<style>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
input[type='number'] {
|
|
100
|
+
-webkit-appearance: textfield;
|
|
101
|
+
-moz-appearance: textfield;
|
|
102
|
+
appearance: textfield;
|
|
103
|
+
}
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
input[type='number']::-webkit-inner-spin-button,
|
|
106
|
+
input[type='number']::-webkit-outer-spin-button {
|
|
107
|
+
-webkit-appearance: none;
|
|
108
|
+
}
|
|
109
109
|
</style>
|
|
@@ -32,30 +32,30 @@ function dispatchInput(value2) {
|
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
34
|
{#if readonly}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
<span class="flex min-h-8 max-w-full items-center px-3 py-1 text-sm md:min-h-[2.5rem]">
|
|
36
|
+
<div class="overflow-hidden">
|
|
37
|
+
{@html value ?? '-'}
|
|
38
|
+
</div>
|
|
39
|
+
</span>
|
|
40
40
|
{:else}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
<textarea
|
|
42
|
+
use:focusNow
|
|
43
|
+
{...$$restProps}
|
|
44
|
+
class="textarea textarea-bordered
|
|
45
45
|
shadow-neutral-focus md:rounded-xls flex h-max min-h-8
|
|
46
46
|
w-full items-center rounded-lg bg-transparent text-xs
|
|
47
47
|
shadow-sm md:text-sm lg:min-h-[2.5rem]
|
|
48
48
|
{scrollbar.thin}"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
49
|
+
id={id || name || 'default-textarea-id'}
|
|
50
|
+
{name}
|
|
51
|
+
{placeholder}
|
|
52
|
+
autocomplete="off"
|
|
53
|
+
bind:this={reference}
|
|
54
|
+
bind:value
|
|
55
|
+
{rows}
|
|
56
|
+
on:input={(e) => {
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
dispatchInput(e.target.value)
|
|
59
|
+
}}
|
|
60
|
+
></textarea>
|
|
61
61
|
{/if}
|
|
@@ -2,7 +2,7 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
name?:
|
|
5
|
+
name?: string | null | undefined;
|
|
6
6
|
id?: string | undefined;
|
|
7
7
|
rows?: number | undefined;
|
|
8
8
|
placeholder?: string | undefined;
|
|
@@ -10,7 +10,7 @@ declare const __propDef: {
|
|
|
10
10
|
value?: string | undefined;
|
|
11
11
|
readonly?: boolean | undefined;
|
|
12
12
|
error?: false | undefined;
|
|
13
|
-
align?:
|
|
13
|
+
align?: `left` | `right` | undefined;
|
|
14
14
|
};
|
|
15
15
|
events: {
|
|
16
16
|
input: CustomEvent<any>;
|
|
@@ -127,88 +127,84 @@ $: calcFilteredItems($touchedInput, $inputValue, values);
|
|
|
127
127
|
</script>
|
|
128
128
|
|
|
129
129
|
<div class="input input-bordered flex min-w-0 items-center">
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
<Icon data={LibIcon_Cross}></Icon>
|
|
152
|
-
</button>
|
|
153
|
-
{/if}
|
|
154
|
-
<!-- {#if $open}
|
|
130
|
+
<div class="relative">
|
|
131
|
+
{#if iconToDisplayInInput($localSelected)}
|
|
132
|
+
{@const ico = iconToDisplayInInput($localSelected)}
|
|
133
|
+
<Icon data={ico?.data} class={tw(['relative', ico?.class])} style={ico?.style} size={ico?.size}
|
|
134
|
+
></Icon>
|
|
135
|
+
{/if}
|
|
136
|
+
</div>
|
|
137
|
+
<!-- {id} -->
|
|
138
|
+
<input
|
|
139
|
+
{...$input}
|
|
140
|
+
use:$input.action
|
|
141
|
+
class="-ml-8 -mr-5 h-full min-w-0 flex-grow bg-transparent px-10"
|
|
142
|
+
{placeholder}
|
|
143
|
+
/>
|
|
144
|
+
<div class="pointer-events-none relative right-0 flex gap-2">
|
|
145
|
+
{#if clearable && $localSelected && $localSelected.length > 0}
|
|
146
|
+
<button on:click={clearSelection} class="pointer-events-auto">
|
|
147
|
+
<Icon data={LibIcon_Cross}></Icon>
|
|
148
|
+
</button>
|
|
149
|
+
{/if}
|
|
150
|
+
<!-- {#if $open}
|
|
155
151
|
<Icon data={LibIcon_ChevronUp}></Icon>
|
|
156
152
|
{:else}
|
|
157
153
|
<Icon data={LibIcon_ChevronDown}></Icon>
|
|
158
154
|
{/if} -->
|
|
159
|
-
|
|
155
|
+
</div>
|
|
160
156
|
</div>
|
|
161
157
|
|
|
162
158
|
{#if $open}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
159
|
+
<ul
|
|
160
|
+
class="border-base-content/20 z-50 flex max-h-[300px] flex-col overflow-hidden rounded-lg border"
|
|
161
|
+
{...$menu}
|
|
162
|
+
use:$menu.action
|
|
163
|
+
transition:fly={{ duration: 150, y: -5 }}
|
|
164
|
+
>
|
|
165
|
+
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
|
166
|
+
<div class="bg-base-100 flex max-h-full flex-col gap-0 overflow-y-auto py-2" tabindex="0">
|
|
167
|
+
{#each filteredItems as item, index (index)}
|
|
168
|
+
<li
|
|
169
|
+
{...$option(toOption(item))}
|
|
170
|
+
use:$option.action
|
|
171
|
+
class="data-[highlighted]:bg-primary data-[highlighted]:text-primary-content relative flex cursor-pointer scroll-my-2 items-center
|
|
176
172
|
rounded-md
|
|
177
173
|
px-1
|
|
178
174
|
py-2
|
|
179
175
|
data-[disabled]:opacity-50"
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
176
|
+
>
|
|
177
|
+
{#if isChecked($localSelected, item)}
|
|
178
|
+
<Icon data={LibIcon_Check} class="w-6"></Icon>
|
|
179
|
+
{:else}
|
|
180
|
+
<!-- just to book the place -->
|
|
181
|
+
<span class="w-6"></span>
|
|
182
|
+
{/if}
|
|
183
|
+
{#if item.icon?.data}
|
|
184
|
+
<Icon
|
|
185
|
+
data={item.icon.data}
|
|
186
|
+
class={tw(['flex-shrink-0', item.icon.class])}
|
|
187
|
+
style={item.icon.style}
|
|
188
|
+
size={item.icon.size}
|
|
189
|
+
></Icon>
|
|
190
|
+
{/if}
|
|
191
|
+
<div class="pl-2 {item.class}">
|
|
192
|
+
<span class="font-medium">{item.caption}</span>
|
|
193
|
+
</div>
|
|
194
|
+
</li>
|
|
195
|
+
{:else}
|
|
196
|
+
<li class="relative cursor-pointer rounded-md py-1 pl-8 pr-4">Aucun résultat</li>
|
|
197
|
+
{/each}
|
|
198
|
+
</div>
|
|
199
|
+
{#if totalCount}
|
|
200
|
+
<div class="bg-base-300 z-50 text-center text-xs">
|
|
201
|
+
{#if items.length < totalCount}
|
|
202
|
+
({items.length} / {totalCount})
|
|
203
|
+
{:else}
|
|
204
|
+
<!-- yes, items.length can be bigger if the selected item is not in the limit -->
|
|
205
|
+
({items.length})
|
|
206
|
+
{/if}
|
|
207
|
+
</div>
|
|
208
|
+
{/if}
|
|
209
|
+
</ul>
|
|
214
210
|
{/if}
|
|
@@ -134,101 +134,101 @@ $: calcFilteredItems($touchedInput, $inputValue, value);
|
|
|
134
134
|
</script>
|
|
135
135
|
|
|
136
136
|
<div class="input input-bordered flex min-w-0 items-center {disabled && 'opacity-40'}">
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
137
|
+
<div class="relative">
|
|
138
|
+
{#if $localSelected?.value?.icon?.data}
|
|
139
|
+
<Icon
|
|
140
|
+
data={$localSelected.value.icon.data}
|
|
141
|
+
class={tw(['relative', $localSelected.value.icon.class])}
|
|
142
|
+
style={$localSelected.value.icon.style}
|
|
143
|
+
size={$localSelected.value.icon.size}
|
|
144
|
+
></Icon>
|
|
145
|
+
{:else}
|
|
146
|
+
<Icon data={LibIcon_Search} class="relative"></Icon>
|
|
147
|
+
{/if}
|
|
148
|
+
</div>
|
|
149
|
+
<!-- {id} -->
|
|
150
|
+
<input
|
|
151
|
+
{...$input}
|
|
152
|
+
use:$input.action
|
|
153
|
+
class="-ml-8 -mr-5 h-full min-w-0 flex-grow bg-transparent px-10"
|
|
154
|
+
{placeholder}
|
|
155
|
+
use:focusNow
|
|
156
|
+
/>
|
|
157
|
+
<div class="pointer-events-none relative right-0 flex gap-2">
|
|
158
|
+
{#if clearable && $localSelected}
|
|
159
|
+
<button on:click={clearSelection} class="pointer-events-auto">
|
|
160
|
+
<Icon data={LibIcon_Cross}></Icon>
|
|
161
|
+
</button>
|
|
162
|
+
{/if}
|
|
163
|
+
<!-- {#if $open}
|
|
164
164
|
<Icon data={LibIcon_ChevronUp}></Icon>
|
|
165
165
|
{:else}
|
|
166
166
|
<Icon data={LibIcon_ChevronDown}></Icon>
|
|
167
167
|
{/if} -->
|
|
168
|
-
|
|
168
|
+
</div>
|
|
169
169
|
</div>
|
|
170
170
|
|
|
171
171
|
{#if $open}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
172
|
+
<ul
|
|
173
|
+
class="border-base-content/20 z-50 flex max-h-[300px] flex-col overflow-hidden rounded-lg border"
|
|
174
|
+
{...$menu}
|
|
175
|
+
use:$menu.action
|
|
176
|
+
transition:fly={{ duration: 150, y: -5 }}
|
|
177
|
+
>
|
|
178
|
+
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
|
179
|
+
<div class="bg-base-100 flex max-h-full flex-col gap-0 overflow-y-auto py-2" tabindex="0">
|
|
180
|
+
{#each filteredItems as item, index (index)}
|
|
181
|
+
<li
|
|
182
|
+
{...$option(toOption(item))}
|
|
183
|
+
use:$option.action
|
|
184
|
+
class="data-[highlighted]:bg-primary data-[highlighted]:text-primary-content relative flex cursor-pointer scroll-my-2 items-center
|
|
185
185
|
rounded-md
|
|
186
186
|
px-1
|
|
187
187
|
py-2
|
|
188
188
|
data-[disabled]:opacity-50"
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
189
|
+
>
|
|
190
|
+
{#if $localSelected?.value?.id === item.id}
|
|
191
|
+
<Icon data={LibIcon_Check} class="w-6"></Icon>
|
|
192
|
+
{:else}
|
|
193
|
+
<!-- just to book the place -->
|
|
194
|
+
<span class="w-6"></span>
|
|
195
|
+
{/if}
|
|
196
|
+
{#if item.icon?.data}
|
|
197
|
+
<Icon
|
|
198
|
+
data={item.icon.data}
|
|
199
|
+
class={tw(['flex-shrink-0', item.icon.class])}
|
|
200
|
+
style={item.icon.style}
|
|
201
|
+
size={item.icon.size}
|
|
202
|
+
></Icon>
|
|
203
|
+
{/if}
|
|
204
|
+
<div class="pl-2">
|
|
205
|
+
<span class="font-medium">{item.caption}</span>
|
|
206
|
+
</div>
|
|
207
|
+
</li>
|
|
208
|
+
{:else}
|
|
209
|
+
{#if createOptionWhenNoResult}
|
|
210
|
+
<div class="p-4">
|
|
211
|
+
<Button
|
|
212
|
+
class="w-full"
|
|
213
|
+
on:click={(e) => {
|
|
214
|
+
dispatchCreateRequest(e, $inputValue)
|
|
215
|
+
}}>Créer "{$inputValue}"</Button
|
|
216
|
+
>
|
|
217
|
+
</div>
|
|
218
|
+
{:else}
|
|
219
|
+
<li class="relative cursor-pointer rounded-md py-1 pl-8 pr-4">Aucun résultat</li>
|
|
220
|
+
{/if}
|
|
221
|
+
{/each}
|
|
222
|
+
</div>
|
|
223
|
+
{#if totalCount}
|
|
224
|
+
<div class="bg-base-300 z-50 text-center text-xs">
|
|
225
|
+
{#if items.length < totalCount}
|
|
226
|
+
({items.length} / {totalCount})
|
|
227
|
+
{:else}
|
|
228
|
+
<!-- yes, items.length can be bigger if the selected item is not in the limit -->
|
|
229
|
+
({items.length})
|
|
230
|
+
{/if}
|
|
231
|
+
</div>
|
|
232
|
+
{/if}
|
|
233
|
+
</ul>
|
|
234
234
|
{/if}
|
|
@@ -12,26 +12,26 @@ function dispatchSelected(_data) {
|
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<div {id} class="input input-bordered flex w-fit min-w-0 items-center">
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
15
|
+
<div class="-mx-2 flex gap-2" title={placeholder}>
|
|
16
|
+
{#each items as item}
|
|
17
|
+
<button
|
|
18
|
+
{disabled}
|
|
19
|
+
on:click={() => {
|
|
20
|
+
value = item.id
|
|
21
|
+
dispatchSelected(items.find((i) => i.id === item.id))
|
|
22
|
+
}}
|
|
23
|
+
type="button"
|
|
24
|
+
class="min-w-0 cursor-pointer rounded-md px-1.5 py-1 {value === item.id
|
|
25
|
+
? 'bg-primary text-primary-content'
|
|
26
|
+
: ''}"
|
|
27
|
+
>
|
|
28
|
+
<div class="flex gap-2">
|
|
29
|
+
{#if item.icon}
|
|
30
|
+
<Icon {...item.icon} />
|
|
31
|
+
{/if}
|
|
32
|
+
{item.caption}
|
|
33
|
+
</div>
|
|
34
|
+
</button>
|
|
35
|
+
{/each}
|
|
36
|
+
</div>
|
|
37
37
|
</div>
|
package/esm/ui/link/Link.svelte
CHANGED
|
@@ -7,22 +7,22 @@ export { className as class };
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<a
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
class={`${daisy[kind]} link inline-block text-left no-underline hover:underline ${className ?? ''}`}
|
|
11
|
+
{href}
|
|
12
|
+
rel="noopener"
|
|
13
|
+
{target}
|
|
14
|
+
{...$$restProps}
|
|
15
15
|
>
|
|
16
|
-
|
|
16
|
+
<slot />
|
|
17
17
|
</a>
|
|
18
18
|
|
|
19
19
|
<style>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
a[target='_blank']::after {
|
|
21
|
+
display: inline-block;
|
|
22
|
+
content: '⇱';
|
|
23
|
+
position: relative;
|
|
24
|
+
top: -3px;
|
|
25
|
+
margin-left: 3px;
|
|
26
|
+
transform: rotate(90deg);
|
|
27
|
+
}
|
|
28
28
|
</style>
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { HTMLAnchorAttributes } from 'svelte/elements';
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
[x: string]: any;
|
|
6
5
|
href: string;
|
|
7
|
-
target?:
|
|
8
|
-
kind?:
|
|
9
|
-
class?: string | undefined | null;
|
|
6
|
+
target?: import("svelte/elements").HTMLAttributeAnchorTarget | null | undefined;
|
|
7
|
+
kind?: "info" | "ghost" | undefined;
|
|
8
|
+
class?: string | undefined | null | undefined;
|
|
10
9
|
};
|
|
11
10
|
events: {
|
|
12
11
|
[evt: string]: CustomEvent<any>;
|