@lobb-js/studio 0.1.37 → 0.1.39
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/Lobb.js +358 -0
- package/dist/Studio.svelte +150 -0
- package/dist/Studio.svelte.d.ts +6 -0
- package/{src/lib → dist}/components/LlmButton.svelte +2 -2
- package/dist/components/LlmButton.svelte.d.ts +17 -0
- package/{src/lib → dist}/components/Studio.svelte +10 -10
- package/dist/components/Studio.svelte.d.ts +6 -0
- package/{src/lib → dist}/components/alertView.svelte +1 -1
- package/dist/components/alertView.svelte.d.ts +8 -0
- package/{src/lib → dist}/components/breadCrumbs.svelte +2 -2
- package/dist/components/breadCrumbs.svelte.d.ts +3 -0
- package/{src/lib → dist}/components/combobox.svelte +4 -4
- package/dist/components/combobox.svelte.d.ts +15 -0
- package/{src/lib → dist}/components/confirmationDialog/confirmationDialog.svelte +1 -1
- package/dist/components/confirmationDialog/confirmationDialog.svelte.d.ts +8 -0
- package/dist/components/confirmationDialog/store.svelte.d.ts +1 -0
- package/dist/components/confirmationDialog/store.svelte.js +69 -0
- package/{src/lib → dist}/components/createManyButton.svelte +2 -2
- package/dist/components/createManyButton.svelte.d.ts +8 -0
- package/{src/lib → dist}/components/dataTable/childRecords.svelte +2 -2
- package/dist/components/dataTable/childRecords.svelte.d.ts +9 -0
- package/{src/lib → dist}/components/dataTable/dataTable.svelte +3 -3
- package/dist/components/dataTable/dataTable.svelte.d.ts +15 -0
- package/{src/lib → dist}/components/dataTable/fieldCell.svelte +1 -1
- package/dist/components/dataTable/fieldCell.svelte.d.ts +10 -0
- package/{src/lib → dist}/components/dataTable/filter.svelte +2 -2
- package/dist/components/dataTable/filter.svelte.d.ts +10 -0
- package/{src/lib → dist}/components/dataTable/filterButton.svelte +1 -1
- package/dist/components/dataTable/filterButton.svelte.d.ts +8 -0
- package/dist/components/dataTable/footer.svelte.d.ts +8 -0
- package/{src/lib → dist}/components/dataTable/header.svelte +2 -2
- package/dist/components/dataTable/header.svelte.d.ts +10 -0
- package/{src/lib → dist}/components/dataTable/sort.svelte +2 -2
- package/dist/components/dataTable/sort.svelte.d.ts +8 -0
- package/{src/lib → dist}/components/dataTable/sortButton.svelte +2 -2
- package/dist/components/dataTable/sortButton.svelte.d.ts +8 -0
- package/dist/components/dataTable/table.svelte.d.ts +32 -0
- package/dist/components/dataTable/utils.d.ts +7 -0
- package/dist/components/dataTable/utils.js +111 -0
- package/{src/lib → dist}/components/detailView/create/children.svelte +3 -3
- package/dist/components/detailView/create/children.svelte.d.ts +8 -0
- package/{src/lib → dist}/components/detailView/create/createDetailView.svelte +6 -6
- package/dist/components/detailView/create/createDetailView.svelte.d.ts +18 -0
- package/{src/lib → dist}/components/detailView/create/createDetailViewButton.svelte +2 -2
- package/dist/components/detailView/create/createDetailViewButton.svelte.d.ts +11 -0
- package/{src/lib → dist}/components/detailView/create/createManyView.svelte +5 -5
- package/dist/components/detailView/create/createManyView.svelte.d.ts +16 -0
- package/{src/lib → dist}/components/detailView/create/subRecords.svelte +1 -1
- package/dist/components/detailView/create/subRecords.svelte.d.ts +8 -0
- package/dist/components/detailView/detailViewForm.svelte.d.ts +48 -0
- package/dist/components/detailView/fieldCustomInput.svelte.d.ts +10 -0
- package/{src/lib → dist}/components/detailView/fieldInput.svelte +4 -4
- package/dist/components/detailView/fieldInput.svelte.d.ts +10 -0
- package/{src/lib → dist}/components/detailView/fieldInputReplacement.svelte +1 -1
- package/dist/components/detailView/fieldInputReplacement.svelte.d.ts +11 -0
- package/dist/components/detailView/store.svelte.d.ts +4 -0
- package/dist/components/detailView/store.svelte.js +125 -0
- package/{src/lib → dist}/components/detailView/update/children.svelte +4 -4
- package/dist/components/detailView/update/children.svelte.d.ts +7 -0
- package/{src/lib → dist}/components/detailView/update/updateDetailView.svelte +6 -6
- package/dist/components/detailView/update/updateDetailView.svelte.d.ts +19 -0
- package/{src/lib → dist}/components/detailView/update/updateDetailViewButton.svelte +2 -2
- package/dist/components/detailView/update/updateDetailViewButton.svelte.d.ts +11 -0
- package/dist/components/detailView/utils.d.ts +8 -0
- package/dist/components/detailView/utils.js +165 -0
- package/{src/lib → dist}/components/diffViewer.svelte +1 -1
- package/dist/components/diffViewer.svelte.d.ts +9 -0
- package/{src/lib → dist}/components/drawer.svelte +1 -1
- package/dist/components/drawer.svelte.d.ts +8 -0
- package/{src/lib → dist}/components/extensionsComponents.svelte +1 -1
- package/dist/components/extensionsComponents.svelte.d.ts +11 -0
- package/dist/components/foreingKeyInput.svelte.d.ts +11 -0
- package/{src/lib → dist}/components/header.svelte +1 -1
- package/dist/components/header.svelte.d.ts +6 -0
- package/dist/components/loadingTypesForMonacoEditor.d.ts +7 -0
- package/dist/components/loadingTypesForMonacoEditor.js +72 -0
- package/{src/lib → dist}/components/miniSidebar.svelte +7 -7
- package/dist/components/miniSidebar.svelte.d.ts +20 -0
- package/{src/lib → dist}/components/monacoEditor.svelte +1 -1
- package/dist/components/monacoEditor.svelte.d.ts +13 -0
- package/{src/lib → dist}/components/rangeCalendarButton.svelte +4 -4
- package/dist/components/rangeCalendarButton.svelte.d.ts +7 -0
- package/{src/lib → dist}/components/routes/collections/collection.svelte +4 -4
- package/dist/components/routes/collections/collection.svelte.d.ts +11 -0
- package/{src/lib → dist}/components/routes/collections/collections.svelte +3 -3
- package/{src/lib → dist}/components/routes/data_model/dataModel.svelte +2 -2
- package/{src/lib → dist}/components/routes/data_model/flow.svelte +1 -1
- package/{src/lib → dist}/components/routes/data_model/syncManager.svelte +6 -6
- package/dist/components/routes/data_model/utils.js +34 -0
- package/{src/lib → dist}/components/routes/extensions/extension.svelte +2 -2
- package/dist/components/routes/extensions/extension.svelte.d.ts +13 -0
- package/{src/lib → dist}/components/routes/home.svelte +2 -2
- package/dist/components/routes/home.svelte.d.ts +26 -0
- package/{src/lib → dist}/components/routes/workflows/workflows.svelte +8 -8
- package/{src/lib → dist}/components/selectRecord.svelte +1 -1
- package/dist/components/selectRecord.svelte.d.ts +15 -0
- package/{src/lib → dist}/components/setServerPage.svelte +2 -2
- package/dist/components/setServerPage.svelte.d.ts +18 -0
- package/{src/lib/components/sidebar/index.ts → dist/components/sidebar/index.d.ts} +1 -2
- package/dist/components/sidebar/index.js +3 -0
- package/{src/lib → dist}/components/sidebar/sidebar.svelte +1 -1
- package/dist/components/sidebar/sidebar.svelte.d.ts +17 -0
- package/dist/components/sidebar/sidebarElements.svelte.d.ts +19 -0
- package/dist/components/sidebar/sidebarTrigger.svelte.d.ts +7 -0
- package/{src/lib → dist}/components/singletone.svelte +1 -1
- package/dist/components/singletone.svelte.d.ts +6 -0
- package/{src/lib → dist}/components/ui/accordion/accordion-content.svelte +1 -1
- package/dist/components/ui/accordion/accordion-content.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/accordion/accordion-item.svelte +1 -1
- package/dist/components/ui/accordion/accordion-item.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/accordion/accordion-trigger.svelte +1 -1
- package/dist/components/ui/accordion/accordion-trigger.svelte.d.ts +7 -0
- package/dist/components/ui/accordion/index.d.ts +6 -0
- package/{src/lib/components/ui/accordion/index.ts → dist/components/ui/accordion/index.js} +4 -13
- package/{src/lib → dist}/components/ui/alert/alert-description.svelte +1 -1
- package/dist/components/ui/alert/alert-description.svelte.d.ts +5 -0
- package/{src/lib → dist}/components/ui/alert/alert-title.svelte +1 -1
- package/dist/components/ui/alert/alert-title.svelte.d.ts +8 -0
- package/{src/lib → dist}/components/ui/alert/alert.svelte +1 -1
- package/dist/components/ui/alert/alert.svelte.d.ts +26 -0
- package/{src/lib/components/ui/alert/index.ts → dist/components/ui/alert/index.d.ts} +1 -10
- package/dist/components/ui/alert/index.js +7 -0
- package/{src/lib → dist}/components/ui/alert-dialog/alert-dialog-action.svelte +2 -2
- package/dist/components/ui/alert-dialog/alert-dialog-action.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/alert-dialog/alert-dialog-cancel.svelte +2 -2
- package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/alert-dialog/alert-dialog-content.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte.d.ts +7 -0
- package/{src/lib → dist}/components/ui/alert-dialog/alert-dialog-description.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/alert-dialog/alert-dialog-footer.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-footer.svelte.d.ts +5 -0
- package/{src/lib → dist}/components/ui/alert-dialog/alert-dialog-header.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-header.svelte.d.ts +5 -0
- package/{src/lib → dist}/components/ui/alert-dialog/alert-dialog-overlay.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/alert-dialog/alert-dialog-title.svelte +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/index.d.ts +13 -0
- package/dist/components/ui/alert-dialog/index.js +15 -0
- package/{src/lib → dist}/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-ellipsis.svelte.d.ts +5 -0
- package/{src/lib → dist}/components/ui/breadcrumb/breadcrumb-item.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-item.svelte.d.ts +5 -0
- package/{src/lib → dist}/components/ui/breadcrumb/breadcrumb-link.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-link.svelte.d.ts +11 -0
- package/{src/lib → dist}/components/ui/breadcrumb/breadcrumb-list.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-list.svelte.d.ts +5 -0
- package/{src/lib → dist}/components/ui/breadcrumb/breadcrumb-page.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-page.svelte.d.ts +5 -0
- package/{src/lib → dist}/components/ui/breadcrumb/breadcrumb-separator.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte.d.ts +5 -0
- package/dist/components/ui/breadcrumb/breadcrumb.svelte.d.ts +5 -0
- package/{src/lib/components/ui/breadcrumb/index.ts → dist/components/ui/breadcrumb/index.d.ts} +1 -18
- package/dist/components/ui/breadcrumb/index.js +10 -0
- package/{src/lib → dist}/components/ui/button/button.svelte +1 -1
- package/dist/components/ui/button/button.svelte.d.ts +60 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.js +4 -0
- package/{src/lib → dist}/components/ui/checkbox/checkbox.svelte +1 -1
- package/dist/components/ui/checkbox/checkbox.svelte.d.ts +4 -0
- package/dist/components/ui/checkbox/index.d.ts +2 -0
- package/dist/components/ui/checkbox/index.js +4 -0
- package/{src/lib → dist}/components/ui/command/command-dialog.svelte +1 -1
- package/dist/components/ui/command/command-dialog.svelte.d.ts +9 -0
- package/{src/lib → dist}/components/ui/command/command-empty.svelte +1 -1
- package/dist/components/ui/command/command-empty.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/command/command-group.svelte +1 -1
- package/dist/components/ui/command/command-group.svelte.d.ts +7 -0
- package/{src/lib → dist}/components/ui/command/command-input.svelte +1 -1
- package/dist/components/ui/command/command-input.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/command/command-item.svelte +1 -1
- package/dist/components/ui/command/command-item.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/command/command-link-item.svelte +1 -1
- package/dist/components/ui/command/command-link-item.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/command/command-list.svelte +1 -1
- package/dist/components/ui/command/command-list.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/command/command-separator.svelte +1 -1
- package/dist/components/ui/command/command-separator.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/command/command-shortcut.svelte +1 -1
- package/dist/components/ui/command/command-shortcut.svelte.d.ts +5 -0
- package/{src/lib → dist}/components/ui/command/command.svelte +1 -1
- package/dist/components/ui/command/command.svelte.d.ts +4 -0
- package/{src/lib/components/ui/command/index.ts → dist/components/ui/command/index.d.ts} +2 -29
- package/dist/components/ui/command/index.js +15 -0
- package/{src/lib → dist}/components/ui/dialog/dialog-content.svelte +1 -1
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +9 -0
- package/{src/lib → dist}/components/ui/dialog/dialog-description.svelte +1 -1
- package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/dialog/dialog-footer.svelte +1 -1
- package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +5 -0
- package/{src/lib → dist}/components/ui/dialog/dialog-header.svelte +1 -1
- package/dist/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
- package/{src/lib → dist}/components/ui/dialog/dialog-overlay.svelte +1 -1
- package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/dialog/dialog-title.svelte +1 -1
- package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/index.d.ts +12 -0
- package/dist/components/ui/dialog/index.js +14 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.js +4 -0
- package/{src/lib → dist}/components/ui/input/input.svelte +1 -1
- package/dist/components/ui/input/input.svelte.d.ts +13 -0
- package/dist/components/ui/label/index.d.ts +2 -0
- package/dist/components/ui/label/index.js +4 -0
- package/{src/lib → dist}/components/ui/label/label.svelte +1 -1
- package/dist/components/ui/label/label.svelte.d.ts +4 -0
- package/dist/components/ui/popover/index.d.ts +6 -0
- package/dist/components/ui/popover/index.js +8 -0
- package/{src/lib → dist}/components/ui/popover/popover-content.svelte +1 -1
- package/dist/components/ui/popover/popover-content.svelte.d.ts +7 -0
- package/{src/lib/components/ui/range-calendar/index.ts → dist/components/ui/range-calendar/index.d.ts} +1 -17
- package/dist/components/ui/range-calendar/index.js +16 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar-cell.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-cell.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar-day.svelte +2 -2
- package/dist/components/ui/range-calendar/range-calendar-day.svelte.d.ts +6 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar-grid-body.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-grid-body.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar-grid-head.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-grid-head.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar-grid-row.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-grid-row.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar-grid.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-grid.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar-head-cell.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-head-cell.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar-header.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-header.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar-heading.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-heading.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar-months.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-months.svelte.d.ts +5 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar-next-button.svelte +2 -2
- package/dist/components/ui/range-calendar/range-calendar-next-button.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar-prev-button.svelte +2 -2
- package/dist/components/ui/range-calendar/range-calendar-prev-button.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/range-calendar/range-calendar.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar.svelte.d.ts +5 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/select/index.js +13 -0
- package/{src/lib → dist}/components/ui/select/select-content.svelte +1 -1
- package/dist/components/ui/select/select-content.svelte.d.ts +7 -0
- package/{src/lib → dist}/components/ui/select/select-group-heading.svelte +1 -1
- package/dist/components/ui/select/select-group-heading.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/select/select-item.svelte +1 -1
- package/dist/components/ui/select/select-item.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/select/select-scroll-down-button.svelte +1 -1
- package/dist/components/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/select/select-scroll-up-button.svelte +1 -1
- package/dist/components/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/select/select-separator.svelte +2 -2
- package/dist/components/ui/select/select-separator.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/ui/select/select-trigger.svelte +1 -1
- package/dist/components/ui/select/select-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.js +4 -0
- package/{src/lib → dist}/components/ui/separator/separator.svelte +1 -1
- package/dist/components/ui/separator/separator.svelte.d.ts +4 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.js +4 -0
- package/{src/lib → dist}/components/ui/skeleton/skeleton.svelte +1 -1
- package/dist/components/ui/skeleton/skeleton.svelte.d.ts +5 -0
- package/dist/components/ui/sonner/index.js +1 -0
- package/dist/components/ui/sonner/sonner.svelte.d.ts +4 -0
- package/dist/components/ui/switch/index.d.ts +2 -0
- package/dist/components/ui/switch/index.js +4 -0
- package/{src/lib → dist}/components/ui/switch/switch.svelte +1 -1
- package/dist/components/ui/switch/switch.svelte.d.ts +4 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.js +4 -0
- package/{src/lib → dist}/components/ui/textarea/textarea.svelte +1 -1
- package/dist/components/ui/textarea/textarea.svelte.d.ts +5 -0
- package/dist/components/ui/tooltip/index.d.ts +6 -0
- package/dist/components/ui/tooltip/index.js +8 -0
- package/{src/lib → dist}/components/ui/tooltip/tooltip-content.svelte +1 -1
- package/dist/components/ui/tooltip/tooltip-content.svelte.d.ts +4 -0
- package/{src/lib → dist}/components/workflowEditor.svelte +5 -5
- package/dist/components/workflowEditor.svelte.d.ts +16 -0
- package/dist/eventSystem.js +89 -0
- package/{src/lib → dist}/extensions/extension.types.d.ts +21 -21
- package/dist/extensions/extension.types.js +1 -0
- package/dist/extensions/extensionUtils.js +239 -0
- package/dist/index.js +27 -0
- package/dist/store.svelte.js +72 -0
- package/dist/store.types.js +1 -0
- package/dist/utils.js +72 -0
- package/package.json +24 -17
- package/vite-plugins/index.js +3 -6
- package/vite-plugins/monorepo-import-resolver.js +92 -0
- 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/routes/data_model/utils.ts +0 -35
- 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/extensions/extension.types.ts +0 -92
- package/src/lib/extensions/extensionUtils.ts +0 -191
- package/src/lib/index.ts +0 -36
- package/src/lib/store.svelte.ts +0 -33
- package/src/lib/store.types.ts +0 -28
- package/src/lib/utils.ts +0 -79
- package/vite-plugins/studio-source-resolver.js +0 -41
- /package/{src/lib → dist}/Lobb.d.ts +0 -0
- /package/{src/lib → dist}/components/dataTable/footer.svelte +0 -0
- /package/{src/lib → dist}/components/dataTable/table.svelte +0 -0
- /package/{src/lib → dist}/components/detailView/detailViewForm.svelte +0 -0
- /package/{src/lib → dist}/components/detailView/fieldCustomInput.svelte +0 -0
- /package/{src/lib → dist}/components/foreingKeyInput.svelte +0 -0
- /package/{src/lib → dist}/components/routes/collections/collections.svelte.d.ts +0 -0
- /package/{src/lib → dist}/components/routes/data_model/dataModel.svelte.d.ts +0 -0
- /package/{src/lib → dist}/components/routes/data_model/flow.css +0 -0
- /package/{src/lib → dist}/components/routes/data_model/flow.svelte.d.ts +0 -0
- /package/{src/lib → dist}/components/routes/data_model/syncManager.svelte.d.ts +0 -0
- /package/{src/lib → dist}/components/routes/data_model/utils.d.ts +0 -0
- /package/{src/lib → dist}/components/routes/workflows/workflows.svelte.d.ts +0 -0
- /package/{src/lib → dist}/components/sidebar/sidebarElements.svelte +0 -0
- /package/{src/lib → dist}/components/sidebar/sidebarTrigger.svelte +0 -0
- /package/{src/lib → dist}/components/ui/breadcrumb/breadcrumb.svelte +0 -0
- /package/{src/lib/components/ui/sonner/index.ts → dist/components/ui/sonner/index.d.ts} +0 -0
- /package/{src/lib → dist}/components/ui/sonner/sonner.svelte +0 -0
- /package/{src/lib → dist}/eventSystem.d.ts +0 -0
- /package/{src/lib → dist}/extensions/extensionUtils.d.ts +0 -0
- /package/{src/lib → dist}/index.d.ts +0 -0
- /package/{src/lib → dist}/store.svelte.d.ts +0 -0
- /package/{src/lib → dist}/store.types.d.ts +0 -0
- /package/{src/lib → dist}/utils.d.ts +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import Dagre from '@dagrejs/dagre';
|
|
2
|
-
|
|
3
|
-
export function getLayoutedElements(nodes: any[], edges: any[]) {
|
|
4
|
-
const g = new Dagre.graphlib.Graph().setDefaultEdgeLabel(() => ({}));
|
|
5
|
-
g.setGraph({ rankdir: "LR" });
|
|
6
|
-
|
|
7
|
-
edges.forEach((edge) => g.setEdge(edge.source, edge.target));
|
|
8
|
-
nodes.forEach((node) => {
|
|
9
|
-
return g.setNode(node.id, {
|
|
10
|
-
...node,
|
|
11
|
-
width: node.measured?.width ?? 0,
|
|
12
|
-
height: node.measured?.height ?? 0,
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
Dagre.layout(g);
|
|
17
|
-
|
|
18
|
-
return {
|
|
19
|
-
nodes: nodes.map((node) => {
|
|
20
|
-
const position = g.node(node.id);
|
|
21
|
-
// We are shifting the dagre node position (anchor=center center) to the top left
|
|
22
|
-
// so it matches the Svelte Flow node anchor point (top left).
|
|
23
|
-
const x = position.x - (node.measured?.width ?? 0) / 2;
|
|
24
|
-
const y = position.y - (node.measured?.height ?? 0) / 2;
|
|
25
|
-
|
|
26
|
-
return {
|
|
27
|
-
...node,
|
|
28
|
-
position: { x, y },
|
|
29
|
-
targetPosition: "left",
|
|
30
|
-
sourcePosition: "right",
|
|
31
|
-
};
|
|
32
|
-
}),
|
|
33
|
-
edges,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
-
|
|
3
|
-
import Title from "./alert-dialog-title.svelte";
|
|
4
|
-
import Action from "./alert-dialog-action.svelte";
|
|
5
|
-
import Cancel from "./alert-dialog-cancel.svelte";
|
|
6
|
-
import Footer from "./alert-dialog-footer.svelte";
|
|
7
|
-
import Header from "./alert-dialog-header.svelte";
|
|
8
|
-
import Overlay from "./alert-dialog-overlay.svelte";
|
|
9
|
-
import Content from "./alert-dialog-content.svelte";
|
|
10
|
-
import Description from "./alert-dialog-description.svelte";
|
|
11
|
-
|
|
12
|
-
const Root = AlertDialogPrimitive.Root;
|
|
13
|
-
const Trigger = AlertDialogPrimitive.Trigger;
|
|
14
|
-
const Portal = AlertDialogPrimitive.Portal;
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
Root,
|
|
18
|
-
Title,
|
|
19
|
-
Action,
|
|
20
|
-
Cancel,
|
|
21
|
-
Portal,
|
|
22
|
-
Footer,
|
|
23
|
-
Header,
|
|
24
|
-
Trigger,
|
|
25
|
-
Overlay,
|
|
26
|
-
Content,
|
|
27
|
-
Description,
|
|
28
|
-
//
|
|
29
|
-
Root as AlertDialog,
|
|
30
|
-
Title as AlertDialogTitle,
|
|
31
|
-
Action as AlertDialogAction,
|
|
32
|
-
Cancel as AlertDialogCancel,
|
|
33
|
-
Portal as AlertDialogPortal,
|
|
34
|
-
Footer as AlertDialogFooter,
|
|
35
|
-
Header as AlertDialogHeader,
|
|
36
|
-
Trigger as AlertDialogTrigger,
|
|
37
|
-
Overlay as AlertDialogOverlay,
|
|
38
|
-
Content as AlertDialogContent,
|
|
39
|
-
Description as AlertDialogDescription,
|
|
40
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import Root, {
|
|
2
|
-
type ButtonProps,
|
|
3
|
-
type ButtonSize,
|
|
4
|
-
type ButtonVariant,
|
|
5
|
-
buttonVariants,
|
|
6
|
-
} from "./button.svelte";
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
Root,
|
|
10
|
-
type ButtonProps as Props,
|
|
11
|
-
//
|
|
12
|
-
Root as Button,
|
|
13
|
-
buttonVariants,
|
|
14
|
-
type ButtonProps,
|
|
15
|
-
type ButtonSize,
|
|
16
|
-
type ButtonVariant,
|
|
17
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Dialog as DialogPrimitive } from "bits-ui";
|
|
2
|
-
|
|
3
|
-
import Title from "./dialog-title.svelte";
|
|
4
|
-
import Footer from "./dialog-footer.svelte";
|
|
5
|
-
import Header from "./dialog-header.svelte";
|
|
6
|
-
import Overlay from "./dialog-overlay.svelte";
|
|
7
|
-
import Content from "./dialog-content.svelte";
|
|
8
|
-
import Description from "./dialog-description.svelte";
|
|
9
|
-
|
|
10
|
-
const Root: typeof DialogPrimitive.Root = DialogPrimitive.Root;
|
|
11
|
-
const Trigger: typeof DialogPrimitive.Trigger = DialogPrimitive.Trigger;
|
|
12
|
-
const Close: typeof DialogPrimitive.Close = DialogPrimitive.Close;
|
|
13
|
-
const Portal: typeof DialogPrimitive.Portal = DialogPrimitive.Portal;
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
Root,
|
|
17
|
-
Title,
|
|
18
|
-
Portal,
|
|
19
|
-
Footer,
|
|
20
|
-
Header,
|
|
21
|
-
Trigger,
|
|
22
|
-
Overlay,
|
|
23
|
-
Content,
|
|
24
|
-
Description,
|
|
25
|
-
Close,
|
|
26
|
-
//
|
|
27
|
-
Root as Dialog,
|
|
28
|
-
Title as DialogTitle,
|
|
29
|
-
Portal as DialogPortal,
|
|
30
|
-
Footer as DialogFooter,
|
|
31
|
-
Header as DialogHeader,
|
|
32
|
-
Trigger as DialogTrigger,
|
|
33
|
-
Overlay as DialogOverlay,
|
|
34
|
-
Content as DialogContent,
|
|
35
|
-
Description as DialogDescription,
|
|
36
|
-
Close as DialogClose,
|
|
37
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Popover as PopoverPrimitive } from "bits-ui";
|
|
2
|
-
import Content from "./popover-content.svelte";
|
|
3
|
-
const Root = PopoverPrimitive.Root;
|
|
4
|
-
const Trigger = PopoverPrimitive.Trigger;
|
|
5
|
-
const Close = PopoverPrimitive.Close;
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
Root,
|
|
9
|
-
Content,
|
|
10
|
-
Trigger,
|
|
11
|
-
Close,
|
|
12
|
-
//
|
|
13
|
-
Root as Popover,
|
|
14
|
-
Content as PopoverContent,
|
|
15
|
-
Trigger as PopoverTrigger,
|
|
16
|
-
Close as PopoverClose,
|
|
17
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Select as SelectPrimitive } from "bits-ui";
|
|
2
|
-
|
|
3
|
-
import GroupHeading from "./select-group-heading.svelte";
|
|
4
|
-
import Item from "./select-item.svelte";
|
|
5
|
-
import Content from "./select-content.svelte";
|
|
6
|
-
import Trigger from "./select-trigger.svelte";
|
|
7
|
-
import Separator from "./select-separator.svelte";
|
|
8
|
-
import ScrollDownButton from "./select-scroll-down-button.svelte";
|
|
9
|
-
import ScrollUpButton from "./select-scroll-up-button.svelte";
|
|
10
|
-
|
|
11
|
-
const Root = SelectPrimitive.Root;
|
|
12
|
-
const Group = SelectPrimitive.Group;
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
Root,
|
|
16
|
-
Item,
|
|
17
|
-
Group,
|
|
18
|
-
GroupHeading,
|
|
19
|
-
Content,
|
|
20
|
-
Trigger,
|
|
21
|
-
Separator,
|
|
22
|
-
ScrollDownButton,
|
|
23
|
-
ScrollUpButton,
|
|
24
|
-
//
|
|
25
|
-
Root as Select,
|
|
26
|
-
Item as SelectItem,
|
|
27
|
-
Group as SelectGroup,
|
|
28
|
-
GroupHeading as SelectGroupHeading,
|
|
29
|
-
Content as SelectContent,
|
|
30
|
-
Trigger as SelectTrigger,
|
|
31
|
-
Separator as SelectSeparator,
|
|
32
|
-
ScrollDownButton as SelectScrollDownButton,
|
|
33
|
-
ScrollUpButton as SelectScrollUpButton,
|
|
34
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Tooltip as TooltipPrimitive } from "bits-ui";
|
|
2
|
-
import Content from "./tooltip-content.svelte";
|
|
3
|
-
|
|
4
|
-
const Root = TooltipPrimitive.Root;
|
|
5
|
-
const Trigger = TooltipPrimitive.Trigger;
|
|
6
|
-
const Provider = TooltipPrimitive.Provider;
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
Root,
|
|
10
|
-
Trigger,
|
|
11
|
-
Content,
|
|
12
|
-
Provider,
|
|
13
|
-
//
|
|
14
|
-
Root as Tooltip,
|
|
15
|
-
Content as TooltipContent,
|
|
16
|
-
Trigger as TooltipTrigger,
|
|
17
|
-
Provider as TooltipProvider,
|
|
18
|
-
};
|
package/src/lib/eventSystem.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { toast } from "svelte-sonner";
|
|
2
|
-
import { ctx } from "./store.svelte";
|
|
3
|
-
import { openCreateDetailView, openUpdateDetailView } from "./components/detailView/store.svelte";
|
|
4
|
-
|
|
5
|
-
export async function emitEvent(eventName: string, input: Record<string, any>) {
|
|
6
|
-
const workflows = ctx.meta.studio_workflows.filter(
|
|
7
|
-
(workflow) => {
|
|
8
|
-
return eventName.startsWith(workflow.eventName);
|
|
9
|
-
},
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
for (let index = 0; index < workflows.length; index++) {
|
|
13
|
-
const workflow = workflows[index];
|
|
14
|
-
try {
|
|
15
|
-
const localOutput = await workflow.handler(
|
|
16
|
-
input,
|
|
17
|
-
await getEventContext(),
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
if (localOutput) {
|
|
21
|
-
input = localOutput;
|
|
22
|
-
}
|
|
23
|
-
} catch (error) {
|
|
24
|
-
toast.error((error as any).message);
|
|
25
|
-
throw error;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return input;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async function getEventContext() {
|
|
33
|
-
return {
|
|
34
|
-
toast,
|
|
35
|
-
openCreateDetailView,
|
|
36
|
-
openUpdateDetailView,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import type { Lobb } from "$lib/Lobb";
|
|
2
|
-
import type { CTX } from "../lib/store.types";
|
|
3
|
-
import type { Button } from "$lib/components/ui/button";
|
|
4
|
-
import type { Input } from "$lib/components/ui/input";
|
|
5
|
-
import type { Separator } from "$lib/components/ui/separator";
|
|
6
|
-
import type { Skeleton } from "$lib/components/ui/skeleton";
|
|
7
|
-
import type LlmButton from "$lib/components/LlmButton.svelte";
|
|
8
|
-
import type Sidebar from "$lib/components/sidebar/sidebar.svelte";
|
|
9
|
-
import type SidebarTrigger from "$lib/components/sidebar/sidebarTrigger.svelte";
|
|
10
|
-
import type CreateDetailViewButton from "$lib/components/detailView/create/createDetailViewButton.svelte";
|
|
11
|
-
import type UpdateDetailViewButton from "$lib/components/detailView/update/updateDetailViewButton.svelte";
|
|
12
|
-
import type { mediaQueries } from "$lib/utils";
|
|
13
|
-
import type Table from "$lib/components/dataTable/table.svelte";
|
|
14
|
-
import type { Location } from "@wjfe/n-savant";
|
|
15
|
-
import type RangeCalendarButton from "$lib/components/rangeCalendarButton.svelte";
|
|
16
|
-
import type DataTable from "$lib/components/dataTable/dataTable.svelte";
|
|
17
|
-
import type Drawer from "$lib/components/drawer.svelte";
|
|
18
|
-
import type SelectRecord from "$lib/components/selectRecord.svelte";
|
|
19
|
-
import * as Popover from "$lib/components/ui/popover";
|
|
20
|
-
import * as intlDate from "@internationalized/date";
|
|
21
|
-
import * as Icons from "lucide-svelte"
|
|
22
|
-
import { ContextMenu } from "bits-ui";
|
|
23
|
-
import * as Tooltip from "$lib/components/ui/tooltip";
|
|
24
|
-
import * as Breadcrumb from "$lib/components/ui/breadcrumb";
|
|
25
|
-
import { showDialog } from "$lib/components/confirmationDialog/store.svelte";
|
|
26
|
-
import { toast } from "svelte-sonner";
|
|
27
|
-
import type Drawer from "$lib/components/drawer.svelte";
|
|
28
|
-
import { Switch } from "$lib/components/ui/switch";
|
|
29
|
-
|
|
30
|
-
// extensions utils
|
|
31
|
-
export interface Components {
|
|
32
|
-
Button: typeof Button;
|
|
33
|
-
Input: typeof Input;
|
|
34
|
-
Separator: typeof Separator;
|
|
35
|
-
Skeleton: typeof Skeleton;
|
|
36
|
-
LlmButton: typeof LlmButton;
|
|
37
|
-
Sidebar: typeof Sidebar;
|
|
38
|
-
SidebarTrigger: typeof SidebarTrigger;
|
|
39
|
-
CreateDetailViewButton: typeof CreateDetailViewButton;
|
|
40
|
-
UpdateDetailViewButton: typeof UpdateDetailViewButton;
|
|
41
|
-
Tooltip: typeof Tooltip;
|
|
42
|
-
Breadcrumb: typeof Breadcrumb;
|
|
43
|
-
ContextMenu: typeof ContextMenu;
|
|
44
|
-
Popover: typeof Popover;
|
|
45
|
-
Icons: typeof Icons;
|
|
46
|
-
Table: typeof Table;
|
|
47
|
-
RangeCalendarButton: typeof RangeCalendarButton;
|
|
48
|
-
DataTable: typeof DataTable;
|
|
49
|
-
Drawer: typeof Drawer;
|
|
50
|
-
SelectRecord: typeof SelectRecord,
|
|
51
|
-
Switch: typeof Switch,
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface ExtensionUtils {
|
|
55
|
-
ctx: CTX;
|
|
56
|
-
lobb: Lobb;
|
|
57
|
-
location: Location;
|
|
58
|
-
toast: typeof toast;
|
|
59
|
-
showDialog: typeof showDialog;
|
|
60
|
-
components: Components;
|
|
61
|
-
mediaQueries: typeof mediaQueries;
|
|
62
|
-
intlDate: typeof intlDate;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// dashboard nav
|
|
66
|
-
interface DashboardNav {
|
|
67
|
-
label: string;
|
|
68
|
-
icon: any;
|
|
69
|
-
href?: string;
|
|
70
|
-
onclick?: () => void;
|
|
71
|
-
navs?: DashboardNav[];
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface DashboardNavs {
|
|
75
|
-
top?: DashboardNav[];
|
|
76
|
-
middle?: DashboardNav[];
|
|
77
|
-
bottom?: DashboardNav[];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// extension components base Props
|
|
81
|
-
export interface ExtensionProps {
|
|
82
|
-
utils: ExtensionUtils;
|
|
83
|
-
[key: string]: any;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// extension exported object
|
|
87
|
-
export interface Extension {
|
|
88
|
-
name: string;
|
|
89
|
-
onStartup?: (utils: ExtensionUtils) => Promise<void>;
|
|
90
|
-
components?: Record<string, any>;
|
|
91
|
-
dashboardNavs?: DashboardNavs;
|
|
92
|
-
}
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
Components,
|
|
3
|
-
DashboardNavs,
|
|
4
|
-
Extension,
|
|
5
|
-
ExtensionUtils,
|
|
6
|
-
} from "./extension.types";
|
|
7
|
-
import { lobb } from "$lib";
|
|
8
|
-
import { ctx } from "$lib/store.svelte";
|
|
9
|
-
import { toast } from "svelte-sonner";
|
|
10
|
-
import { showDialog } from "$lib/components/confirmationDialog/store.svelte";
|
|
11
|
-
import { Button } from "$lib/components/ui/button";
|
|
12
|
-
import { Input } from "$lib/components/ui/input";
|
|
13
|
-
import { Separator } from "$lib/components/ui/separator";
|
|
14
|
-
import { Skeleton } from "$lib/components/ui/skeleton";
|
|
15
|
-
import Table from "$lib/components/dataTable/table.svelte";
|
|
16
|
-
import { mediaQueries } from "$lib/utils";
|
|
17
|
-
import LlmButton from "$lib/components/LlmButton.svelte";
|
|
18
|
-
import Sidebar from "$lib/components/sidebar/sidebar.svelte";
|
|
19
|
-
import SidebarTrigger from "$lib/components/sidebar/sidebarTrigger.svelte";
|
|
20
|
-
import CreateDetailViewButton from "$lib/components/detailView/create/createDetailViewButton.svelte";
|
|
21
|
-
import UpdateDetailViewButton from "$lib/components/detailView/update/updateDetailViewButton.svelte";
|
|
22
|
-
import * as intlDate from "@internationalized/date";
|
|
23
|
-
import * as Tooltip from "$lib/components/ui/tooltip";
|
|
24
|
-
import * as Breadcrumb from "$lib/components/ui/breadcrumb";
|
|
25
|
-
import { ContextMenu } from "bits-ui";
|
|
26
|
-
import * as Popover from "$lib/components/ui/popover";
|
|
27
|
-
import * as Icons from "lucide-svelte";
|
|
28
|
-
import { location } from "@wjfe/n-savant";
|
|
29
|
-
import RangeCalendarButton from "$lib/components/rangeCalendarButton.svelte";
|
|
30
|
-
import DataTable from "$lib/components/dataTable/dataTable.svelte";
|
|
31
|
-
import Drawer from "$lib/components/drawer.svelte";
|
|
32
|
-
import SelectRecord from "$lib/components/selectRecord.svelte";
|
|
33
|
-
import { Switch } from "$lib/components/ui/switch";
|
|
34
|
-
|
|
35
|
-
export function getComponents(): Components {
|
|
36
|
-
return {
|
|
37
|
-
Button: Button,
|
|
38
|
-
Input: Input,
|
|
39
|
-
Separator: Separator,
|
|
40
|
-
Skeleton: Skeleton,
|
|
41
|
-
LlmButton: LlmButton,
|
|
42
|
-
Sidebar: Sidebar,
|
|
43
|
-
SidebarTrigger: SidebarTrigger,
|
|
44
|
-
CreateDetailViewButton: CreateDetailViewButton,
|
|
45
|
-
UpdateDetailViewButton: UpdateDetailViewButton,
|
|
46
|
-
Tooltip: Tooltip,
|
|
47
|
-
Breadcrumb: Breadcrumb,
|
|
48
|
-
ContextMenu: ContextMenu,
|
|
49
|
-
Popover: Popover,
|
|
50
|
-
Icons: Icons,
|
|
51
|
-
Table: Table,
|
|
52
|
-
RangeCalendarButton: RangeCalendarButton,
|
|
53
|
-
DataTable: DataTable,
|
|
54
|
-
Drawer: Drawer,
|
|
55
|
-
SelectRecord: SelectRecord,
|
|
56
|
-
Switch: Switch,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function getExtensionUtils(): ExtensionUtils {
|
|
61
|
-
return {
|
|
62
|
-
ctx: ctx,
|
|
63
|
-
lobb: lobb,
|
|
64
|
-
location: location,
|
|
65
|
-
toast: toast,
|
|
66
|
-
showDialog: showDialog,
|
|
67
|
-
components: getComponents(),
|
|
68
|
-
mediaQueries: mediaQueries,
|
|
69
|
-
intlDate: intlDate,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function getExtensionsThatHasDash(): string[] {
|
|
74
|
-
const extensionNames = Object.keys(ctx.meta.extensions);
|
|
75
|
-
|
|
76
|
-
const extensionsWithDashExt = [];
|
|
77
|
-
for (let index = 0; index < extensionNames.length; index++) {
|
|
78
|
-
const extensionName = extensionNames[index];
|
|
79
|
-
const extensionMeta = ctx.meta.extensions[extensionName];
|
|
80
|
-
if (extensionMeta.hasDashboardExtension) {
|
|
81
|
-
extensionsWithDashExt.push(extensionName);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return extensionsWithDashExt;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export async function loadExtensions(studioExtensions?: any[]): Promise<Record<string, Extension>> {
|
|
89
|
-
const extensions: Record<string, Extension> = {};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (studioExtensions) {
|
|
93
|
-
for (let index = 0; index < studioExtensions.length; index++) {
|
|
94
|
-
const studioExtension = studioExtensions[index](getExtensionUtils());
|
|
95
|
-
extensions[studioExtension.name] = studioExtension;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const extensionsThatHasDash = getExtensionsThatHasDash();
|
|
100
|
-
for (let index = 0; index < extensionsThatHasDash.length; index++) {
|
|
101
|
-
const extensionName = extensionsThatHasDash[index];
|
|
102
|
-
|
|
103
|
-
// Try to import locally-installed extension by name first
|
|
104
|
-
if (extensionName && extensions[extensionName]) {
|
|
105
|
-
continue;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Fall back to remote import
|
|
109
|
-
try {
|
|
110
|
-
extensions[extensionName] = (
|
|
111
|
-
await import(
|
|
112
|
-
/* @vite-ignore */ `${ctx.lobbUrl}/api/extensions/${extensionName}/dashboard?v=${ctx.meta.extensions[extensionName]?.version}`
|
|
113
|
-
)
|
|
114
|
-
).extension(getExtensionUtils());
|
|
115
|
-
} catch (error) {
|
|
116
|
-
console.warn(`Failed to load remote extension ${extensionName}`, error);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return extensions;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export function loadExtensionComponents(
|
|
124
|
-
name: string,
|
|
125
|
-
filterByExtensions?: string[],
|
|
126
|
-
): any[] {
|
|
127
|
-
const components = [];
|
|
128
|
-
for (const [extensionName, extensionValue] of Object.entries(
|
|
129
|
-
ctx.extensions,
|
|
130
|
-
)) {
|
|
131
|
-
if (filterByExtensions && !filterByExtensions.includes(extensionName)) {
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
if (extensionValue.components) {
|
|
135
|
-
for (const [componentName, componentValue] of Object.entries(
|
|
136
|
-
extensionValue.components,
|
|
137
|
-
)) {
|
|
138
|
-
if (name.startsWith(componentName)) {
|
|
139
|
-
components.push(componentValue);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return components;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export async function executeExtensionsOnStartup() {
|
|
148
|
-
const extensionNames: string[] = Object.keys(ctx.extensions);
|
|
149
|
-
for (let index = 0; index < extensionNames.length; index++) {
|
|
150
|
-
const extensionName = extensionNames[index];
|
|
151
|
-
const extension = ctx.extensions[extensionName];
|
|
152
|
-
if (extension) {
|
|
153
|
-
if (extension.onStartup) {
|
|
154
|
-
await extension.onStartup(getExtensionUtils());
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export function getDashboardNavs(): DashboardNavs {
|
|
161
|
-
let navs: DashboardNavs = {
|
|
162
|
-
top: [],
|
|
163
|
-
middle: [],
|
|
164
|
-
bottom: [],
|
|
165
|
-
};
|
|
166
|
-
const extensionNames: string[] = Object.keys(ctx.extensions);
|
|
167
|
-
for (let index = 0; index < extensionNames.length; index++) {
|
|
168
|
-
const extensionName = extensionNames[index];
|
|
169
|
-
const extension = ctx.extensions[extensionName];
|
|
170
|
-
if (extension) {
|
|
171
|
-
if (extension.dashboardNavs && extension.dashboardNavs.top && navs.top) {
|
|
172
|
-
navs.top = [...navs.top, ...extension.dashboardNavs.top];
|
|
173
|
-
}
|
|
174
|
-
if (
|
|
175
|
-
extension.dashboardNavs &&
|
|
176
|
-
extension.dashboardNavs.middle &&
|
|
177
|
-
navs.middle
|
|
178
|
-
) {
|
|
179
|
-
navs.middle = [...navs.middle, ...extension.dashboardNavs.middle];
|
|
180
|
-
}
|
|
181
|
-
if (
|
|
182
|
-
extension.dashboardNavs &&
|
|
183
|
-
extension.dashboardNavs.bottom &&
|
|
184
|
-
navs.bottom
|
|
185
|
-
) {
|
|
186
|
-
navs.bottom = [...navs.bottom, ...extension.dashboardNavs.bottom];
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
return navs;
|
|
191
|
-
}
|
package/src/lib/index.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// Main Studio component
|
|
2
|
-
export { default as Studio } from "./components/Studio.svelte";
|
|
3
|
-
|
|
4
|
-
// Lobb client and utilities
|
|
5
|
-
export { Lobb } from "./Lobb";
|
|
6
|
-
export * from "./utils";
|
|
7
|
-
export * from "./eventSystem";
|
|
8
|
-
export { ctx, lobb } from "./store.svelte";
|
|
9
|
-
export type * from "./store.types";
|
|
10
|
-
|
|
11
|
-
export function createSet(lastNumber: number): Set<number> {
|
|
12
|
-
const set = new Set() as Set<number>;
|
|
13
|
-
for (let i = 0; i <= lastNumber; i++) {
|
|
14
|
-
set.add(i);
|
|
15
|
-
}
|
|
16
|
-
return set;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function moveElement<T>(array: T[], fromIndex: number, toIndex: number) {
|
|
20
|
-
if (
|
|
21
|
-
fromIndex < 0 || fromIndex >= array.length || toIndex < 0 ||
|
|
22
|
-
toIndex >= array.length
|
|
23
|
-
) {
|
|
24
|
-
throw new Error("Index out of bounds");
|
|
25
|
-
}
|
|
26
|
-
const [element] = array.splice(fromIndex, 1);
|
|
27
|
-
array.splice(toIndex, 0, element);
|
|
28
|
-
return array;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function pxToRem(px: number) {
|
|
32
|
-
const rootFontSize = parseFloat(
|
|
33
|
-
getComputedStyle(document.documentElement).fontSize,
|
|
34
|
-
);
|
|
35
|
-
return px / rootFontSize;
|
|
36
|
-
}
|
package/src/lib/store.svelte.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { CTX } from './store.types';
|
|
2
|
-
import { Lobb } from './Lobb';
|
|
3
|
-
import { toast } from 'svelte-sonner';
|
|
4
|
-
import pkg from '../../package.json';
|
|
5
|
-
|
|
6
|
-
if (!window.APP_ENV) {
|
|
7
|
-
window.APP_ENV = {};
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
if (window.APP_ENV.LOBB_URL === '%LOBB_URL%') {
|
|
11
|
-
window.APP_ENV.LOBB_URL = null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const ctx: CTX = $state.raw({
|
|
15
|
-
studioVersion: pkg.version,
|
|
16
|
-
lobbUrl: window.APP_ENV.LOBB_URL || localStorage.getItem("lobb_url"),
|
|
17
|
-
extensions: {},
|
|
18
|
-
meta: {
|
|
19
|
-
collections: null,
|
|
20
|
-
extensions: null,
|
|
21
|
-
filter: null
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export const lobb = new Lobb(ctx.lobbUrl);
|
|
26
|
-
|
|
27
|
-
// logging the message if got any bad responses
|
|
28
|
-
lobb.onResponse(async (response) => {
|
|
29
|
-
if (response.status >= 400) {
|
|
30
|
-
const body = await response.json();
|
|
31
|
-
toast.error(body.message);
|
|
32
|
-
}
|
|
33
|
-
});
|
package/src/lib/store.types.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Extension } from "../extensions/extension.types";
|
|
2
|
-
|
|
3
|
-
interface Collection {
|
|
4
|
-
category: string;
|
|
5
|
-
owner: string;
|
|
6
|
-
fields: Record<string, any>;
|
|
7
|
-
singleton: boolean;
|
|
8
|
-
}
|
|
9
|
-
type Collections = Record<string, Collection>;
|
|
10
|
-
|
|
11
|
-
interface Meta {
|
|
12
|
-
version: string;
|
|
13
|
-
relations: Array<any>;
|
|
14
|
-
collections: Collections;
|
|
15
|
-
extensions: Record<string, any>;
|
|
16
|
-
filter: any;
|
|
17
|
-
events: any[];
|
|
18
|
-
event_context_type: string;
|
|
19
|
-
studio_workflows: any[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface CTX {
|
|
23
|
-
studioVersion: string;
|
|
24
|
-
lobbUrl: string | null;
|
|
25
|
-
extensions: Record<string, Extension>;
|
|
26
|
-
meta: Meta;
|
|
27
|
-
currentUrl: URL;
|
|
28
|
-
}
|