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,55 +0,0 @@
|
|
|
1
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
2
|
-
import { type Snippet } from 'svelte';
|
|
3
|
-
import type { SnippetLike } from '../table/type.js';
|
|
4
|
-
declare class __sveltets_Render<RelationItem extends {
|
|
5
|
-
id: string | number;
|
|
6
|
-
}> {
|
|
7
|
-
props(): {
|
|
8
|
-
key?: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
search: (q: string) => Promise<RelationItem[]>;
|
|
11
|
-
createUrl?: string;
|
|
12
|
-
createTitle?: string;
|
|
13
|
-
createIcon?: string | undefined;
|
|
14
|
-
error?: string;
|
|
15
|
-
placeholder?: string;
|
|
16
|
-
flatMode?: boolean;
|
|
17
|
-
slotItem: SnippetLike<[RelationItem]>;
|
|
18
|
-
slotSuggestion?: SnippetLike<[RelationItem]> | undefined;
|
|
19
|
-
input?: HTMLInputAttributes | undefined;
|
|
20
|
-
append?: Snippet | undefined;
|
|
21
|
-
debounceMs?: number;
|
|
22
|
-
class?: string;
|
|
23
|
-
classList?: string;
|
|
24
|
-
value?: RelationItem[] | null | undefined;
|
|
25
|
-
};
|
|
26
|
-
events(): {
|
|
27
|
-
input: CustomEvent<{
|
|
28
|
-
value: (string | number)[];
|
|
29
|
-
items: RelationItem[];
|
|
30
|
-
}>;
|
|
31
|
-
} & {
|
|
32
|
-
[evt: string]: CustomEvent<any>;
|
|
33
|
-
};
|
|
34
|
-
slots(): {};
|
|
35
|
-
bindings(): string;
|
|
36
|
-
exports(): {};
|
|
37
|
-
}
|
|
38
|
-
interface $$IsomorphicComponent {
|
|
39
|
-
new <RelationItem extends {
|
|
40
|
-
id: string | number;
|
|
41
|
-
}>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<RelationItem>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<RelationItem>['props']>, ReturnType<__sveltets_Render<RelationItem>['events']>, ReturnType<__sveltets_Render<RelationItem>['slots']>> & {
|
|
42
|
-
$$bindings?: ReturnType<__sveltets_Render<RelationItem>['bindings']>;
|
|
43
|
-
} & ReturnType<__sveltets_Render<RelationItem>['exports']>;
|
|
44
|
-
<RelationItem extends {
|
|
45
|
-
id: string | number;
|
|
46
|
-
}>(internal: unknown, props: ReturnType<__sveltets_Render<RelationItem>['props']> & {
|
|
47
|
-
$$events?: ReturnType<__sveltets_Render<RelationItem>['events']>;
|
|
48
|
-
}): ReturnType<__sveltets_Render<RelationItem>['exports']>;
|
|
49
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
50
|
-
}
|
|
51
|
-
declare const InputRelations: $$IsomorphicComponent;
|
|
52
|
-
type InputRelations<RelationItem extends {
|
|
53
|
-
id: string | number;
|
|
54
|
-
}> = InstanceType<typeof InputRelations<RelationItem>>;
|
|
55
|
-
export default InputRelations;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { mdiClose } from '@mdi/js'
|
|
3
|
-
import { browser } from '$app/environment'
|
|
4
|
-
import { page } from '$app/state'
|
|
5
|
-
import { Icon } from '../icon/index.js'
|
|
6
|
-
import { InputText } from './index.js'
|
|
7
|
-
|
|
8
|
-
let {
|
|
9
|
-
class: klass = '',
|
|
10
|
-
key = 'search',
|
|
11
|
-
value = page.url.searchParams.get(key) || '',
|
|
12
|
-
oninput,
|
|
13
|
-
onclear,
|
|
14
|
-
onkeydown
|
|
15
|
-
}: {
|
|
16
|
-
class?: string
|
|
17
|
-
key?: string
|
|
18
|
-
value?: string
|
|
19
|
-
oninput?: (value: string) => void
|
|
20
|
-
onclear?: () => void
|
|
21
|
-
onkeydown?: (event: KeyboardEvent) => void
|
|
22
|
-
} = $props()
|
|
23
|
-
|
|
24
|
-
let inputElement = $state<HTMLInputElement>()
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<InputText
|
|
28
|
-
{key}
|
|
29
|
-
bind:inputElement
|
|
30
|
-
bind:value
|
|
31
|
-
on:blur
|
|
32
|
-
on:input={() => oninput?.(value)}
|
|
33
|
-
on:keydown={(e) => onkeydown?.(e)}
|
|
34
|
-
on:keyup
|
|
35
|
-
bindWithParams
|
|
36
|
-
input={{
|
|
37
|
-
class: 'input-sm pr-8',
|
|
38
|
-
placeholder: 'Recherche',
|
|
39
|
-
autocomplete: 'off',
|
|
40
|
-
inputmode: 'search'
|
|
41
|
-
}}
|
|
42
|
-
classWrapper="relative {klass}"
|
|
43
|
-
>
|
|
44
|
-
{#snippet append()}
|
|
45
|
-
<button
|
|
46
|
-
class="btn btn-square btn-sm absolute right-0"
|
|
47
|
-
class:hidden={!browser}
|
|
48
|
-
style:scale={!!value ? 0.75 : 0}
|
|
49
|
-
onclick={() => {
|
|
50
|
-
value = ''
|
|
51
|
-
oninput?.(value)
|
|
52
|
-
onclear?.()
|
|
53
|
-
}}
|
|
54
|
-
tabindex={!!value ? 0 : -1}
|
|
55
|
-
>
|
|
56
|
-
<Icon path={mdiClose} />
|
|
57
|
-
</button>
|
|
58
|
-
{/snippet}
|
|
59
|
-
</InputText>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
type $$ComponentProps = {
|
|
2
|
-
class?: string;
|
|
3
|
-
key?: string;
|
|
4
|
-
value?: string;
|
|
5
|
-
oninput?: (value: string) => void;
|
|
6
|
-
onclear?: () => void;
|
|
7
|
-
onkeydown?: (event: KeyboardEvent) => void;
|
|
8
|
-
};
|
|
9
|
-
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> {
|
|
10
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
11
|
-
$$bindings?: Bindings;
|
|
12
|
-
} & Exports;
|
|
13
|
-
(internal: unknown, props: Props & {
|
|
14
|
-
$$events?: Events;
|
|
15
|
-
$$slots?: Slots;
|
|
16
|
-
}): Exports & {
|
|
17
|
-
$set?: any;
|
|
18
|
-
$on?: any;
|
|
19
|
-
};
|
|
20
|
-
z_$$bindings?: Bindings;
|
|
21
|
-
}
|
|
22
|
-
declare const InputSearch: $$__sveltets_2_IsomorphicComponent<$$ComponentProps, {
|
|
23
|
-
blur: FocusEvent;
|
|
24
|
-
keyup: KeyboardEvent;
|
|
25
|
-
} & {
|
|
26
|
-
[evt: string]: CustomEvent<any>;
|
|
27
|
-
}, {}, {}, "">;
|
|
28
|
-
type InputSearch = InstanceType<typeof InputSearch>;
|
|
29
|
-
export default InputSearch;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { createEventDispatcher, onMount } from 'svelte'
|
|
3
|
-
import { mdiUnfoldMoreHorizontal } from '@mdi/js'
|
|
4
|
-
|
|
5
|
-
import { Icon } from '../icon/index.js'
|
|
6
|
-
import { DropDown } from '../menu/index.js'
|
|
7
|
-
import { SelectorList, FormControl, type InputProps } from './index.js'
|
|
8
|
-
|
|
9
|
-
import { type Options, parseOptions } from '../../utils/options.js'
|
|
10
|
-
import type { TippyProps } from '../../utils/tippy.js'
|
|
11
|
-
|
|
12
|
-
type $$Props = Omit<InputProps, 'input' | 'inputElement'> & {
|
|
13
|
-
options: Options
|
|
14
|
-
tippyProps?: TippyProps
|
|
15
|
-
placeholder?: string
|
|
16
|
-
disabled?: boolean
|
|
17
|
-
}
|
|
18
|
-
$: ({ value: _value, options, tippyProps, placeholder, disabled, ...props } = $$props as $$Props)
|
|
19
|
-
export let value = _value
|
|
20
|
-
|
|
21
|
-
$: _options = parseOptions(options)
|
|
22
|
-
$: selectedOption = _options.find((opt) => opt.value === value)
|
|
23
|
-
|
|
24
|
-
let dropDown: DropDown
|
|
25
|
-
let button: HTMLButtonElement
|
|
26
|
-
const dispatch = createEventDispatcher<{ input: string; select: string }>()
|
|
27
|
-
|
|
28
|
-
let focusIndex = 0
|
|
29
|
-
onMount(() => {
|
|
30
|
-
const index = _options.findIndex((opt) => opt.value === value)
|
|
31
|
-
focusIndex = index === -1 ? 0 : index
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
function onSelect(index: number) {
|
|
35
|
-
focusIndex = index
|
|
36
|
-
value = _options[index].value
|
|
37
|
-
dispatch('input', value)
|
|
38
|
-
dispatch('select', value)
|
|
39
|
-
dropDown.hide()
|
|
40
|
-
}
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<DropDown bind:this={dropDown}>
|
|
44
|
-
<svelte:fragment slot="activator">
|
|
45
|
-
<FormControl {...props}>
|
|
46
|
-
{#snippet children({ key })}
|
|
47
|
-
<button
|
|
48
|
-
bind:this={button}
|
|
49
|
-
id={key}
|
|
50
|
-
{disabled}
|
|
51
|
-
type="button"
|
|
52
|
-
class="input flex grow items-center pr-2"
|
|
53
|
-
>
|
|
54
|
-
{#if selectedOption}
|
|
55
|
-
{#if selectedOption.icon}
|
|
56
|
-
<Icon path={selectedOption.icon} size={21} class="opacity-70" />
|
|
57
|
-
{/if}
|
|
58
|
-
<span>{selectedOption.label}</span>
|
|
59
|
-
{:else if placeholder}
|
|
60
|
-
<span class="opacity-60">{placeholder}</span>
|
|
61
|
-
{/if}
|
|
62
|
-
<Icon class="ml-auto" path={mdiUnfoldMoreHorizontal} size={18} />
|
|
63
|
-
</button>
|
|
64
|
-
{#if value !== undefined}
|
|
65
|
-
<input type="hidden" name={key} {value} />
|
|
66
|
-
{/if}
|
|
67
|
-
{/snippet}
|
|
68
|
-
</FormControl>
|
|
69
|
-
</svelte:fragment>
|
|
70
|
-
|
|
71
|
-
<SelectorList
|
|
72
|
-
trigger={button}
|
|
73
|
-
{focusIndex}
|
|
74
|
-
items={_options.map((opt) => ({ id: opt.value, ...opt })).filter((opt) => !opt.disable)}
|
|
75
|
-
let:item
|
|
76
|
-
on:select={({ detail }) => onSelect(detail)}
|
|
77
|
-
class="w-full"
|
|
78
|
-
>
|
|
79
|
-
{#if item.icon}
|
|
80
|
-
<Icon path={item.icon} size={18} class="opacity-70" />
|
|
81
|
-
{/if}
|
|
82
|
-
<span class="pr-4 whitespace-nowrap">{item.label}</span>
|
|
83
|
-
</SelectorList>
|
|
84
|
-
</DropDown>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type InputProps } from './index.js';
|
|
2
|
-
import { type Options } from '../../utils/options.js';
|
|
3
|
-
import type { TippyProps } from '../../utils/tippy.js';
|
|
4
|
-
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> {
|
|
5
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
6
|
-
$$bindings?: Bindings;
|
|
7
|
-
} & Exports;
|
|
8
|
-
(internal: unknown, props: Props & {
|
|
9
|
-
$$events?: Events;
|
|
10
|
-
$$slots?: Slots;
|
|
11
|
-
}): Exports & {
|
|
12
|
-
$set?: any;
|
|
13
|
-
$on?: any;
|
|
14
|
-
};
|
|
15
|
-
z_$$bindings?: Bindings;
|
|
16
|
-
}
|
|
17
|
-
declare const InputSelect: $$__sveltets_2_IsomorphicComponent<Omit<InputProps, "input" | "inputElement"> & {
|
|
18
|
-
options: Options;
|
|
19
|
-
tippyProps?: TippyProps;
|
|
20
|
-
placeholder?: string;
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
}, {
|
|
23
|
-
input: CustomEvent<string>;
|
|
24
|
-
select: CustomEvent<string>;
|
|
25
|
-
} & {
|
|
26
|
-
[evt: string]: CustomEvent<any>;
|
|
27
|
-
}, {}, {}, string>;
|
|
28
|
-
type InputSelect = InstanceType<typeof InputSelect>;
|
|
29
|
-
export default InputSelect;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte'
|
|
3
|
-
import { FormControl, bindValueWithParams, type InputProps } from './index.js'
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
input,
|
|
7
|
-
value = $bindable(),
|
|
8
|
-
classWrapper,
|
|
9
|
-
bindWithParams,
|
|
10
|
-
inputElement = $bindable(),
|
|
11
|
-
prepend,
|
|
12
|
-
append,
|
|
13
|
-
...controlProps
|
|
14
|
-
}: InputProps & {
|
|
15
|
-
prepend?: Snippet<[value: string | null | undefined]>
|
|
16
|
-
append?: Snippet<[value: string | null | undefined]>
|
|
17
|
-
} = $props()
|
|
18
|
-
|
|
19
|
-
let inputProps = $derived({
|
|
20
|
-
...input,
|
|
21
|
-
class: `input input-bordered w-full ${input?.class || ''}`
|
|
22
|
-
})
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<FormControl {...controlProps} enhanceDisabled={controlProps.enhanceDisabled || bindWithParams}>
|
|
26
|
-
{#snippet children({ key })}
|
|
27
|
-
<div class={classWrapper}>
|
|
28
|
-
{@render prepend?.(value)}
|
|
29
|
-
<input
|
|
30
|
-
bind:value
|
|
31
|
-
on:input
|
|
32
|
-
on:focus
|
|
33
|
-
on:blur
|
|
34
|
-
on:keydown
|
|
35
|
-
on:keyup
|
|
36
|
-
bind:this={inputElement}
|
|
37
|
-
use:bindValueWithParams={{ bindEnable: bindWithParams, initValue: (v) => (value = v) }}
|
|
38
|
-
type="text"
|
|
39
|
-
name={key}
|
|
40
|
-
id={key}
|
|
41
|
-
{...inputProps}
|
|
42
|
-
/>
|
|
43
|
-
{@render append?.(value)}
|
|
44
|
-
</div>
|
|
45
|
-
{/snippet}
|
|
46
|
-
</FormControl>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
import { type InputProps } from './index.js';
|
|
3
|
-
type $$ComponentProps = InputProps & {
|
|
4
|
-
prepend?: Snippet<[value: string | null | undefined]>;
|
|
5
|
-
append?: Snippet<[value: string | null | undefined]>;
|
|
6
|
-
};
|
|
7
|
-
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> {
|
|
8
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
9
|
-
$$bindings?: Bindings;
|
|
10
|
-
} & Exports;
|
|
11
|
-
(internal: unknown, props: Props & {
|
|
12
|
-
$$events?: Events;
|
|
13
|
-
$$slots?: Slots;
|
|
14
|
-
}): Exports & {
|
|
15
|
-
$set?: any;
|
|
16
|
-
$on?: any;
|
|
17
|
-
};
|
|
18
|
-
z_$$bindings?: Bindings;
|
|
19
|
-
}
|
|
20
|
-
declare const InputText: $$__sveltets_2_IsomorphicComponent<$$ComponentProps, {
|
|
21
|
-
input: Event;
|
|
22
|
-
focus: FocusEvent;
|
|
23
|
-
blur: FocusEvent;
|
|
24
|
-
keydown: KeyboardEvent;
|
|
25
|
-
keyup: KeyboardEvent;
|
|
26
|
-
} & {
|
|
27
|
-
[evt: string]: CustomEvent<any>;
|
|
28
|
-
}, {}, {}, "value" | "inputElement">;
|
|
29
|
-
type InputText = InstanceType<typeof InputText>;
|
|
30
|
-
export default InputText;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { FormControl, type TextareaProps } from './index.js'
|
|
3
|
-
type $$Props = TextareaProps
|
|
4
|
-
$: ({ textarea, value: _value, ...props } = $$props as $$Props)
|
|
5
|
-
$: ({ class: inputClass, ...inputProps } = textarea || {})
|
|
6
|
-
export let value = _value
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<FormControl {...props}>
|
|
10
|
-
{#snippet children({ key })}
|
|
11
|
-
<textarea
|
|
12
|
-
bind:value
|
|
13
|
-
on:input
|
|
14
|
-
on:focus
|
|
15
|
-
on:blur
|
|
16
|
-
name={key}
|
|
17
|
-
id={key}
|
|
18
|
-
class="textarea textarea-bordered {inputClass || ''}"
|
|
19
|
-
rows="4"
|
|
20
|
-
{...inputProps}
|
|
21
|
-
></textarea>
|
|
22
|
-
{/snippet}
|
|
23
|
-
</FormControl>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type TextareaProps } 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 InputTextarea: $$__sveltets_2_IsomorphicComponent<TextareaProps, {
|
|
16
|
-
input: Event;
|
|
17
|
-
focus: FocusEvent;
|
|
18
|
-
blur: FocusEvent;
|
|
19
|
-
} & {
|
|
20
|
-
[evt: string]: CustomEvent<any>;
|
|
21
|
-
}, {}, {}, string>;
|
|
22
|
-
type InputTextarea = InstanceType<typeof InputTextarea>;
|
|
23
|
-
export default InputTextarea;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { createEventDispatcher } from 'svelte'
|
|
3
|
-
import type { HTMLInputAttributes, FormEventHandler } from 'svelte/elements'
|
|
4
|
-
import { FormControl, type InputProps } from './index.js'
|
|
5
|
-
import dayjs from 'dayjs'
|
|
6
|
-
type $$Props = InputProps<Date> & { getDefaultDate?: () => Date }
|
|
7
|
-
|
|
8
|
-
export let value: Date | null | undefined = undefined
|
|
9
|
-
export let input: HTMLInputAttributes = {}
|
|
10
|
-
export let getDefaultDate = () => new Date(0)
|
|
11
|
-
|
|
12
|
-
$: ({ class: inputClass = '', ...inputProps } = input)
|
|
13
|
-
|
|
14
|
-
const dispatch = createEventDispatcher<{ input: Date | null }>()
|
|
15
|
-
|
|
16
|
-
const onInput: FormEventHandler<HTMLInputElement> = ({ currentTarget }) => {
|
|
17
|
-
value = getDateTime(currentTarget.value)
|
|
18
|
-
dispatch('input', value)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function getDateTime(v: string | null | undefined): Date | null | undefined {
|
|
22
|
-
if (!v) return value
|
|
23
|
-
const date = value ? new Date(value) : getDefaultDate()
|
|
24
|
-
const dateString = [
|
|
25
|
-
date.getFullYear().toString(),
|
|
26
|
-
(date.getMonth() + 1).toString().padStart(2, '0'),
|
|
27
|
-
date.getDate().toString().padStart(2, '0')
|
|
28
|
-
].join('-')
|
|
29
|
-
return new Date(`${dateString}T${v}`)
|
|
30
|
-
}
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<FormControl {...$$restProps}>
|
|
34
|
-
{#snippet children({ key })}
|
|
35
|
-
<input
|
|
36
|
-
value={value && dayjs(value).format('HH:mm')}
|
|
37
|
-
on:input={onInput}
|
|
38
|
-
on:focus
|
|
39
|
-
on:blur
|
|
40
|
-
type="time"
|
|
41
|
-
name={key}
|
|
42
|
-
id={key}
|
|
43
|
-
class="input input-bordered {inputClass}"
|
|
44
|
-
{...inputProps}
|
|
45
|
-
/>
|
|
46
|
-
{/snippet}
|
|
47
|
-
</FormControl>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
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 InputTime: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
class?: string;
|
|
17
|
-
classLabel?: string;
|
|
18
|
-
key?: string;
|
|
19
|
-
label?: import("svelte").Snippet | string;
|
|
20
|
-
labelAppend?: import("svelte").Snippet | null;
|
|
21
|
-
error?: string;
|
|
22
|
-
hint?: string;
|
|
23
|
-
prefix?: string | number;
|
|
24
|
-
prefixFor?: string | number;
|
|
25
|
-
enhanceDisabled?: boolean;
|
|
26
|
-
labelPosition?: "top" | "left" | "right";
|
|
27
|
-
children?: import("svelte").Snippet<[{
|
|
28
|
-
key: string;
|
|
29
|
-
}]> | undefined;
|
|
30
|
-
} & {
|
|
31
|
-
input?: HTMLInputAttributes;
|
|
32
|
-
inputElement?: HTMLInputElement;
|
|
33
|
-
classWrapper?: string;
|
|
34
|
-
value?: Date | null | undefined;
|
|
35
|
-
bindWithParams?: boolean;
|
|
36
|
-
} & {
|
|
37
|
-
getDefaultDate?: () => Date;
|
|
38
|
-
}, {
|
|
39
|
-
focus: FocusEvent;
|
|
40
|
-
blur: FocusEvent;
|
|
41
|
-
input: CustomEvent<Date | null>;
|
|
42
|
-
} & {
|
|
43
|
-
[evt: string]: CustomEvent<any>;
|
|
44
|
-
}, {}, {}, string>;
|
|
45
|
-
type InputTime = InstanceType<typeof InputTime>;
|
|
46
|
-
export default InputTime;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { fade } from 'svelte/transition'
|
|
3
|
-
import { createEventDispatcher } from 'svelte'
|
|
4
|
-
import { mdiLoading, mdiPlus } from '@mdi/js'
|
|
5
|
-
|
|
6
|
-
import Icon from '../icon/Icon.svelte'
|
|
7
|
-
|
|
8
|
-
export let isLoading: boolean
|
|
9
|
-
export let createUrl = ''
|
|
10
|
-
export let createTitle = ''
|
|
11
|
-
export let createIcon = mdiPlus
|
|
12
|
-
|
|
13
|
-
const dispatch = createEventDispatcher<{ unselect: void; create: void }>()
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
{#if isLoading}
|
|
17
|
-
<div in:fade|local>
|
|
18
|
-
<Icon
|
|
19
|
-
path={mdiLoading}
|
|
20
|
-
class="w-9"
|
|
21
|
-
classSVG="animate-spin fill-primary-ligther stroke-primary-ligther"
|
|
22
|
-
/>
|
|
23
|
-
</div>
|
|
24
|
-
{:else if createUrl}
|
|
25
|
-
<a
|
|
26
|
-
href={createUrl}
|
|
27
|
-
class="btn btn-square btn-xs"
|
|
28
|
-
in:fade|local={{ duration: 200 }}
|
|
29
|
-
data-sveltekit-noscroll
|
|
30
|
-
data-sveltekit-replacestate
|
|
31
|
-
>
|
|
32
|
-
<Icon path={createIcon} on:click={() => dispatch('create')} title={createTitle} />
|
|
33
|
-
</a>
|
|
34
|
-
{/if}
|
|
@@ -1,26 +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 RelationAfter: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
-
isLoading: boolean;
|
|
16
|
-
createUrl?: string;
|
|
17
|
-
createTitle?: string;
|
|
18
|
-
createIcon?: string;
|
|
19
|
-
}, {
|
|
20
|
-
unselect: CustomEvent<void>;
|
|
21
|
-
create: CustomEvent<void>;
|
|
22
|
-
} & {
|
|
23
|
-
[evt: string]: CustomEvent<any>;
|
|
24
|
-
}, {}, {}, string>;
|
|
25
|
-
type RelationAfter = InstanceType<typeof RelationAfter>;
|
|
26
|
-
export default RelationAfter;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<script lang="ts" generics="Item extends {id: string | number}">
|
|
2
|
-
import { createEventDispatcher } from 'svelte'
|
|
3
|
-
import { selector } from '../../action/selector.js'
|
|
4
|
-
|
|
5
|
-
let klass = ''
|
|
6
|
-
export { klass as class }
|
|
7
|
-
|
|
8
|
-
export let items: Item[]
|
|
9
|
-
export let isError = false
|
|
10
|
-
export let isLoading = false
|
|
11
|
-
export let focusIndex = 0
|
|
12
|
-
export let trigger: HTMLElement | undefined = undefined
|
|
13
|
-
export let keyDownEvent: KeyboardEvent | undefined = undefined
|
|
14
|
-
export let keyDownPreventDefault = true
|
|
15
|
-
|
|
16
|
-
const dispatch = createEventDispatcher<{ select: number }>()
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<ul
|
|
20
|
-
use:selector={{
|
|
21
|
-
trigger,
|
|
22
|
-
focusIndex,
|
|
23
|
-
onSelect: (index) => dispatch('select', index),
|
|
24
|
-
onFocus: (index) => (focusIndex = index),
|
|
25
|
-
keyDownEvent,
|
|
26
|
-
keyDownPreventDefault
|
|
27
|
-
}}
|
|
28
|
-
class="flex flex-col gap-1 {klass}"
|
|
29
|
-
>
|
|
30
|
-
{#if isError}
|
|
31
|
-
<li class="p-2 text-center">Erreur 🥲</li>
|
|
32
|
-
{:else}
|
|
33
|
-
{#each items as item, index (item.id)}
|
|
34
|
-
{@const isFocused = focusIndex === index}
|
|
35
|
-
<li
|
|
36
|
-
role="menuitem"
|
|
37
|
-
on:click={() => dispatch('select', index)}
|
|
38
|
-
on:keydown={() => dispatch('select', index)}
|
|
39
|
-
class="hover:bg-base-200 flex cursor-pointer items-center justify-start gap-3 rounded px-3 py-2"
|
|
40
|
-
class:bg-base-300={isFocused}
|
|
41
|
-
>
|
|
42
|
-
<slot {item} {index} />
|
|
43
|
-
</li>
|
|
44
|
-
{:else}
|
|
45
|
-
<li class="px-3 py-2 rounded opacity-70">
|
|
46
|
-
{isLoading ? 'Chargement...' : 'Aucun élément'}
|
|
47
|
-
</li>
|
|
48
|
-
{/each}
|
|
49
|
-
{/if}
|
|
50
|
-
</ul>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
declare class __sveltets_Render<Item extends {
|
|
2
|
-
id: string | number;
|
|
3
|
-
}> {
|
|
4
|
-
props(): {
|
|
5
|
-
class?: string;
|
|
6
|
-
items: Item[];
|
|
7
|
-
isError?: boolean;
|
|
8
|
-
isLoading?: boolean;
|
|
9
|
-
focusIndex?: number;
|
|
10
|
-
trigger?: HTMLElement | undefined;
|
|
11
|
-
keyDownEvent?: KeyboardEvent | undefined;
|
|
12
|
-
keyDownPreventDefault?: boolean;
|
|
13
|
-
};
|
|
14
|
-
events(): {
|
|
15
|
-
select: CustomEvent<number>;
|
|
16
|
-
} & {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
};
|
|
19
|
-
slots(): {
|
|
20
|
-
default: {
|
|
21
|
-
item: Item;
|
|
22
|
-
index: any;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
bindings(): string;
|
|
26
|
-
exports(): {};
|
|
27
|
-
}
|
|
28
|
-
interface $$IsomorphicComponent {
|
|
29
|
-
new <Item extends {
|
|
30
|
-
id: string | number;
|
|
31
|
-
}>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<Item>['props']> & {
|
|
32
|
-
children?: any;
|
|
33
|
-
}>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<Item>['props']>, ReturnType<__sveltets_Render<Item>['events']>, ReturnType<__sveltets_Render<Item>['slots']>> & {
|
|
34
|
-
$$bindings?: ReturnType<__sveltets_Render<Item>['bindings']>;
|
|
35
|
-
} & ReturnType<__sveltets_Render<Item>['exports']>;
|
|
36
|
-
<Item extends {
|
|
37
|
-
id: string | number;
|
|
38
|
-
}>(internal: unknown, props: ReturnType<__sveltets_Render<Item>['props']> & {
|
|
39
|
-
$$events?: ReturnType<__sveltets_Render<Item>['events']>;
|
|
40
|
-
$$slots?: ReturnType<__sveltets_Render<Item>['slots']>;
|
|
41
|
-
children?: any;
|
|
42
|
-
}): ReturnType<__sveltets_Render<Item>['exports']>;
|
|
43
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
44
|
-
}
|
|
45
|
-
declare const SelectorList: $$IsomorphicComponent;
|
|
46
|
-
type SelectorList<Item extends {
|
|
47
|
-
id: string | number;
|
|
48
|
-
}> = InstanceType<typeof SelectorList<Item>>;
|
|
49
|
-
export default SelectorList;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type BindOptions = {
|
|
2
|
-
bindEnable?: boolean;
|
|
3
|
-
listenerType?: 'input' | 'click';
|
|
4
|
-
debounceTime?: number;
|
|
5
|
-
initValue?: (initalValue: string) => unknown;
|
|
6
|
-
};
|
|
7
|
-
export declare function bindValueWithParams(node: HTMLInputElement | HTMLButtonElement, { bindEnable, debounceTime, initValue, listenerType }: BindOptions): {
|
|
8
|
-
destroy(): void;
|
|
9
|
-
} | undefined;
|
|
10
|
-
export declare function bindCheckedWithParams(node: HTMLInputElement, { bindEnable, listenerType, debounceTime, initValue }: BindOptions): {
|
|
11
|
-
destroy: () => void;
|
|
12
|
-
} | undefined;
|
|
13
|
-
export {};
|