@lobb-js/studio 0.1.31 → 0.1.32
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/{src/lib/components → dist}/LlmButton.svelte +2 -2
- package/dist/LlmButton.svelte.d.ts +17 -0
- package/{src → dist}/Studio.svelte +15 -15
- package/dist/Studio.svelte.d.ts +6 -0
- package/{src/lib/components → dist}/alertView.svelte +1 -1
- package/dist/alertView.svelte.d.ts +8 -0
- package/{src/lib/components → dist}/breadCrumbs.svelte +2 -2
- package/dist/breadCrumbs.svelte.d.ts +3 -0
- package/{src/lib/components → dist}/combobox.svelte +4 -4
- package/dist/combobox.svelte.d.ts +15 -0
- package/{src/lib/components → dist}/confirmationDialog/confirmationDialog.svelte +1 -1
- package/dist/confirmationDialog/confirmationDialog.svelte.d.ts +8 -0
- package/dist/confirmationDialog/store.svelte.d.ts +1 -0
- package/dist/confirmationDialog/store.svelte.js +69 -0
- package/{src/lib/components → dist}/createManyButton.svelte +2 -2
- package/dist/createManyButton.svelte.d.ts +8 -0
- package/{src/lib/components → dist}/dataTable/childRecords.svelte +2 -2
- package/dist/dataTable/childRecords.svelte.d.ts +9 -0
- package/{src/lib/components → dist}/dataTable/dataTable.svelte +3 -3
- package/dist/dataTable/dataTable.svelte.d.ts +15 -0
- package/{src/lib/components → dist}/dataTable/fieldCell.svelte +1 -1
- package/dist/dataTable/fieldCell.svelte.d.ts +10 -0
- package/{src/lib/components → dist}/dataTable/filter.svelte +2 -2
- package/dist/dataTable/filter.svelte.d.ts +10 -0
- package/{src/lib/components → dist}/dataTable/filterButton.svelte +1 -1
- package/dist/dataTable/filterButton.svelte.d.ts +8 -0
- package/dist/dataTable/footer.svelte.d.ts +8 -0
- package/{src/lib/components → dist}/dataTable/header.svelte +2 -2
- package/dist/dataTable/header.svelte.d.ts +10 -0
- package/{src/lib/components → dist}/dataTable/sort.svelte +2 -2
- package/dist/dataTable/sort.svelte.d.ts +8 -0
- package/{src/lib/components → dist}/dataTable/sortButton.svelte +2 -2
- package/dist/dataTable/sortButton.svelte.d.ts +8 -0
- package/dist/dataTable/table.svelte.d.ts +32 -0
- package/dist/dataTable/utils.d.ts +7 -0
- package/dist/dataTable/utils.js +111 -0
- package/{src/lib/components → dist}/detailView/create/children.svelte +3 -3
- package/dist/detailView/create/children.svelte.d.ts +8 -0
- package/{src/lib/components → dist}/detailView/create/createDetailView.svelte +6 -6
- package/dist/detailView/create/createDetailView.svelte.d.ts +18 -0
- package/{src/lib/components → dist}/detailView/create/createDetailViewButton.svelte +2 -2
- package/dist/detailView/create/createDetailViewButton.svelte.d.ts +11 -0
- package/{src/lib/components → dist}/detailView/create/createManyView.svelte +5 -5
- package/dist/detailView/create/createManyView.svelte.d.ts +16 -0
- package/{src/lib/components → dist}/detailView/create/subRecords.svelte +1 -1
- package/dist/detailView/create/subRecords.svelte.d.ts +8 -0
- package/dist/detailView/detailViewForm.svelte.d.ts +48 -0
- package/dist/detailView/fieldCustomInput.svelte.d.ts +10 -0
- package/{src/lib/components → dist}/detailView/fieldInput.svelte +4 -4
- package/dist/detailView/fieldInput.svelte.d.ts +10 -0
- package/{src/lib/components → dist}/detailView/fieldInputReplacement.svelte +1 -1
- package/dist/detailView/fieldInputReplacement.svelte.d.ts +11 -0
- package/dist/detailView/store.svelte.d.ts +4 -0
- package/dist/detailView/store.svelte.js +125 -0
- package/{src/lib/components → dist}/detailView/update/children.svelte +4 -4
- package/dist/detailView/update/children.svelte.d.ts +7 -0
- package/{src/lib/components → dist}/detailView/update/updateDetailView.svelte +6 -6
- package/dist/detailView/update/updateDetailView.svelte.d.ts +19 -0
- package/{src/lib/components → dist}/detailView/update/updateDetailViewButton.svelte +2 -2
- package/dist/detailView/update/updateDetailViewButton.svelte.d.ts +11 -0
- package/dist/detailView/utils.d.ts +8 -0
- package/dist/detailView/utils.js +165 -0
- package/{src/lib/components → dist}/diffViewer.svelte +1 -1
- package/dist/diffViewer.svelte.d.ts +9 -0
- package/{src/lib/components → dist}/drawer.svelte +1 -1
- package/dist/drawer.svelte.d.ts +8 -0
- package/{src/lib/components → dist}/extensionsComponents.svelte +1 -2
- package/dist/extensionsComponents.svelte.d.ts +11 -0
- package/dist/foreingKeyInput.svelte.d.ts +11 -0
- package/{src/lib/components → dist}/header.svelte +1 -1
- package/dist/header.svelte.d.ts +6 -0
- package/dist/loadingTypesForMonacoEditor.d.ts +7 -0
- package/dist/loadingTypesForMonacoEditor.js +72 -0
- package/{src/lib/components → dist}/miniSidebar.svelte +7 -7
- package/dist/miniSidebar.svelte.d.ts +20 -0
- package/{src/lib/components → dist}/monacoEditor.svelte +1 -1
- package/dist/monacoEditor.svelte.d.ts +13 -0
- package/{src/lib/components → dist}/rangeCalendarButton.svelte +4 -4
- package/dist/rangeCalendarButton.svelte.d.ts +7 -0
- package/{src/lib/components → dist}/selectRecord.svelte +1 -1
- package/dist/selectRecord.svelte.d.ts +15 -0
- package/{src/lib/components → dist}/setServerPage.svelte +2 -2
- package/dist/setServerPage.svelte.d.ts +18 -0
- package/{src/lib/components/sidebar/index.ts → dist/sidebar/index.d.ts} +1 -2
- package/dist/sidebar/index.js +3 -0
- package/{src/lib/components → dist}/sidebar/sidebar.svelte +1 -1
- package/dist/sidebar/sidebar.svelte.d.ts +17 -0
- package/dist/sidebar/sidebarElements.svelte.d.ts +19 -0
- package/dist/sidebar/sidebarTrigger.svelte.d.ts +7 -0
- package/{src/lib/components → dist}/singletone.svelte +1 -1
- package/dist/singletone.svelte.d.ts +6 -0
- package/{src/lib/components → dist}/ui/accordion/accordion-content.svelte +1 -1
- package/dist/ui/accordion/accordion-content.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/accordion/accordion-item.svelte +1 -1
- package/dist/ui/accordion/accordion-item.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/accordion/accordion-trigger.svelte +1 -1
- package/dist/ui/accordion/accordion-trigger.svelte.d.ts +7 -0
- package/dist/ui/accordion/index.d.ts +6 -0
- package/{src/lib/components/ui/accordion/index.ts → dist/ui/accordion/index.js} +4 -13
- package/{src/lib/components → dist}/ui/alert/alert-description.svelte +1 -1
- package/dist/ui/alert/alert-description.svelte.d.ts +5 -0
- package/{src/lib/components → dist}/ui/alert/alert-title.svelte +1 -1
- package/dist/ui/alert/alert-title.svelte.d.ts +8 -0
- package/{src/lib/components → dist}/ui/alert/alert.svelte +1 -1
- package/dist/ui/alert/alert.svelte.d.ts +26 -0
- package/{src/lib/components/ui/alert/index.ts → dist/ui/alert/index.d.ts} +1 -10
- package/dist/ui/alert/index.js +7 -0
- package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-action.svelte +2 -2
- package/dist/ui/alert-dialog/alert-dialog-action.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-cancel.svelte +2 -2
- package/dist/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-content.svelte +1 -1
- package/dist/ui/alert-dialog/alert-dialog-content.svelte.d.ts +7 -0
- package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-description.svelte +1 -1
- package/dist/ui/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-footer.svelte +1 -1
- package/dist/ui/alert-dialog/alert-dialog-footer.svelte.d.ts +5 -0
- package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-header.svelte +1 -1
- package/dist/ui/alert-dialog/alert-dialog-header.svelte.d.ts +5 -0
- package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-overlay.svelte +1 -1
- package/dist/ui/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-title.svelte +1 -1
- package/dist/ui/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
- package/dist/ui/alert-dialog/index.d.ts +13 -0
- package/dist/ui/alert-dialog/index.js +15 -0
- package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb-ellipsis.svelte +1 -1
- package/dist/ui/breadcrumb/breadcrumb-ellipsis.svelte.d.ts +5 -0
- package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb-item.svelte +1 -1
- package/dist/ui/breadcrumb/breadcrumb-item.svelte.d.ts +5 -0
- package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb-link.svelte +1 -1
- package/dist/ui/breadcrumb/breadcrumb-link.svelte.d.ts +11 -0
- package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb-list.svelte +1 -1
- package/dist/ui/breadcrumb/breadcrumb-list.svelte.d.ts +5 -0
- package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb-page.svelte +1 -1
- package/dist/ui/breadcrumb/breadcrumb-page.svelte.d.ts +5 -0
- package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb-separator.svelte +1 -1
- package/dist/ui/breadcrumb/breadcrumb-separator.svelte.d.ts +5 -0
- package/dist/ui/breadcrumb/breadcrumb.svelte.d.ts +5 -0
- package/{src/lib/components/ui/breadcrumb/index.ts → dist/ui/breadcrumb/index.d.ts} +1 -18
- package/dist/ui/breadcrumb/index.js +10 -0
- package/{src/lib/components → dist}/ui/button/button.svelte +1 -1
- package/dist/ui/button/button.svelte.d.ts +60 -0
- package/dist/ui/button/index.d.ts +2 -0
- package/dist/ui/button/index.js +4 -0
- package/{src/lib/components → dist}/ui/checkbox/checkbox.svelte +1 -1
- package/dist/ui/checkbox/checkbox.svelte.d.ts +4 -0
- package/dist/ui/checkbox/index.d.ts +2 -0
- package/dist/ui/checkbox/index.js +4 -0
- package/{src/lib/components → dist}/ui/command/command-dialog.svelte +1 -1
- package/dist/ui/command/command-dialog.svelte.d.ts +9 -0
- package/{src/lib/components → dist}/ui/command/command-empty.svelte +1 -1
- package/dist/ui/command/command-empty.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/command/command-group.svelte +1 -1
- package/dist/ui/command/command-group.svelte.d.ts +7 -0
- package/{src/lib/components → dist}/ui/command/command-input.svelte +1 -1
- package/dist/ui/command/command-input.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/command/command-item.svelte +1 -1
- package/dist/ui/command/command-item.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/command/command-link-item.svelte +1 -1
- package/dist/ui/command/command-link-item.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/command/command-list.svelte +1 -1
- package/dist/ui/command/command-list.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/command/command-separator.svelte +1 -1
- package/dist/ui/command/command-separator.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/command/command-shortcut.svelte +1 -1
- package/dist/ui/command/command-shortcut.svelte.d.ts +5 -0
- package/{src/lib/components → dist}/ui/command/command.svelte +1 -1
- package/dist/ui/command/command.svelte.d.ts +4 -0
- package/{src/lib/components/ui/command/index.ts → dist/ui/command/index.d.ts} +2 -29
- package/dist/ui/command/index.js +15 -0
- package/{src/lib/components → dist}/ui/dialog/dialog-content.svelte +1 -1
- package/dist/ui/dialog/dialog-content.svelte.d.ts +9 -0
- package/{src/lib/components → dist}/ui/dialog/dialog-description.svelte +1 -1
- package/dist/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/dialog/dialog-footer.svelte +1 -1
- package/dist/ui/dialog/dialog-footer.svelte.d.ts +5 -0
- package/{src/lib/components → dist}/ui/dialog/dialog-header.svelte +1 -1
- package/dist/ui/dialog/dialog-header.svelte.d.ts +5 -0
- package/{src/lib/components → dist}/ui/dialog/dialog-overlay.svelte +1 -1
- package/dist/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/dialog/dialog-title.svelte +1 -1
- package/dist/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/ui/dialog/index.d.ts +12 -0
- package/dist/ui/dialog/index.js +14 -0
- package/dist/ui/input/index.d.ts +2 -0
- package/dist/ui/input/index.js +4 -0
- package/{src/lib/components → dist}/ui/input/input.svelte +1 -1
- package/dist/ui/input/input.svelte.d.ts +13 -0
- package/dist/ui/label/index.d.ts +2 -0
- package/dist/ui/label/index.js +4 -0
- package/{src/lib/components → dist}/ui/label/label.svelte +1 -1
- package/dist/ui/label/label.svelte.d.ts +4 -0
- package/dist/ui/popover/index.d.ts +6 -0
- package/dist/ui/popover/index.js +8 -0
- package/{src/lib/components → dist}/ui/popover/popover-content.svelte +1 -1
- package/dist/ui/popover/popover-content.svelte.d.ts +7 -0
- package/{src/lib/components/ui/range-calendar/index.ts → dist/ui/range-calendar/index.d.ts} +1 -17
- package/dist/ui/range-calendar/index.js +16 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar-cell.svelte +1 -1
- package/dist/ui/range-calendar/range-calendar-cell.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar-day.svelte +2 -2
- package/dist/ui/range-calendar/range-calendar-day.svelte.d.ts +6 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar-grid-body.svelte +1 -1
- package/dist/ui/range-calendar/range-calendar-grid-body.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar-grid-head.svelte +1 -1
- package/dist/ui/range-calendar/range-calendar-grid-head.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar-grid-row.svelte +1 -1
- package/dist/ui/range-calendar/range-calendar-grid-row.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar-grid.svelte +1 -1
- package/dist/ui/range-calendar/range-calendar-grid.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar-head-cell.svelte +1 -1
- package/dist/ui/range-calendar/range-calendar-head-cell.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar-header.svelte +1 -1
- package/dist/ui/range-calendar/range-calendar-header.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar-heading.svelte +1 -1
- package/dist/ui/range-calendar/range-calendar-heading.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar-months.svelte +1 -1
- package/dist/ui/range-calendar/range-calendar-months.svelte.d.ts +5 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar-next-button.svelte +2 -2
- package/dist/ui/range-calendar/range-calendar-next-button.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar-prev-button.svelte +2 -2
- package/dist/ui/range-calendar/range-calendar-prev-button.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/range-calendar/range-calendar.svelte +1 -1
- package/dist/ui/range-calendar/range-calendar.svelte.d.ts +5 -0
- package/dist/ui/select/index.d.ts +11 -0
- package/dist/ui/select/index.js +13 -0
- package/{src/lib/components → dist}/ui/select/select-content.svelte +1 -1
- package/dist/ui/select/select-content.svelte.d.ts +7 -0
- package/{src/lib/components → dist}/ui/select/select-group-heading.svelte +1 -1
- package/dist/ui/select/select-group-heading.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/select/select-item.svelte +1 -1
- package/dist/ui/select/select-item.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/select/select-scroll-down-button.svelte +1 -1
- package/dist/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/select/select-scroll-up-button.svelte +1 -1
- package/dist/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/select/select-separator.svelte +2 -2
- package/dist/ui/select/select-separator.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/ui/select/select-trigger.svelte +1 -1
- package/dist/ui/select/select-trigger.svelte.d.ts +4 -0
- package/dist/ui/separator/index.d.ts +2 -0
- package/dist/ui/separator/index.js +4 -0
- package/{src/lib/components → dist}/ui/separator/separator.svelte +1 -1
- package/dist/ui/separator/separator.svelte.d.ts +4 -0
- package/dist/ui/skeleton/index.d.ts +2 -0
- package/dist/ui/skeleton/index.js +4 -0
- package/{src/lib/components → dist}/ui/skeleton/skeleton.svelte +1 -1
- package/dist/ui/skeleton/skeleton.svelte.d.ts +5 -0
- package/dist/ui/sonner/index.js +1 -0
- package/dist/ui/sonner/sonner.svelte.d.ts +4 -0
- package/dist/ui/switch/index.d.ts +2 -0
- package/dist/ui/switch/index.js +4 -0
- package/{src/lib/components → dist}/ui/switch/switch.svelte +1 -1
- package/dist/ui/switch/switch.svelte.d.ts +4 -0
- package/dist/ui/textarea/index.d.ts +2 -0
- package/dist/ui/textarea/index.js +4 -0
- package/{src/lib/components → dist}/ui/textarea/textarea.svelte +1 -1
- package/dist/ui/textarea/textarea.svelte.d.ts +5 -0
- package/dist/ui/tooltip/index.d.ts +6 -0
- package/dist/ui/tooltip/index.js +8 -0
- package/{src/lib/components → dist}/ui/tooltip/tooltip-content.svelte +1 -1
- package/dist/ui/tooltip/tooltip-content.svelte.d.ts +4 -0
- package/{src/lib/components → dist}/workflowEditor.svelte +5 -5
- package/dist/workflowEditor.svelte.d.ts +16 -0
- package/package.json +24 -14
- package/{vite-plugin-contextual-lib.js → vite-plugins/contextual-lib-alias.js} +2 -7
- package/vite-plugins/index.js +21 -0
- package/vite-plugins/studio-source-resolver.js +41 -0
- package/.env.example +0 -1
- package/.storybook/main.ts +0 -31
- package/.storybook/preview.ts +0 -21
- package/.storybook/vitest.setup.ts +0 -7
- package/components.json +0 -16
- package/docker-entrypoint.sh +0 -7
- package/dockerfile +0 -27
- package/index.html +0 -13
- package/public/lobb.svg +0 -15
- package/src/app.css +0 -121
- package/src/components-export.ts +0 -21
- package/src/extensions/extension.types.ts +0 -93
- package/src/extensions/extensionUtils.ts +0 -192
- package/src/lib/Lobb.ts +0 -241
- package/src/lib/components/confirmationDialog/store.svelte.ts +0 -28
- package/src/lib/components/dataTable/utils.ts +0 -127
- package/src/lib/components/detailView/store.svelte.ts +0 -61
- package/src/lib/components/detailView/utils.ts +0 -177
- package/src/lib/components/loadingTypesForMonacoEditor.ts +0 -36
- package/src/lib/components/ui/alert-dialog/index.ts +0 -40
- package/src/lib/components/ui/button/index.ts +0 -17
- package/src/lib/components/ui/checkbox/index.ts +0 -6
- package/src/lib/components/ui/dialog/index.ts +0 -37
- package/src/lib/components/ui/input/index.ts +0 -7
- package/src/lib/components/ui/label/index.ts +0 -7
- package/src/lib/components/ui/popover/index.ts +0 -17
- package/src/lib/components/ui/select/index.ts +0 -34
- package/src/lib/components/ui/separator/index.ts +0 -7
- package/src/lib/components/ui/skeleton/index.ts +0 -7
- package/src/lib/components/ui/switch/index.ts +0 -7
- package/src/lib/components/ui/textarea/index.ts +0 -7
- package/src/lib/components/ui/tooltip/index.ts +0 -18
- package/src/lib/eventSystem.ts +0 -38
- package/src/lib/index.ts +0 -40
- package/src/lib/store.svelte.ts +0 -21
- package/src/lib/store.types.ts +0 -28
- package/src/lib/utils.ts +0 -84
- package/src/main.ts +0 -18
- package/src/routes/collections/collection.svelte +0 -46
- package/src/routes/collections/collections.svelte +0 -43
- package/src/routes/data_model/dataModel.svelte +0 -40
- package/src/routes/data_model/flow.css +0 -22
- package/src/routes/data_model/flow.svelte +0 -82
- package/src/routes/data_model/syncManager.svelte +0 -93
- package/src/routes/data_model/utils.ts +0 -35
- package/src/routes/extensions/extension.svelte +0 -16
- package/src/routes/home.svelte +0 -36
- package/src/routes/workflows/workflows.svelte +0 -135
- package/src/stories/Configure.mdx +0 -364
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +0 -1
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +0 -1
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +0 -1
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +0 -1
- package/src/stories/assets/youtube.svg +0 -1
- package/src/stories/detailView/detailViewForm.stories.svelte +0 -79
- package/src/stories/examples/Button.stories.svelte +0 -31
- package/src/stories/examples/Button.svelte +0 -30
- package/src/stories/examples/Header.stories.svelte +0 -26
- package/src/stories/examples/Header.svelte +0 -45
- package/src/stories/examples/Page.stories.svelte +0 -29
- package/src/stories/examples/Page.svelte +0 -70
- package/src/stories/examples/button.css +0 -30
- package/src/stories/examples/header.css +0 -32
- package/src/stories/examples/page.css +0 -68
- package/src/vite-env.d.ts +0 -2
- package/svelte.config.js +0 -7
- package/todo.md +0 -24
- package/tsconfig.app.json +0 -25
- package/tsconfig.json +0 -14
- package/tsconfig.node.json +0 -24
- package/vite.build.svelte.config.ts +0 -18
- package/vite.config.ts +0 -84
- package/vite.extension.config.ts +0 -81
- package/vite_utils.ts +0 -28
- package/vitest.shims.d.ts +0 -1
- /package/{src/lib/components → dist}/dataTable/footer.svelte +0 -0
- /package/{src/lib/components → dist}/dataTable/table.svelte +0 -0
- /package/{src/lib/components → dist}/detailView/detailViewForm.svelte +0 -0
- /package/{src/lib/components → dist}/detailView/fieldCustomInput.svelte +0 -0
- /package/{src/lib/components → dist}/foreingKeyInput.svelte +0 -0
- /package/{src/lib/components → dist}/sidebar/sidebarElements.svelte +0 -0
- /package/{src/lib/components → dist}/sidebar/sidebarTrigger.svelte +0 -0
- /package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb.svelte +0 -0
- /package/{src/lib/components/ui/sonner/index.ts → dist/ui/sonner/index.d.ts} +0 -0
- /package/{src/lib/components → dist}/ui/sonner/sonner.svelte +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { lobb } from "
|
|
2
|
+
import { lobb } from "..";
|
|
3
3
|
import { Brain, LoaderIcon, Send } from "lucide-svelte";
|
|
4
4
|
import Button, { type ButtonProps } from "./ui/button/button.svelte";
|
|
5
5
|
import * as Popover from "./ui/popover";
|
|
6
6
|
import Textarea from "./ui/textarea/textarea.svelte";
|
|
7
7
|
import { toast } from "svelte-sonner";
|
|
8
|
-
import { ctx } from "
|
|
8
|
+
import { ctx } from "../store.svelte";
|
|
9
9
|
|
|
10
10
|
interface LocalProp {
|
|
11
11
|
value?: any;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ButtonProps } from "./ui/button/button.svelte";
|
|
2
|
+
interface LocalProp {
|
|
3
|
+
value?: any;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
format?: any;
|
|
8
|
+
messages?: any[];
|
|
9
|
+
variant?: ButtonProps["variant"];
|
|
10
|
+
class?: ButtonProps["class"];
|
|
11
|
+
Icon?: ButtonProps["Icon"];
|
|
12
|
+
children?: ButtonProps["children"];
|
|
13
|
+
onApiResponseComplete?: (res: any) => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
declare const LlmButton: import("svelte").Component<LocalProp, {}, "value">;
|
|
16
|
+
type LlmButton = ReturnType<typeof LlmButton>;
|
|
17
|
+
export default LlmButton;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Toaster } from "./
|
|
2
|
+
import { Toaster } from "./ui/sonner";
|
|
3
3
|
import { onMount, onDestroy } from "svelte";
|
|
4
4
|
import { ModeWatcher } from "mode-watcher";
|
|
5
|
-
import { ctx } from "
|
|
6
|
-
import { lobb } from "
|
|
7
|
-
import Header from "
|
|
5
|
+
import { ctx } from "../store.svelte";
|
|
6
|
+
import { lobb } from "..";
|
|
7
|
+
import Header from "./header.svelte";
|
|
8
8
|
import { LoaderCircle, ServerOff } from "lucide-svelte";
|
|
9
|
-
import Dialog from "
|
|
10
|
-
import MiniSidebar from "
|
|
11
|
-
import SetServerPage from "
|
|
12
|
-
import * as Tooltip from "
|
|
9
|
+
import Dialog from "./confirmationDialog/confirmationDialog.svelte";
|
|
10
|
+
import MiniSidebar from "./miniSidebar.svelte";
|
|
11
|
+
import SetServerPage from "./setServerPage.svelte";
|
|
12
|
+
import * as Tooltip from "./ui/tooltip";
|
|
13
13
|
import { Router, Route, Fallback, init as initRouter, } from "@wjfe/n-savant";
|
|
14
14
|
import {
|
|
15
15
|
executeExtensionsOnStartup,
|
|
16
16
|
loadExtensions,
|
|
17
|
-
} from "
|
|
18
|
-
import { mediaQueries } from "
|
|
19
|
-
import Home from "
|
|
20
|
-
import DataModel from "
|
|
21
|
-
import Collections from "
|
|
22
|
-
import Workflows from "
|
|
23
|
-
import Extension from "
|
|
17
|
+
} from "../extensions/extensionUtils";
|
|
18
|
+
import { mediaQueries } from "../utils";
|
|
19
|
+
import Home from "../../routes/home.svelte";
|
|
20
|
+
import DataModel from "../../routes/data_model/dataModel.svelte";
|
|
21
|
+
import Collections from "../../routes/collections/collections.svelte";
|
|
22
|
+
import Workflows from "../../routes/workflows/workflows.svelte";
|
|
23
|
+
import Extension from "../../routes/extensions/extension.svelte";
|
|
24
24
|
|
|
25
25
|
interface StudioProps {
|
|
26
26
|
extensions?: any[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import * as Breadcrumb from "./ui/breadcrumb";
|
|
3
|
-
import { ctx } from "
|
|
4
|
-
import { mediaQueries } from "
|
|
3
|
+
import { ctx } from "../store.svelte";
|
|
4
|
+
import { mediaQueries } from "../utils";
|
|
5
5
|
import { location } from "@wjfe/n-savant";
|
|
6
6
|
|
|
7
7
|
const isSmall = $derived(!mediaQueries.sm.current);
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import CheckIcon from "@lucide/svelte/icons/check";
|
|
3
3
|
import ChevronsUpDownIcon from "@lucide/svelte/icons/chevrons-up-down";
|
|
4
4
|
import { tick } from "svelte";
|
|
5
|
-
import * as Command from "
|
|
6
|
-
import * as Popover from "
|
|
7
|
-
import { Button } from "
|
|
8
|
-
import { cn } from "
|
|
5
|
+
import * as Command from "./ui/command/index.js";
|
|
6
|
+
import * as Popover from "./ui/popover/index.js";
|
|
7
|
+
import { Button } from "./ui/button/index.js";
|
|
8
|
+
import { cn } from "../utils.js";
|
|
9
9
|
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
10
10
|
|
|
11
11
|
interface Option {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
2
|
+
interface Option {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
interface Props {
|
|
7
|
+
placeholder: string;
|
|
8
|
+
searchPlaceholder: string;
|
|
9
|
+
options: Option[];
|
|
10
|
+
value: string;
|
|
11
|
+
buttonClass?: HTMLButtonAttributes["class"];
|
|
12
|
+
}
|
|
13
|
+
declare const Combobox: import("svelte").Component<Props, {}, "value">;
|
|
14
|
+
type Combobox = ReturnType<typeof Combobox>;
|
|
15
|
+
export default Combobox;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface DialogProps {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
onDecision: (result: boolean) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const ConfirmationDialog: import("svelte").Component<DialogProps, {}, "">;
|
|
7
|
+
type ConfirmationDialog = ReturnType<typeof ConfirmationDialog>;
|
|
8
|
+
export default ConfirmationDialog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showDialog(title: string, description: string): Promise<boolean>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { mount, unmount } from "svelte";
|
|
38
|
+
import ConfirmationDialog from "./confirmationDialog.svelte";
|
|
39
|
+
export function showDialog(title, description) {
|
|
40
|
+
var _this = this;
|
|
41
|
+
return new Promise(function (resolve) {
|
|
42
|
+
var targetElement = document.querySelector('main');
|
|
43
|
+
if (!targetElement) {
|
|
44
|
+
throw new Error("main html element doesn't exist for some reason");
|
|
45
|
+
}
|
|
46
|
+
var mountedElement = mount(ConfirmationDialog, {
|
|
47
|
+
target: targetElement,
|
|
48
|
+
props: {
|
|
49
|
+
title: title,
|
|
50
|
+
description: description,
|
|
51
|
+
onDecision: function (result) { return __awaiter(_this, void 0, void 0, function () {
|
|
52
|
+
return __generator(this, function (_a) {
|
|
53
|
+
switch (_a.label) {
|
|
54
|
+
case 0:
|
|
55
|
+
resolve(result);
|
|
56
|
+
return [4 /*yield*/, unmount(mountedElement, {
|
|
57
|
+
outro: true
|
|
58
|
+
})];
|
|
59
|
+
case 1:
|
|
60
|
+
_a.sent();
|
|
61
|
+
return [2 /*return*/];
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}); }
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
console.log("the dialog is mounted man");
|
|
68
|
+
});
|
|
69
|
+
}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
import Button, { type ButtonProps } from "./ui/button/button.svelte";
|
|
5
5
|
import { toast } from "svelte-sonner";
|
|
6
6
|
import MonacoEditor from "./monacoEditor.svelte";
|
|
7
|
-
import { lobb } from "
|
|
8
|
-
import { calculateDrawerWidth } from "
|
|
7
|
+
import { lobb } from "..";
|
|
8
|
+
import { calculateDrawerWidth } from "../utils";
|
|
9
9
|
import Drawer from "./drawer.svelte";
|
|
10
10
|
|
|
11
11
|
interface LocalProps extends ButtonProps {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ButtonProps } from "./ui/button/button.svelte";
|
|
2
|
+
interface LocalProps extends ButtonProps {
|
|
3
|
+
collectionName: string;
|
|
4
|
+
onSuccessfullSave?: () => Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
declare const CreateManyButton: import("svelte").Component<LocalProps, {}, "">;
|
|
7
|
+
type CreateManyButton = ReturnType<typeof CreateManyButton>;
|
|
8
|
+
export default CreateManyButton;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { ctx } from "
|
|
2
|
+
import { ctx } from "../../store.svelte";
|
|
3
3
|
import { ChevronRight, Plus, Smartphone, Table } from "lucide-svelte";
|
|
4
4
|
import DataTable from "./dataTable.svelte";
|
|
5
5
|
import CreateDetailViewButton from "../detailView/create/createDetailViewButton.svelte";
|
|
6
6
|
import ExtensionsComponents from "../extensionsComponents.svelte";
|
|
7
|
-
import { getExtensionUtils } from "
|
|
7
|
+
import { getExtensionUtils } from "../../extensions/extensionUtils";
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
10
10
|
collectionName: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
collectionName: string;
|
|
3
|
+
recordId: string;
|
|
4
|
+
width: number;
|
|
5
|
+
unifiedBgColor?: "bg-soft" | "bg-background";
|
|
6
|
+
}
|
|
7
|
+
declare const ChildRecords: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type ChildRecords = ReturnType<typeof ChildRecords>;
|
|
9
|
+
export default ChildRecords;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import _ from "lodash";
|
|
3
|
-
import { lobb } from "
|
|
3
|
+
import { lobb } from "../..";
|
|
4
4
|
import Footer from "./footer.svelte";
|
|
5
5
|
import Header from "./header.svelte";
|
|
6
6
|
import Table, { type TableProps } from "./table.svelte";
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
import ChildRecords from "./childRecords.svelte";
|
|
11
11
|
import FieldCell from "./fieldCell.svelte";
|
|
12
12
|
import Skeleton from "../ui/skeleton/skeleton.svelte";
|
|
13
|
-
import { ctx } from "
|
|
13
|
+
import { ctx } from "../../store.svelte";
|
|
14
14
|
import Button from "../ui/button/button.svelte";
|
|
15
15
|
import { showDialog } from "../confirmationDialog/store.svelte";
|
|
16
16
|
import UpdateDetailViewButton from "../detailView/update/updateDetailViewButton.svelte";
|
|
17
|
-
import { emitEvent } from "
|
|
17
|
+
import { emitEvent } from "../../eventSystem";
|
|
18
18
|
import type { Snippet } from "svelte";
|
|
19
19
|
|
|
20
20
|
interface Props {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type TableProps } from "./table.svelte";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
interface Props {
|
|
4
|
+
collectionName: string;
|
|
5
|
+
filter?: any;
|
|
6
|
+
showHeader?: boolean;
|
|
7
|
+
showFooter?: boolean;
|
|
8
|
+
unifiedBgColor?: "bg-soft" | "bg-background";
|
|
9
|
+
showDelete?: boolean;
|
|
10
|
+
tableProps?: Partial<TableProps>;
|
|
11
|
+
headerLeft?: Snippet<[]>;
|
|
12
|
+
}
|
|
13
|
+
declare const DataTable: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
type DataTable = ReturnType<typeof DataTable>;
|
|
15
|
+
export default DataTable;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { getFieldRelation } from "
|
|
2
|
+
import { getFieldRelation } from "../../utils";
|
|
3
3
|
import { ExternalLink } from "lucide-svelte";
|
|
4
4
|
import UpdateDetailViewButton from "../detailView/update/updateDetailViewButton.svelte";
|
|
5
5
|
import { getField } from "./utils";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
collectionName: string;
|
|
3
|
+
fieldName: string;
|
|
4
|
+
value: any;
|
|
5
|
+
entry: Record<string, any>;
|
|
6
|
+
tableParams?: any;
|
|
7
|
+
}
|
|
8
|
+
declare const FieldCell: import("svelte").Component<Props, {}, "tableParams">;
|
|
9
|
+
type FieldCell = ReturnType<typeof FieldCell>;
|
|
10
|
+
export default FieldCell;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import * as Popover from "
|
|
2
|
+
import * as Popover from "../ui/popover/index.js";
|
|
3
3
|
import Filter from "./filter.svelte";
|
|
4
4
|
import {
|
|
5
5
|
Plus,
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
} from "lucide-svelte";
|
|
12
12
|
import { buttonVariants } from "../ui/button";
|
|
13
13
|
import _ from "lodash";
|
|
14
|
-
import { ctx } from "
|
|
14
|
+
import { ctx } from "../../store.svelte";
|
|
15
15
|
import Button from "../ui/button/button.svelte";
|
|
16
16
|
|
|
17
17
|
interface Props {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Filter from "./filter.svelte";
|
|
2
|
+
interface Props {
|
|
3
|
+
filter: any;
|
|
4
|
+
collectionName: string;
|
|
5
|
+
isFirst?: boolean;
|
|
6
|
+
deleteFilter?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare const Filter: import("svelte").Component<Props, {}, "filter">;
|
|
9
|
+
type Filter = ReturnType<typeof Filter>;
|
|
10
|
+
export default Filter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import * as Popover from "
|
|
2
|
+
import * as Popover from "../ui/popover/index.js";
|
|
3
3
|
import { ListFilter } from "lucide-svelte";
|
|
4
4
|
import { buttonVariants } from "../ui/button";
|
|
5
5
|
import Filter from "./filter.svelte";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { ctx } from "
|
|
2
|
+
import { ctx } from "../../store.svelte";
|
|
3
3
|
import { ListRestart, Plus, SquareStack, Trash } from "lucide-svelte";
|
|
4
4
|
import LlmButton from "../LlmButton.svelte";
|
|
5
5
|
import FilterButton from "./filterButton.svelte";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import Button from "../ui/button/button.svelte";
|
|
8
8
|
import CreateManyButton from "../createManyButton.svelte";
|
|
9
9
|
import { showDialog } from "../confirmationDialog/store.svelte";
|
|
10
|
-
import { lobb } from "
|
|
10
|
+
import { lobb } from "../..";
|
|
11
11
|
import CreateDetailViewButton from "../detailView/create/createDetailViewButton.svelte";
|
|
12
12
|
import type { Snippet } from "svelte";
|
|
13
13
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
interface Props {
|
|
3
|
+
collectionName: string;
|
|
4
|
+
params: any;
|
|
5
|
+
selectedRecords: string[];
|
|
6
|
+
left?: Snippet<[]>;
|
|
7
|
+
}
|
|
8
|
+
declare const Header: import("svelte").Component<Props, {}, "params" | "selectedRecords">;
|
|
9
|
+
type Header = ReturnType<typeof Header>;
|
|
10
|
+
export default Header;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
|
|
4
|
-
import * as Popover from "
|
|
4
|
+
import * as Popover from "../ui/popover/index.js";
|
|
5
5
|
import { ArrowDown, ArrowUp, GripVertical, Plus, X } from "lucide-svelte";
|
|
6
6
|
import Button, { buttonVariants } from "../ui/button/button.svelte";
|
|
7
7
|
import Label from "../ui/label/label.svelte";
|
|
8
8
|
import Switch from "../ui/switch/switch.svelte";
|
|
9
|
-
import { ctx } from "
|
|
9
|
+
import { ctx } from "../../store.svelte";
|
|
10
10
|
import { getFieldIcon } from "./utils";
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import * as Popover from "
|
|
2
|
+
import * as Popover from "../ui/popover/index.js";
|
|
3
3
|
import { ArrowDownWideNarrow } from "lucide-svelte";
|
|
4
|
-
import { buttonVariants } from "
|
|
4
|
+
import { buttonVariants } from "../ui/button";
|
|
5
5
|
import Sort from "./sort.svelte";
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface Column {
|
|
2
|
+
id: string;
|
|
3
|
+
icon?: any;
|
|
4
|
+
subtext?: any;
|
|
5
|
+
}
|
|
6
|
+
type Entry = Record<string, any>;
|
|
7
|
+
interface Select {
|
|
8
|
+
onSelect: (entry: any) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface TableProps {
|
|
11
|
+
data: Entry[];
|
|
12
|
+
columns?: Column[];
|
|
13
|
+
showCollapsible?: boolean;
|
|
14
|
+
sort?: Record<string, "asc" | "desc">;
|
|
15
|
+
localSorting?: boolean;
|
|
16
|
+
selectedRecords?: Array<any>;
|
|
17
|
+
selectByColumn?: string | null;
|
|
18
|
+
showCheckboxes?: boolean;
|
|
19
|
+
showLastRowBorder?: boolean;
|
|
20
|
+
showLastColumnBorder?: boolean;
|
|
21
|
+
overrideCell?: Snippet<[any, Column, Entry]>;
|
|
22
|
+
tools?: Snippet<[Entry, number]>;
|
|
23
|
+
collapsible?: Snippet<[Entry, number]>;
|
|
24
|
+
parentWidth?: number;
|
|
25
|
+
unifiedBgColor?: "bg-soft" | "bg-background";
|
|
26
|
+
select?: Select;
|
|
27
|
+
tableWidth?: number;
|
|
28
|
+
}
|
|
29
|
+
import type { Snippet } from "svelte";
|
|
30
|
+
declare const Table: import("svelte").Component<TableProps, {}, "sort" | "selectedRecords" | "tableWidth">;
|
|
31
|
+
type Table = ReturnType<typeof Table>;
|
|
32
|
+
export default Table;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TableProps } from "./table.svelte";
|
|
2
|
+
export declare function getCollectionColumns(collectionName: string): TableProps['columns'];
|
|
3
|
+
export declare function getFieldIcon(fieldName: string, collectionName: string): any;
|
|
4
|
+
export declare function getFields(collectionName: string): Record<string, any>;
|
|
5
|
+
export declare function getField(fieldName: string, collectionName: string): any;
|
|
6
|
+
export declare function getCollectionPrimaryField(collectionName: string): string | undefined;
|
|
7
|
+
export declare function getCollectionParamsFields(collectionName: string, allFields?: boolean): string;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ctx } from "../../store.svelte";
|
|
2
|
+
import { Binary, Braces, Brackets, Calendar, CalendarClock, Clock, Hash, Key, Text, Type, } from "lucide-svelte/icons";
|
|
3
|
+
export function getCollectionColumns(collectionName) {
|
|
4
|
+
var collectionFields = getFields(collectionName);
|
|
5
|
+
var headers = [];
|
|
6
|
+
for (var fieldName in collectionFields) {
|
|
7
|
+
var field = collectionFields[fieldName];
|
|
8
|
+
headers.push({
|
|
9
|
+
id: field.key,
|
|
10
|
+
subtext: field.type,
|
|
11
|
+
icon: getFieldIcon(fieldName, collectionName),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return headers;
|
|
15
|
+
}
|
|
16
|
+
export function getFieldIcon(fieldName, collectionName) {
|
|
17
|
+
var field = getField(fieldName, collectionName);
|
|
18
|
+
if (fieldName === "id") {
|
|
19
|
+
return Key;
|
|
20
|
+
}
|
|
21
|
+
else if (field.type === "string") {
|
|
22
|
+
return Type;
|
|
23
|
+
}
|
|
24
|
+
else if (field.type === "text") {
|
|
25
|
+
return Text;
|
|
26
|
+
}
|
|
27
|
+
else if (field.type === "object") {
|
|
28
|
+
return Braces;
|
|
29
|
+
}
|
|
30
|
+
else if (field.type === "array") {
|
|
31
|
+
return Brackets;
|
|
32
|
+
}
|
|
33
|
+
else if (field.type === "bool") {
|
|
34
|
+
return Binary;
|
|
35
|
+
}
|
|
36
|
+
else if (field.type === "integer") {
|
|
37
|
+
return Hash;
|
|
38
|
+
}
|
|
39
|
+
else if (field.type === "long") {
|
|
40
|
+
return Hash;
|
|
41
|
+
}
|
|
42
|
+
else if (field.type === "float") {
|
|
43
|
+
return Hash;
|
|
44
|
+
}
|
|
45
|
+
else if (field.type === "decimal") {
|
|
46
|
+
return Hash;
|
|
47
|
+
}
|
|
48
|
+
else if (field.type === "date") {
|
|
49
|
+
return Calendar;
|
|
50
|
+
}
|
|
51
|
+
else if (field.type === "datetime") {
|
|
52
|
+
return CalendarClock;
|
|
53
|
+
}
|
|
54
|
+
else if (field.type === "time") {
|
|
55
|
+
return Clock;
|
|
56
|
+
}
|
|
57
|
+
throw new Error("(".concat(field.type, ") doesnt have an icon"));
|
|
58
|
+
}
|
|
59
|
+
export function getFields(collectionName) {
|
|
60
|
+
return ctx.meta.collections[collectionName].fields;
|
|
61
|
+
}
|
|
62
|
+
export function getField(fieldName, collectionName) {
|
|
63
|
+
return getFields(collectionName)[fieldName];
|
|
64
|
+
}
|
|
65
|
+
export function getCollectionPrimaryField(collectionName) {
|
|
66
|
+
var collectionFields = ctx.meta.collections[collectionName].fields;
|
|
67
|
+
var primaryFieldObject = Object.values(collectionFields).find(function (field) { return field.type === "string"; });
|
|
68
|
+
if (primaryFieldObject &&
|
|
69
|
+
typeof primaryFieldObject === "object" &&
|
|
70
|
+
"key" in primaryFieldObject) {
|
|
71
|
+
var fieldName = primaryFieldObject.key;
|
|
72
|
+
return fieldName;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export function getCollectionParamsFields(collectionName, allFields) {
|
|
76
|
+
if (allFields === void 0) { allFields = false; }
|
|
77
|
+
var relations = ctx.meta.relations;
|
|
78
|
+
var foreignFields = relations
|
|
79
|
+
.filter(function (relation) {
|
|
80
|
+
return relation.from.collection === collectionName;
|
|
81
|
+
})
|
|
82
|
+
.map(function (relation) {
|
|
83
|
+
return {
|
|
84
|
+
field: relation.from.field,
|
|
85
|
+
collection: relation.to.collection,
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
var columns = [];
|
|
89
|
+
for (var index = 0; index < foreignFields.length; index++) {
|
|
90
|
+
var foreignField = foreignFields[index];
|
|
91
|
+
if (!foreignField.collection) {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
columns.push("".concat(foreignField.field, ".id"));
|
|
95
|
+
if (!allFields) {
|
|
96
|
+
var primaryField = getCollectionPrimaryField(foreignField.collection);
|
|
97
|
+
if (primaryField) {
|
|
98
|
+
columns.push("".concat(foreignField.field, ".").concat(primaryField));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
var fieldNames = Object.keys(ctx.meta.collections[foreignField.collection].fields);
|
|
103
|
+
for (var index_1 = 0; index_1 < fieldNames.length; index_1++) {
|
|
104
|
+
var fieldName = fieldNames[index_1];
|
|
105
|
+
columns.push("".concat(foreignField.field, ".").concat(fieldName));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
var foreignColumns = columns.join(",");
|
|
110
|
+
return "*".concat(foreignColumns ? ",".concat(foreignColumns) : "");
|
|
111
|
+
}
|