firstly 0.0.16-next.2 → 0.1.0-next.4
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 +42 -0
- package/esm/SqlDatabase/FF_LogToConsole.d.ts +14 -0
- package/esm/SqlDatabase/FF_LogToConsole.js +24 -5
- package/esm/auth/Entities.d.ts +4 -3
- package/esm/auth/Entities.js +19 -15
- package/esm/auth/server/AuthController.server.js +86 -93
- package/esm/auth/server/handleAuth.d.ts +4 -2
- package/esm/auth/server/handleAuth.js +8 -4
- package/esm/auth/server/helperRole.d.ts +11 -4
- package/esm/auth/server/helperRole.js +29 -20
- package/esm/auth/server/index.d.ts +1 -0
- package/esm/auth/server/index.js +1 -0
- package/esm/auth/server/module.d.ts +27 -5
- package/esm/auth/server/module.js +24 -10
- package/esm/auth/server/providers/github.js +13 -2
- package/esm/auth/static/assets/Page-5iUUg7GN.d.ts +2 -0
- package/esm/auth/static/assets/Page-5iUUg7GN.js +1 -0
- package/esm/auth/static/assets/Page-BHW08QWz.css +1 -0
- package/esm/auth/static/assets/Page-BcSzu3xq.d.ts +2 -0
- package/esm/auth/static/assets/Page-BcSzu3xq.js +20 -0
- package/esm/auth/static/assets/Page-sEK21EQB.d.ts +2 -0
- package/esm/auth/static/assets/Page-sEK21EQB.js +1 -0
- package/esm/auth/static/assets/index-RpcgeXPm.d.ts +232 -0
- package/esm/auth/static/assets/index-RpcgeXPm.js +2 -0
- package/esm/auth/static/index.html +1 -1
- package/esm/auth/types.d.ts +1 -0
- package/esm/bin/cmd.js +16 -16
- package/esm/changeLog/changeLogEntities.d.ts +21 -0
- package/esm/changeLog/changeLogEntities.js +57 -0
- package/esm/changeLog/index.d.ts +3 -15
- package/esm/changeLog/index.js +3 -51
- package/esm/changeLog/server/index.d.ts +39 -28
- package/esm/changeLog/server/index.js +40 -29
- package/esm/cron/Cron.d.ts +11 -0
- package/esm/cron/Cron.js +43 -0
- package/esm/cron/Role_Cron.d.ts +3 -0
- package/esm/cron/Role_Cron.js +3 -0
- package/esm/cron/index.d.ts +3 -0
- package/esm/cron/index.js +3 -0
- package/esm/cron/server/index.d.ts +29 -11
- package/esm/cron/server/index.js +29 -13
- package/esm/feedback/FeedbackController.d.ts +3 -1
- package/esm/feedback/FeedbackController.js +23 -1
- package/esm/feedback/server/index.d.ts +2 -2
- package/esm/feedback/server/index.js +2 -2
- package/esm/feedback/types.d.ts +6 -0
- package/esm/feedback/ui/DialogIssue.svelte +16 -2
- package/esm/feedback/ui/DialogIssues.svelte +2 -2
- package/esm/feedback/ui/DialogMilestones.svelte +2 -3
- package/esm/feedback/ui/Feedback.svelte +1 -1
- package/esm/formats/dates.js +1 -1
- package/esm/formats/index.d.ts +1 -1
- package/esm/formats/index.js +1 -1
- package/esm/formats/strings.d.ts +2 -0
- package/esm/formats/strings.js +22 -0
- package/esm/index.d.ts +3 -84
- package/esm/index.js +3 -47
- package/esm/internals/FF_Entity.d.ts +2 -0
- package/esm/{FF_Entity.js → internals/FF_Entity.js} +10 -10
- package/esm/{FF_Fields.js → internals/FF_Fields.js} +1 -1
- package/esm/{cellsBuildor.d.ts → internals/cellsBuildor.d.ts} +1 -1
- package/esm/{common.d.ts → internals/common.d.ts} +0 -2
- package/esm/internals/common.js +3 -0
- package/esm/{helper.js → internals/helper.js} +1 -1
- package/esm/internals/index.d.ts +83 -0
- package/esm/internals/index.js +45 -0
- package/esm/{storeItem.js → internals/storeItem.js} +2 -2
- package/esm/mail/Mail.d.ts +13 -0
- package/esm/mail/Mail.js +51 -0
- package/esm/mail/Role_Mail.d.ts +3 -0
- package/esm/mail/Role_Mail.js +3 -0
- package/esm/mail/index.d.ts +7 -2
- package/esm/mail/index.js +7 -2
- package/esm/mail/server/formatMailHelper.d.ts +16 -0
- package/esm/mail/server/formatMailHelper.js +113 -0
- package/esm/mail/server/index.d.ts +32 -19
- package/esm/mail/server/index.js +113 -38
- package/esm/server/index.d.ts +9 -6
- package/esm/server/index.js +28 -50
- package/esm/svelte/FF_Layout.svelte +2 -2
- package/esm/svelte/dialog/DialogManagement.svelte +2 -2
- package/esm/svelte/dialog/DialogPrimitive.svelte +1 -1
- package/esm/svelte/dialog/DialogPrimitive.svelte.d.ts +1 -1
- package/esm/svelte/dialog/dialog.d.ts +1 -1
- package/esm/svelte/dialog/dialog.js +1 -1
- package/esm/svelte/helpers.d.ts +1 -0
- package/esm/svelte/index.d.ts +1 -0
- package/esm/svelte/index.js +1 -0
- package/esm/svelte/initRemultSvelteReactivity.d.ts +1 -0
- package/esm/svelte/initRemultSvelteReactivity.js +29 -0
- package/esm/sveltekit/server/index.d.ts +2 -2
- package/esm/sveltekit/server/index.js +2 -2
- package/esm/ui/Button.svelte +2 -2
- package/esm/ui/Button.svelte.d.ts +1 -1
- package/esm/ui/Field.svelte +7 -5
- package/esm/ui/Field.svelte.d.ts +5 -2
- package/esm/ui/FieldGroup.svelte +4 -3
- package/esm/ui/FieldGroup.svelte.d.ts +7 -4
- package/esm/ui/Grid.svelte +3 -3
- package/esm/ui/Grid.svelte.d.ts +2 -2
- package/esm/ui/Grid2.svelte +3 -3
- package/esm/ui/Grid2.svelte.d.ts +1 -1
- package/esm/ui/GridPaginate.svelte +2 -2
- package/esm/ui/GridPaginate2.svelte +1 -1
- package/esm/ui/Loading.svelte +1 -1
- package/esm/ui/Tooltip.svelte +1 -1
- package/esm/ui/dialog/DialogForm.svelte +5 -5
- package/esm/ui/dialog/DialogManagement.svelte +2 -2
- package/esm/ui/dialog/DialogPrimitive.svelte +3 -3
- package/esm/ui/dialog/DialogPrimitive.svelte.d.ts +1 -1
- package/esm/ui/dialog/FormEditAction.svelte +3 -3
- package/esm/ui/dialog/FormEditAction.svelte.d.ts +1 -1
- package/esm/ui/dialog/dialog.d.ts +1 -1
- package/esm/ui/dialog/dialog.js +1 -1
- package/esm/ui/index.d.ts +1 -1
- package/esm/ui/internals/FieldContainer.svelte +2 -2
- package/esm/ui/internals/Textarea.svelte +3 -3
- package/esm/ui/internals/select/MultiSelectMelt.svelte +7 -7
- package/esm/ui/internals/select/MultiSelectMelt.svelte.d.ts +1 -1
- package/esm/ui/internals/select/SelectMelt.svelte +29 -15
- package/esm/ui/internals/select/SelectMelt.svelte.d.ts +5 -2
- package/esm/ui/internals/select/SelectRadio.svelte +1 -1
- package/esm/ui/internals/select/SelectRadio.svelte.d.ts +1 -1
- package/esm/ui/link/LinkPlus.svelte +3 -3
- package/esm/ui/link/LinkPlus.svelte.d.ts +1 -1
- package/esm/virtual/Customer.js +1 -1
- package/esm/virtual/StateDemoEnum.d.ts +2 -2
- package/esm/virtual/StateDemoEnum.js +1 -1
- package/esm/virtual/UIEntity.js +1 -1
- package/esm/vite/index.js +50 -52
- package/package.json +19 -12
- package/esm/FF_Entity.d.ts +0 -2
- package/esm/ROUTES.d.ts +0 -102
- package/esm/ROUTES.js +0 -106
- package/esm/auth/static/assets/Page-BorYIfy9.d.ts +0 -6
- package/esm/auth/static/assets/Page-BorYIfy9.js +0 -1
- package/esm/auth/static/assets/Page-Cm4MsdIa.d.ts +0 -6
- package/esm/auth/static/assets/Page-Cm4MsdIa.js +0 -20
- package/esm/auth/static/assets/Page-CqsLm8yQ.d.ts +0 -6
- package/esm/auth/static/assets/Page-CqsLm8yQ.js +0 -1
- package/esm/auth/static/assets/Page-JfNiCSIG.css +0 -1
- package/esm/auth/static/assets/index-Borxa2ns.d.ts +0 -234
- package/esm/auth/static/assets/index-Borxa2ns.js +0 -44
- package/esm/common.js +0 -8
- package/esm/mail/templates/DefaultMail.svelte +0 -86
- package/esm/mail/templates/DefaultMail.svelte.d.ts +0 -30
- /package/esm/{BaseEnum.d.ts → internals/BaseEnum.d.ts} +0 -0
- /package/esm/{BaseEnum.js → internals/BaseEnum.js} +0 -0
- /package/esm/{FF_Fields.d.ts → internals/FF_Fields.d.ts} +0 -0
- /package/esm/{cellsBuildor.js → internals/cellsBuildor.js} +0 -0
- /package/esm/{helper.d.ts → internals/helper.d.ts} +0 -0
- /package/esm/{storeItem.d.ts → internals/storeItem.d.ts} +0 -0
- /package/esm/{storeList.d.ts → internals/storeList.d.ts} +0 -0
- /package/esm/{storeList.js → internals/storeList.js} +0 -0
- /package/esm/{theme.d.ts → internals/theme.d.ts} +0 -0
- /package/esm/{theme.js → internals/theme.js} +0 -0
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import type { FieldMetadata } from 'remult';
|
|
2
|
-
import { type StoreItem } from '../';
|
|
3
|
-
import type { Cell } from '../cellsBuildor';
|
|
2
|
+
import { type StoreItem } from '../internals';
|
|
3
|
+
import type { Cell } from '../internals/cellsBuildor';
|
|
4
4
|
declare class __sveltets_Render<T extends Record<any, any>> {
|
|
5
5
|
props(): {
|
|
6
|
-
mode?: "
|
|
6
|
+
mode?: "edit" | "view" | "filtre";
|
|
7
7
|
cells: Cell<T>[];
|
|
8
8
|
store: StoreItem<T>;
|
|
9
9
|
focusKey?: string | null | undefined;
|
|
10
|
+
createRequest?: ((args: {
|
|
11
|
+
input: string;
|
|
12
|
+
id: string;
|
|
13
|
+
}) => void) | undefined;
|
|
10
14
|
};
|
|
11
15
|
events(): {
|
|
12
|
-
createRequest: CustomEvent<any>;
|
|
13
16
|
changed: CustomEvent<any>;
|
|
14
17
|
} & {
|
|
15
18
|
[evt: string]: CustomEvent<any>;
|
package/esm/ui/Grid.svelte
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
import type { EntityOrderBy } from 'remult'
|
|
5
5
|
|
|
6
|
-
import type { Cell } from '../cellsBuildor.js'
|
|
6
|
+
import type { Cell } from '../internals/cellsBuildor.js'
|
|
7
7
|
import {
|
|
8
8
|
displayWithDefaultAndSuffix,
|
|
9
9
|
getEntityDisplayValue,
|
|
10
10
|
getEntityDisplayValueFromField,
|
|
11
11
|
getFieldLinkDisplayValue,
|
|
12
12
|
getFieldMetaType,
|
|
13
|
-
} from '../helper.js'
|
|
14
|
-
import { LibIcon_Delete, LibIcon_Edit, type StoreList } from '../index.js'
|
|
13
|
+
} from '../internals/helper.js'
|
|
14
|
+
import { LibIcon_Delete, LibIcon_Edit, type StoreList } from '../internals/index.js'
|
|
15
15
|
import Button from './Button.svelte'
|
|
16
16
|
import Clipboardable from './Clipboardable.svelte'
|
|
17
17
|
import GridLoading from './GridLoading.svelte'
|
package/esm/ui/Grid.svelte.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EntityOrderBy } from 'remult';
|
|
2
|
-
import type { Cell } from '../cellsBuildor.js';
|
|
3
|
-
import { type StoreList } from '../index.js';
|
|
2
|
+
import type { Cell } from '../internals/cellsBuildor.js';
|
|
3
|
+
import { type StoreList } from '../internals/index.js';
|
|
4
4
|
declare class __sveltets_Render<T extends Record<any, any>> {
|
|
5
5
|
props(): {
|
|
6
6
|
cells: Cell<T>[];
|
package/esm/ui/Grid2.svelte
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
import type { EntityOrderBy } from 'remult'
|
|
5
5
|
|
|
6
|
-
import type { Cell } from '../cellsBuildor.js'
|
|
6
|
+
import type { Cell } from '../internals/cellsBuildor.js'
|
|
7
7
|
import {
|
|
8
8
|
displayWithDefaultAndSuffix,
|
|
9
9
|
getEntityDisplayValue,
|
|
10
10
|
getEntityDisplayValueFromField,
|
|
11
11
|
getFieldLinkDisplayValue,
|
|
12
12
|
getFieldMetaType,
|
|
13
|
-
} from '../helper.js'
|
|
14
|
-
import { LibIcon_Delete, LibIcon_Edit } from '../index.js'
|
|
13
|
+
} from '../internals/helper.js'
|
|
14
|
+
import { LibIcon_Delete, LibIcon_Edit } from '../internals/index.js'
|
|
15
15
|
import { intersection } from '../svelte/actions/intersection.js'
|
|
16
16
|
import type { FF_Repo } from '../svelte/FF_Repo.svelte.js'
|
|
17
17
|
import Button from './Button.svelte'
|
package/esm/ui/Grid2.svelte.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EntityOrderBy } from 'remult';
|
|
2
|
-
import type { Cell } from '../cellsBuildor.js';
|
|
2
|
+
import type { Cell } from '../internals/cellsBuildor.js';
|
|
3
3
|
import type { FF_Repo } from '../svelte/FF_Repo.svelte.js';
|
|
4
4
|
declare class __sveltets_Render<T extends Record<any, any>> {
|
|
5
5
|
props(): {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<Loading class="mx-2 h-4 w-1/2"></Loading>
|
|
35
35
|
<Loading class="mx-2 h-3 w-1/6"></Loading>
|
|
36
36
|
{:else if !needPaginate}
|
|
37
|
-
<span class="
|
|
37
|
+
<span class="justify-end px-2 font-bold text-primary">
|
|
38
38
|
{totalCount}
|
|
39
39
|
</span>
|
|
40
40
|
{:else}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
</button>
|
|
49
49
|
{#if isValidValue}
|
|
50
50
|
<button aria-label="current" class="btn join-item px-0">
|
|
51
|
-
<span class="text-primary
|
|
51
|
+
<span class="font-bold text-primary">{totalCount}</span>
|
|
52
52
|
<span class="text-[0.55rem] italic"
|
|
53
53
|
>({pageDisplayed} / {Math.ceil((totalCount ?? 0) / pageSize)})</span
|
|
54
54
|
>
|
package/esm/ui/Loading.svelte
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<!-- To fix one capa & cadb are on the same css -->
|
|
9
9
|
<div
|
|
10
10
|
class={tw(
|
|
11
|
-
'skeleton
|
|
11
|
+
'skeleton flex h-4 w-full items-center justify-center rounded-lg bg-base-content/20',
|
|
12
12
|
extraClass,
|
|
13
13
|
)}
|
|
14
14
|
>
|
package/esm/ui/Tooltip.svelte
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { FieldGroup, storeItem } from '
|
|
3
|
-
import { cellsBuildor } from '../../cellsBuildor'
|
|
2
|
+
import { FieldGroup, storeItem } from '../../internals'
|
|
3
|
+
import { cellsBuildor } from '../../internals/cellsBuildor'
|
|
4
4
|
import { dialog, type DialogMetaDataInternal } from './dialog'
|
|
5
5
|
import DialogPrimitive from './DialogPrimitive.svelte'
|
|
6
6
|
import FormEditAction from './FormEditAction.svelte'
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
const onCreate = (
|
|
22
|
-
dialog.close(toShow.id, { success: true, item:
|
|
21
|
+
const onCreate = (args: { input: string; id: string }) => {
|
|
22
|
+
dialog.close(toShow.id, { success: true, item: args.input })
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
let isLoading = false
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
{cells}
|
|
62
62
|
{store}
|
|
63
63
|
mode={toShow.type === 'view' ? 'view' : 'edit'}
|
|
64
|
-
|
|
64
|
+
createRequest={onCreate}
|
|
65
65
|
/>
|
|
66
66
|
</div>
|
|
67
67
|
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
<p>Hey 🫵 developer, you are missing a few things 🤡!</p>
|
|
72
72
|
<p>Or use use one of the custom built in dialog like</p>
|
|
73
73
|
|
|
74
|
-
<pre class="bg-base-300
|
|
74
|
+
<pre class="mt-2 bg-base-300 p-2 text-xs">await dialog.confirmDelete('The Car')</pre>
|
|
75
75
|
|
|
76
76
|
<p>Or pass you own component</p>
|
|
77
|
-
<pre class="bg-base-300
|
|
77
|
+
<pre class="mt-2 bg-base-300 p-2 text-xs">{`await dialog.show({
|
|
78
78
|
detail: { caption: 'Interlocuteur' },
|
|
79
79
|
component: CreateCarForm,
|
|
80
80
|
props: { isEdit: false },
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { createEventDispatcher } from 'svelte'
|
|
4
4
|
import { fade } from 'svelte/transition'
|
|
5
5
|
|
|
6
|
-
import { LibIcon_Cross, tw, type BaseItemLight } from '../../'
|
|
6
|
+
import { LibIcon_Cross, tw, type BaseItemLight } from '../../internals'
|
|
7
7
|
import { flyAndScale } from '../../utils/transition'
|
|
8
8
|
import Icon from '../Icon.svelte'
|
|
9
9
|
import LinkPlus from '../link/LinkPlus.svelte'
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
<div
|
|
42
42
|
{...$overlay}
|
|
43
43
|
use:$overlay.action
|
|
44
|
-
class="
|
|
44
|
+
class="fixed inset-0 z-40 bg-base-300/80 blur-sm"
|
|
45
45
|
transition:fade={{ duration: 150 }}
|
|
46
46
|
></div>
|
|
47
47
|
<div
|
|
48
48
|
class={tw(
|
|
49
|
-
`
|
|
49
|
+
`relative z-40 max-h-[90vh] overflow-auto rounded-xl border border-base-content/60 bg-base-100 p-6 shadow-lg`,
|
|
50
50
|
classes.root,
|
|
51
51
|
)}
|
|
52
52
|
transition:flyAndScale={{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BaseItemLight } from '../../';
|
|
1
|
+
import { type BaseItemLight } from '../../internals';
|
|
2
2
|
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> {
|
|
3
3
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
4
|
$$bindings?: Bindings;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" generics="T extends any">
|
|
2
2
|
import { createEventDispatcher } from 'svelte'
|
|
3
3
|
|
|
4
|
-
import type { StoreItem } from '
|
|
4
|
+
import type { StoreItem } from '../../internals'
|
|
5
5
|
import Button from '../Button.svelte'
|
|
6
6
|
import Icon from '../Icon.svelte'
|
|
7
7
|
import { LibIcon_Add, LibIcon_Check, LibIcon_Delete } from '../LibIcon'
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
<div>
|
|
38
38
|
{#if $store.globalError}
|
|
39
|
-
<span class="text-
|
|
39
|
+
<span class="text-xs text-error">{$store.globalError}</span>
|
|
40
40
|
{/if}
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
{#if type === 'insert'}
|
|
51
51
|
<div>
|
|
52
52
|
{#if $store.globalError}
|
|
53
|
-
<span class="text-
|
|
53
|
+
<span class="text-xs text-error">{$store.globalError}</span>
|
|
54
54
|
{/if}
|
|
55
55
|
</div>
|
|
56
56
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SvelteComponent } from 'svelte';
|
|
2
2
|
import { type Repository } from 'remult';
|
|
3
|
-
import { type BaseItemLight, type CellsInput, type StoreItem } from '../../';
|
|
3
|
+
import { type BaseItemLight, type CellsInput, type StoreItem } from '../../internals';
|
|
4
4
|
import type { FF_Repo } from '../../svelte';
|
|
5
5
|
export type DialogClasses = {
|
|
6
6
|
/**
|
package/esm/ui/dialog/dialog.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { writable } from 'svelte/store';
|
|
2
2
|
import {} from 'remult';
|
|
3
|
-
import { LibIcon_Add, LibIcon_Delete, LibIcon_Edit, LibIcon_Search, } from '../../';
|
|
3
|
+
import { LibIcon_Add, LibIcon_Delete, LibIcon_Edit, LibIcon_Search, } from '../../internals';
|
|
4
4
|
const createDialogManagement = () => {
|
|
5
5
|
const { subscribe, update } = writable([]);
|
|
6
6
|
// internal...
|
package/esm/ui/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FieldMetadata } from 'remult';
|
|
2
|
-
import type { Cell } from '../';
|
|
2
|
+
import type { Cell } from '../internals';
|
|
3
3
|
export type Align = 'text-left' | 'text-center' | 'text-right';
|
|
4
4
|
export declare const align: (f?: FieldMetadata, isSlot?: boolean) => Align;
|
|
5
5
|
export declare const getAligns: (cells: Cell<any>[], withAction: boolean) => Align[];
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
|
|
16
16
|
<div class="form-control w-full">
|
|
17
17
|
<label for={forId} class={tw(`label flex gap-1 px-2 pb-1`, classes.label)}>
|
|
18
|
-
<span class="label-text text-base-content/60
|
|
18
|
+
<span class="label-text pl-2 text-xs text-base-content/60">
|
|
19
19
|
{label}{required ? ' *' : ''}
|
|
20
20
|
</span>
|
|
21
21
|
{#if error}
|
|
22
|
-
<span class="label-text-alt text-error
|
|
22
|
+
<span class="label-text-alt truncate text-error">{error}</span>
|
|
23
23
|
{/if}
|
|
24
24
|
</label>
|
|
25
25
|
<div class={tw('grid h-12 w-full', classes.slot)}>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { createEventDispatcher, onMount } from 'svelte'
|
|
3
3
|
|
|
4
|
-
import { scrollbar } from '../../theme'
|
|
4
|
+
import { scrollbar } from '../../internals/theme'
|
|
5
5
|
|
|
6
6
|
export let name: string | null = null
|
|
7
7
|
export let id = ''
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
<textarea
|
|
50
50
|
use:focusNow
|
|
51
51
|
{...$$restProps}
|
|
52
|
-
class="
|
|
53
|
-
|
|
52
|
+
class="shadow-neutral-focus md:rounded-xls
|
|
53
|
+
textarea textarea-bordered flex h-max min-h-8
|
|
54
54
|
w-full items-center rounded-lg bg-transparent text-xs
|
|
55
55
|
shadow-sm md:text-sm lg:min-h-[2.5rem]
|
|
56
56
|
{scrollbar.thin}"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
tw,
|
|
12
12
|
type BaseItem,
|
|
13
13
|
type FF_Icon,
|
|
14
|
-
} from '
|
|
14
|
+
} from '../../../internals'
|
|
15
15
|
import Icon from '../../Icon.svelte'
|
|
16
16
|
|
|
17
17
|
export let id: string
|
|
@@ -205,21 +205,21 @@
|
|
|
205
205
|
|
|
206
206
|
{#if $open}
|
|
207
207
|
<ul
|
|
208
|
-
class="
|
|
208
|
+
class="z-50 flex max-h-[300px] flex-col overflow-hidden rounded-lg border border-base-content/20"
|
|
209
209
|
{...$menu}
|
|
210
210
|
use:$menu.action
|
|
211
211
|
transition:fly={{ duration: 150, y: -5 }}
|
|
212
212
|
>
|
|
213
213
|
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
|
214
|
-
<div class="
|
|
214
|
+
<div class="flex max-h-full flex-col gap-0 overflow-y-auto bg-base-100 py-2" tabindex="0">
|
|
215
215
|
{#each filteredItems as item, index (index)}
|
|
216
216
|
<li
|
|
217
217
|
{...$option(toOption(item))}
|
|
218
218
|
use:$option.action
|
|
219
|
-
class="
|
|
220
|
-
rounded-md
|
|
221
|
-
px-1
|
|
219
|
+
class="relative flex cursor-pointer scroll-my-2 items-center rounded-md px-1
|
|
222
220
|
py-2
|
|
221
|
+
data-[highlighted]:bg-primary
|
|
222
|
+
data-[highlighted]:text-primary-content
|
|
223
223
|
data-[disabled]:opacity-50"
|
|
224
224
|
>
|
|
225
225
|
{#if isChecked($localSelected, item)}
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
{/each}
|
|
246
246
|
</div>
|
|
247
247
|
{#if totalCount}
|
|
248
|
-
<div class="bg-base-300
|
|
248
|
+
<div class="z-50 bg-base-300 text-center text-xs">
|
|
249
249
|
{#if items.length < totalCount}
|
|
250
250
|
({items.length} / {totalCount})
|
|
251
251
|
{:else}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BaseItem } from '
|
|
1
|
+
import { type BaseItem } from '../../../internals';
|
|
2
2
|
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> {
|
|
3
3
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
4
|
$$bindings?: Bindings;
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
Button,
|
|
8
|
+
LibIcon_Add,
|
|
8
9
|
LibIcon_Check,
|
|
9
10
|
LibIcon_Cross,
|
|
10
11
|
LibIcon_Search,
|
|
11
12
|
tw,
|
|
12
13
|
type BaseItem,
|
|
13
14
|
type FF_Icon,
|
|
14
|
-
} from '../../../'
|
|
15
|
+
} from '../../../internals'
|
|
15
16
|
import Icon from '../../Icon.svelte'
|
|
16
17
|
|
|
17
18
|
export let id: string
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
export let clearable = false
|
|
37
38
|
export let createOptionWhenNoResult = false
|
|
38
39
|
export let default_select_if_one_item = false
|
|
40
|
+
export let createRequest: ((args: { input: string; id: string }) => void) | undefined = undefined
|
|
39
41
|
|
|
40
42
|
const dispatch = createEventDispatcher()
|
|
41
43
|
|
|
@@ -47,11 +49,6 @@
|
|
|
47
49
|
dispatch('issue', msg)
|
|
48
50
|
}
|
|
49
51
|
|
|
50
|
-
function dispatchCreateRequest(e: any, input: string) {
|
|
51
|
-
e.preventDefault()
|
|
52
|
-
dispatch('createRequest', input)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
52
|
let lastSearch: string | undefined = undefined
|
|
56
53
|
const localLoadOptions = async (str: string) => {
|
|
57
54
|
if (str === lastSearch) {
|
|
@@ -205,21 +202,21 @@
|
|
|
205
202
|
|
|
206
203
|
{#if $open}
|
|
207
204
|
<ul
|
|
208
|
-
class="
|
|
205
|
+
class="z-50 flex max-h-[300px] flex-col overflow-hidden rounded-lg border border-base-content/20"
|
|
209
206
|
{...$menu}
|
|
210
207
|
use:$menu.action
|
|
211
208
|
transition:fly={{ duration: 150, y: -5 }}
|
|
212
209
|
>
|
|
213
210
|
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
|
214
|
-
<div class="
|
|
211
|
+
<div class="flex max-h-full flex-col gap-0 overflow-y-auto bg-base-100 py-2" tabindex="0">
|
|
215
212
|
{#each filteredItems as item, index (index)}
|
|
216
213
|
<li
|
|
217
214
|
{...$option(toOption(item))}
|
|
218
215
|
use:$option.action
|
|
219
|
-
class="
|
|
220
|
-
rounded-md
|
|
221
|
-
px-1
|
|
216
|
+
class="relative flex cursor-pointer scroll-my-2 items-center rounded-md px-1
|
|
222
217
|
py-2
|
|
218
|
+
data-[highlighted]:bg-primary
|
|
219
|
+
data-[highlighted]:text-primary-content
|
|
223
220
|
data-[disabled]:opacity-50"
|
|
224
221
|
>
|
|
225
222
|
{#if $localSelected?.value?.id === item.id}
|
|
@@ -245,10 +242,27 @@
|
|
|
245
242
|
<div class="p-4">
|
|
246
243
|
<Button
|
|
247
244
|
class="w-full"
|
|
248
|
-
on:click={(
|
|
249
|
-
|
|
250
|
-
|
|
245
|
+
on:click={async () => {
|
|
246
|
+
await createRequest?.({ input: $inputValue, id })
|
|
247
|
+
// const newValue = await createRequest?.({ input: $inputValue, id })
|
|
248
|
+
// if (newValue) {
|
|
249
|
+
// items.push(newValue)
|
|
250
|
+
// filteredItems.push(newValue)
|
|
251
|
+
// sync.selected(toOption(newValue))
|
|
252
|
+
// $open = false
|
|
253
|
+
// }
|
|
254
|
+
$open = false
|
|
255
|
+
}}
|
|
251
256
|
>
|
|
257
|
+
<div class="flex items-center gap-2">
|
|
258
|
+
<Icon data={LibIcon_Add}></Icon>
|
|
259
|
+
{#if $inputValue}
|
|
260
|
+
Créer "{$inputValue}"
|
|
261
|
+
{:else}
|
|
262
|
+
Créer
|
|
263
|
+
{/if}
|
|
264
|
+
</div>
|
|
265
|
+
</Button>
|
|
252
266
|
</div>
|
|
253
267
|
{:else}
|
|
254
268
|
<li class="relative cursor-pointer rounded-md py-1 pl-8 pr-4">Aucun résultat</li>
|
|
@@ -256,7 +270,7 @@
|
|
|
256
270
|
{/each}
|
|
257
271
|
</div>
|
|
258
272
|
{#if totalCount}
|
|
259
|
-
<div class="bg-base-300
|
|
273
|
+
<div class="z-50 bg-base-300 text-center text-xs">
|
|
260
274
|
{#if items.length < totalCount}
|
|
261
275
|
({items.length} / {totalCount})
|
|
262
276
|
{:else}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BaseItem } from '../../../';
|
|
1
|
+
import { type BaseItem } from '../../../internals';
|
|
2
2
|
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> {
|
|
3
3
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
4
|
$$bindings?: Bindings;
|
|
@@ -26,10 +26,13 @@ declare const SelectMelt: $$__sveltets_2_IsomorphicComponent<{
|
|
|
26
26
|
clearable?: boolean;
|
|
27
27
|
createOptionWhenNoResult?: boolean;
|
|
28
28
|
default_select_if_one_item?: boolean;
|
|
29
|
+
createRequest?: ((args: {
|
|
30
|
+
input: string;
|
|
31
|
+
id: string;
|
|
32
|
+
}) => void) | undefined;
|
|
29
33
|
}, {
|
|
30
34
|
selected: CustomEvent<any>;
|
|
31
35
|
issue: CustomEvent<any>;
|
|
32
|
-
createRequest: CustomEvent<any>;
|
|
33
36
|
} & {
|
|
34
37
|
[evt: string]: CustomEvent<any>;
|
|
35
38
|
}, {}, {}, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseItem } from '../../../';
|
|
1
|
+
import type { BaseItem } from '../../../internals';
|
|
2
2
|
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> {
|
|
3
3
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
4
|
$$bindings?: Bindings;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { type BaseItemLight } from '
|
|
2
|
+
import { type BaseItemLight } from '../../internals'
|
|
3
3
|
import Icon from '../Icon.svelte'
|
|
4
4
|
import Tooltip from '../Tooltip.svelte'
|
|
5
5
|
import Link from './Link.svelte'
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<div>
|
|
40
40
|
<Link href={item.href}>{item.caption}</Link>
|
|
41
41
|
{#if item.captionSub && captionSubStyle === 'inline'}
|
|
42
|
-
<span class="text-base-content/70
|
|
42
|
+
<span class="text-xs italic text-base-content/70">{item.captionSub}</span>
|
|
43
43
|
{/if}
|
|
44
44
|
</div>
|
|
45
45
|
{:else}
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</span>
|
|
52
52
|
{/if}
|
|
53
53
|
{#if item.captionSub && captionSubStyle === 'under'}
|
|
54
|
-
<span class="text-base-content/70
|
|
54
|
+
<span class="text-xs italic text-base-content/70">{item.captionSub}</span>
|
|
55
55
|
{/if}
|
|
56
56
|
</div>
|
|
57
57
|
{/if}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BaseItemLight } from '
|
|
1
|
+
import { type BaseItemLight } from '../../internals';
|
|
2
2
|
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> {
|
|
3
3
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
4
|
$$bindings?: Bindings;
|
package/esm/virtual/Customer.js
CHANGED
|
@@ -5,7 +5,7 @@ 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 '../FF_Fields';
|
|
8
|
+
import { FF_Fields } from '../internals/FF_Fields';
|
|
9
9
|
let Customer = class Customer {
|
|
10
10
|
id;
|
|
11
11
|
name;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEnum } from '../BaseEnum';
|
|
2
|
-
import type { BaseEnumOptions } from '../BaseEnum';
|
|
1
|
+
import { BaseEnum } from '../internals/BaseEnum';
|
|
2
|
+
import type { BaseEnumOptions } from '../internals/BaseEnum';
|
|
3
3
|
import '../ui/LibIcon';
|
|
4
4
|
export declare class StateDemoEnum extends BaseEnum {
|
|
5
5
|
static CHECK: StateDemoEnum;
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
var StateDemoEnum_1;
|
|
8
8
|
import { ValueListFieldType } from 'remult';
|
|
9
|
-
import { BaseEnum } from '../BaseEnum';
|
|
9
|
+
import { BaseEnum } from '../internals/BaseEnum';
|
|
10
10
|
import '../ui/LibIcon';
|
|
11
11
|
import { LibIcon_Add, LibIcon_Delete, LibIcon_Edit } from '../ui/LibIcon';
|
|
12
12
|
let StateDemoEnum = class StateDemoEnum extends BaseEnum {
|
package/esm/virtual/UIEntity.js
CHANGED
|
@@ -5,7 +5,7 @@ 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 '../FF_Fields.js';
|
|
8
|
+
import { FF_Fields } from '../internals/FF_Fields.js';
|
|
9
9
|
import { StateDemoEnum } from './StateDemoEnum.js';
|
|
10
10
|
let UIEntity = class UIEntity {
|
|
11
11
|
id;
|