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,14 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { page } from '$app/stores'
|
|
5
|
-
import { enhance } from '$app/forms'
|
|
2
|
+
import { ChevronDownIcon, PlusIcon, SaveIcon } from '@lucide/svelte'
|
|
3
|
+
import { page } from '$app/state'
|
|
6
4
|
|
|
7
|
-
import { Icon } from '../icon/index.js'
|
|
8
5
|
import { Dialog } from '../dialog/index.js'
|
|
9
6
|
import { DropDown } from '../menu/index.js'
|
|
10
|
-
|
|
11
|
-
import {
|
|
7
|
+
|
|
8
|
+
// import { InputText } from '../input/index.js';
|
|
9
|
+
// import { useForm } from '../../validation/form.jss';
|
|
12
10
|
|
|
13
11
|
type View = {
|
|
14
12
|
id: string
|
|
@@ -16,70 +14,73 @@
|
|
|
16
14
|
query: string
|
|
17
15
|
}
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
function getQuery({ searchParams }: URL) {
|
|
46
|
-
const searchParam = new URLSearchParams(searchParams)
|
|
17
|
+
let {
|
|
18
|
+
key,
|
|
19
|
+
views,
|
|
20
|
+
action = '',
|
|
21
|
+
actionCreate = '?/view_create',
|
|
22
|
+
actionUpdate = '?/view_update',
|
|
23
|
+
actionDelete = '?/view_delete'
|
|
24
|
+
}: {
|
|
25
|
+
key: string
|
|
26
|
+
views: View[]
|
|
27
|
+
action?: string
|
|
28
|
+
actionCreate?: string
|
|
29
|
+
actionUpdate?: string
|
|
30
|
+
actionDelete?: string
|
|
31
|
+
} = $props()
|
|
32
|
+
|
|
33
|
+
let dialog = $state<HTMLDialogElement>()
|
|
34
|
+
// const form = useForm({
|
|
35
|
+
// onSuccess() {
|
|
36
|
+
// dialog?.close();
|
|
37
|
+
// }
|
|
38
|
+
// });
|
|
39
|
+
|
|
40
|
+
let query = $derived.by(() => {
|
|
41
|
+
const searchParam = new URLSearchParams(page.url.searchParams)
|
|
47
42
|
searchParam.delete('skip')
|
|
48
43
|
searchParam.delete('take')
|
|
49
44
|
return searchParam.toString()
|
|
50
|
-
}
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
let selectedView = $derived(views.find((v) => v.query === query))
|
|
48
|
+
let isNewView = $derived(!!query && !selectedView)
|
|
51
49
|
</script>
|
|
52
50
|
|
|
51
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable
|
|
52
|
+
@typescript-eslint/no-unused-vars */
|
|
53
53
|
<DropDown>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
{#snippet activator()}
|
|
55
|
+
<button
|
|
56
|
+
type="button"
|
|
57
|
+
class="menu-item bordered gap-1 rounded-lg border font-semibold opacity-90 btn-sm"
|
|
58
|
+
>
|
|
59
|
+
<span>{isNewView ? 'Nouvelle vue' : selectedView?.name || 'Vue simple'}</span>
|
|
60
|
+
<ChevronDownIcon size={20} class="translate-x-1 translate-y-px opacity-90" />
|
|
61
|
+
</button>
|
|
62
|
+
{/snippet}
|
|
62
63
|
|
|
63
64
|
<ul class="flex flex-col gap-1">
|
|
64
65
|
{#if isNewView}
|
|
65
66
|
<li>
|
|
66
67
|
<button
|
|
67
68
|
type="button"
|
|
68
|
-
class="menu-item w-full pr-
|
|
69
|
-
|
|
69
|
+
class="menu-item w-full pr-1.5"
|
|
70
|
+
onclick={() => {
|
|
70
71
|
selectedView = undefined
|
|
71
|
-
dialog
|
|
72
|
+
dialog?.showModal()
|
|
72
73
|
}}
|
|
73
74
|
>
|
|
74
75
|
<span>Ajouter la nouvelle vue</span>
|
|
75
|
-
<
|
|
76
|
+
<PlusIcon class="ml-auto opacity-80" size={21} />
|
|
76
77
|
</button>
|
|
77
78
|
<hr class="my-1" />
|
|
78
79
|
</li>
|
|
79
80
|
{/if}
|
|
80
81
|
|
|
81
82
|
<li>
|
|
82
|
-
<a href={
|
|
83
|
+
<a href={page.url.pathname} class="menu-item" class:active={!query}>
|
|
83
84
|
<span class="grow">Vue simple</span>
|
|
84
85
|
</a>
|
|
85
86
|
</li>
|
|
@@ -87,21 +88,21 @@
|
|
|
87
88
|
{#each views as view (view.id)}
|
|
88
89
|
<li>
|
|
89
90
|
<a
|
|
90
|
-
href="{
|
|
91
|
+
href="{page.url.pathname}?{view.query}"
|
|
91
92
|
class="menu-item group pr-1"
|
|
92
93
|
class:active={view.id === selectedView?.id}
|
|
93
94
|
>
|
|
94
95
|
<span class="grow">{view.name}</span>
|
|
95
96
|
<button
|
|
96
97
|
type="button"
|
|
97
|
-
class="btn btn-square btn-ghost btn-xs
|
|
98
|
-
|
|
98
|
+
class="btn btn-square rounded btn-ghost btn-xs"
|
|
99
|
+
onclick={(e) => {
|
|
100
|
+
e.preventDefault()
|
|
99
101
|
selectedView = view
|
|
100
|
-
dialog
|
|
102
|
+
dialog?.showModal()
|
|
101
103
|
}}
|
|
102
104
|
>
|
|
103
|
-
<
|
|
104
|
-
path={mdiContentSaveEditOutline}
|
|
105
|
+
<SaveIcon
|
|
105
106
|
class="opacity-50 group-hover:opacity-80"
|
|
106
107
|
size={18}
|
|
107
108
|
title="Modifier la vue '{view.name}'"
|
|
@@ -114,14 +115,18 @@
|
|
|
114
115
|
</DropDown>
|
|
115
116
|
|
|
116
117
|
<Dialog bind:dialog>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
{#snippet header()}
|
|
119
|
+
<h2 class="title">
|
|
120
|
+
{#if selectedView}
|
|
121
|
+
Modifier la vue
|
|
122
|
+
{:else}
|
|
123
|
+
Ajouter la nouvelle vue
|
|
124
|
+
{/if}
|
|
125
|
+
</h2>
|
|
126
|
+
{/snippet}
|
|
127
|
+
|
|
128
|
+
<span>TODO: how to build basic form (create update) with new system ?</span>
|
|
129
|
+
<!--
|
|
125
130
|
<form
|
|
126
131
|
action="{action}{selectedView ? actionUpdate : actionCreate}"
|
|
127
132
|
method="post"
|
|
@@ -133,18 +138,14 @@
|
|
|
133
138
|
<input type="hidden" name="key" value={key} />
|
|
134
139
|
<input type="hidden" name="query" value={query} />
|
|
135
140
|
|
|
136
|
-
<
|
|
137
|
-
key="name"
|
|
138
|
-
input={{ placeholder: 'Nom de la vue' }}
|
|
139
|
-
value={selectedView?.name || ''}
|
|
140
|
-
/>
|
|
141
|
+
<Input key="name" input={{ placeholder: 'Nom de la vue' }} value={selectedView?.name || ''} />
|
|
141
142
|
|
|
142
143
|
<div class="mt-2 flex flex-row-reverse gap-2">
|
|
143
144
|
<button class="btn"> Valider </button>
|
|
144
145
|
|
|
145
|
-
<button formaction="{action}{actionDelete}" class="btn btn-ghost
|
|
146
|
+
<button formaction="{action}{actionDelete}" class="btn text-error btn-ghost">
|
|
146
147
|
Supprimer
|
|
147
148
|
</button>
|
|
148
149
|
</div>
|
|
149
|
-
</form>
|
|
150
|
+
</form> -->
|
|
150
151
|
</Dialog>
|
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const TableViewSelect: $$__sveltets_2_IsomorphicComponent<{
|
|
1
|
+
type View = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
query: string;
|
|
5
|
+
};
|
|
6
|
+
type $$ComponentProps = {
|
|
15
7
|
key: string;
|
|
16
|
-
views:
|
|
17
|
-
id: string;
|
|
18
|
-
name: string;
|
|
19
|
-
query: string;
|
|
20
|
-
}[];
|
|
8
|
+
views: View[];
|
|
21
9
|
action?: string;
|
|
22
10
|
actionCreate?: string;
|
|
23
11
|
actionUpdate?: string;
|
|
24
12
|
actionDelete?: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
type TableViewSelect = InstanceType<typeof TableViewSelect>;
|
|
13
|
+
};
|
|
14
|
+
declare const TableViewSelect: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
15
|
+
type TableViewSelect = ReturnType<typeof TableViewSelect>;
|
|
29
16
|
export default TableViewSelect;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import { Icon } from '../../icon/index.js'
|
|
2
|
+
import { CheckIcon, XIcon } from '@lucide/svelte'
|
|
4
3
|
|
|
5
4
|
let { cell }: { cell: boolean } = $props()
|
|
6
5
|
</script>
|
|
7
6
|
|
|
8
7
|
<td>
|
|
9
8
|
{#if cell}
|
|
10
|
-
<
|
|
9
|
+
<CheckIcon class="fill-success" />
|
|
11
10
|
{:else}
|
|
12
|
-
<
|
|
11
|
+
<XIcon class="fill-error" />
|
|
13
12
|
{/if}
|
|
14
13
|
</td>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as TableCellArray } from './TableCellArray.svelte';
|
|
2
2
|
export { default as TableCellBoolean } from './TableCellBoolean.svelte';
|
|
3
|
+
export { default as TableCellDate } from './TableCellDate.svelte';
|
|
3
4
|
export { default as TableCellNumber } from './TableCellNumber.svelte';
|
|
4
5
|
export { default as TableCellString } from './TableCellString.svelte';
|
|
5
|
-
export { default as TableCellDate } from './TableCellDate.svelte';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as TableCellArray } from './TableCellArray.svelte';
|
|
2
2
|
export { default as TableCellBoolean } from './TableCellBoolean.svelte';
|
|
3
|
+
export { default as TableCellDate } from './TableCellDate.svelte';
|
|
3
4
|
export { default as TableCellNumber } from './TableCellNumber.svelte';
|
|
4
5
|
export { default as TableCellString } from './TableCellString.svelte';
|
|
5
|
-
export { default as TableCellDate } from './TableCellDate.svelte';
|
package/dist/ui/table/field.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
1
2
|
import type { Options } from '../../utils/options.js';
|
|
2
|
-
import type { SnippetLike } from './type.js';
|
|
3
3
|
export type Primitive = string | number | boolean | Date;
|
|
4
4
|
export type ItemBase = {
|
|
5
5
|
id: string | number;
|
|
@@ -15,8 +15,8 @@ type TableFieldCommon<Item extends ItemBase> = {
|
|
|
15
15
|
sortable?: boolean;
|
|
16
16
|
/** Internal usage */
|
|
17
17
|
_visible?: boolean;
|
|
18
|
-
cell: ((item: Item) =>
|
|
19
|
-
head?:
|
|
18
|
+
cell: ((item: Item) => Snippet<[Item]>) | ((item: Item) => null | undefined | Primitive | Primitive[]);
|
|
19
|
+
head?: Snippet<[Item]>;
|
|
20
20
|
};
|
|
21
21
|
type TableFieldPrimitve = {
|
|
22
22
|
type?: 'string' | 'textarea' | 'number' | 'boolean' | 'date';
|
|
@@ -37,8 +37,8 @@ export declare function syncFieldsWithParams<Item extends ItemBase>(tablekey: st
|
|
|
37
37
|
locked?: boolean;
|
|
38
38
|
visible?: boolean;
|
|
39
39
|
sortable?: boolean;
|
|
40
|
-
cell: ((item: Item) =>
|
|
41
|
-
head?:
|
|
40
|
+
cell: ((item: Item) => Snippet<[Item]>) | ((item: Item) => null | undefined | Primitive | Primitive[]);
|
|
41
|
+
head?: Snippet<[Item]> | undefined;
|
|
42
42
|
type?: "string" | "textarea" | "number" | "boolean" | "date";
|
|
43
43
|
} | {
|
|
44
44
|
_visible: boolean;
|
|
@@ -49,8 +49,8 @@ export declare function syncFieldsWithParams<Item extends ItemBase>(tablekey: st
|
|
|
49
49
|
locked?: boolean;
|
|
50
50
|
visible?: boolean;
|
|
51
51
|
sortable?: boolean;
|
|
52
|
-
cell: ((item: Item) =>
|
|
53
|
-
head?:
|
|
52
|
+
cell: ((item: Item) => Snippet<[Item]>) | ((item: Item) => null | undefined | Primitive | Primitive[]);
|
|
53
|
+
head?: Snippet<[Item]> | undefined;
|
|
54
54
|
type: "select" | "multiselect";
|
|
55
55
|
})[];
|
|
56
56
|
export {};
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { createEventDispatcher } from 'svelte'
|
|
2
|
+
import { ArrowDownNarrowWideIcon, ArrowDownWideNarrowIcon, type IconProps } from '@lucide/svelte'
|
|
3
|
+
import type { Component } from 'svelte'
|
|
5
4
|
|
|
6
5
|
type Order = 'asc' | 'desc' | undefined
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
let {
|
|
7
|
+
order = $bindable(),
|
|
8
|
+
IconAsc = ArrowDownNarrowWideIcon,
|
|
9
|
+
IconDesc = ArrowDownWideNarrowIcon,
|
|
10
|
+
onChange
|
|
11
|
+
}: {
|
|
12
|
+
order: Order
|
|
13
|
+
IconAsc?: Component<IconProps>
|
|
14
|
+
IconDesc?: Component<IconProps>
|
|
15
|
+
onChange?: (order: Order) => void
|
|
16
|
+
} = $props()
|
|
12
17
|
|
|
13
18
|
const handleOrderClick = (orderBy: 'asc' | 'desc') => () => {
|
|
14
19
|
if (order === orderBy) order = undefined
|
|
15
20
|
else order = orderBy
|
|
16
|
-
|
|
21
|
+
onChange?.(order)
|
|
17
22
|
}
|
|
18
23
|
</script>
|
|
19
24
|
|
|
@@ -23,17 +28,17 @@
|
|
|
23
28
|
<button
|
|
24
29
|
class="btn ring-primary"
|
|
25
30
|
class:ring-2={order === 'asc'}
|
|
26
|
-
|
|
31
|
+
onclick={handleOrderClick('asc')}
|
|
27
32
|
>
|
|
28
|
-
<
|
|
33
|
+
<IconAsc />
|
|
29
34
|
<span>Ascendant</span>
|
|
30
35
|
</button>
|
|
31
36
|
<button
|
|
32
37
|
class="btn ring-primary"
|
|
33
38
|
class:ring-2={order === 'desc'}
|
|
34
|
-
|
|
39
|
+
onclick={handleOrderClick('desc')}
|
|
35
40
|
>
|
|
36
|
-
<
|
|
41
|
+
<IconDesc />
|
|
37
42
|
<span>Descendant</span>
|
|
38
43
|
</button>
|
|
39
44
|
</div>
|
|
@@ -1,24 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const OrderButtons: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
-
order: "desc" | "asc" | undefined;
|
|
16
|
-
iconAsc?: string;
|
|
17
|
-
iconDesc?: string;
|
|
18
|
-
}, {
|
|
19
|
-
change: CustomEvent<"desc" | "asc" | undefined>;
|
|
20
|
-
} & {
|
|
21
|
-
[evt: string]: CustomEvent<any>;
|
|
22
|
-
}, {}, {}, string>;
|
|
23
|
-
type OrderButtons = InstanceType<typeof OrderButtons>;
|
|
1
|
+
import { type IconProps } from '@lucide/svelte';
|
|
2
|
+
import type { Component } from 'svelte';
|
|
3
|
+
type Order = 'asc' | 'desc' | undefined;
|
|
4
|
+
type $$ComponentProps = {
|
|
5
|
+
order: Order;
|
|
6
|
+
IconAsc?: Component<IconProps>;
|
|
7
|
+
IconDesc?: Component<IconProps>;
|
|
8
|
+
onChange?: (order: Order) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const OrderButtons: Component<$$ComponentProps, {}, "order">;
|
|
11
|
+
type OrderButtons = ReturnType<typeof OrderButtons>;
|
|
24
12
|
export default OrderButtons;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" generics="Item extends ItemBase">
|
|
2
|
-
import {
|
|
2
|
+
import { CheckIcon, XIcon } from '@lucide/svelte'
|
|
3
3
|
import type { ItemBase, TableField } from '../index.js'
|
|
4
4
|
import TableHeadSelect from './TableHeadSelect.svelte'
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<TableHeadSelect
|
|
10
10
|
{field}
|
|
11
11
|
options={[
|
|
12
|
-
{ value: 'true', label: 'Oui', icon:
|
|
13
|
-
{ value: 'false', label: 'Non', icon:
|
|
12
|
+
{ value: 'true', label: 'Oui', icon: CheckIcon },
|
|
13
|
+
{ value: 'false', label: 'Non', icon: XIcon }
|
|
14
14
|
]}
|
|
15
15
|
/>
|
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
<script lang="ts" generics="Item extends ItemBase">
|
|
2
|
+
import { CalendarArrowDownIcon, CalendarArrowUpIcon, CalendarSearchIcon } from '@lucide/svelte'
|
|
2
3
|
import { goto } from '$app/navigation'
|
|
3
4
|
import { page } from '$app/state'
|
|
4
|
-
import {
|
|
5
|
-
mdiCalendarFilterOutline,
|
|
6
|
-
mdiSortClockAscendingOutline,
|
|
7
|
-
mdiSortClockDescendingOutline
|
|
8
|
-
} from '@mdi/js'
|
|
9
|
-
|
|
5
|
+
import { urlParam } from '../../../state/param.svelte.ts'
|
|
10
6
|
import { DropDown } from '../../menu/index.js'
|
|
11
|
-
import { InputTime } from '../../input/index.js'
|
|
12
|
-
import type { ItemBase, TableField } from '../index.js'
|
|
13
7
|
import { formatRange } from '../../range/format.js'
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
8
|
+
import { type RangeAsDate, RangePicker } from '../../range/index.js'
|
|
9
|
+
import type { ItemBase, TableField } from '../index.js'
|
|
16
10
|
import { jsonParse } from '../../../utils/jsonParse.js'
|
|
17
|
-
import { Icon } from '../../icon/index.js'
|
|
18
11
|
import OrderButtons from './OrderButtons.svelte'
|
|
19
12
|
|
|
20
|
-
let { field }: { field: TableField<Item> } = $props()
|
|
13
|
+
let { field }: { field: Omit<TableField<Item>, 'cell'> } = $props()
|
|
21
14
|
|
|
22
15
|
let dropDown: DropDown
|
|
23
16
|
let rangePicker: RangePicker
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
|
|
18
|
+
let initialValue = jsonParse<{
|
|
19
|
+
start?: string
|
|
20
|
+
end?: string
|
|
21
|
+
order?: 'asc' | 'desc'
|
|
22
|
+
}>(page.url.searchParams.get(field.key), {})
|
|
28
23
|
|
|
29
24
|
let range: RangeAsDate = $state({
|
|
30
25
|
start: initialValue.start ? new Date(initialValue.start) : null,
|
|
@@ -37,7 +32,7 @@
|
|
|
37
32
|
function updateUrl() {
|
|
38
33
|
isValidPeriod = !!range.start && !!range.end
|
|
39
34
|
if (!isValidPeriod && !order) {
|
|
40
|
-
goto(
|
|
35
|
+
goto(urlParam.without(field.key, 'skip', 'take'), {
|
|
41
36
|
replaceState: true,
|
|
42
37
|
noScroll: true,
|
|
43
38
|
keepFocus: true
|
|
@@ -45,7 +40,7 @@
|
|
|
45
40
|
return
|
|
46
41
|
}
|
|
47
42
|
goto(
|
|
48
|
-
|
|
43
|
+
urlParam.with(
|
|
49
44
|
{
|
|
50
45
|
[field.key]: JSON.stringify({
|
|
51
46
|
...(isValidPeriod
|
|
@@ -70,7 +65,7 @@
|
|
|
70
65
|
range = { start: null, end: null }
|
|
71
66
|
dropDown.hide()
|
|
72
67
|
rangePicker.clear()
|
|
73
|
-
goto(
|
|
68
|
+
goto(urlParam.without(field.key, 'skip', 'take'), {
|
|
74
69
|
replaceState: true,
|
|
75
70
|
noScroll: true,
|
|
76
71
|
keepFocus: true
|
|
@@ -85,37 +80,37 @@
|
|
|
85
80
|
hideOnNav={false}
|
|
86
81
|
class="max-h-none"
|
|
87
82
|
>
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
83
|
+
{#snippet activator()}
|
|
84
|
+
<button class="menu-item min-h-8 w-full flex-wrap gap-y-1">
|
|
85
|
+
<div class="flex gap-2">
|
|
86
|
+
<span>{field.label}</span>
|
|
87
|
+
{#if !isValidPeriod}
|
|
88
|
+
<CalendarSearchIcon size={15} class="opacity-50" />
|
|
89
|
+
{/if}
|
|
90
|
+
</div>
|
|
95
91
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
size={18}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
</button>
|
|
92
|
+
{#if isValidPeriod}
|
|
93
|
+
<span class="badge badge-xs text-[0.7rem] font-normal text-white badge-primary">
|
|
94
|
+
{formatRange(range)}
|
|
95
|
+
</span>
|
|
96
|
+
{/if}
|
|
97
|
+
{#if order === 'asc'}
|
|
98
|
+
<CalendarArrowDownIcon size={18} class="fill-primary" />
|
|
99
|
+
{:else if order === 'desc'}
|
|
100
|
+
<CalendarArrowUpIcon size={18} class="fill-primary" />
|
|
101
|
+
{/if}
|
|
102
|
+
</button>
|
|
103
|
+
{/snippet}
|
|
109
104
|
|
|
110
105
|
{#if field.sortable !== false}
|
|
111
106
|
<OrderButtons
|
|
112
107
|
bind:order
|
|
113
|
-
|
|
108
|
+
onChange={() => {
|
|
114
109
|
updateUrl()
|
|
115
110
|
dropDown.hide()
|
|
116
111
|
}}
|
|
117
|
-
|
|
118
|
-
|
|
112
|
+
IconAsc={CalendarArrowDownIcon}
|
|
113
|
+
IconDesc={CalendarArrowUpIcon}
|
|
119
114
|
/>
|
|
120
115
|
{/if}
|
|
121
116
|
|
|
@@ -141,20 +136,9 @@
|
|
|
141
136
|
<input class="hidden" type="text" name="end" value={range.end?.toJSON()} />
|
|
142
137
|
|
|
143
138
|
<div class="m-2 flex gap-2">
|
|
144
|
-
<InputTime
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
enhanceDisabled
|
|
148
|
-
class="grow"
|
|
149
|
-
on:input={updateUrl}
|
|
150
|
-
/>
|
|
151
|
-
<InputTime
|
|
152
|
-
label="Jusqu'à"
|
|
153
|
-
bind:value={range.end}
|
|
154
|
-
enhanceDisabled
|
|
155
|
-
class="grow"
|
|
156
|
-
on:input={updateUrl}
|
|
157
|
-
/>
|
|
139
|
+
<!-- <InputTime label="A partir de" bind:value={range.start} class="grow" on:input={updateUrl} />
|
|
140
|
+
<InputTime label="Jusqu'à" bind:value={range.end} class="grow" on:input={updateUrl} /> -->
|
|
141
|
+
<span>TODO: same problème with input...</span>
|
|
158
142
|
</div>
|
|
159
143
|
|
|
160
144
|
<div class="m-2 flex flex-row-reverse gap-2">
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts" generics="Item extends ItemBase">
|
|
2
|
-
import type { ItemBase, TableField } from '../index.js'
|
|
3
2
|
import { tip } from '../../../action/tip.js'
|
|
3
|
+
import type { ItemBase, TableField } from '../index.js'
|
|
4
|
+
|
|
4
5
|
let { field }: { field: TableField<Item> } = $props()
|
|
5
6
|
</script>
|
|
6
7
|
|