fuma 2.0.50 → 2.1.1
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/dist/action/index.d.ts +2 -5
- package/dist/action/index.js +2 -5
- package/dist/action/list/handlers.d.ts +6 -6
- package/dist/action/list/handlers.js +6 -5
- package/dist/action/list/index.d.ts +1 -1
- package/dist/action/list/index.js +11 -5
- package/dist/action/list/trigger.js +6 -2
- package/dist/action/list/utils.js +1 -1
- package/dist/action/tip.js +2 -2
- package/dist/command/command.svelte.d.ts +16 -0
- package/dist/command/command.svelte.js +68 -0
- package/dist/command/index.d.ts +1 -0
- package/dist/command/index.js +1 -0
- package/dist/data.d.ts +87 -0
- package/dist/data.js +51 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/input/InputBoolean.svelte +107 -0
- package/dist/input/InputBoolean.svelte.d.ts +12 -0
- package/dist/input/InputNumber.svelte +33 -0
- package/dist/input/InputNumber.svelte.d.ts +10 -0
- package/dist/input/InputRadio.svelte +56 -0
- package/dist/input/InputRadio.svelte.d.ts +11 -0
- package/dist/input/InputRange.svelte +30 -0
- package/dist/input/InputRange.svelte.d.ts +10 -0
- package/dist/input/InputRelation.svelte +119 -0
- package/dist/input/InputRelation.svelte.d.ts +39 -0
- package/dist/input/InputSelect.svelte +113 -0
- package/dist/input/InputSelect.svelte.d.ts +37 -0
- package/dist/input/InputSelectNative.svelte +56 -0
- package/dist/input/InputSelectNative.svelte.d.ts +12 -0
- package/dist/input/InputString.svelte +48 -0
- package/dist/input/InputString.svelte.d.ts +11 -0
- package/dist/input/InputTextarea.svelte +47 -0
- package/dist/input/InputTextarea.svelte.d.ts +11 -0
- package/dist/input/Issues.svelte +21 -0
- package/dist/input/Issues.svelte.d.ts +7 -0
- package/dist/input/index.d.ts +11 -0
- package/dist/input/index.js +10 -0
- package/dist/input/type.d.ts +5 -0
- package/dist/popover/Popover.svelte +50 -0
- package/dist/popover/index.d.ts +2 -0
- package/dist/popover/index.js +2 -0
- package/dist/popover/popover.svelte.d.ts +26 -0
- package/dist/popover/popover.svelte.js +101 -0
- package/dist/remote/useForm.d.ts +6 -0
- package/dist/remote/useForm.js +22 -0
- package/dist/search/Spans.svelte +15 -0
- package/dist/search/Spans.svelte.d.ts +7 -0
- package/dist/search/index.d.ts +2 -0
- package/dist/search/index.js +2 -0
- package/dist/search/search.js +96 -0
- package/dist/server/index.d.ts +0 -4
- package/dist/server/index.js +0 -4
- package/dist/server/parseQuery.js +1 -1
- package/dist/server/sse.js +4 -4
- package/dist/server/table.js +1 -1
- package/dist/state/index.d.ts +1 -0
- package/dist/state/index.js +1 -0
- package/dist/state/param.svelte.d.ts +17 -0
- package/dist/state/param.svelte.js +64 -0
- package/dist/ui/button/ButtonDelete.svelte +49 -28
- package/dist/ui/button/ButtonDelete.svelte.d.ts +12 -31
- package/dist/ui/button/index.d.ts +0 -1
- package/dist/ui/button/index.js +0 -1
- package/dist/ui/copy/ButtonCopy.svelte +43 -0
- package/dist/ui/copy/ButtonCopy.svelte.d.ts +17 -0
- package/dist/ui/copy/index.d.ts +2 -0
- package/dist/ui/copy/index.js +2 -0
- package/dist/ui/copy/useCopy.svelte.d.ts +10 -0
- package/dist/ui/copy/useCopy.svelte.js +36 -0
- package/dist/ui/dialog/Dialog.svelte +56 -26
- package/dist/ui/dialog/Dialog.svelte.d.ts +14 -35
- package/dist/ui/dialog/index.d.ts +0 -1
- package/dist/ui/dialog/index.js +0 -1
- package/dist/ui/drawer/Drawer.svelte +53 -45
- package/dist/ui/drawer/Drawer.svelte.d.ts +8 -63
- package/dist/ui/drawer/drawerFly.js +1 -1
- package/dist/ui/drawer/useLayer.svelte.d.ts +5 -0
- package/dist/ui/drawer/useLayer.svelte.js +33 -0
- package/dist/ui/index.d.ts +4 -12
- package/dist/ui/index.js +4 -12
- package/dist/ui/menu/ContextMenu.svelte +27 -26
- package/dist/ui/menu/ContextMenu.svelte.d.ts +9 -35
- package/dist/ui/menu/DropDown.svelte +44 -26
- package/dist/ui/menu/DropDown.svelte.d.ts +18 -43
- package/dist/ui/menu/DropDownMenu.svelte +51 -41
- package/dist/ui/menu/DropDownMenu.svelte.d.ts +7 -29
- package/dist/ui/menu/dropdown.css +4 -4
- package/dist/ui/menu/index.d.ts +1 -1
- package/dist/ui/menu/index.js +2 -1
- package/dist/ui/mode/ToggleMode.svelte +25 -14
- package/dist/ui/mode/ToggleMode.svelte.d.ts +10 -35
- package/dist/ui/mode/index.d.ts +1 -1
- package/dist/ui/mode/index.js +1 -1
- package/dist/ui/mode/useMode.svelte.d.ts +8 -0
- package/dist/ui/mode/useMode.svelte.js +40 -0
- package/dist/ui/pagination/Pagination.svelte +18 -14
- package/dist/ui/pagination/Pagination.svelte.d.ts +4 -18
- package/dist/ui/range/RangePicker.svelte +3 -2
- package/dist/ui/range/RangePickerButton.svelte +49 -37
- package/dist/ui/range/RangePickerButton.svelte.d.ts +7 -21
- package/dist/ui/range/index.d.ts +1 -1
- package/dist/ui/range/index.js +1 -1
- package/dist/ui/table/Table.svelte +17 -24
- package/dist/ui/table/Table.svelte.d.ts +3 -3
- package/dist/ui/table/TableBody.svelte +1 -1
- package/dist/ui/table/TableBody.svelte.d.ts +1 -1
- package/dist/ui/table/TableFieldsEdition.svelte +90 -78
- package/dist/ui/table/TableFieldsEdition.svelte.d.ts +14 -13
- package/dist/ui/table/TableHead.svelte +1 -1
- package/dist/ui/table/TableViewSelect.svelte +71 -70
- package/dist/ui/table/TableViewSelect.svelte.d.ts +10 -23
- package/dist/ui/table/cell/TableCellArray.svelte +2 -2
- package/dist/ui/table/cell/TableCellBoolean.svelte +3 -4
- package/dist/ui/table/cell/index.d.ts +1 -1
- package/dist/ui/table/cell/index.js +1 -1
- package/dist/ui/table/field.d.ts +7 -7
- package/dist/ui/table/head/OrderButtons.svelte +18 -13
- package/dist/ui/table/head/OrderButtons.svelte.d.ts +11 -23
- package/dist/ui/table/head/TableHeadBoolean.svelte +3 -3
- package/dist/ui/table/head/TableHeadDate.svelte +40 -56
- package/dist/ui/table/head/TableHeadDate.svelte.d.ts +1 -1
- package/dist/ui/table/head/TableHeadDefault.svelte +2 -1
- package/dist/ui/table/head/TableHeadNumber.svelte +93 -108
- package/dist/ui/table/head/TableHeadNumber.svelte.d.ts +13 -10
- package/dist/ui/table/head/TableHeadSelect.svelte +55 -52
- package/dist/ui/table/head/TableHeadSelect.svelte.d.ts +13 -10
- package/dist/ui/table/head/TableHeadString.svelte +28 -34
- package/dist/ui/table/head/index.d.ts +3 -3
- package/dist/ui/table/head/index.js +3 -3
- package/dist/ui/table/index.d.ts +5 -5
- package/dist/ui/table/index.js +4 -5
- package/dist/utils/csv.js +1 -1
- package/dist/utils/eventEmitter.d.ts +2 -2
- package/dist/utils/eventEmitter.js +18 -11
- package/dist/utils/index.d.ts +4 -6
- package/dist/utils/index.js +4 -6
- package/dist/utils/normalizePath.js +1 -1
- package/dist/utils/options.d.ts +6 -5
- package/dist/utils/options.js +3 -2
- package/dist/utils/tippy.d.ts +1 -1
- package/dist/utils/tippy.js +1 -1
- package/dist/validation/index.d.ts +0 -1
- package/dist/validation/index.js +0 -1
- package/dist/validation/zod.d.ts +12 -393
- package/dist/validation/zod.js +22 -82
- package/package.json +115 -134
- package/dist/action/heightScreen.d.ts +0 -10
- package/dist/action/heightScreen.js +0 -24
- package/dist/action/portal.d.ts +0 -3
- package/dist/action/portal.js +0 -9
- package/dist/action/selector.d.ts +0 -15
- package/dist/action/selector.js +0 -71
- package/dist/api/client.d.ts +0 -3
- package/dist/api/client.js +0 -24
- package/dist/api/config.d.ts +0 -46
- package/dist/api/config.js +0 -7
- package/dist/api/index.d.ts +0 -3
- package/dist/api/index.js +0 -3
- package/dist/api/server.d.ts +0 -11
- package/dist/api/server.js +0 -17
- package/dist/private/Meta.svelte +0 -16
- package/dist/private/Meta.svelte.d.ts +0 -30
- package/dist/private/api.d.ts +0 -61
- package/dist/private/api.js +0 -10
- package/dist/private/constant.d.ts +0 -14
- package/dist/private/constant.js +0 -6
- package/dist/private/model.d.ts +0 -70
- package/dist/private/model.js +0 -25
- package/dist/private/prisma.d.ts +0 -2
- package/dist/private/prisma.js +0 -2
- package/dist/private/store.d.ts +0 -1
- package/dist/private/store.js +0 -2
- package/dist/server/auth.d.ts +0 -12
- package/dist/server/auth.js +0 -15
- package/dist/server/formAction.d.ts +0 -13
- package/dist/server/formAction.js +0 -8
- package/dist/server/json.d.ts +0 -1
- package/dist/server/json.js +0 -16
- package/dist/server/parseFormData.d.ts +0 -10
- package/dist/server/parseFormData.js +0 -85
- package/dist/server/try.d.ts +0 -9
- package/dist/server/try.js +0 -41
- package/dist/store/index.d.ts +0 -2
- package/dist/store/index.js +0 -2
- package/dist/store/isSmallScreen.d.ts +0 -1
- package/dist/store/isSmallScreen.js +0 -14
- package/dist/store/param.d.ts +0 -22
- package/dist/store/param.js +0 -61
- package/dist/store/session.d.ts +0 -1
- package/dist/store/session.js +0 -13
- package/dist/ui/badge/Badge.svelte +0 -9
- package/dist/ui/badge/Badge.svelte.d.ts +0 -21
- package/dist/ui/badge/index.d.ts +0 -1
- package/dist/ui/badge/index.js +0 -1
- package/dist/ui/button/ButtonCopy.svelte +0 -59
- package/dist/ui/button/ButtonCopy.svelte.d.ts +0 -27
- package/dist/ui/card/Card.svelte +0 -43
- package/dist/ui/card/Card.svelte.d.ts +0 -41
- package/dist/ui/card/CardBasic.svelte +0 -15
- package/dist/ui/card/CardBasic.svelte.d.ts +0 -31
- package/dist/ui/card/CardCollapse.svelte +0 -71
- package/dist/ui/card/CardCollapse.svelte.d.ts +0 -39
- package/dist/ui/card/CardFullScreen.svelte +0 -31
- package/dist/ui/card/CardFullScreen.svelte.d.ts +0 -38
- package/dist/ui/card/CardLink.svelte +0 -22
- package/dist/ui/card/CardLink.svelte.d.ts +0 -31
- package/dist/ui/card/index.d.ts +0 -5
- package/dist/ui/card/index.js +0 -5
- package/dist/ui/context.d.ts +0 -6
- package/dist/ui/context.js +0 -12
- package/dist/ui/dialog/DialogConfirm.svelte +0 -24
- package/dist/ui/dialog/DialogConfirm.svelte.d.ts +0 -35
- package/dist/ui/drawer/layers.d.ts +0 -7
- package/dist/ui/drawer/layers.js +0 -68
- package/dist/ui/form/Form.svelte +0 -168
- package/dist/ui/form/Form.svelte.d.ts +0 -62
- package/dist/ui/form/FormInput.svelte +0 -15
- package/dist/ui/form/FormSection.svelte +0 -78
- package/dist/ui/form/FormSection.svelte.d.ts +0 -39
- package/dist/ui/form/form.d.ts +0 -37
- package/dist/ui/form/form.js +0 -57
- package/dist/ui/form/formInput.js +0 -33
- package/dist/ui/form/index.d.ts +0 -3
- package/dist/ui/form/index.js +0 -3
- package/dist/ui/icon/Icon.svelte +0 -53
- package/dist/ui/icon/Icon.svelte.d.ts +0 -29
- package/dist/ui/icon/index.d.ts +0 -1
- package/dist/ui/icon/index.js +0 -1
- package/dist/ui/input/FormControl.svelte +0 -77
- package/dist/ui/input/FormControl.svelte.d.ts +0 -34
- package/dist/ui/input/InputBoolean.svelte +0 -33
- package/dist/ui/input/InputBoolean.svelte.d.ts +0 -46
- package/dist/ui/input/InputCheckboxs.svelte +0 -71
- package/dist/ui/input/InputCheckboxs.svelte.d.ts +0 -57
- package/dist/ui/input/InputCheckboxsMenu.svelte +0 -106
- package/dist/ui/input/InputCheckboxsMenu.svelte.d.ts +0 -59
- package/dist/ui/input/InputCheckboxsTree.svelte +0 -18
- package/dist/ui/input/InputCheckboxsTree.svelte.d.ts +0 -25
- package/dist/ui/input/InputCheckboxsTreeNodes.svelte +0 -68
- package/dist/ui/input/InputCheckboxsTreeNodes.svelte.d.ts +0 -27
- package/dist/ui/input/InputCombo.svelte +0 -99
- package/dist/ui/input/InputCombo.svelte.d.ts +0 -59
- package/dist/ui/input/InputDate.svelte +0 -47
- package/dist/ui/input/InputDate.svelte.d.ts +0 -46
- package/dist/ui/input/InputDateTime.svelte +0 -41
- package/dist/ui/input/InputDateTime.svelte.d.ts +0 -23
- package/dist/ui/input/InputImage.svelte +0 -116
- package/dist/ui/input/InputImage.svelte.d.ts +0 -48
- package/dist/ui/input/InputImagePreview.svelte +0 -60
- package/dist/ui/input/InputImagePreview.svelte.d.ts +0 -27
- package/dist/ui/input/InputNumber.svelte +0 -31
- package/dist/ui/input/InputNumber.svelte.d.ts +0 -23
- package/dist/ui/input/InputOptionInParam.svelte +0 -36
- package/dist/ui/input/InputOptionInParam.svelte.d.ts +0 -24
- package/dist/ui/input/InputOptions.svelte +0 -85
- package/dist/ui/input/InputOptions.svelte.d.ts +0 -21
- package/dist/ui/input/InputPassword.svelte +0 -25
- package/dist/ui/input/InputPassword.svelte.d.ts +0 -45
- package/dist/ui/input/InputRadio.svelte +0 -84
- package/dist/ui/input/InputRadio.svelte.d.ts +0 -56
- package/dist/ui/input/InputRelation.svelte +0 -171
- package/dist/ui/input/InputRelation.svelte.d.ts +0 -76
- package/dist/ui/input/InputRelations.svelte +0 -166
- package/dist/ui/input/InputRelations.svelte.d.ts +0 -55
- package/dist/ui/input/InputSearch.svelte +0 -59
- package/dist/ui/input/InputSearch.svelte.d.ts +0 -29
- package/dist/ui/input/InputSelect.svelte +0 -84
- package/dist/ui/input/InputSelect.svelte.d.ts +0 -29
- package/dist/ui/input/InputText.svelte +0 -46
- package/dist/ui/input/InputText.svelte.d.ts +0 -30
- package/dist/ui/input/InputTextarea.svelte +0 -23
- package/dist/ui/input/InputTextarea.svelte.d.ts +0 -23
- package/dist/ui/input/InputTime.svelte +0 -47
- package/dist/ui/input/InputTime.svelte.d.ts +0 -46
- package/dist/ui/input/RelationAfter.svelte +0 -34
- package/dist/ui/input/RelationAfter.svelte.d.ts +0 -26
- package/dist/ui/input/SelectorList.svelte +0 -50
- package/dist/ui/input/SelectorList.svelte.d.ts +0 -49
- package/dist/ui/input/action.d.ts +0 -13
- package/dist/ui/input/action.js +0 -56
- package/dist/ui/input/index.d.ts +0 -26
- package/dist/ui/input/index.js +0 -26
- package/dist/ui/input/textRich/InputTextRich.svelte +0 -72
- package/dist/ui/input/textRich/InputTextRich.svelte.d.ts +0 -48
- package/dist/ui/input/textRich/SuggesionList.svelte +0 -25
- package/dist/ui/input/textRich/SuggesionList.svelte.d.ts +0 -23
- package/dist/ui/input/textRich/ToolMark.svelte +0 -22
- package/dist/ui/input/textRich/ToolMark.svelte.d.ts +0 -25
- package/dist/ui/input/textRich/ToolMarkColor.svelte +0 -36
- package/dist/ui/input/textRich/ToolMarkColor.svelte.d.ts +0 -23
- package/dist/ui/input/textRich/ToolMarkLink.svelte +0 -72
- package/dist/ui/input/textRich/ToolMarkLink.svelte.d.ts +0 -21
- package/dist/ui/input/textRich/ToolMenu.svelte +0 -66
- package/dist/ui/input/textRich/ToolMenu.svelte.d.ts +0 -33
- package/dist/ui/input/textRich/ToolMenuAlign.svelte +0 -50
- package/dist/ui/input/textRich/ToolMenuAlign.svelte.d.ts +0 -21
- package/dist/ui/input/textRich/ToolMenuInsert.svelte +0 -54
- package/dist/ui/input/textRich/ToolMenuInsert.svelte.d.ts +0 -23
- package/dist/ui/input/textRich/ToolMenuNode.svelte +0 -60
- package/dist/ui/input/textRich/ToolMenuNode.svelte.d.ts +0 -21
- package/dist/ui/input/textRich/ToolsBar.svelte +0 -61
- package/dist/ui/input/textRich/ToolsBar.svelte.d.ts +0 -24
- package/dist/ui/input/textRich/extensions.d.ts +0 -2
- package/dist/ui/input/textRich/extensions.js +0 -62
- package/dist/ui/input/textRich/indent.d.ts +0 -13
- package/dist/ui/input/textRich/indent.js +0 -112
- package/dist/ui/input/textRich/index.d.ts +0 -3
- package/dist/ui/input/textRich/index.js +0 -3
- package/dist/ui/input/textRich/suggestion.d.ts +0 -7
- package/dist/ui/input/textRich/suggestion.js +0 -55
- package/dist/ui/input/textRich/tiptapParser.d.ts +0 -4
- package/dist/ui/input/textRich/tiptapParser.js +0 -29
- package/dist/ui/input/types.d.ts +0 -15
- package/dist/ui/input/types.js +0 -1
- package/dist/ui/login/Login.svelte +0 -99
- package/dist/ui/login/Login.svelte.d.ts +0 -20
- package/dist/ui/login/index.d.ts +0 -1
- package/dist/ui/login/index.js +0 -1
- package/dist/ui/placeholder/Placeholder.svelte +0 -12
- package/dist/ui/placeholder/Placeholder.svelte.d.ts +0 -30
- package/dist/ui/placeholder/PlaceholderImage.svelte +0 -16
- package/dist/ui/placeholder/PlaceholderImage.svelte.d.ts +0 -30
- package/dist/ui/placeholder/index.d.ts +0 -2
- package/dist/ui/placeholder/index.js +0 -2
- package/dist/ui/table/type.d.ts +0 -2
- package/dist/ui/tabs/Tabs.svelte +0 -32
- package/dist/ui/tabs/Tabs.svelte.d.ts +0 -22
- package/dist/ui/tabs/TabsIcon.svelte +0 -60
- package/dist/ui/tabs/TabsIcon.svelte.d.ts +0 -24
- package/dist/ui/tabs/index.d.ts +0 -8
- package/dist/ui/tabs/index.js +0 -2
- package/dist/utils/avatar.d.ts +0 -1
- package/dist/utils/avatar.js +0 -5
- package/dist/utils/component.d.ts +0 -6
- package/dist/utils/component.js +0 -3
- package/dist/validation/form.d.ts +0 -34
- package/dist/validation/form.js +0 -103
- /package/dist/{ui/table → input}/type.js +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const Login: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
-
onSuccess?: ((action: URL, data?: Record<string, unknown> | undefined) => any) | undefined;
|
|
16
|
-
}, {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
}, {}, {}, string>;
|
|
19
|
-
type Login = InstanceType<typeof Login>;
|
|
20
|
-
export default Login;
|
package/dist/ui/login/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Login } from './Login.svelte';
|
package/dist/ui/login/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Login } from './Login.svelte';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let klass = ''
|
|
3
|
-
export { klass as class }
|
|
4
|
-
export let style = ''
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<div
|
|
8
|
-
{style}
|
|
9
|
-
class="rounded-box p-2 bg-base-200/40 h-32 grid place-content-center text-base-content/60 {klass}"
|
|
10
|
-
>
|
|
11
|
-
<slot>Aucun élément</slot>
|
|
12
|
-
</div>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
-
default: any;
|
|
16
|
-
} ? Props extends Record<string, never> ? any : {
|
|
17
|
-
children?: any;
|
|
18
|
-
} : {});
|
|
19
|
-
declare const Placeholder: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
-
class?: string;
|
|
21
|
-
style?: string;
|
|
22
|
-
}, {
|
|
23
|
-
default: {};
|
|
24
|
-
}>, {
|
|
25
|
-
[evt: string]: CustomEvent<any>;
|
|
26
|
-
}, {
|
|
27
|
-
default: {};
|
|
28
|
-
}, {}, string>;
|
|
29
|
-
type Placeholder = InstanceType<typeof Placeholder>;
|
|
30
|
-
export default Placeholder;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { mdiPlus } from '@mdi/js'
|
|
3
|
-
import { Icon } from '../icon/index.js'
|
|
4
|
-
|
|
5
|
-
export let x: number
|
|
6
|
-
export let y: number
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<div style:width="{x}px" style:height="{y}px" class="rounded-lg bg-base-200 p-2">
|
|
10
|
-
<div class="grid h-full w-full content-center rounded-md border-4 border-dashed">
|
|
11
|
-
<span class="text-center text-sm font-medium text-base-content/60">
|
|
12
|
-
<slot>Pas d'image</slot>
|
|
13
|
-
</span>
|
|
14
|
-
<Icon path={mdiPlus} size={30} class="fill-base-content/60" />
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
-
default: any;
|
|
16
|
-
} ? Props extends Record<string, never> ? any : {
|
|
17
|
-
children?: any;
|
|
18
|
-
} : {});
|
|
19
|
-
declare const PlaceholderImage: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
-
x: number;
|
|
21
|
-
y: number;
|
|
22
|
-
}, {
|
|
23
|
-
default: {};
|
|
24
|
-
}>, {
|
|
25
|
-
[evt: string]: CustomEvent<any>;
|
|
26
|
-
}, {
|
|
27
|
-
default: {};
|
|
28
|
-
}, {}, string>;
|
|
29
|
-
type PlaceholderImage = InstanceType<typeof PlaceholderImage>;
|
|
30
|
-
export default PlaceholderImage;
|
package/dist/ui/table/type.d.ts
DELETED
package/dist/ui/tabs/Tabs.svelte
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { page } from '$app/stores'
|
|
3
|
-
import type { Tab } from './index.js'
|
|
4
|
-
import { Icon } from '../icon/index.js'
|
|
5
|
-
|
|
6
|
-
export let tabs: Tab[]
|
|
7
|
-
let klass = ''
|
|
8
|
-
export { klass as class }
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div
|
|
12
|
-
class="
|
|
13
|
-
bordered sticky top-0 z-20 flex gap-2 rounded-t-2xl border-b bg-base-100 p-2 shadow-sm
|
|
14
|
-
{klass}
|
|
15
|
-
"
|
|
16
|
-
>
|
|
17
|
-
{#each tabs as tab}
|
|
18
|
-
{@const active = tab.isActive ?? $page.url.pathname.startsWith(tab.href)}
|
|
19
|
-
<a
|
|
20
|
-
href={tab.href}
|
|
21
|
-
data-sveltekit-noscroll
|
|
22
|
-
class="
|
|
23
|
-
menu-item grow flex-col justify-center gap-0 rounded-lg py-2
|
|
24
|
-
text-sm lg:flex-row lg:gap-3 lg:text-base
|
|
25
|
-
"
|
|
26
|
-
class:active
|
|
27
|
-
>
|
|
28
|
-
<Icon path={tab.icon} size={20} class="opacity-70" />
|
|
29
|
-
<span class="hidden whitespace-nowrap sm:block">{tab.label}</span>
|
|
30
|
-
</a>
|
|
31
|
-
{/each}
|
|
32
|
-
</div>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Tab } from './index.js';
|
|
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
|
-
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 Tabs: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
tabs: Tab[];
|
|
17
|
-
class?: string;
|
|
18
|
-
}, {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
}, {}, {}, string>;
|
|
21
|
-
type Tabs = InstanceType<typeof Tabs>;
|
|
22
|
-
export default Tabs;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { page } from '$app/stores'
|
|
3
|
-
import { onMount } from 'svelte'
|
|
4
|
-
|
|
5
|
-
import { urlParam } from '../../store/index.js'
|
|
6
|
-
import { Icon } from '../icon/index.js'
|
|
7
|
-
import { parseOptions, type Options, type Option } from '../../utils/options.js'
|
|
8
|
-
|
|
9
|
-
export let options: Options
|
|
10
|
-
export let showLabel = false
|
|
11
|
-
export let key: string
|
|
12
|
-
export let defaultValue: string | undefined = undefined
|
|
13
|
-
|
|
14
|
-
let _options = getOptions($page.url)
|
|
15
|
-
onMount(() =>
|
|
16
|
-
page.subscribe(({ url }) => {
|
|
17
|
-
_options = getOptions(url)
|
|
18
|
-
})
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
function getOptions(url: URL) {
|
|
22
|
-
return parseOptions(options).map((option) => ({
|
|
23
|
-
...option,
|
|
24
|
-
isActive: getIsActive(option, url)
|
|
25
|
-
}))
|
|
26
|
-
}
|
|
27
|
-
function getIsActive(option: Option, { searchParams }: URL) {
|
|
28
|
-
if (searchParams.get(key) === option.value) return true
|
|
29
|
-
if (!searchParams.has(key)) return option.value === defaultValue
|
|
30
|
-
return false
|
|
31
|
-
}
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<div class="flex items-center gap-[3px] rounded-lg bg-base-200 p-1">
|
|
35
|
-
{#each _options as { value, label, icon, isActive }}
|
|
36
|
-
<a
|
|
37
|
-
href={$urlParam.with({ [key]: value })}
|
|
38
|
-
data-sveltekit-noscroll
|
|
39
|
-
data-sveltekit-replacestate
|
|
40
|
-
class="flex h-6 items-center justify-center gap-2 rounded p-1"
|
|
41
|
-
class:px-2={showLabel}
|
|
42
|
-
class:w-6={icon && !showLabel}
|
|
43
|
-
class:whitespace-nowrap={showLabel}
|
|
44
|
-
class:bg-base-100={isActive}
|
|
45
|
-
class:shadow={isActive}
|
|
46
|
-
>
|
|
47
|
-
{#if icon}
|
|
48
|
-
<Icon
|
|
49
|
-
path={icon}
|
|
50
|
-
title={showLabel ? '' : label}
|
|
51
|
-
size={18}
|
|
52
|
-
class={isActive ? '' : 'opacity-60'}
|
|
53
|
-
/>
|
|
54
|
-
{/if}
|
|
55
|
-
{#if !icon || showLabel}
|
|
56
|
-
<span class="text-sm font-medium opacity-80">{label}</span>
|
|
57
|
-
{/if}
|
|
58
|
-
</a>
|
|
59
|
-
{/each}
|
|
60
|
-
</div>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type Options } from '../../utils/options.js';
|
|
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
|
-
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 TabsIcon: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
options: Options;
|
|
17
|
-
showLabel?: boolean;
|
|
18
|
-
key: string;
|
|
19
|
-
defaultValue?: string | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
[evt: string]: CustomEvent<any>;
|
|
22
|
-
}, {}, {}, string>;
|
|
23
|
-
type TabsIcon = InstanceType<typeof TabsIcon>;
|
|
24
|
-
export default TabsIcon;
|
package/dist/ui/tabs/index.d.ts
DELETED
package/dist/ui/tabs/index.js
DELETED
package/dist/utils/avatar.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function createAvatarPlaceholder(): string;
|
package/dist/utils/avatar.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, ComponentType } from 'svelte';
|
|
2
|
-
export type ComponentAndProps = {
|
|
3
|
-
component: ComponentType;
|
|
4
|
-
props: ComponentProps<InstanceType<ComponentType>>;
|
|
5
|
-
};
|
|
6
|
-
export declare function component<Component extends ComponentType>(component: Component, props: ComponentProps<InstanceType<Component>>): ComponentAndProps;
|
package/dist/utils/component.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { SubmitFunction } from '@sveltejs/kit';
|
|
2
|
-
export type SetError = {
|
|
3
|
-
[key: string]: (err: string) => void;
|
|
4
|
-
};
|
|
5
|
-
export type FormContext = {
|
|
6
|
-
setError: SetError;
|
|
7
|
-
};
|
|
8
|
-
export declare const formContext: {
|
|
9
|
-
get: () => FormContext;
|
|
10
|
-
};
|
|
11
|
-
type MaybePromise<T> = T | Promise<T>;
|
|
12
|
-
type SuccessMessage = false | string | ((action: URL) => string);
|
|
13
|
-
type BooleanOrFunction = boolean | ((action: URL) => boolean);
|
|
14
|
-
export type UseFormOptions<ReturnData> = {
|
|
15
|
-
onSubmit?: (...args: Parameters<SubmitFunction>) => MaybePromise<any>;
|
|
16
|
-
onSuccess?: (action: URL, data?: ReturnData) => MaybePromise<any>;
|
|
17
|
-
onResetError?: () => unknown;
|
|
18
|
-
onError?: (err: any) => MaybePromise<unknown>;
|
|
19
|
-
onFail?: (failure: Record<string, any> | undefined) => MaybePromise<unknown>;
|
|
20
|
-
successUpdate?: BooleanOrFunction;
|
|
21
|
-
successReset?: BooleanOrFunction;
|
|
22
|
-
successMessage?: SuccessMessage;
|
|
23
|
-
submitOnChange?: boolean;
|
|
24
|
-
};
|
|
25
|
-
export declare function useForm<ReturnData extends Record<string, unknown>>({ onSubmit, onSuccess, onResetError, onError, onFail, successUpdate, successReset, successMessage }?: UseFormOptions<ReturnData>): {
|
|
26
|
-
enhance: (form: HTMLFormElement) => {
|
|
27
|
-
destroy(): void;
|
|
28
|
-
};
|
|
29
|
-
submit: SubmitFunction<ReturnData>;
|
|
30
|
-
isLoading: import("svelte/store").Writable<boolean>;
|
|
31
|
-
resetErrors: () => Promise<void>;
|
|
32
|
-
setError(key: string, value: string): void;
|
|
33
|
-
};
|
|
34
|
-
export {};
|
package/dist/validation/form.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { setContext, getContext, hasContext } from 'svelte';
|
|
2
|
-
import { toast } from 'svelte-sonner';
|
|
3
|
-
import { enhance } from '$app/forms';
|
|
4
|
-
import { goto } from '$app/navigation';
|
|
5
|
-
import { writable } from 'svelte/store';
|
|
6
|
-
const formContextKey = {};
|
|
7
|
-
export const formContext = {
|
|
8
|
-
get: () => {
|
|
9
|
-
if (hasContext(formContextKey))
|
|
10
|
-
return getContext(formContextKey);
|
|
11
|
-
return setContext(formContextKey, { setError: {} });
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
export function useForm({ onSubmit, onSuccess, onResetError, onError, onFail, successUpdate = true, successReset = true, successMessage = 'Succès' } = {}) {
|
|
15
|
-
const { setError } = formContext.get();
|
|
16
|
-
const isLoading = writable(false);
|
|
17
|
-
async function resetErrors() {
|
|
18
|
-
for (const key in setError)
|
|
19
|
-
setError[key]('');
|
|
20
|
-
if (onResetError)
|
|
21
|
-
onResetError();
|
|
22
|
-
}
|
|
23
|
-
function handleFailure({ issues, message }) {
|
|
24
|
-
resetErrors();
|
|
25
|
-
if (issues) {
|
|
26
|
-
issues.forEach((issue) => {
|
|
27
|
-
const key = issue.path.join('.');
|
|
28
|
-
if (!setError[key]) {
|
|
29
|
-
toast.warning(`[${issue.code}] ${key} receive "${issue.received}" instead "${issue.expected}"`);
|
|
30
|
-
console.warn('Error not visible', issue);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
setError[key](issue.message);
|
|
34
|
-
});
|
|
35
|
-
const issuesKeys = issues
|
|
36
|
-
.map(({ path }) => path.join('.'))
|
|
37
|
-
.filter((k, i, self) => self.indexOf(k) === i);
|
|
38
|
-
toast.warning('Invalid form', { description: issuesKeys.join(', ') });
|
|
39
|
-
}
|
|
40
|
-
if (message) {
|
|
41
|
-
toast.warning(message);
|
|
42
|
-
console.warn(message);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
const submit = async (event) => {
|
|
46
|
-
isLoading.set(true);
|
|
47
|
-
if (onSubmit)
|
|
48
|
-
await onSubmit(event);
|
|
49
|
-
event.submitter?.classList.add('btn-disabled');
|
|
50
|
-
return async ({ result, update, action }) => {
|
|
51
|
-
isLoading.set(false);
|
|
52
|
-
event.submitter?.classList.remove('btn-disabled');
|
|
53
|
-
if (result.type === 'error') {
|
|
54
|
-
if (onError)
|
|
55
|
-
await onError(result.error.message);
|
|
56
|
-
const { message } = result.error;
|
|
57
|
-
toast.error(message || 'Erreur');
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
if (result.type === 'failure') {
|
|
61
|
-
if (onFail)
|
|
62
|
-
await onFail(result.data);
|
|
63
|
-
if (result.data)
|
|
64
|
-
handleFailure(result.data);
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
function getValue(valueOrFunction) {
|
|
68
|
-
if (typeof valueOrFunction === 'function')
|
|
69
|
-
return valueOrFunction(action);
|
|
70
|
-
return valueOrFunction;
|
|
71
|
-
}
|
|
72
|
-
if (result.type === 'success') {
|
|
73
|
-
if (successMessage !== false)
|
|
74
|
-
toast.success(getValue(successMessage));
|
|
75
|
-
if (successUpdate)
|
|
76
|
-
await update({ reset: getValue(successReset) });
|
|
77
|
-
if (onSuccess)
|
|
78
|
-
await onSuccess(action, result.data);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
if (result.type === 'redirect') {
|
|
82
|
-
if (successMessage !== false)
|
|
83
|
-
toast.success(getValue(successMessage));
|
|
84
|
-
await goto(result.location, { replaceState: true, invalidateAll: getValue(successUpdate) });
|
|
85
|
-
if (onSuccess)
|
|
86
|
-
await onSuccess(action);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
return {
|
|
91
|
-
enhance: (form) => enhance(form, submit),
|
|
92
|
-
submit,
|
|
93
|
-
isLoading,
|
|
94
|
-
resetErrors,
|
|
95
|
-
setError(key, value) {
|
|
96
|
-
if (!setError[key]) {
|
|
97
|
-
console.warn(`Error setter for field "${key}" not exist`);
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
setError[key](value);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
}
|
|
File without changes
|