@quillsql/admin 1.6.1 → 1.6.3
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/cjs/Admin.d.ts +41 -87
- package/dist/cjs/Admin.d.ts.map +1 -1
- package/dist/cjs/Admin.js +358 -456
- package/dist/cjs/AdminProvider.d.ts +108 -50
- package/dist/cjs/AdminProvider.d.ts.map +1 -1
- package/dist/cjs/AdminProvider.js +390 -208
- package/dist/cjs/api/ConnectionClient.d.ts +20 -38
- package/dist/cjs/api/ConnectionClient.d.ts.map +1 -1
- package/dist/cjs/api/ConnectionClient.js +291 -321
- package/dist/cjs/assets/ArrowDownHeadIcon.d.ts.map +1 -1
- package/dist/cjs/components/Banner/index.d.ts +0 -1
- package/dist/cjs/components/Banner/index.d.ts.map +1 -1
- package/dist/cjs/components/Banner/index.js +1 -1
- package/dist/cjs/components/CardSection.js +1 -1
- package/dist/cjs/components/CardTitle.js +1 -1
- package/dist/cjs/components/ClipboardButton.d.ts +8 -0
- package/dist/cjs/components/ClipboardButton.d.ts.map +1 -0
- package/dist/cjs/components/ClipboardButton.js +74 -0
- package/dist/cjs/components/DashboardSelectPopover.d.ts +8 -5
- package/dist/cjs/components/DashboardSelectPopover.d.ts.map +1 -1
- package/dist/cjs/components/DashboardSelectPopover.js +74 -185
- package/dist/cjs/components/DatabaseMismatchCard.d.ts +3 -3
- package/dist/cjs/components/DatabaseMismatchCard.d.ts.map +1 -1
- package/dist/cjs/components/DatabaseMismatchCard.js +3 -3
- package/dist/cjs/components/DatabaseSelector.d.ts.map +1 -1
- package/dist/cjs/components/DatabaseSelector.js +10 -2
- package/dist/cjs/components/DateRangePicker/SingleDatePicker.d.ts +10 -0
- package/dist/cjs/components/DateRangePicker/SingleDatePicker.d.ts.map +1 -0
- package/dist/cjs/components/DateRangePicker/SingleDatePicker.js +263 -0
- package/dist/cjs/components/DateRangePicker/YearlessDateRangePicker.d.ts +18 -0
- package/dist/cjs/components/DateRangePicker/YearlessDateRangePicker.d.ts.map +1 -0
- package/dist/cjs/components/DateRangePicker/YearlessDateRangePicker.js +288 -0
- package/dist/cjs/components/DateRangePicker/dateRangePickerUtils.d.ts +91 -0
- package/dist/cjs/components/DateRangePicker/dateRangePickerUtils.d.ts.map +1 -0
- package/dist/cjs/components/DateRangePicker/dateRangePickerUtils.js +898 -0
- package/dist/cjs/components/DeleteButton.d.ts +0 -1
- package/dist/cjs/components/DeleteButton.d.ts.map +1 -1
- package/dist/cjs/components/DeleteButton.js +1 -1
- package/dist/cjs/components/DropDownMenu.js +1 -1
- package/dist/cjs/components/DropDownMenuWithLabel.d.ts +4 -3
- package/dist/cjs/components/DropDownMenuWithLabel.d.ts.map +1 -1
- package/dist/cjs/components/DropDownMenuWithLabel.js +56 -29
- package/dist/cjs/components/DynamicBanner.d.ts +2 -5
- package/dist/cjs/components/DynamicBanner.d.ts.map +1 -1
- package/dist/cjs/components/DynamicBanner.js +3 -3
- package/dist/cjs/components/EmptyDashboardComponent/index.d.ts +0 -1
- package/dist/cjs/components/EmptyDashboardComponent/index.d.ts.map +1 -1
- package/dist/cjs/components/EmptyDashboardComponent/index.js +6 -5
- package/dist/cjs/components/EmptyVirtualTablesComponent.d.ts +4 -0
- package/dist/cjs/components/EmptyVirtualTablesComponent.d.ts.map +1 -0
- package/dist/cjs/components/EmptyVirtualTablesComponent.js +41 -0
- package/dist/cjs/components/ExternalLink.d.ts +4 -0
- package/dist/cjs/components/ExternalLink.d.ts.map +1 -0
- package/dist/cjs/components/ExternalLink.js +15 -0
- package/dist/cjs/components/FormTooltip.d.ts +8 -0
- package/dist/cjs/components/FormTooltip.d.ts.map +1 -0
- package/dist/cjs/components/FormTooltip.js +89 -0
- package/dist/cjs/components/InputLabel.d.ts +4 -1
- package/dist/cjs/components/InputLabel.d.ts.map +1 -1
- package/dist/cjs/components/InputLabel.js +13 -8
- package/dist/cjs/components/InternalDashboard/ChartSkeleton.d.ts +11 -0
- package/dist/cjs/components/InternalDashboard/ChartSkeleton.d.ts.map +1 -0
- package/dist/cjs/components/InternalDashboard/ChartSkeleton.js +21 -0
- package/dist/cjs/components/InternalDashboard/DashboardFilter.d.ts +20 -0
- package/dist/cjs/components/InternalDashboard/DashboardFilter.d.ts.map +1 -0
- package/dist/cjs/components/InternalDashboard/DashboardFilter.js +104 -0
- package/dist/cjs/components/InternalDashboard/DashboardLoadingComponent.d.ts +7 -0
- package/dist/cjs/components/InternalDashboard/DashboardLoadingComponent.d.ts.map +1 -0
- package/dist/cjs/components/InternalDashboard/DashboardLoadingComponent.js +22 -0
- package/dist/cjs/components/InternalDashboard/DateRangePicker/QuillDateRangePicker.d.ts +37 -0
- package/dist/cjs/components/InternalDashboard/DateRangePicker/QuillDateRangePicker.d.ts.map +1 -0
- package/dist/cjs/components/InternalDashboard/DateRangePicker/QuillDateRangePicker.js +275 -0
- package/dist/cjs/components/InternalDashboard/DateRangePicker/dateRangePickerUtils.d.ts +85 -0
- package/dist/cjs/components/InternalDashboard/DateRangePicker/dateRangePickerUtils.d.ts.map +1 -0
- package/dist/cjs/components/InternalDashboard/DateRangePicker/dateRangePickerUtils.js +534 -0
- package/dist/cjs/components/InternalDashboard/InternalDashboard.d.ts +17 -0
- package/dist/cjs/components/InternalDashboard/InternalDashboard.d.ts.map +1 -0
- package/dist/cjs/components/InternalDashboard/InternalDashboard.js +1947 -0
- package/dist/cjs/components/OrgSelect.d.ts +9 -13
- package/dist/cjs/components/OrgSelect.d.ts.map +1 -1
- package/dist/cjs/components/OrgSelect.js +136 -119
- package/dist/cjs/components/QuillMultiSelectWithCombo.d.ts +30 -0
- package/dist/cjs/components/QuillMultiSelectWithCombo.d.ts.map +1 -0
- package/dist/cjs/components/QuillMultiSelectWithCombo.js +504 -0
- package/dist/cjs/components/QuillPopover.d.ts +11 -0
- package/dist/cjs/components/QuillPopover.d.ts.map +1 -0
- package/dist/cjs/components/QuillPopover.js +180 -0
- package/dist/cjs/components/QuillSelect.d.ts +1 -1
- package/dist/cjs/components/QuillSelect.d.ts.map +1 -1
- package/dist/cjs/components/QuillSelect.js +38 -16
- package/dist/cjs/components/QuillSelectWithCombo.d.ts +22 -0
- package/dist/cjs/components/QuillSelectWithCombo.d.ts.map +1 -0
- package/dist/cjs/components/QuillSelectWithCombo.js +327 -0
- package/dist/cjs/components/QuillTab.d.ts +12 -0
- package/dist/cjs/components/QuillTab.d.ts.map +1 -0
- package/dist/cjs/components/QuillTab.js +84 -0
- package/dist/cjs/components/QuillToolTipPortal.d.ts +11 -0
- package/dist/cjs/components/QuillToolTipPortal.d.ts.map +1 -0
- package/dist/cjs/components/QuillToolTipPortal.js +108 -0
- package/dist/cjs/components/SegmentedControl.d.ts +8 -2
- package/dist/cjs/components/SegmentedControl.d.ts.map +1 -1
- package/dist/cjs/components/SegmentedControl.js +11 -12
- package/dist/cjs/components/SqlTextEditor.d.ts +2 -5
- package/dist/cjs/components/SqlTextEditor.d.ts.map +1 -1
- package/dist/cjs/components/SqlTextEditor.js +20 -19
- package/dist/cjs/components/StepDisplay.d.ts.map +1 -1
- package/dist/cjs/components/StepDisplay.js +2 -2
- package/dist/cjs/components/Tenants/EditTenant.d.ts +41 -0
- package/dist/cjs/components/Tenants/EditTenant.d.ts.map +1 -0
- package/dist/cjs/components/Tenants/EditTenant.js +760 -0
- package/dist/cjs/components/UiComponents.d.ts +35 -6
- package/dist/cjs/components/UiComponents.d.ts.map +1 -1
- package/dist/cjs/components/UiComponents.js +226 -28
- package/dist/cjs/components/VirtualTableTile.d.ts +7 -0
- package/dist/cjs/components/VirtualTableTile.d.ts.map +1 -0
- package/dist/cjs/components/VirtualTableTile.js +51 -0
- package/dist/cjs/components/index.d.ts +5 -5
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/constants/dataTypes.d.ts.map +1 -1
- package/dist/cjs/constants/dataTypes.js +2 -0
- package/dist/cjs/forms/client_onboard/ConnectDatabase.d.ts +15 -6
- package/dist/cjs/forms/client_onboard/ConnectDatabase.d.ts.map +1 -1
- package/dist/cjs/forms/client_onboard/ConnectDatabase.js +209 -96
- package/dist/cjs/forms/client_onboard/ConnectSchema.d.ts +13 -9
- package/dist/cjs/forms/client_onboard/ConnectSchema.d.ts.map +1 -1
- package/dist/cjs/forms/client_onboard/ConnectSchema.js +158 -236
- package/dist/cjs/forms/client_onboard/CreateVirtualTables.d.ts +47 -0
- package/dist/cjs/forms/client_onboard/CreateVirtualTables.d.ts.map +1 -0
- package/dist/cjs/forms/client_onboard/CreateVirtualTables.js +396 -0
- package/dist/cjs/forms/client_onboard/__tests__/ConnectDatabase.test.d.ts +2 -0
- package/dist/cjs/forms/client_onboard/__tests__/ConnectDatabase.test.d.ts.map +1 -0
- package/dist/cjs/forms/client_onboard/__tests__/ConnectDatabase.test.js +571 -0
- package/dist/cjs/forms/client_onboard/__tests__/ConnectSchema.test.d.ts +2 -0
- package/dist/cjs/forms/client_onboard/__tests__/ConnectSchema.test.d.ts.map +1 -0
- package/dist/cjs/forms/client_onboard/__tests__/ConnectSchema.test.js +459 -0
- package/dist/cjs/forms/client_onboard/__tests__/CreateVirtualTables.test.d.ts +2 -0
- package/dist/cjs/forms/client_onboard/__tests__/CreateVirtualTables.test.d.ts.map +1 -0
- package/dist/cjs/forms/client_onboard/__tests__/CreateVirtualTables.test.js +385 -0
- package/dist/cjs/forms/virtual_tables/CreateEditVirtualTable.d.ts +20 -0
- package/dist/cjs/forms/virtual_tables/CreateEditVirtualTable.d.ts.map +1 -0
- package/dist/cjs/forms/virtual_tables/CreateEditVirtualTable.js +294 -0
- package/dist/cjs/hooks/useDashboardManager.d.ts +16 -0
- package/dist/cjs/hooks/useDashboardManager.d.ts.map +1 -0
- package/dist/cjs/hooks/useDashboardManager.js +113 -0
- package/dist/cjs/hooks/useDatabaseSchema.d.ts +5 -0
- package/dist/cjs/hooks/useDatabaseSchema.d.ts.map +1 -0
- package/dist/cjs/hooks/useDatabaseSchema.js +54 -0
- package/dist/cjs/hooks/useItemBeingEdited.d.ts +1 -2
- package/dist/cjs/hooks/useItemBeingEdited.d.ts.map +1 -1
- package/dist/cjs/hooks/useItemBeingEdited.js +2 -14
- package/dist/cjs/hooks/useOnClickOutside.d.ts +4 -1
- package/dist/cjs/hooks/useOnClickOutside.d.ts.map +1 -1
- package/dist/cjs/hooks/useOnClickOutside.js +50 -7
- package/dist/cjs/hooks/useTenants.d.ts +13 -0
- package/dist/cjs/hooks/useTenants.d.ts.map +1 -0
- package/dist/cjs/hooks/useTenants.js +174 -0
- package/dist/cjs/hooks/useThrottle.d.ts +2 -0
- package/dist/cjs/hooks/useThrottle.d.ts.map +1 -0
- package/dist/cjs/hooks/useThrottle.js +14 -0
- package/dist/cjs/icons/CheckCircleIcon.d.ts +5 -0
- package/dist/cjs/icons/CheckCircleIcon.d.ts.map +1 -0
- package/dist/cjs/icons/CheckCircleIcon.js +5 -0
- package/dist/cjs/icons/DownChevronIcon.d.ts +2 -0
- package/dist/cjs/icons/DownChevronIcon.d.ts.map +1 -0
- package/dist/cjs/icons/DownChevronIcon.js +7 -0
- package/dist/cjs/icons/ExclamationFilledIcon.d.ts +5 -0
- package/dist/cjs/icons/ExclamationFilledIcon.d.ts.map +1 -0
- package/dist/cjs/icons/ExclamationFilledIcon.js +5 -0
- package/dist/cjs/icons/ExteriorLinkIcon.d.ts +5 -0
- package/dist/cjs/icons/ExteriorLinkIcon.d.ts.map +1 -0
- package/dist/cjs/icons/ExteriorLinkIcon.js +5 -0
- package/dist/cjs/icons/GlobeIcon.d.ts +5 -0
- package/dist/cjs/icons/GlobeIcon.d.ts.map +1 -0
- package/dist/cjs/icons/GlobeIcon.js +15 -0
- package/dist/cjs/icons/InformationCircleIcon.d.ts +4 -0
- package/dist/cjs/icons/InformationCircleIcon.d.ts.map +1 -0
- package/dist/cjs/icons/InformationCircleIcon.js +7 -0
- package/dist/cjs/icons/LeftChevronIcon.d.ts +2 -0
- package/dist/cjs/icons/LeftChevronIcon.d.ts.map +1 -0
- package/dist/cjs/icons/LeftChevronIcon.js +7 -0
- package/dist/cjs/icons/QuestionMarkCircleIcon.d.ts +5 -0
- package/dist/cjs/icons/QuestionMarkCircleIcon.d.ts.map +1 -0
- package/dist/cjs/icons/QuestionMarkCircleIcon.js +5 -0
- package/dist/cjs/icons/RightChevronIcon.d.ts +2 -0
- package/dist/cjs/icons/RightChevronIcon.d.ts.map +1 -0
- package/dist/cjs/icons/RightChevronIcon.js +7 -0
- package/dist/cjs/icons/XMarkIcon.d.ts +0 -1
- package/dist/cjs/icons/XMarkIcon.d.ts.map +1 -1
- package/dist/cjs/icons/XMarkIcon.js +1 -1
- package/dist/cjs/index.d.ts +2 -3
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +6 -7
- package/dist/cjs/modals/CodePreview.d.ts +6 -0
- package/dist/cjs/modals/CodePreview.d.ts.map +1 -0
- package/dist/cjs/modals/CodePreview.js +151 -0
- package/dist/cjs/modals/EditEnvironmentModal.d.ts +15 -0
- package/dist/cjs/modals/EditEnvironmentModal.d.ts.map +1 -0
- package/dist/cjs/modals/EditEnvironmentModal.js +551 -0
- package/dist/cjs/modals/EditFiltersModal.d.ts +14 -10
- package/dist/cjs/modals/EditFiltersModal.d.ts.map +1 -1
- package/dist/cjs/modals/EditFiltersModal.js +1219 -263
- package/dist/cjs/modals/NewDashboardModal.d.ts +6 -8
- package/dist/cjs/modals/NewDashboardModal.d.ts.map +1 -1
- package/dist/cjs/modals/NewDashboardModal.js +147 -146
- package/dist/cjs/modals/PromoteDashboardModal.d.ts +16 -0
- package/dist/cjs/modals/PromoteDashboardModal.d.ts.map +1 -0
- package/dist/cjs/modals/PromoteDashboardModal.js +56 -0
- package/dist/cjs/modals/PromoteReportModal.d.ts +15 -0
- package/dist/cjs/modals/PromoteReportModal.d.ts.map +1 -0
- package/dist/cjs/modals/PromoteReportModal.js +128 -0
- package/dist/cjs/modals/PromoteViewModal.d.ts +5 -5
- package/dist/cjs/modals/PromoteViewModal.d.ts.map +1 -1
- package/dist/cjs/modals/PromoteViewModal.js +58 -94
- package/dist/cjs/modals/ReorderDashboardModal.d.ts +1 -2
- package/dist/cjs/modals/ReorderDashboardModal.d.ts.map +1 -1
- package/dist/cjs/modals/ReorderDashboardModal.js +34 -20
- package/dist/cjs/modals/SavedQueriesModal.d.ts +7 -0
- package/dist/cjs/modals/SavedQueriesModal.d.ts.map +1 -0
- package/dist/cjs/modals/SavedQueriesModal.js +128 -0
- package/dist/cjs/modals/index.d.ts +0 -1
- package/dist/cjs/modals/index.d.ts.map +1 -1
- package/dist/cjs/modals/index.js +1 -3
- package/dist/cjs/primitives/ButtonPrimitive.d.ts +3 -1
- package/dist/cjs/primitives/ButtonPrimitive.d.ts.map +1 -1
- package/dist/cjs/primitives/ButtonPrimitive.js +24 -16
- package/dist/cjs/primitives/CheckboxPrimitive.d.ts +12 -0
- package/dist/cjs/primitives/CheckboxPrimitive.d.ts.map +1 -0
- package/dist/cjs/primitives/CheckboxPrimitive.js +29 -0
- package/dist/cjs/primitives/HeaderPrimitive.d.ts.map +1 -1
- package/dist/cjs/primitives/HeaderPrimitive.js +1 -1
- package/dist/cjs/primitives/MiniButtonPrimitive.d.ts +7 -0
- package/dist/cjs/primitives/MiniButtonPrimitive.d.ts.map +1 -0
- package/dist/cjs/primitives/MiniButtonPrimitive.js +56 -0
- package/dist/cjs/primitives/ModalPrimitive.d.ts +2 -10
- package/dist/cjs/primitives/ModalPrimitive.d.ts.map +1 -1
- package/dist/cjs/primitives/ModalPrimitive.js +6 -6
- package/dist/cjs/primitives/PlaceholderPrimitive.d.ts +5 -0
- package/dist/cjs/primitives/PlaceholderPrimitive.d.ts.map +1 -0
- package/dist/cjs/primitives/PlaceholderPrimitive.js +18 -0
- package/dist/cjs/primitives/PopoverPrimitive.d.ts +8 -0
- package/dist/cjs/primitives/PopoverPrimitive.d.ts.map +1 -0
- package/dist/cjs/primitives/PopoverPrimitive.js +53 -0
- package/dist/cjs/primitives/SecondaryButtonPrimitive.d.ts +3 -1
- package/dist/cjs/primitives/SecondaryButtonPrimitive.d.ts.map +1 -1
- package/dist/cjs/primitives/SecondaryButtonPrimitive.js +13 -10
- package/dist/cjs/primitives/TextInputPrimitive.d.ts +7 -2
- package/dist/cjs/primitives/TextInputPrimitive.d.ts.map +1 -1
- package/dist/cjs/primitives/TextInputPrimitive.js +109 -14
- package/dist/cjs/primitives/TogglePrimitive.d.ts +6 -3
- package/dist/cjs/primitives/TogglePrimitive.d.ts.map +1 -1
- package/dist/cjs/primitives/TogglePrimitive.js +10 -7
- package/dist/cjs/primitives/index.d.ts +1 -1
- package/dist/cjs/primitives/index.d.ts.map +1 -1
- package/dist/cjs/primitives/index.js +3 -3
- package/dist/cjs/public_components/ChartQueryBuilder.d.ts +9 -0
- package/dist/cjs/public_components/ChartQueryBuilder.d.ts.map +1 -0
- package/dist/cjs/public_components/ChartQueryBuilder.js +131 -0
- package/dist/cjs/public_components/CreateEnvironment.d.ts +1 -1
- package/dist/cjs/public_components/CreateEnvironment.d.ts.map +1 -1
- package/dist/cjs/public_components/CreateEnvironment.js +168 -81
- package/dist/cjs/public_components/DashboardManager.d.ts +2 -2
- package/dist/cjs/public_components/DashboardManager.d.ts.map +1 -1
- package/dist/cjs/public_components/DashboardManager.js +346 -187
- package/dist/cjs/public_components/EnvSelectPopover.d.ts +12 -0
- package/dist/cjs/public_components/EnvSelectPopover.d.ts.map +1 -0
- package/dist/cjs/public_components/EnvSelectPopover.js +144 -0
- package/dist/cjs/public_components/{SQLViewManager.d.ts → VirtualTableManager.d.ts} +3 -2
- package/dist/cjs/public_components/VirtualTableManager.d.ts.map +1 -0
- package/dist/cjs/public_components/VirtualTableManager.js +731 -0
- package/dist/cjs/public_components/__tests__/CreateEnvironment.test.d.ts +2 -0
- package/dist/cjs/public_components/__tests__/CreateEnvironment.test.d.ts.map +1 -0
- package/dist/cjs/public_components/__tests__/CreateEnvironment.test.js +685 -0
- package/dist/cjs/utils/astProcessing.d.ts +14 -1
- package/dist/cjs/utils/astProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/astProcessing.js +72 -8
- package/dist/cjs/utils/astProcessing.uspec.js +7 -3
- package/dist/cjs/utils/columnProcessing.d.ts +12 -0
- package/dist/cjs/utils/columnProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/columnProcessing.js +173 -7
- package/dist/cjs/utils/constants.d.ts +4 -21
- package/dist/cjs/utils/constants.d.ts.map +1 -1
- package/dist/cjs/utils/constants.js +20 -11
- package/dist/cjs/utils/dataEditor.d.ts +4 -3
- package/dist/cjs/utils/dataEditor.d.ts.map +1 -1
- package/dist/cjs/utils/dataEditor.js +69 -121
- package/dist/cjs/utils/dataFetcher.d.ts +20 -2
- package/dist/cjs/utils/dataFetcher.d.ts.map +1 -1
- package/dist/cjs/utils/dataFetcher.js +46 -56
- package/dist/cjs/utils/databases.d.ts +20 -8
- package/dist/cjs/utils/databases.d.ts.map +1 -1
- package/dist/cjs/utils/databases.js +63 -24
- package/dist/cjs/utils/filter.d.ts +222 -0
- package/dist/cjs/utils/filter.d.ts.map +1 -0
- package/dist/cjs/utils/filter.js +347 -0
- package/dist/cjs/utils/monacoAutocomplete.d.ts +2 -1
- package/dist/cjs/utils/monacoAutocomplete.d.ts.map +1 -1
- package/dist/cjs/utils/monacoAutocomplete.js +149 -44
- package/dist/cjs/utils/report.d.ts +120 -0
- package/dist/cjs/utils/report.d.ts.map +1 -0
- package/dist/cjs/utils/report.js +109 -0
- package/dist/cjs/utils/schema.d.ts +41 -29
- package/dist/cjs/utils/schema.d.ts.map +1 -1
- package/dist/cjs/utils/schema.js +137 -91
- package/dist/cjs/utils/table.d.ts +70 -4
- package/dist/cjs/utils/table.d.ts.map +1 -1
- package/dist/cjs/utils/tenants.d.ts +48 -0
- package/dist/cjs/utils/tenants.d.ts.map +1 -0
- package/dist/cjs/utils/tenants.js +37 -0
- package/dist/cjs/utils/textProcessing.js +1 -2
- package/dist/cjs/utils/ui.d.ts +2 -0
- package/dist/cjs/utils/ui.d.ts.map +1 -0
- package/dist/cjs/utils/ui.js +18 -0
- package/dist/cjs/utils/validation.d.ts +2 -0
- package/dist/cjs/utils/validation.d.ts.map +1 -0
- package/dist/cjs/utils/validation.js +77 -0
- package/dist/cjs/utils/validation.uspec.d.ts +2 -0
- package/dist/cjs/utils/validation.uspec.d.ts.map +1 -0
- package/dist/cjs/utils/validation.uspec.js +53 -0
- package/dist/esm/Admin.d.ts +41 -87
- package/dist/esm/Admin.d.ts.map +1 -1
- package/dist/esm/Admin.js +355 -422
- package/dist/esm/AdminProvider.d.ts +108 -50
- package/dist/esm/AdminProvider.d.ts.map +1 -1
- package/dist/esm/AdminProvider.js +390 -209
- package/dist/esm/api/ConnectionClient.d.ts +20 -38
- package/dist/esm/api/ConnectionClient.d.ts.map +1 -1
- package/dist/esm/api/ConnectionClient.js +280 -306
- package/dist/esm/assets/ArrowDownHeadIcon.d.ts.map +1 -1
- package/dist/esm/components/Banner/index.d.ts +0 -1
- package/dist/esm/components/Banner/index.d.ts.map +1 -1
- package/dist/esm/components/ClipboardButton.d.ts +8 -0
- package/dist/esm/components/ClipboardButton.d.ts.map +1 -0
- package/dist/esm/components/ClipboardButton.js +69 -0
- package/dist/esm/components/DashboardSelectPopover.d.ts +8 -5
- package/dist/esm/components/DashboardSelectPopover.d.ts.map +1 -1
- package/dist/esm/components/DashboardSelectPopover.js +72 -186
- package/dist/esm/components/DatabaseMismatchCard.d.ts +3 -3
- package/dist/esm/components/DatabaseMismatchCard.d.ts.map +1 -1
- package/dist/esm/components/DatabaseMismatchCard.js +2 -2
- package/dist/esm/components/DatabaseSelector.d.ts.map +1 -1
- package/dist/esm/components/DatabaseSelector.js +9 -1
- package/dist/esm/components/DateRangePicker/SingleDatePicker.d.ts +10 -0
- package/dist/esm/components/DateRangePicker/SingleDatePicker.d.ts.map +1 -0
- package/dist/esm/components/DateRangePicker/SingleDatePicker.js +227 -0
- package/dist/esm/components/DateRangePicker/YearlessDateRangePicker.d.ts +18 -0
- package/dist/esm/components/DateRangePicker/YearlessDateRangePicker.d.ts.map +1 -0
- package/dist/esm/components/DateRangePicker/YearlessDateRangePicker.js +282 -0
- package/dist/esm/components/DateRangePicker/dateRangePickerUtils.d.ts +91 -0
- package/dist/esm/components/DateRangePicker/dateRangePickerUtils.d.ts.map +1 -0
- package/dist/esm/components/DateRangePicker/dateRangePickerUtils.js +883 -0
- package/dist/esm/components/DeleteButton.d.ts +0 -1
- package/dist/esm/components/DeleteButton.d.ts.map +1 -1
- package/dist/esm/components/DropDownMenuWithLabel.d.ts +4 -3
- package/dist/esm/components/DropDownMenuWithLabel.d.ts.map +1 -1
- package/dist/esm/components/DropDownMenuWithLabel.js +37 -23
- package/dist/esm/components/DynamicBanner.d.ts +2 -5
- package/dist/esm/components/DynamicBanner.d.ts.map +1 -1
- package/dist/esm/components/DynamicBanner.js +2 -2
- package/dist/esm/components/EmptyDashboardComponent/index.d.ts +0 -1
- package/dist/esm/components/EmptyDashboardComponent/index.d.ts.map +1 -1
- package/dist/esm/components/EmptyDashboardComponent/index.js +5 -4
- package/dist/esm/components/EmptyVirtualTablesComponent.d.ts +4 -0
- package/dist/esm/components/EmptyVirtualTablesComponent.d.ts.map +1 -0
- package/dist/esm/components/EmptyVirtualTablesComponent.js +38 -0
- package/dist/esm/components/ExternalLink.d.ts +4 -0
- package/dist/esm/components/ExternalLink.d.ts.map +1 -0
- package/dist/esm/components/ExternalLink.js +9 -0
- package/dist/esm/components/FormTooltip.d.ts +8 -0
- package/dist/esm/components/FormTooltip.d.ts.map +1 -0
- package/dist/esm/components/FormTooltip.js +84 -0
- package/dist/esm/components/InputLabel.d.ts +4 -1
- package/dist/esm/components/InputLabel.d.ts.map +1 -1
- package/dist/esm/components/InputLabel.js +10 -8
- package/dist/esm/components/InternalDashboard/ChartSkeleton.d.ts +11 -0
- package/dist/esm/components/InternalDashboard/ChartSkeleton.d.ts.map +1 -0
- package/dist/esm/components/InternalDashboard/ChartSkeleton.js +16 -0
- package/dist/esm/components/InternalDashboard/DashboardFilter.d.ts +20 -0
- package/dist/esm/components/InternalDashboard/DashboardFilter.d.ts.map +1 -0
- package/dist/esm/components/InternalDashboard/DashboardFilter.js +101 -0
- package/dist/esm/components/InternalDashboard/DashboardLoadingComponent.d.ts +7 -0
- package/dist/esm/components/InternalDashboard/DashboardLoadingComponent.d.ts.map +1 -0
- package/dist/esm/components/InternalDashboard/DashboardLoadingComponent.js +15 -0
- package/dist/esm/components/InternalDashboard/DateRangePicker/QuillDateRangePicker.d.ts +37 -0
- package/dist/esm/components/InternalDashboard/DateRangePicker/QuillDateRangePicker.d.ts.map +1 -0
- package/dist/esm/components/InternalDashboard/DateRangePicker/QuillDateRangePicker.js +269 -0
- package/dist/esm/components/InternalDashboard/DateRangePicker/dateRangePickerUtils.d.ts +85 -0
- package/dist/esm/components/InternalDashboard/DateRangePicker/dateRangePickerUtils.d.ts.map +1 -0
- package/dist/esm/components/InternalDashboard/DateRangePicker/dateRangePickerUtils.js +520 -0
- package/dist/esm/components/InternalDashboard/InternalDashboard.d.ts +17 -0
- package/dist/esm/components/InternalDashboard/InternalDashboard.d.ts.map +1 -0
- package/dist/esm/components/InternalDashboard/InternalDashboard.js +1940 -0
- package/dist/esm/components/OrgSelect.d.ts +9 -13
- package/dist/esm/components/OrgSelect.d.ts.map +1 -1
- package/dist/esm/components/OrgSelect.js +134 -117
- package/dist/esm/components/QuillMultiSelectWithCombo.d.ts +30 -0
- package/dist/esm/components/QuillMultiSelectWithCombo.d.ts.map +1 -0
- package/dist/esm/components/QuillMultiSelectWithCombo.js +466 -0
- package/dist/esm/components/QuillPopover.d.ts +11 -0
- package/dist/esm/components/QuillPopover.d.ts.map +1 -0
- package/dist/esm/components/QuillPopover.js +144 -0
- package/dist/esm/components/QuillSelect.d.ts +1 -1
- package/dist/esm/components/QuillSelect.d.ts.map +1 -1
- package/dist/esm/components/QuillSelect.js +39 -16
- package/dist/esm/components/QuillSelectWithCombo.d.ts +22 -0
- package/dist/esm/components/QuillSelectWithCombo.d.ts.map +1 -0
- package/dist/esm/components/QuillSelectWithCombo.js +291 -0
- package/dist/esm/components/QuillTab.d.ts +12 -0
- package/dist/esm/components/QuillTab.d.ts.map +1 -0
- package/dist/esm/components/QuillTab.js +81 -0
- package/dist/esm/components/QuillToolTipPortal.d.ts +11 -0
- package/dist/esm/components/QuillToolTipPortal.d.ts.map +1 -0
- package/dist/esm/components/QuillToolTipPortal.js +104 -0
- package/dist/esm/components/SegmentedControl.d.ts +8 -2
- package/dist/esm/components/SegmentedControl.d.ts.map +1 -1
- package/dist/esm/components/SegmentedControl.js +10 -10
- package/dist/esm/components/SqlTextEditor.d.ts +2 -5
- package/dist/esm/components/SqlTextEditor.d.ts.map +1 -1
- package/dist/esm/components/SqlTextEditor.js +21 -20
- package/dist/esm/components/StepDisplay.d.ts.map +1 -1
- package/dist/esm/components/StepDisplay.js +1 -1
- package/dist/esm/components/Tenants/EditTenant.d.ts +41 -0
- package/dist/esm/components/Tenants/EditTenant.d.ts.map +1 -0
- package/dist/esm/components/Tenants/EditTenant.js +754 -0
- package/dist/esm/components/UiComponents.d.ts +35 -6
- package/dist/esm/components/UiComponents.d.ts.map +1 -1
- package/dist/esm/components/UiComponents.js +220 -26
- package/dist/esm/components/VirtualTableTile.d.ts +7 -0
- package/dist/esm/components/VirtualTableTile.d.ts.map +1 -0
- package/dist/esm/components/VirtualTableTile.js +48 -0
- package/dist/esm/components/index.d.ts +5 -5
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +5 -5
- package/dist/esm/constants/dataTypes.d.ts.map +1 -1
- package/dist/esm/constants/dataTypes.js +2 -0
- package/dist/esm/forms/client_onboard/ConnectDatabase.d.ts +15 -6
- package/dist/esm/forms/client_onboard/ConnectDatabase.d.ts.map +1 -1
- package/dist/esm/forms/client_onboard/ConnectDatabase.js +211 -98
- package/dist/esm/forms/client_onboard/ConnectSchema.d.ts +13 -9
- package/dist/esm/forms/client_onboard/ConnectSchema.d.ts.map +1 -1
- package/dist/esm/forms/client_onboard/ConnectSchema.js +160 -238
- package/dist/esm/forms/client_onboard/CreateVirtualTables.d.ts +47 -0
- package/dist/esm/forms/client_onboard/CreateVirtualTables.d.ts.map +1 -0
- package/dist/esm/forms/client_onboard/CreateVirtualTables.js +388 -0
- package/dist/esm/forms/client_onboard/__tests__/ConnectDatabase.test.d.ts +2 -0
- package/dist/esm/forms/client_onboard/__tests__/ConnectDatabase.test.d.ts.map +1 -0
- package/dist/esm/forms/client_onboard/__tests__/ConnectDatabase.test.js +566 -0
- package/dist/esm/forms/client_onboard/__tests__/ConnectSchema.test.d.ts +2 -0
- package/dist/esm/forms/client_onboard/__tests__/ConnectSchema.test.d.ts.map +1 -0
- package/dist/esm/forms/client_onboard/__tests__/ConnectSchema.test.js +454 -0
- package/dist/esm/forms/client_onboard/__tests__/CreateVirtualTables.test.d.ts +2 -0
- package/dist/esm/forms/client_onboard/__tests__/CreateVirtualTables.test.d.ts.map +1 -0
- package/dist/esm/forms/client_onboard/__tests__/CreateVirtualTables.test.js +380 -0
- package/dist/esm/forms/virtual_tables/CreateEditVirtualTable.d.ts +20 -0
- package/dist/esm/forms/virtual_tables/CreateEditVirtualTable.d.ts.map +1 -0
- package/dist/esm/forms/virtual_tables/CreateEditVirtualTable.js +288 -0
- package/dist/esm/hooks/useDashboardManager.d.ts +16 -0
- package/dist/esm/hooks/useDashboardManager.d.ts.map +1 -0
- package/dist/esm/hooks/useDashboardManager.js +109 -0
- package/dist/esm/hooks/useDatabaseSchema.d.ts +5 -0
- package/dist/esm/hooks/useDatabaseSchema.d.ts.map +1 -0
- package/dist/esm/hooks/useDatabaseSchema.js +50 -0
- package/dist/esm/hooks/useItemBeingEdited.d.ts +1 -2
- package/dist/esm/hooks/useItemBeingEdited.d.ts.map +1 -1
- package/dist/esm/hooks/useItemBeingEdited.js +3 -15
- package/dist/esm/hooks/useOnClickOutside.d.ts +4 -1
- package/dist/esm/hooks/useOnClickOutside.d.ts.map +1 -1
- package/dist/esm/hooks/useOnClickOutside.js +49 -8
- package/dist/esm/hooks/useTenants.d.ts +13 -0
- package/dist/esm/hooks/useTenants.d.ts.map +1 -0
- package/dist/esm/hooks/useTenants.js +170 -0
- package/dist/esm/hooks/useThrottle.d.ts +2 -0
- package/dist/esm/hooks/useThrottle.d.ts.map +1 -0
- package/dist/esm/hooks/useThrottle.js +11 -0
- package/dist/esm/icons/CheckCircleIcon.d.ts +5 -0
- package/dist/esm/icons/CheckCircleIcon.d.ts.map +1 -0
- package/dist/esm/icons/CheckCircleIcon.js +3 -0
- package/dist/esm/icons/DownChevronIcon.d.ts +2 -0
- package/dist/esm/icons/DownChevronIcon.d.ts.map +1 -0
- package/dist/esm/icons/DownChevronIcon.js +4 -0
- package/dist/esm/icons/ExclamationFilledIcon.d.ts +5 -0
- package/dist/esm/icons/ExclamationFilledIcon.d.ts.map +1 -0
- package/dist/esm/icons/ExclamationFilledIcon.js +3 -0
- package/dist/esm/icons/ExteriorLinkIcon.d.ts +5 -0
- package/dist/esm/icons/ExteriorLinkIcon.d.ts.map +1 -0
- package/dist/esm/icons/ExteriorLinkIcon.js +3 -0
- package/dist/esm/icons/GlobeIcon.d.ts +5 -0
- package/dist/esm/icons/GlobeIcon.d.ts.map +1 -0
- package/dist/esm/icons/GlobeIcon.js +12 -0
- package/dist/esm/icons/InformationCircleIcon.d.ts +4 -0
- package/dist/esm/icons/InformationCircleIcon.d.ts.map +1 -0
- package/dist/esm/icons/InformationCircleIcon.js +4 -0
- package/dist/esm/icons/LeftChevronIcon.d.ts +2 -0
- package/dist/esm/icons/LeftChevronIcon.d.ts.map +1 -0
- package/dist/esm/icons/LeftChevronIcon.js +4 -0
- package/dist/esm/icons/QuestionMarkCircleIcon.d.ts +5 -0
- package/dist/esm/icons/QuestionMarkCircleIcon.d.ts.map +1 -0
- package/dist/esm/icons/QuestionMarkCircleIcon.js +3 -0
- package/dist/esm/icons/RightChevronIcon.d.ts +2 -0
- package/dist/esm/icons/RightChevronIcon.d.ts.map +1 -0
- package/dist/esm/icons/RightChevronIcon.js +4 -0
- package/dist/esm/icons/XMarkIcon.d.ts +0 -1
- package/dist/esm/icons/XMarkIcon.d.ts.map +1 -1
- package/dist/esm/index.d.ts +2 -3
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/modals/CodePreview.d.ts +6 -0
- package/dist/esm/modals/CodePreview.d.ts.map +1 -0
- package/dist/esm/modals/CodePreview.js +145 -0
- package/dist/esm/modals/EditEnvironmentModal.d.ts +15 -0
- package/dist/esm/modals/EditEnvironmentModal.d.ts.map +1 -0
- package/dist/esm/modals/EditEnvironmentModal.js +545 -0
- package/dist/esm/modals/EditFiltersModal.d.ts +14 -10
- package/dist/esm/modals/EditFiltersModal.d.ts.map +1 -1
- package/dist/esm/modals/EditFiltersModal.js +1226 -264
- package/dist/esm/modals/NewDashboardModal.d.ts +6 -8
- package/dist/esm/modals/NewDashboardModal.d.ts.map +1 -1
- package/dist/esm/modals/NewDashboardModal.js +148 -146
- package/dist/esm/modals/PromoteDashboardModal.d.ts +16 -0
- package/dist/esm/modals/PromoteDashboardModal.d.ts.map +1 -0
- package/dist/esm/modals/PromoteDashboardModal.js +53 -0
- package/dist/esm/modals/PromoteReportModal.d.ts +15 -0
- package/dist/esm/modals/PromoteReportModal.d.ts.map +1 -0
- package/dist/esm/modals/PromoteReportModal.js +125 -0
- package/dist/esm/modals/PromoteViewModal.d.ts +5 -5
- package/dist/esm/modals/PromoteViewModal.d.ts.map +1 -1
- package/dist/esm/modals/PromoteViewModal.js +58 -94
- package/dist/esm/modals/ReorderDashboardModal.d.ts +1 -2
- package/dist/esm/modals/ReorderDashboardModal.d.ts.map +1 -1
- package/dist/esm/modals/ReorderDashboardModal.js +34 -20
- package/dist/esm/modals/SavedQueriesModal.d.ts +7 -0
- package/dist/esm/modals/SavedQueriesModal.d.ts.map +1 -0
- package/dist/esm/modals/SavedQueriesModal.js +125 -0
- package/dist/esm/modals/index.d.ts +0 -1
- package/dist/esm/modals/index.d.ts.map +1 -1
- package/dist/esm/modals/index.js +0 -1
- package/dist/esm/primitives/ButtonPrimitive.d.ts +3 -1
- package/dist/esm/primitives/ButtonPrimitive.d.ts.map +1 -1
- package/dist/esm/primitives/ButtonPrimitive.js +25 -17
- package/dist/esm/primitives/CheckboxPrimitive.d.ts +12 -0
- package/dist/esm/primitives/CheckboxPrimitive.d.ts.map +1 -0
- package/dist/esm/primitives/CheckboxPrimitive.js +27 -0
- package/dist/esm/primitives/HeaderPrimitive.d.ts.map +1 -1
- package/dist/esm/primitives/HeaderPrimitive.js +1 -1
- package/dist/esm/primitives/MiniButtonPrimitive.d.ts +7 -0
- package/dist/esm/primitives/MiniButtonPrimitive.d.ts.map +1 -0
- package/dist/esm/primitives/MiniButtonPrimitive.js +54 -0
- package/dist/esm/primitives/ModalPrimitive.d.ts +2 -10
- package/dist/esm/primitives/ModalPrimitive.d.ts.map +1 -1
- package/dist/esm/primitives/ModalPrimitive.js +7 -7
- package/dist/esm/primitives/PlaceholderPrimitive.d.ts +5 -0
- package/dist/esm/primitives/PlaceholderPrimitive.d.ts.map +1 -0
- package/dist/esm/primitives/PlaceholderPrimitive.js +15 -0
- package/dist/esm/primitives/PopoverPrimitive.d.ts +8 -0
- package/dist/esm/primitives/PopoverPrimitive.d.ts.map +1 -0
- package/dist/esm/primitives/PopoverPrimitive.js +49 -0
- package/dist/esm/primitives/SecondaryButtonPrimitive.d.ts +3 -1
- package/dist/esm/primitives/SecondaryButtonPrimitive.d.ts.map +1 -1
- package/dist/esm/primitives/SecondaryButtonPrimitive.js +14 -11
- package/dist/esm/primitives/TextInputPrimitive.d.ts +7 -2
- package/dist/esm/primitives/TextInputPrimitive.d.ts.map +1 -1
- package/dist/esm/primitives/TextInputPrimitive.js +77 -12
- package/dist/esm/primitives/TogglePrimitive.d.ts +6 -3
- package/dist/esm/primitives/TogglePrimitive.d.ts.map +1 -1
- package/dist/esm/primitives/TogglePrimitive.js +10 -7
- package/dist/esm/primitives/index.d.ts +1 -1
- package/dist/esm/primitives/index.d.ts.map +1 -1
- package/dist/esm/primitives/index.js +1 -1
- package/dist/esm/public_components/ChartQueryBuilder.d.ts +9 -0
- package/dist/esm/public_components/ChartQueryBuilder.d.ts.map +1 -0
- package/dist/esm/public_components/ChartQueryBuilder.js +125 -0
- package/dist/esm/public_components/CreateEnvironment.d.ts +1 -1
- package/dist/esm/public_components/CreateEnvironment.d.ts.map +1 -1
- package/dist/esm/public_components/CreateEnvironment.js +152 -75
- package/dist/esm/public_components/DashboardManager.d.ts +2 -2
- package/dist/esm/public_components/DashboardManager.d.ts.map +1 -1
- package/dist/esm/public_components/DashboardManager.js +350 -191
- package/dist/esm/public_components/EnvSelectPopover.d.ts +12 -0
- package/dist/esm/public_components/EnvSelectPopover.d.ts.map +1 -0
- package/dist/esm/public_components/EnvSelectPopover.js +138 -0
- package/dist/esm/public_components/{SQLViewManager.d.ts → VirtualTableManager.d.ts} +3 -2
- package/dist/esm/public_components/VirtualTableManager.d.ts.map +1 -0
- package/dist/esm/public_components/VirtualTableManager.js +723 -0
- package/dist/esm/public_components/__tests__/CreateEnvironment.test.d.ts +2 -0
- package/dist/esm/public_components/__tests__/CreateEnvironment.test.d.ts.map +1 -0
- package/dist/esm/public_components/__tests__/CreateEnvironment.test.js +680 -0
- package/dist/esm/utils/astProcessing.d.ts +14 -1
- package/dist/esm/utils/astProcessing.d.ts.map +1 -1
- package/dist/esm/utils/astProcessing.js +67 -6
- package/dist/esm/utils/astProcessing.uspec.js +8 -4
- package/dist/esm/utils/columnProcessing.d.ts +12 -0
- package/dist/esm/utils/columnProcessing.d.ts.map +1 -1
- package/dist/esm/utils/columnProcessing.js +167 -4
- package/dist/esm/utils/constants.d.ts +4 -21
- package/dist/esm/utils/constants.d.ts.map +1 -1
- package/dist/esm/utils/constants.js +18 -9
- package/dist/esm/utils/dataEditor.d.ts +4 -3
- package/dist/esm/utils/dataEditor.d.ts.map +1 -1
- package/dist/esm/utils/dataEditor.js +65 -117
- package/dist/esm/utils/dataFetcher.d.ts +20 -2
- package/dist/esm/utils/dataFetcher.d.ts.map +1 -1
- package/dist/esm/utils/dataFetcher.js +44 -53
- package/dist/esm/utils/databases.d.ts +20 -8
- package/dist/esm/utils/databases.d.ts.map +1 -1
- package/dist/esm/utils/databases.js +60 -21
- package/dist/esm/utils/filter.d.ts +222 -0
- package/dist/esm/utils/filter.d.ts.map +1 -0
- package/dist/esm/utils/filter.js +343 -0
- package/dist/esm/utils/monacoAutocomplete.d.ts +2 -1
- package/dist/esm/utils/monacoAutocomplete.d.ts.map +1 -1
- package/dist/esm/utils/monacoAutocomplete.js +146 -41
- package/dist/esm/utils/report.d.ts +120 -0
- package/dist/esm/utils/report.d.ts.map +1 -0
- package/dist/esm/utils/report.js +106 -0
- package/dist/esm/utils/schema.d.ts +41 -29
- package/dist/esm/utils/schema.d.ts.map +1 -1
- package/dist/esm/utils/schema.js +133 -88
- package/dist/esm/utils/table.d.ts +70 -4
- package/dist/esm/utils/table.d.ts.map +1 -1
- package/dist/esm/utils/tenants.d.ts +48 -0
- package/dist/esm/utils/tenants.d.ts.map +1 -0
- package/dist/esm/utils/tenants.js +31 -0
- package/dist/esm/utils/ui.d.ts +2 -0
- package/dist/esm/utils/ui.d.ts.map +1 -0
- package/dist/esm/utils/ui.js +14 -0
- package/dist/esm/utils/validation.d.ts +2 -0
- package/dist/esm/utils/validation.d.ts.map +1 -0
- package/dist/esm/utils/validation.js +74 -0
- package/dist/esm/utils/validation.uspec.d.ts +2 -0
- package/dist/esm/utils/validation.uspec.d.ts.map +1 -0
- package/dist/esm/utils/validation.uspec.js +51 -0
- package/package.json +22 -9
- package/dist/cjs/components/EnvSelectPopover.d.ts +0 -13
- package/dist/cjs/components/EnvSelectPopover.d.ts.map +0 -1
- package/dist/cjs/components/EnvSelectPopover.js +0 -224
- package/dist/cjs/components/SqlViewTile.d.ts +0 -8
- package/dist/cjs/components/SqlViewTile.d.ts.map +0 -1
- package/dist/cjs/components/SqlViewTile.js +0 -69
- package/dist/cjs/forms/client_onboard/CreateSqlViews.d.ts +0 -24
- package/dist/cjs/forms/client_onboard/CreateSqlViews.d.ts.map +0 -1
- package/dist/cjs/forms/client_onboard/CreateSqlViews.js +0 -250
- package/dist/cjs/forms/sql_views/CreateEditSqlView.d.ts +0 -29
- package/dist/cjs/forms/sql_views/CreateEditSqlView.d.ts.map +0 -1
- package/dist/cjs/forms/sql_views/CreateEditSqlView.js +0 -228
- package/dist/cjs/modals/PromoteDashModal.d.ts +0 -17
- package/dist/cjs/modals/PromoteDashModal.d.ts.map +0 -1
- package/dist/cjs/modals/PromoteDashModal.js +0 -133
- package/dist/cjs/primitives/SelectPrimitive.d.ts +0 -16
- package/dist/cjs/primitives/SelectPrimitive.d.ts.map +0 -1
- package/dist/cjs/primitives/SelectPrimitive.js +0 -43
- package/dist/cjs/public_components/DashboardBuilder.d.ts +0 -7
- package/dist/cjs/public_components/DashboardBuilder.d.ts.map +0 -1
- package/dist/cjs/public_components/DashboardBuilder.js +0 -220
- package/dist/cjs/public_components/SQLViewManager.d.ts.map +0 -1
- package/dist/cjs/public_components/SQLViewManager.js +0 -563
- package/dist/esm/components/EnvSelectPopover.d.ts +0 -13
- package/dist/esm/components/EnvSelectPopover.d.ts.map +0 -1
- package/dist/esm/components/EnvSelectPopover.js +0 -221
- package/dist/esm/components/SqlViewTile.d.ts +0 -8
- package/dist/esm/components/SqlViewTile.d.ts.map +0 -1
- package/dist/esm/components/SqlViewTile.js +0 -40
- package/dist/esm/forms/client_onboard/CreateSqlViews.d.ts +0 -24
- package/dist/esm/forms/client_onboard/CreateSqlViews.d.ts.map +0 -1
- package/dist/esm/forms/client_onboard/CreateSqlViews.js +0 -242
- package/dist/esm/forms/sql_views/CreateEditSqlView.d.ts +0 -29
- package/dist/esm/forms/sql_views/CreateEditSqlView.d.ts.map +0 -1
- package/dist/esm/forms/sql_views/CreateEditSqlView.js +0 -222
- package/dist/esm/modals/PromoteDashModal.d.ts +0 -17
- package/dist/esm/modals/PromoteDashModal.d.ts.map +0 -1
- package/dist/esm/modals/PromoteDashModal.js +0 -130
- package/dist/esm/primitives/SelectPrimitive.d.ts +0 -16
- package/dist/esm/primitives/SelectPrimitive.d.ts.map +0 -1
- package/dist/esm/primitives/SelectPrimitive.js +0 -41
- package/dist/esm/public_components/DashboardBuilder.d.ts +0 -7
- package/dist/esm/public_components/DashboardBuilder.d.ts.map +0 -1
- package/dist/esm/public_components/DashboardBuilder.js +0 -214
- package/dist/esm/public_components/SQLViewManager.d.ts.map +0 -1
- package/dist/esm/public_components/SQLViewManager.js +0 -555
|
@@ -1,179 +1,162 @@
|
|
|
1
|
-
import { ALL_INT_TYPES } from '../constants/dataTypes';
|
|
2
1
|
import { QUILL_SERVER } from '../utils/constants';
|
|
3
|
-
import {
|
|
4
|
-
export async function testConnectionString(connectionString, databaseType, clientId) {
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
import { quillFetch } from '../utils/dataFetcher';
|
|
3
|
+
export async function testConnectionString(queryEndpoint, connectionString, databaseType, getToken, clientId) {
|
|
4
|
+
const controller = new AbortController();
|
|
5
|
+
const timeoutId = setTimeout(() => controller.abort(), 10000); // 10 second timeout
|
|
6
|
+
try {
|
|
7
|
+
if (!clientId) {
|
|
8
|
+
// If no clientId, likely during onboarding, can't use actual sdk
|
|
9
|
+
const response = await fetch(`${QUILL_SERVER}/sdk/test-connection`, {
|
|
10
|
+
method: 'POST',
|
|
11
|
+
headers: {
|
|
12
|
+
'Content-Type': 'application/json',
|
|
13
|
+
},
|
|
14
|
+
body: JSON.stringify({
|
|
15
|
+
connectionString,
|
|
16
|
+
databaseType,
|
|
17
|
+
}),
|
|
18
|
+
signal: controller.signal,
|
|
19
|
+
});
|
|
20
|
+
clearTimeout(timeoutId);
|
|
21
|
+
const results = await response.json();
|
|
22
|
+
return results;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
const { data } = await quillFetch({
|
|
26
|
+
client: {
|
|
27
|
+
queryEndpoint,
|
|
28
|
+
clientId: clientId,
|
|
29
|
+
withCredentials: false,
|
|
30
|
+
},
|
|
31
|
+
task: 'test-connection',
|
|
32
|
+
metadata: {
|
|
33
|
+
connectionString,
|
|
34
|
+
databaseType,
|
|
35
|
+
},
|
|
36
|
+
getToken,
|
|
37
|
+
abortSignal: controller.signal,
|
|
38
|
+
});
|
|
39
|
+
clearTimeout(timeoutId);
|
|
40
|
+
return data;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
clearTimeout(timeoutId);
|
|
45
|
+
if (error.name === 'AbortError') {
|
|
46
|
+
return { success: false, error: 'Connection timed out after 10 seconds' };
|
|
47
|
+
}
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
20
50
|
}
|
|
21
|
-
export async function
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
51
|
+
export async function getTablesBySchema(queryEndpoint, clientId, schema, getToken) {
|
|
52
|
+
const results = await quillFetch({
|
|
53
|
+
client: {
|
|
54
|
+
queryEndpoint,
|
|
55
|
+
clientId,
|
|
56
|
+
withCredentials: false,
|
|
27
57
|
},
|
|
28
|
-
|
|
58
|
+
task: 'tables-by-schema',
|
|
59
|
+
metadata: {
|
|
29
60
|
clientId,
|
|
30
61
|
schema,
|
|
31
|
-
databaseType,
|
|
32
|
-
task: 'schema-info',
|
|
33
|
-
}),
|
|
34
|
-
});
|
|
35
|
-
const results = await response.json();
|
|
36
|
-
return results;
|
|
37
|
-
}
|
|
38
|
-
export async function getTablesBySchema(clientId, schema) {
|
|
39
|
-
const localURL = `${QUILL_SERVER}/sdk/tables-by-schema`;
|
|
40
|
-
const response = await fetch(localURL, {
|
|
41
|
-
method: 'POST',
|
|
42
|
-
headers: {
|
|
43
|
-
'Content-Type': 'application/json',
|
|
44
62
|
},
|
|
45
|
-
|
|
46
|
-
clientId,
|
|
47
|
-
schemaNames: [schema],
|
|
48
|
-
task: 'tables-by-schema',
|
|
49
|
-
}),
|
|
63
|
+
getToken,
|
|
50
64
|
});
|
|
51
|
-
|
|
52
|
-
|
|
65
|
+
if (results.status === 'success') {
|
|
66
|
+
return results.data.tables;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
throw new Error(results.error);
|
|
70
|
+
}
|
|
53
71
|
}
|
|
54
|
-
export async function
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
headers: {
|
|
59
|
-
'Content-Type': 'application/json',
|
|
60
|
-
},
|
|
61
|
-
body: JSON.stringify({
|
|
72
|
+
export async function setSchemaNames(queryEndpoint, clientId, schemaNames, getToken) {
|
|
73
|
+
await quillFetch({
|
|
74
|
+
client: {
|
|
75
|
+
queryEndpoint,
|
|
62
76
|
clientId,
|
|
63
|
-
|
|
64
|
-
table,
|
|
65
|
-
task: 'table-info',
|
|
66
|
-
}),
|
|
67
|
-
});
|
|
68
|
-
const results = await response.json();
|
|
69
|
-
return results;
|
|
70
|
-
}
|
|
71
|
-
export async function getOrgInfo(clientId, schema, table, orgIdColumn, orgColumn) {
|
|
72
|
-
const localURL = `${QUILL_SERVER}/sdk/org-info`;
|
|
73
|
-
const response = await fetch(localURL, {
|
|
74
|
-
method: 'POST',
|
|
75
|
-
headers: {
|
|
76
|
-
'Content-Type': 'application/json',
|
|
77
|
+
withCredentials: false,
|
|
77
78
|
},
|
|
78
|
-
|
|
79
|
+
task: 'set-schemas',
|
|
80
|
+
metadata: {
|
|
79
81
|
clientId,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
orgIdColumn,
|
|
84
|
-
task: 'org-info',
|
|
85
|
-
}),
|
|
82
|
+
schemaNames,
|
|
83
|
+
},
|
|
84
|
+
getToken,
|
|
86
85
|
});
|
|
87
|
-
const results = await response.json();
|
|
88
|
-
return results.orgStrings;
|
|
89
86
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
// Unused?
|
|
88
|
+
export async function getTableInfo(queryEndpoint, clientId, schema, table, getToken) {
|
|
89
|
+
const results = await quillFetch({
|
|
90
|
+
client: {
|
|
91
|
+
queryEndpoint,
|
|
92
|
+
clientId,
|
|
93
|
+
withCredentials: false,
|
|
96
94
|
},
|
|
97
|
-
|
|
95
|
+
task: 'table-info',
|
|
96
|
+
metadata: {
|
|
98
97
|
clientId,
|
|
99
98
|
schema,
|
|
100
99
|
table,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}),
|
|
100
|
+
},
|
|
101
|
+
getToken,
|
|
104
102
|
});
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return acc;
|
|
111
|
-
}, []);
|
|
112
|
-
if (potentialBestFK.length > 0) {
|
|
113
|
-
return potentialBestFK;
|
|
103
|
+
if (results.status === 'success') {
|
|
104
|
+
return results.data.columns;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
throw new Error(results.error);
|
|
114
108
|
}
|
|
115
|
-
return results.foreignKeysString;
|
|
116
109
|
}
|
|
117
|
-
export async function
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
headers: {
|
|
122
|
-
'Content-Type': 'application/json',
|
|
123
|
-
},
|
|
124
|
-
body: JSON.stringify({
|
|
110
|
+
export async function getTableColumnsBySchema(queryEndpoint, clientId, getToken, schemas) {
|
|
111
|
+
const results = await quillFetch({
|
|
112
|
+
client: {
|
|
113
|
+
queryEndpoint,
|
|
125
114
|
clientId,
|
|
126
|
-
|
|
127
|
-
schemaName,
|
|
128
|
-
task: 'table-schemas',
|
|
129
|
-
}),
|
|
130
|
-
});
|
|
131
|
-
const results = await response.json();
|
|
132
|
-
return results;
|
|
133
|
-
}
|
|
134
|
-
export async function getTableColumnsBySchema(clientId, schemaNames, databaseType, queryEndpoint) {
|
|
135
|
-
const localURL = queryEndpoint ?? `${QUILL_SERVER}/table-info-by-schema`;
|
|
136
|
-
const response = await fetch(localURL, {
|
|
137
|
-
method: 'POST',
|
|
138
|
-
headers: {
|
|
139
|
-
'Content-Type': 'application/json',
|
|
115
|
+
withCredentials: false,
|
|
140
116
|
},
|
|
141
|
-
|
|
117
|
+
task: 'table-info-by-schema',
|
|
118
|
+
metadata: {
|
|
142
119
|
clientId,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
120
|
+
schemas,
|
|
121
|
+
},
|
|
122
|
+
getToken,
|
|
123
|
+
});
|
|
124
|
+
if (results.status === 'error') {
|
|
125
|
+
throw new Error(results.error);
|
|
126
|
+
}
|
|
127
|
+
const formattedResults = results.data.columnsByTable.map((table) => {
|
|
128
|
+
return {
|
|
129
|
+
tableName: table.tableName,
|
|
130
|
+
displayName: table.displayName,
|
|
131
|
+
columns: table.columns.map((column) => {
|
|
132
|
+
return {
|
|
133
|
+
columnName: column.columnName,
|
|
134
|
+
displayName: column.displayName,
|
|
135
|
+
fieldType: column.fieldType,
|
|
136
|
+
dataTypeId: column.dataTypeId,
|
|
137
|
+
field: column.columnName,
|
|
138
|
+
};
|
|
139
|
+
}),
|
|
140
|
+
};
|
|
159
141
|
});
|
|
160
|
-
|
|
161
|
-
return queryEndpoint ? results.data.queryResults : results;
|
|
142
|
+
return { columnsByTable: formattedResults, schema: results.data.schema };
|
|
162
143
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
144
|
+
// Unused?
|
|
145
|
+
export async function getVirtualTables(queryEndpoint, tableSchemas, customerNameField, clientId, getToken) {
|
|
146
|
+
const { data: results } = await quillFetch({
|
|
147
|
+
client: {
|
|
148
|
+
queryEndpoint,
|
|
149
|
+
clientId,
|
|
150
|
+
withCredentials: false,
|
|
169
151
|
},
|
|
170
|
-
|
|
152
|
+
task: 'sqlviewai',
|
|
153
|
+
metadata: {
|
|
171
154
|
tableSchemas,
|
|
172
155
|
customerNameField,
|
|
173
|
-
|
|
174
|
-
}
|
|
156
|
+
clientId,
|
|
157
|
+
},
|
|
158
|
+
getToken,
|
|
175
159
|
});
|
|
176
|
-
const results = await response.json();
|
|
177
160
|
if (results.notSureWhatThisIs.length === 0) {
|
|
178
161
|
return [];
|
|
179
162
|
}
|
|
@@ -182,19 +165,24 @@ export async function getSQLViews(tableSchemas, customerNameField) {
|
|
|
182
165
|
}
|
|
183
166
|
return results.notSureWhatThisIs.sqlQueries;
|
|
184
167
|
}
|
|
185
|
-
export async function
|
|
186
|
-
const url = queryEndpoint ?? `${QUILL_SERVER}/sdk/query-view`;
|
|
168
|
+
export async function getVirtualTableData(clientId, query, databaseType, queryEndpoint, getToken) {
|
|
187
169
|
let queryAst = undefined;
|
|
188
170
|
try {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
171
|
+
const { data } = await quillFetch({
|
|
172
|
+
client: {
|
|
173
|
+
queryEndpoint,
|
|
174
|
+
clientId,
|
|
175
|
+
withCredentials: false,
|
|
176
|
+
},
|
|
177
|
+
task: 'astify',
|
|
178
|
+
metadata: {
|
|
179
|
+
clientId,
|
|
180
|
+
query,
|
|
181
|
+
useNewNodeSql: true,
|
|
194
182
|
},
|
|
195
|
-
|
|
183
|
+
getToken,
|
|
196
184
|
});
|
|
197
|
-
queryAst =
|
|
185
|
+
queryAst = data;
|
|
198
186
|
if (queryAst.success === false) {
|
|
199
187
|
return {
|
|
200
188
|
success: false,
|
|
@@ -208,29 +196,26 @@ export async function getSqlViewData(clientId, query, databaseType, queryEndpoin
|
|
|
208
196
|
error: 'Invalid SQL Query',
|
|
209
197
|
};
|
|
210
198
|
}
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
199
|
+
const limitRegex = /limit\s+\d+/i;
|
|
200
|
+
const results = await quillFetch({
|
|
201
|
+
client: {
|
|
202
|
+
queryEndpoint,
|
|
203
|
+
clientId,
|
|
204
|
+
withCredentials: false,
|
|
215
205
|
},
|
|
216
|
-
|
|
206
|
+
task: 'query-view',
|
|
207
|
+
metadata: {
|
|
208
|
+
preQueries: [query],
|
|
217
209
|
clientId,
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
clientId,
|
|
223
|
-
runQueryConfig: {
|
|
224
|
-
overridePost: true,
|
|
225
|
-
convertDatatypes: true,
|
|
226
|
-
limitThousand: true,
|
|
227
|
-
},
|
|
228
|
-
databaseType: databaseType,
|
|
210
|
+
runQueryConfig: {
|
|
211
|
+
overridePost: true,
|
|
212
|
+
convertDatatypes: true,
|
|
213
|
+
limitThousand: !limitRegex.test(query),
|
|
229
214
|
},
|
|
230
|
-
|
|
231
|
-
}
|
|
215
|
+
databaseType: databaseType,
|
|
216
|
+
},
|
|
217
|
+
getToken,
|
|
232
218
|
});
|
|
233
|
-
const results = await response.json();
|
|
234
219
|
if (results.status === 'error') {
|
|
235
220
|
return { ...results, success: false };
|
|
236
221
|
}
|
|
@@ -247,6 +232,43 @@ export async function getSqlViewData(clientId, query, databaseType, queryEndpoin
|
|
|
247
232
|
};
|
|
248
233
|
}
|
|
249
234
|
}
|
|
235
|
+
if (databaseType.toLowerCase() === 'clickhouse') {
|
|
236
|
+
const dateFields = results.data.queryResults[0].fields.filter((field) => {
|
|
237
|
+
return (field.fieldType.toLowerCase() === 'date' // date32, which gets classified as date, does not work with dateTrunc operations that we use
|
|
238
|
+
);
|
|
239
|
+
});
|
|
240
|
+
if (dateFields.length > 0) {
|
|
241
|
+
return {
|
|
242
|
+
error: `Error Invalid Column ${dateFields[0].name}. Clickhouse Date types not supported. Use CAST(${dateFields[0].name} AS DateTime) to convert DATE fields to DateTime.`,
|
|
243
|
+
success: false,
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
const binaryFields = results.data.queryResults[0].fields.filter((field) => {
|
|
247
|
+
return (field.fieldType.toLowerCase() === 'bytea'
|
|
248
|
+
// It seems unlikely a customerID would be bytea
|
|
249
|
+
// && field.name !== customerId
|
|
250
|
+
);
|
|
251
|
+
});
|
|
252
|
+
if (binaryFields.length > 0) {
|
|
253
|
+
return {
|
|
254
|
+
error: `Error Invalid Column ${binaryFields[0].name}. Clickhouse Binary types not supported. Use CAST(${binaryFields[0].name} AS Text) to convert Binary fields to a supported type.`,
|
|
255
|
+
success: false,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
const enumFields = results.data.queryResults[0].fields.filter((field) => {
|
|
259
|
+
return (field.fieldType.toLowerCase() === 'pg_enum' ||
|
|
260
|
+
field.fieldType.toLowerCase() === 'anyenum'
|
|
261
|
+
// It seems unlikely a customerID would be an enum
|
|
262
|
+
// && field.name !== customerId
|
|
263
|
+
);
|
|
264
|
+
});
|
|
265
|
+
if (enumFields.length > 0) {
|
|
266
|
+
return {
|
|
267
|
+
error: `Error Invalid Column ${enumFields[0].name}. Clickhouse ENUM types not supported. Use CAST(${enumFields[0].name} AS Text) to convert ENUM fields to a supported type.`,
|
|
268
|
+
success: false,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
}
|
|
250
272
|
return queryEndpoint
|
|
251
273
|
? {
|
|
252
274
|
...results.data.queryResults[0],
|
|
@@ -255,73 +277,97 @@ export async function getSqlViewData(clientId, query, databaseType, queryEndpoin
|
|
|
255
277
|
}
|
|
256
278
|
: { ...results, ...queryAst };
|
|
257
279
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
280
|
+
// Unused?
|
|
281
|
+
export async function getAST(query, clientId, queryEndpoint, getToken) {
|
|
282
|
+
const { data } = await quillFetch({
|
|
283
|
+
client: {
|
|
284
|
+
queryEndpoint,
|
|
285
|
+
clientId,
|
|
286
|
+
withCredentials: false,
|
|
287
|
+
},
|
|
288
|
+
task: 'astify',
|
|
289
|
+
metadata: {
|
|
290
|
+
clientId,
|
|
291
|
+
query,
|
|
292
|
+
useNewNodeSql: true,
|
|
264
293
|
},
|
|
265
|
-
|
|
294
|
+
getToken,
|
|
295
|
+
});
|
|
296
|
+
return data;
|
|
297
|
+
}
|
|
298
|
+
// Unused?
|
|
299
|
+
export async function getQueryFromAI(aiPrompt, columnsByTable, queryEndpoint, clientId, getToken) {
|
|
300
|
+
const { data: results } = await quillFetch({
|
|
301
|
+
client: {
|
|
302
|
+
queryEndpoint,
|
|
303
|
+
clientId,
|
|
304
|
+
withCredentials: false,
|
|
305
|
+
},
|
|
306
|
+
task: 'sql-generator',
|
|
307
|
+
metadata: {
|
|
266
308
|
initialQuestion: aiPrompt,
|
|
267
309
|
tableSchemas: columnsByTable,
|
|
268
|
-
|
|
269
|
-
}
|
|
310
|
+
clientId,
|
|
311
|
+
},
|
|
312
|
+
getToken,
|
|
270
313
|
});
|
|
271
|
-
|
|
272
|
-
return results.message;
|
|
314
|
+
return results?.message || '';
|
|
273
315
|
}
|
|
274
|
-
export async function getQueryFromAiWithConnection(aiPrompt, clientId, schemaNames) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
316
|
+
export async function getQueryFromAiWithConnection(queryEndpoint, aiPrompt, clientId, getToken, schemaNames) {
|
|
317
|
+
if (aiPrompt.trim().length > 500) {
|
|
318
|
+
return '';
|
|
319
|
+
}
|
|
320
|
+
const { data: results } = await quillFetch({
|
|
321
|
+
client: {
|
|
322
|
+
queryEndpoint,
|
|
323
|
+
clientId,
|
|
324
|
+
withCredentials: false,
|
|
280
325
|
},
|
|
281
|
-
|
|
326
|
+
task: 'ai-from-client-schema',
|
|
327
|
+
metadata: {
|
|
282
328
|
prompt: aiPrompt,
|
|
283
329
|
clientId,
|
|
284
330
|
schemaNames,
|
|
285
|
-
|
|
286
|
-
|
|
331
|
+
},
|
|
332
|
+
getToken,
|
|
287
333
|
});
|
|
288
|
-
|
|
289
|
-
return results.message;
|
|
334
|
+
return results?.message || '';
|
|
290
335
|
}
|
|
291
|
-
export async function
|
|
336
|
+
export async function createVirtualTable(viewInfo, client, tableData, currentTableNames, clientId, ownerTenantFields, queryEndpoint, queryHeaders, getToken) {
|
|
292
337
|
let queryName = viewInfo.name;
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
'Content-Type': 'application/json',
|
|
338
|
+
const { data: queryAstRaw } = await quillFetch({
|
|
339
|
+
client: {
|
|
340
|
+
queryEndpoint,
|
|
341
|
+
clientId,
|
|
342
|
+
withCredentials: false,
|
|
299
343
|
},
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
344
|
+
task: 'astify',
|
|
345
|
+
metadata: {
|
|
346
|
+
query: viewInfo.query,
|
|
347
|
+
clientId,
|
|
348
|
+
useNewNodeSql: true,
|
|
349
|
+
},
|
|
350
|
+
getToken,
|
|
307
351
|
});
|
|
308
|
-
const
|
|
309
|
-
|
|
352
|
+
const missingField = ownerTenantFields.find((field) => tableData &&
|
|
353
|
+
!tableData.fields.find((col) => col.name === field?.replaceAll('"', '')));
|
|
354
|
+
const failingTenant = client.allTenantTypes.find((tenant) => tenant.tenantField === missingField);
|
|
355
|
+
if (failingTenant) {
|
|
310
356
|
return {
|
|
311
357
|
success: false,
|
|
312
|
-
|
|
358
|
+
failingTenant,
|
|
313
359
|
};
|
|
314
360
|
}
|
|
315
|
-
|
|
316
|
-
queryName = queryAst.from.map((ast) => ast.table).join('_');
|
|
317
|
-
if (!override && !validQuery) {
|
|
361
|
+
if (!queryAstRaw || queryAstRaw.success === false) {
|
|
318
362
|
return {
|
|
319
363
|
success: false,
|
|
320
|
-
|
|
321
|
-
message: `No foreign key (${allSchemaInfo.selectedFields.foreignKey}) detected in the view. If this is a utility table override this error but if it isn’t you should rework your query.`,
|
|
364
|
+
error: queryAstRaw.message,
|
|
322
365
|
};
|
|
323
366
|
}
|
|
324
|
-
|
|
367
|
+
const queryAst = queryAstRaw.ast[0] ? queryAstRaw.ast[0] : queryAstRaw.ast;
|
|
368
|
+
queryName =
|
|
369
|
+
viewInfo.name ?? queryAst.from.map((ast) => ast.table).join('_');
|
|
370
|
+
// append the next smallest number to the Virtual Table so the new view can be created
|
|
325
371
|
if (currentTableNames.includes(queryName)) {
|
|
326
372
|
let nextSmallestNumber = 1;
|
|
327
373
|
while (currentTableNames.includes(`${queryName}${nextSmallestNumber}`)) {
|
|
@@ -329,93 +375,21 @@ export async function createSQLView(connectionType, allSchemaInfo, columnsByTabl
|
|
|
329
375
|
}
|
|
330
376
|
queryName = queryName + nextSmallestNumber;
|
|
331
377
|
}
|
|
332
|
-
const
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
: 'text';
|
|
338
|
-
localURL = `${QUILL_SERVER}/sdk/create-environment`;
|
|
339
|
-
const wrapQuotes = connectionType.type.toLocaleLowerCase() === 'postgresql' ||
|
|
340
|
-
connectionType.type.toLocaleLowerCase() === 'snowflake';
|
|
341
|
-
const payload = {
|
|
342
|
-
customerFieldName: wrapInQuotes(allSchemaInfo.selectedFields.foreignKey, wrapQuotes),
|
|
343
|
-
customerTableName: `${wrapInQuotes(allSchemaInfo.selectedFields.schema, wrapQuotes)}.${wrapInQuotes(allSchemaInfo.selectedFields.table, wrapQuotes)}`,
|
|
344
|
-
customerTableFieldName: wrapInQuotes(allSchemaInfo.selectedFields.organizationIdField, wrapQuotes),
|
|
345
|
-
adminCustomerId: allSchemaInfo.selectedFields.defaultOrg?.id,
|
|
346
|
-
customerTableTitleFieldName: wrapInQuotes(allSchemaInfo.selectedFields.customerNameField, wrapQuotes),
|
|
347
|
-
customerView: allSchemaInfo.selectedFields.customerView,
|
|
348
|
-
columns: tableData?.fields,
|
|
349
|
-
task: 'create-environment',
|
|
350
|
-
viewQuery: viewInfo.query,
|
|
351
|
-
customerFieldType: fuzzyType,
|
|
352
|
-
name: queryName,
|
|
353
|
-
client,
|
|
354
|
-
domainName,
|
|
355
|
-
schemaName: allSchemaInfo.selectedFields.schema,
|
|
356
|
-
schemaNames: [wrapInQuotes(allSchemaInfo.selectedFields.schema)],
|
|
357
|
-
clientId,
|
|
358
|
-
};
|
|
359
|
-
const response = await fetch(localURL, {
|
|
360
|
-
method: 'POST',
|
|
361
|
-
headers: {
|
|
362
|
-
'Content-Type': 'application/json',
|
|
378
|
+
const results = await quillFetch({
|
|
379
|
+
client: {
|
|
380
|
+
queryEndpoint,
|
|
381
|
+
clientId,
|
|
382
|
+
withCredentials: false,
|
|
363
383
|
},
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
const astResponse = await fetch(localURL, {
|
|
372
|
-
method: 'POST',
|
|
373
|
-
headers: {
|
|
374
|
-
'Content-Type': 'application/json',
|
|
384
|
+
task: 'create-virtual-table',
|
|
385
|
+
metadata: {
|
|
386
|
+
columns: tableData?.fields,
|
|
387
|
+
queryString: viewInfo.query,
|
|
388
|
+
name: queryName,
|
|
389
|
+
clientId,
|
|
390
|
+
ownerTenantFields,
|
|
375
391
|
},
|
|
376
|
-
|
|
392
|
+
getToken,
|
|
377
393
|
});
|
|
378
|
-
|
|
379
|
-
if (ast.success === false) {
|
|
380
|
-
return {
|
|
381
|
-
success: false,
|
|
382
|
-
error: ast.message,
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
let fkInfo = [];
|
|
386
|
-
// make sure ast.ast.columns only has to values
|
|
387
|
-
let hasId = false;
|
|
388
|
-
let hasName = false;
|
|
389
|
-
if (ast.ast.columns && ast.ast.columns.length === 2) {
|
|
390
|
-
ast.ast.columns.forEach((column) => {
|
|
391
|
-
const columnName = column.as || column.expr.column;
|
|
392
|
-
if (columnName === 'id') {
|
|
393
|
-
hasId = true;
|
|
394
|
-
}
|
|
395
|
-
else if (columnName === 'name') {
|
|
396
|
-
hasName = true;
|
|
397
|
-
}
|
|
398
|
-
if (columnName === 'id' && column.as) {
|
|
399
|
-
fkInfo = [column.expr.column];
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
if (!hasId || !hasName) {
|
|
404
|
-
return {
|
|
405
|
-
success: false,
|
|
406
|
-
message: 'Query must have an "id" and "name" column.',
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
let table = '';
|
|
410
|
-
try {
|
|
411
|
-
table = ast.ast.from[0].table;
|
|
412
|
-
}
|
|
413
|
-
catch {
|
|
414
|
-
return {
|
|
415
|
-
success: false,
|
|
416
|
-
message: 'Query must have a table',
|
|
417
|
-
};
|
|
418
|
-
}
|
|
419
|
-
fkInfo = await getFKInfo(clientId, schema, table, 'id');
|
|
420
|
-
return { success: true, table, fkInfo };
|
|
394
|
+
return { ...results.data, success: true };
|
|
421
395
|
}
|