@quillsql/admin 1.3.4 → 1.3.7
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/{Admin.d.ts → cjs/Admin.d.ts} +1 -0
- package/dist/cjs/Admin.d.ts.map +1 -0
- package/dist/{Admin.js → cjs/Admin.js} +30 -34
- package/dist/{AdminProvider.d.ts → cjs/AdminProvider.d.ts} +1 -0
- package/dist/cjs/AdminProvider.d.ts.map +1 -0
- package/dist/{AdminProvider.js → cjs/AdminProvider.js} +0 -1
- package/dist/{api → cjs/api}/ConnectionClient.d.ts +1 -0
- package/dist/cjs/api/ConnectionClient.d.ts.map +1 -0
- package/dist/{api → cjs/api}/ConnectionClient.js +0 -1
- package/dist/{components → cjs/components}/Banner/index.d.ts +1 -0
- package/dist/cjs/components/Banner/index.d.ts.map +1 -0
- package/dist/{components → cjs/components}/Banner/index.js +0 -1
- package/dist/{components → cjs/components}/CardSection.d.ts +1 -0
- package/dist/cjs/components/CardSection.d.ts.map +1 -0
- package/dist/{components → cjs/components}/CardSection.js +0 -1
- package/dist/{components → cjs/components}/CardTitle.d.ts +1 -0
- package/dist/cjs/components/CardTitle.d.ts.map +1 -0
- package/dist/{components → cjs/components}/CardTitle.js +0 -1
- package/dist/{components → cjs/components}/DashboardSelectPopover.d.ts +1 -0
- package/dist/cjs/components/DashboardSelectPopover.d.ts.map +1 -0
- package/dist/{components → cjs/components}/DashboardSelectPopover.js +0 -1
- package/dist/{components → cjs/components}/DatabaseSelector.d.ts +1 -0
- package/dist/cjs/components/DatabaseSelector.d.ts.map +1 -0
- package/dist/{components → cjs/components}/DatabaseSelector.js +0 -1
- package/dist/{components → cjs/components}/DeleteButton.d.ts +1 -0
- package/dist/cjs/components/DeleteButton.d.ts.map +1 -0
- package/dist/{components → cjs/components}/DeleteButton.js +0 -1
- package/dist/{components → cjs/components}/DropDownMenu.d.ts +1 -0
- package/dist/cjs/components/DropDownMenu.d.ts.map +1 -0
- package/dist/{components → cjs/components}/DropDownMenu.js +0 -1
- package/dist/{components → cjs/components}/DropDownMenuWithLabel.d.ts +1 -0
- package/dist/cjs/components/DropDownMenuWithLabel.d.ts.map +1 -0
- package/dist/{components → cjs/components}/DropDownMenuWithLabel.js +0 -1
- package/dist/cjs/components/EmptyDashboardComponent/index.d.ts +3 -0
- package/dist/cjs/components/EmptyDashboardComponent/index.d.ts.map +1 -0
- package/dist/cjs/components/EmptyDashboardComponent/index.js +45 -0
- package/dist/{components → cjs/components}/EnvSelectPopover.d.ts +1 -0
- package/dist/cjs/components/EnvSelectPopover.d.ts.map +1 -0
- package/dist/{components → cjs/components}/EnvSelectPopover.js +19 -3
- package/dist/{components → cjs/components}/InputLabel.d.ts +1 -0
- package/dist/cjs/components/InputLabel.d.ts.map +1 -0
- package/dist/{components → cjs/components}/InputLabel.js +0 -1
- package/dist/{components → cjs/components}/OrgSelect.d.ts +1 -0
- package/dist/cjs/components/OrgSelect.d.ts.map +1 -0
- package/dist/{components → cjs/components}/OrgSelect.js +0 -1
- package/dist/{components → cjs/components}/SqlViewTile.d.ts +1 -0
- package/dist/cjs/components/SqlViewTile.d.ts.map +1 -0
- package/dist/{components → cjs/components}/SqlViewTile.js +0 -1
- package/dist/{components → cjs/components}/StepDisplay.d.ts +1 -0
- package/dist/cjs/components/StepDisplay.d.ts.map +1 -0
- package/dist/{components → cjs/components}/StepDisplay.js +0 -1
- package/dist/cjs/components/index.d.ts +6 -0
- package/dist/cjs/components/index.d.ts.map +1 -0
- package/dist/{components → cjs/components}/index.js +0 -1
- package/dist/{forms → cjs/forms}/client_onboard/ConnectDatabase.d.ts +1 -0
- package/dist/cjs/forms/client_onboard/ConnectDatabase.d.ts.map +1 -0
- package/dist/{forms → cjs/forms}/client_onboard/ConnectDatabase.js +0 -1
- package/dist/{forms → cjs/forms}/client_onboard/ConnectSchema.d.ts +1 -0
- package/dist/cjs/forms/client_onboard/ConnectSchema.d.ts.map +1 -0
- package/dist/{forms → cjs/forms}/client_onboard/ConnectSchema.js +0 -1
- package/dist/{forms → cjs/forms}/client_onboard/CreateSqlViews.d.ts +1 -0
- package/dist/cjs/forms/client_onboard/CreateSqlViews.d.ts.map +1 -0
- package/dist/{forms → cjs/forms}/client_onboard/CreateSqlViews.js +0 -1
- package/dist/{hooks → cjs/hooks}/useItemBeingEdited.d.ts +1 -0
- package/dist/cjs/hooks/useItemBeingEdited.d.ts.map +1 -0
- package/dist/{hooks → cjs/hooks}/useItemBeingEdited.js +0 -1
- package/dist/{icons → cjs/icons}/ArrowDownHeadIcon.d.ts +1 -0
- package/dist/cjs/icons/ArrowDownHeadIcon.d.ts.map +1 -0
- package/dist/{icons → cjs/icons}/ArrowDownHeadIcon.js +0 -1
- package/dist/{icons → cjs/icons}/XMarkIcon.d.ts +1 -0
- package/dist/cjs/icons/XMarkIcon.d.ts.map +1 -0
- package/dist/{icons → cjs/icons}/XMarkIcon.js +0 -1
- package/dist/cjs/icons/index.d.ts +2 -0
- package/dist/cjs/icons/index.d.ts.map +1 -0
- package/dist/{icons → cjs/icons}/index.js +0 -1
- package/dist/cjs/index.d.ts +7 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/{index.js → cjs/index.js} +0 -1
- package/dist/{modals → cjs/modals}/EditDashboardsModal.d.ts +1 -0
- package/dist/cjs/modals/EditDashboardsModal.d.ts.map +1 -0
- package/dist/{modals → cjs/modals}/EditDashboardsModal.js +0 -1
- package/dist/{modals → cjs/modals}/NewDashboardModal.d.ts +1 -0
- package/dist/cjs/modals/NewDashboardModal.d.ts.map +1 -0
- package/dist/{modals → cjs/modals}/NewDashboardModal.js +0 -1
- package/dist/{modals → cjs/modals}/PromoteDashModal.d.ts +1 -0
- package/dist/cjs/modals/PromoteDashModal.d.ts.map +1 -0
- package/dist/{modals → cjs/modals}/PromoteDashModal.js +0 -1
- package/dist/{modals → cjs/modals}/PromoteViewModal.d.ts +1 -0
- package/dist/cjs/modals/PromoteViewModal.d.ts.map +1 -0
- package/dist/{modals → cjs/modals}/PromoteViewModal.js +0 -1
- package/dist/{modals → cjs/modals}/ReorderDashboardModal.d.ts +1 -0
- package/dist/cjs/modals/ReorderDashboardModal.d.ts.map +1 -0
- package/dist/{modals → cjs/modals}/ReorderDashboardModal.js +0 -1
- package/dist/cjs/modals/index.d.ts +5 -0
- package/dist/cjs/modals/index.d.ts.map +1 -0
- package/dist/{modals → cjs/modals}/index.js +0 -1
- package/dist/{primitives → cjs/primitives}/ButtonPrimitive.d.ts +1 -0
- package/dist/cjs/primitives/ButtonPrimitive.d.ts.map +1 -0
- package/dist/{primitives → cjs/primitives}/ButtonPrimitive.js +0 -1
- package/dist/{primitives → cjs/primitives}/HeaderPrimitive.d.ts +1 -0
- package/dist/cjs/primitives/HeaderPrimitive.d.ts.map +1 -0
- package/dist/{primitives → cjs/primitives}/HeaderPrimitive.js +0 -1
- package/dist/{primitives → cjs/primitives}/ModalPrimitive.d.ts +1 -0
- package/dist/cjs/primitives/ModalPrimitive.d.ts.map +1 -0
- package/dist/{primitives → cjs/primitives}/ModalPrimitive.js +0 -1
- package/dist/{primitives → cjs/primitives}/SecondaryButtonPrimitive.d.ts +1 -0
- package/dist/cjs/primitives/SecondaryButtonPrimitive.d.ts.map +1 -0
- package/dist/{primitives → cjs/primitives}/SecondaryButtonPrimitive.js +0 -1
- package/dist/{primitives → cjs/primitives}/SelectPrimitive.d.ts +1 -0
- package/dist/cjs/primitives/SelectPrimitive.d.ts.map +1 -0
- package/dist/{primitives → cjs/primitives}/SelectPrimitive.js +0 -1
- package/dist/{primitives → cjs/primitives}/TextInputPrimitive.d.ts +1 -0
- package/dist/cjs/primitives/TextInputPrimitive.d.ts.map +1 -0
- package/dist/{primitives → cjs/primitives}/TextInputPrimitive.js +0 -1
- package/dist/{primitives → cjs/primitives}/TogglePrimitive.d.ts +1 -0
- package/dist/cjs/primitives/TogglePrimitive.d.ts.map +1 -0
- package/dist/{primitives → cjs/primitives}/TogglePrimitive.js +0 -1
- package/dist/cjs/primitives/index.d.ts +7 -0
- package/dist/cjs/primitives/index.d.ts.map +1 -0
- package/dist/{primitives → cjs/primitives}/index.js +0 -1
- package/dist/{public_components → cjs/public_components}/CreateEnvironment.d.ts +1 -0
- package/dist/cjs/public_components/CreateEnvironment.d.ts.map +1 -0
- package/dist/{public_components → cjs/public_components}/CreateEnvironment.js +0 -1
- package/dist/{public_components → cjs/public_components}/DashboardBuilder.d.ts +1 -0
- package/dist/cjs/public_components/DashboardBuilder.d.ts.map +1 -0
- package/dist/{public_components → cjs/public_components}/DashboardBuilder.js +0 -1
- package/dist/{public_components → cjs/public_components}/DashboardManager.d.ts +1 -0
- package/dist/cjs/public_components/DashboardManager.d.ts.map +1 -0
- package/dist/{public_components → cjs/public_components}/DashboardManager.js +11 -5
- package/dist/{public_components → cjs/public_components}/SQLViewManager.d.ts +1 -0
- package/dist/cjs/public_components/SQLViewManager.d.ts.map +1 -0
- package/dist/{public_components → cjs/public_components}/SQLViewManager.js +0 -1
- package/dist/{utils → cjs/utils}/constants.d.ts +2 -1
- package/dist/cjs/utils/constants.d.ts.map +1 -0
- package/dist/{utils → cjs/utils}/constants.js +1 -3
- package/dist/{utils → cjs/utils}/databases.d.ts +1 -0
- package/dist/cjs/utils/databases.d.ts.map +1 -0
- package/dist/{utils → cjs/utils}/databases.js +0 -1
- package/dist/{utils → cjs/utils}/delay.d.ts +1 -0
- package/dist/cjs/utils/delay.d.ts.map +1 -0
- package/dist/{utils → cjs/utils}/delay.js +0 -1
- package/dist/{utils → cjs/utils}/schema.d.ts +1 -0
- package/dist/cjs/utils/schema.d.ts.map +1 -0
- package/dist/{utils → cjs/utils}/schema.js +0 -1
- package/dist/{utils → cjs/utils}/table.d.ts +1 -0
- package/dist/cjs/utils/table.d.ts.map +1 -0
- package/dist/{utils → cjs/utils}/table.js +0 -1
- package/dist/esm/Admin.d.ts +167 -0
- package/dist/esm/Admin.d.ts.map +1 -0
- package/dist/esm/Admin.js +1387 -0
- package/dist/esm/AdminProvider.d.ts +126 -0
- package/dist/esm/AdminProvider.d.ts.map +1 -0
- package/dist/esm/AdminProvider.js +315 -0
- package/dist/esm/api/ConnectionClient.d.ts +24 -0
- package/dist/esm/api/ConnectionClient.d.ts.map +1 -0
- package/dist/esm/api/ConnectionClient.js +244 -0
- package/dist/esm/components/Banner/index.d.ts +3 -0
- package/dist/esm/components/Banner/index.d.ts.map +1 -0
- package/dist/esm/components/Banner/index.js +27 -0
- package/dist/esm/components/CardSection.d.ts +3 -0
- package/dist/esm/components/CardSection.d.ts.map +1 -0
- package/dist/esm/components/CardSection.js +9 -0
- package/dist/esm/components/CardTitle.d.ts +3 -0
- package/dist/esm/components/CardTitle.d.ts.map +1 -0
- package/dist/esm/components/CardTitle.js +11 -0
- package/dist/esm/components/DashboardSelectPopover.d.ts +11 -0
- package/dist/esm/components/DashboardSelectPopover.d.ts.map +1 -0
- package/dist/esm/components/DashboardSelectPopover.js +175 -0
- package/dist/esm/components/DatabaseSelector.d.ts +11 -0
- package/dist/esm/components/DatabaseSelector.d.ts.map +1 -0
- package/dist/esm/components/DatabaseSelector.js +22 -0
- package/dist/esm/components/DeleteButton.d.ts +3 -0
- package/dist/esm/components/DeleteButton.d.ts.map +1 -0
- package/dist/esm/components/DeleteButton.js +10 -0
- package/dist/esm/components/DropDownMenu.d.ts +10 -0
- package/dist/esm/components/DropDownMenu.d.ts.map +1 -0
- package/dist/esm/components/DropDownMenu.js +39 -0
- package/dist/esm/components/DropDownMenuWithLabel.d.ts +12 -0
- package/dist/esm/components/DropDownMenuWithLabel.d.ts.map +1 -0
- package/dist/esm/components/DropDownMenuWithLabel.js +47 -0
- package/dist/esm/components/EmptyDashboardComponent/index.d.ts +3 -0
- package/dist/esm/components/EmptyDashboardComponent/index.d.ts.map +1 -0
- package/dist/esm/components/EmptyDashboardComponent/index.js +42 -0
- package/dist/esm/components/EnvSelectPopover.d.ts +13 -0
- package/dist/esm/components/EnvSelectPopover.d.ts.map +1 -0
- package/dist/esm/components/EnvSelectPopover.js +222 -0
- package/dist/esm/components/InputLabel.d.ts +3 -0
- package/dist/esm/components/InputLabel.d.ts.map +1 -0
- package/dist/esm/components/InputLabel.js +10 -0
- package/dist/esm/components/OrgSelect.d.ts +12 -0
- package/dist/esm/components/OrgSelect.d.ts.map +1 -0
- package/dist/esm/components/OrgSelect.js +193 -0
- package/dist/esm/components/SqlViewTile.d.ts +8 -0
- package/dist/esm/components/SqlViewTile.d.ts.map +1 -0
- package/dist/esm/components/SqlViewTile.js +40 -0
- package/dist/esm/components/StepDisplay.d.ts +10 -0
- package/dist/esm/components/StepDisplay.d.ts.map +1 -0
- package/dist/esm/components/StepDisplay.js +15 -0
- package/dist/esm/components/index.d.ts +6 -0
- package/dist/esm/components/index.d.ts.map +1 -0
- package/dist/esm/forms/client_onboard/ConnectDatabase.d.ts +11 -0
- package/dist/esm/forms/client_onboard/ConnectDatabase.d.ts.map +1 -0
- package/dist/esm/forms/client_onboard/ConnectDatabase.js +137 -0
- package/dist/esm/forms/client_onboard/ConnectSchema.d.ts +13 -0
- package/dist/esm/forms/client_onboard/ConnectSchema.d.ts.map +1 -0
- package/dist/esm/forms/client_onboard/ConnectSchema.js +171 -0
- package/dist/esm/forms/client_onboard/CreateSqlViews.d.ts +15 -0
- package/dist/esm/forms/client_onboard/CreateSqlViews.d.ts.map +1 -0
- package/dist/esm/forms/client_onboard/CreateSqlViews.js +202 -0
- package/dist/esm/hooks/useItemBeingEdited.d.ts +4 -0
- package/dist/esm/hooks/useItemBeingEdited.d.ts.map +1 -0
- package/dist/esm/hooks/useItemBeingEdited.js +25 -0
- package/dist/esm/icons/ArrowDownHeadIcon.d.ts +5 -0
- package/dist/esm/icons/ArrowDownHeadIcon.d.ts.map +1 -0
- package/dist/esm/icons/ArrowDownHeadIcon.js +3 -0
- package/dist/esm/icons/XMarkIcon.d.ts +3 -0
- package/dist/esm/icons/XMarkIcon.d.ts.map +1 -0
- package/dist/esm/icons/XMarkIcon.js +11 -0
- package/dist/esm/icons/index.d.ts +2 -0
- package/dist/esm/icons/index.d.ts.map +1 -0
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/modals/EditDashboardsModal.d.ts +20 -0
- package/dist/esm/modals/EditDashboardsModal.d.ts.map +1 -0
- package/dist/esm/modals/EditDashboardsModal.js +91 -0
- package/dist/esm/modals/NewDashboardModal.d.ts +19 -0
- package/dist/esm/modals/NewDashboardModal.d.ts.map +1 -0
- package/dist/esm/modals/NewDashboardModal.js +276 -0
- package/dist/esm/modals/PromoteDashModal.d.ts +17 -0
- package/dist/esm/modals/PromoteDashModal.d.ts.map +1 -0
- package/dist/esm/modals/PromoteDashModal.js +123 -0
- package/dist/esm/modals/PromoteViewModal.d.ts +13 -0
- package/dist/esm/modals/PromoteViewModal.d.ts.map +1 -0
- package/dist/esm/modals/PromoteViewModal.js +105 -0
- package/dist/esm/modals/ReorderDashboardModal.d.ts +11 -0
- package/dist/esm/modals/ReorderDashboardModal.d.ts.map +1 -0
- package/dist/esm/modals/ReorderDashboardModal.js +124 -0
- package/dist/esm/modals/index.d.ts +5 -0
- package/dist/esm/modals/index.d.ts.map +1 -0
- package/dist/esm/primitives/ButtonPrimitive.d.ts +12 -0
- package/dist/esm/primitives/ButtonPrimitive.d.ts.map +1 -0
- package/dist/esm/primitives/ButtonPrimitive.js +47 -0
- package/dist/esm/primitives/HeaderPrimitive.d.ts +9 -0
- package/dist/esm/primitives/HeaderPrimitive.d.ts.map +1 -0
- package/dist/esm/primitives/HeaderPrimitive.js +9 -0
- package/dist/esm/primitives/ModalPrimitive.d.ts +12 -0
- package/dist/esm/primitives/ModalPrimitive.d.ts.map +1 -0
- package/dist/esm/primitives/ModalPrimitive.js +47 -0
- package/dist/esm/primitives/SecondaryButtonPrimitive.d.ts +10 -0
- package/dist/esm/primitives/SecondaryButtonPrimitive.d.ts.map +1 -0
- package/dist/esm/primitives/SecondaryButtonPrimitive.js +22 -0
- package/dist/esm/primitives/SelectPrimitive.d.ts +16 -0
- package/dist/esm/primitives/SelectPrimitive.d.ts.map +1 -0
- package/dist/esm/primitives/SelectPrimitive.js +41 -0
- package/dist/esm/primitives/TextInputPrimitive.d.ts +12 -0
- package/dist/esm/primitives/TextInputPrimitive.d.ts.map +1 -0
- package/dist/esm/primitives/TextInputPrimitive.js +24 -0
- package/dist/esm/primitives/TogglePrimitive.d.ts +6 -0
- package/dist/esm/primitives/TogglePrimitive.d.ts.map +1 -0
- package/dist/esm/primitives/TogglePrimitive.js +45 -0
- package/dist/esm/primitives/index.d.ts +7 -0
- package/dist/esm/primitives/index.d.ts.map +1 -0
- package/dist/esm/public_components/CreateEnvironment.d.ts +6 -0
- package/dist/esm/public_components/CreateEnvironment.d.ts.map +1 -0
- package/dist/esm/public_components/CreateEnvironment.js +135 -0
- package/dist/esm/public_components/DashboardBuilder.d.ts +7 -0
- package/dist/esm/public_components/DashboardBuilder.d.ts.map +1 -0
- package/dist/esm/public_components/DashboardBuilder.js +192 -0
- package/dist/esm/public_components/DashboardManager.d.ts +6 -0
- package/dist/esm/public_components/DashboardManager.d.ts.map +1 -0
- package/dist/esm/public_components/DashboardManager.js +312 -0
- package/dist/esm/public_components/SQLViewManager.d.ts +5 -0
- package/dist/esm/public_components/SQLViewManager.d.ts.map +1 -0
- package/dist/esm/public_components/SQLViewManager.js +394 -0
- package/dist/esm/utils/constants.d.ts +26 -0
- package/dist/esm/utils/constants.d.ts.map +1 -0
- package/dist/esm/utils/constants.js +12 -0
- package/dist/esm/utils/databases.d.ts +34 -0
- package/dist/esm/utils/databases.d.ts.map +1 -0
- package/dist/esm/utils/databases.js +51 -0
- package/dist/esm/utils/delay.d.ts +2 -0
- package/dist/esm/utils/delay.d.ts.map +1 -0
- package/dist/esm/utils/delay.js +3 -0
- package/dist/esm/utils/schema.d.ts +22 -0
- package/dist/esm/utils/schema.d.ts.map +1 -0
- package/dist/esm/utils/schema.js +1 -0
- package/dist/esm/utils/table.d.ts +16 -0
- package/dist/esm/utils/table.d.ts.map +1 -0
- package/dist/esm/utils/table.js +1 -0
- package/package.json +11 -7
- package/dist/Admin.d.ts.map +0 -1
- package/dist/Admin.js.map +0 -1
- package/dist/AdminProvider.d.ts.map +0 -1
- package/dist/AdminProvider.js.map +0 -1
- package/dist/api/ConnectionClient.d.ts.map +0 -1
- package/dist/api/ConnectionClient.js.map +0 -1
- package/dist/components/Banner/index.d.ts.map +0 -1
- package/dist/components/Banner/index.js.map +0 -1
- package/dist/components/CardSection.d.ts.map +0 -1
- package/dist/components/CardSection.js.map +0 -1
- package/dist/components/CardTitle.d.ts.map +0 -1
- package/dist/components/CardTitle.js.map +0 -1
- package/dist/components/DashboardSelectPopover.d.ts.map +0 -1
- package/dist/components/DashboardSelectPopover.js.map +0 -1
- package/dist/components/DatabaseSelector.d.ts.map +0 -1
- package/dist/components/DatabaseSelector.js.map +0 -1
- package/dist/components/DeleteButton.d.ts.map +0 -1
- package/dist/components/DeleteButton.js.map +0 -1
- package/dist/components/DropDownMenu.d.ts.map +0 -1
- package/dist/components/DropDownMenu.js.map +0 -1
- package/dist/components/DropDownMenuWithLabel.d.ts.map +0 -1
- package/dist/components/DropDownMenuWithLabel.js.map +0 -1
- package/dist/components/EnvSelectPopover.d.ts.map +0 -1
- package/dist/components/EnvSelectPopover.js.map +0 -1
- package/dist/components/InputLabel.d.ts.map +0 -1
- package/dist/components/InputLabel.js.map +0 -1
- package/dist/components/OrgSelect.d.ts.map +0 -1
- package/dist/components/OrgSelect.js.map +0 -1
- package/dist/components/SqlViewTile.d.ts.map +0 -1
- package/dist/components/SqlViewTile.js.map +0 -1
- package/dist/components/StepDisplay.d.ts.map +0 -1
- package/dist/components/StepDisplay.js.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/forms/client_onboard/ConnectDatabase.d.ts.map +0 -1
- package/dist/forms/client_onboard/ConnectDatabase.js.map +0 -1
- package/dist/forms/client_onboard/ConnectSchema.d.ts.map +0 -1
- package/dist/forms/client_onboard/ConnectSchema.js.map +0 -1
- package/dist/forms/client_onboard/CreateSqlViews.d.ts.map +0 -1
- package/dist/forms/client_onboard/CreateSqlViews.js.map +0 -1
- package/dist/hooks/useItemBeingEdited.d.ts.map +0 -1
- package/dist/hooks/useItemBeingEdited.js.map +0 -1
- package/dist/icons/ArrowDownHeadIcon.d.ts.map +0 -1
- package/dist/icons/ArrowDownHeadIcon.js.map +0 -1
- package/dist/icons/XMarkIcon.d.ts.map +0 -1
- package/dist/icons/XMarkIcon.js.map +0 -1
- package/dist/icons/index.d.ts.map +0 -1
- package/dist/icons/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/modals/EditDashboardsModal.d.ts.map +0 -1
- package/dist/modals/EditDashboardsModal.js.map +0 -1
- package/dist/modals/NewDashboardModal.d.ts.map +0 -1
- package/dist/modals/NewDashboardModal.js.map +0 -1
- package/dist/modals/PromoteDashModal.d.ts.map +0 -1
- package/dist/modals/PromoteDashModal.js.map +0 -1
- package/dist/modals/PromoteViewModal.d.ts.map +0 -1
- package/dist/modals/PromoteViewModal.js.map +0 -1
- package/dist/modals/ReorderDashboardModal.d.ts.map +0 -1
- package/dist/modals/ReorderDashboardModal.js.map +0 -1
- package/dist/modals/index.d.ts.map +0 -1
- package/dist/modals/index.js.map +0 -1
- package/dist/primitives/ButtonPrimitive.d.ts.map +0 -1
- package/dist/primitives/ButtonPrimitive.js.map +0 -1
- package/dist/primitives/HeaderPrimitive.d.ts.map +0 -1
- package/dist/primitives/HeaderPrimitive.js.map +0 -1
- package/dist/primitives/ModalPrimitive.d.ts.map +0 -1
- package/dist/primitives/ModalPrimitive.js.map +0 -1
- package/dist/primitives/SecondaryButtonPrimitive.d.ts.map +0 -1
- package/dist/primitives/SecondaryButtonPrimitive.js.map +0 -1
- package/dist/primitives/SelectPrimitive.d.ts.map +0 -1
- package/dist/primitives/SelectPrimitive.js.map +0 -1
- package/dist/primitives/TextInputPrimitive.d.ts.map +0 -1
- package/dist/primitives/TextInputPrimitive.js.map +0 -1
- package/dist/primitives/TogglePrimitive.d.ts.map +0 -1
- package/dist/primitives/TogglePrimitive.js.map +0 -1
- package/dist/primitives/index.d.ts.map +0 -1
- package/dist/primitives/index.js.map +0 -1
- package/dist/public_components/CreateEnvironment.d.ts.map +0 -1
- package/dist/public_components/CreateEnvironment.js.map +0 -1
- package/dist/public_components/DashboardBuilder.d.ts.map +0 -1
- package/dist/public_components/DashboardBuilder.js.map +0 -1
- package/dist/public_components/DashboardManager.d.ts.map +0 -1
- package/dist/public_components/DashboardManager.js.map +0 -1
- package/dist/public_components/SQLViewManager.d.ts.map +0 -1
- package/dist/public_components/SQLViewManager.js.map +0 -1
- package/dist/utils/constants.d.ts.map +0 -1
- package/dist/utils/constants.js.map +0 -1
- package/dist/utils/databases.d.ts.map +0 -1
- package/dist/utils/databases.js.map +0 -1
- package/dist/utils/delay.d.ts.map +0 -1
- package/dist/utils/delay.js.map +0 -1
- package/dist/utils/schema.d.ts.map +0 -1
- package/dist/utils/schema.js.map +0 -1
- package/dist/utils/table.d.ts.map +0 -1
- package/dist/utils/table.js.map +0 -1
- /package/dist/{components/index.d.ts → esm/components/index.js} +0 -0
- /package/dist/{icons/index.d.ts → esm/icons/index.js} +0 -0
- /package/dist/{index.d.ts → esm/index.js} +0 -0
- /package/dist/{modals/index.d.ts → esm/modals/index.js} +0 -0
- /package/dist/{primitives/index.d.ts → esm/primitives/index.js} +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export default function StepDisplay({ label, completed, header1Style, onClick, }) {
|
|
3
|
+
return (_jsxs("div", { style: {
|
|
4
|
+
height: 64,
|
|
5
|
+
width: '40%',
|
|
6
|
+
minWidth: 600,
|
|
7
|
+
display: 'flex',
|
|
8
|
+
flexDirection: 'row',
|
|
9
|
+
justifyContent: 'space-between',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
borderRadius: 6,
|
|
12
|
+
backgroundColor: '#F6F6F6',
|
|
13
|
+
padding: '24px 24px',
|
|
14
|
+
}, id: "connect-database-form", onClick: onClick, children: [_jsx("h1", { style: { ...header1Style, marginBottom: '0px', fontSize: 16 }, children: label }), completed ? (_jsx("div", { children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", width: "24px", height: "24px", children: _jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z", clipRule: "evenodd" }) }) })) : (_jsx("div", {}))] }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as EnvSelectPopover } from "./EnvSelectPopover";
|
|
2
|
+
export { default as OrgSelect } from "./OrgSelect";
|
|
3
|
+
export { default as DropDownMenu } from "./DropDownMenu";
|
|
4
|
+
export { default as DashboardManager } from "../public_components/DashboardManager";
|
|
5
|
+
export { default as DashboardSelectPopover } from "./DashboardSelectPopover";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { ConnectionError, ConnectionType } from '../../utils/databases';
|
|
3
|
+
import { SchemaDetails } from '../../utils/schema';
|
|
4
|
+
export default function ConnectDatabase({ containerStyle, header1Style, header2Style, setEnvironmentDetails, environmentDetails, }: {
|
|
5
|
+
containerStyle?: CSSProperties;
|
|
6
|
+
header1Style?: CSSProperties;
|
|
7
|
+
header2Style?: CSSProperties;
|
|
8
|
+
environmentDetails?: ConnectionType;
|
|
9
|
+
setEnvironmentDetails: (connectionInfo?: ConnectionType, schemaDetails?: SchemaDetails, schemaError?: ConnectionError) => void;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=ConnectDatabase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectDatabase.d.ts","sourceRoot":"","sources":["../../../../src/forms/client_onboard/ConnectDatabase.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAY,MAAM,OAAO,CAAC;AAGvD,OAAO,EACL,eAAe,EACf,cAAc,EAIf,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,GACnB,EAAE;IACD,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,kBAAkB,CAAC,EAAE,cAAc,CAAC;IACpC,qBAAqB,EAAE,CACrB,cAAc,CAAC,EAAE,cAAc,EAC/B,aAAa,CAAC,EAAE,aAAa,EAC7B,WAAW,CAAC,EAAE,eAAe,KAC1B,IAAI,CAAC;CACX,2CAwRA"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { ButtonPrimitive, TextInputPrimitive } from '../../primitives';
|
|
4
|
+
import DatabaseSelector from '../../components/DatabaseSelector';
|
|
5
|
+
import { DATABASE_DEFAULT_INFO, formConnectionString, getDatabaseConnectionFormat, } from '../../utils/databases';
|
|
6
|
+
import { getSchemaTableInfo, testConnectionString, } from '../../api/ConnectionClient';
|
|
7
|
+
import { delay } from '../../utils/delay';
|
|
8
|
+
export default function ConnectDatabase({ containerStyle, header1Style, header2Style, setEnvironmentDetails, environmentDetails, }) {
|
|
9
|
+
const [showError, setShowError] = useState(false);
|
|
10
|
+
const [connectButtonMessage, setConnectButtonMessage] = useState('Connect');
|
|
11
|
+
const [copied, setCopied] = useState(false);
|
|
12
|
+
const [databaseConnectionDetails, setConnectionDetails] = useState(environmentDetails);
|
|
13
|
+
const onDatabaseSelect = (database) => {
|
|
14
|
+
setConnectionDetails(getDatabaseConnectionFormat(database));
|
|
15
|
+
};
|
|
16
|
+
const testConnection = async () => {
|
|
17
|
+
const connectionString = formConnectionString(databaseConnectionDetails);
|
|
18
|
+
const result = await testConnectionString(connectionString);
|
|
19
|
+
if (result) {
|
|
20
|
+
try {
|
|
21
|
+
const suspectedSchema = await getSchemaTableInfo(connectionString, 'public');
|
|
22
|
+
setConnectButtonMessage('Connecting');
|
|
23
|
+
// Stop the next code from running for a second
|
|
24
|
+
// This is to show the connecting message
|
|
25
|
+
await delay(1000);
|
|
26
|
+
if ('selectedFields' in suspectedSchema) {
|
|
27
|
+
setConnectButtonMessage('Connected ✅');
|
|
28
|
+
await delay(2000);
|
|
29
|
+
setEnvironmentDetails(databaseConnectionDetails, suspectedSchema, undefined);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
setConnectButtonMessage('Connected ✅');
|
|
33
|
+
await delay(2000);
|
|
34
|
+
setEnvironmentDetails(databaseConnectionDetails, undefined, suspectedSchema);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
setConnectButtonMessage('Connect');
|
|
39
|
+
setShowError(true);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
setConnectButtonMessage('Connect');
|
|
44
|
+
setShowError(true);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
return (_jsxs("div", { style: { ...containerStyle }, id: "connect-database-form", children: [_jsx("h1", { style: header1Style, children: "Connect Database" }), _jsxs("div", { style: { marginTop: 12 }, children: [_jsx("h2", { style: { ...header2Style, fontWeight: 600, color: '#565656' }, children: "Database type" }), _jsx("div", { style: { display: 'flex', gap: 10 }, children: DATABASE_DEFAULT_INFO.map((database) => {
|
|
48
|
+
return (_jsx(DatabaseSelector, { onDatabaseSelect: onDatabaseSelect, containerStyle: { marginBottom: '12px' }, label: database.label, value: database.value, imageUrl: database.imageUrl }, database.label));
|
|
49
|
+
}) })] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center' }, children: [_jsxs("div", { style: {
|
|
50
|
+
// width: '100%',
|
|
51
|
+
maxWidth: 330,
|
|
52
|
+
display: 'flex',
|
|
53
|
+
flexDirection: 'row',
|
|
54
|
+
justifyContent: 'space-between',
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
padding: '6px 12px',
|
|
57
|
+
marginTop: '20px',
|
|
58
|
+
marginBottom: '18px',
|
|
59
|
+
borderRadius: 6,
|
|
60
|
+
cursor: 'pointer',
|
|
61
|
+
}, onClick: () => {
|
|
62
|
+
navigator.clipboard.writeText('34.133.137.225');
|
|
63
|
+
setCopied(true);
|
|
64
|
+
setTimeout(() => setCopied(false), 1500);
|
|
65
|
+
}, className: "quill-active", children: [_jsx("style", { children: `.quill-active { background: #fff; border: 1px solid #e7e7e7; }
|
|
66
|
+
.quill-active:hover { background: #fff; box-shadow: 0px 1px 12px rgba(0, 0, 0, 0.07); border: 1px solid #e7e7e7 }
|
|
67
|
+
.quill-active:active { background: #fff; box-shadow: 0px 1px 12px rgba(0, 0, 0, 0.07); border: 1px solid #9DC4F8; outline: 2px solid #9DC4F8; }
|
|
68
|
+
` }), _jsx("div", { style: { ...header2Style, color: '#212121', marginBottom: '0px' }, children: _jsx("h2", { style: {
|
|
69
|
+
WebkitUserSelect: 'none',
|
|
70
|
+
MozUserSelect: 'none',
|
|
71
|
+
msUserSelect: 'none',
|
|
72
|
+
userSelect: 'none',
|
|
73
|
+
}, children: "Whitelist Quill's IP" }) }), _jsxs("div", { style: {
|
|
74
|
+
display: 'flex',
|
|
75
|
+
flexDirection: 'row',
|
|
76
|
+
alignItems: 'center',
|
|
77
|
+
gap: '6px',
|
|
78
|
+
cursor: 'pointer',
|
|
79
|
+
marginLeft: '12px',
|
|
80
|
+
}, children: [_jsx("h2", { style: {
|
|
81
|
+
...header2Style,
|
|
82
|
+
color: '#212121',
|
|
83
|
+
marginBottom: '0px',
|
|
84
|
+
}, children: "34.133.137.225" }), _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "#212121", width: 18, height: 18, children: [_jsx("path", { d: "M7 3.5A1.5 1.5 0 0 1 8.5 2h3.879a1.5 1.5 0 0 1 1.06.44l3.122 3.12A1.5 1.5 0 0 1 17 6.622V12.5a1.5 1.5 0 0 1-1.5 1.5h-1v-3.379a3 3 0 0 0-.879-2.121L10.5 5.379A3 3 0 0 0 8.379 4.5H7v-1Z" }), _jsx("path", { d: "M4.5 6A1.5 1.5 0 0 0 3 7.5v9A1.5 1.5 0 0 0 4.5 18h7a1.5 1.5 0 0 0 1.5-1.5v-5.879a1.5 1.5 0 0 0-.44-1.06L9.44 6.439A1.5 1.5 0 0 0 8.378 6H4.5Z" })] })] })] }), copied && (_jsxs("div", { style: {
|
|
85
|
+
fontSize: 13,
|
|
86
|
+
fontWeight: 600,
|
|
87
|
+
color: '#565656',
|
|
88
|
+
marginLeft: 16,
|
|
89
|
+
display: 'flex',
|
|
90
|
+
flexDirection: 'row',
|
|
91
|
+
alignItems: 'center',
|
|
92
|
+
gap: 6,
|
|
93
|
+
}, children: [_jsx("div", { children: "\u2705" }), " ", _jsx("div", { children: "Copied to clipboard" })] }))] }), databaseConnectionDetails && (_jsxs("div", { children: [databaseConnectionDetails.type === 'PostgreSQL' && (_jsx("div", { children: _jsxs("div", { children: [_jsx("h2", { style: { ...header2Style, fontWeight: 600 }, children: "Connection String" }), _jsx(TextInputPrimitive, { onChange: (e) => {
|
|
94
|
+
setConnectionDetails({
|
|
95
|
+
...databaseConnectionDetails,
|
|
96
|
+
connectionString: e.target.value,
|
|
97
|
+
});
|
|
98
|
+
}, value: databaseConnectionDetails.connectionString })] }) })), _jsxs("div", { style: {
|
|
99
|
+
...header1Style,
|
|
100
|
+
textAlign: 'center',
|
|
101
|
+
fontSize: 14,
|
|
102
|
+
color: '#565656',
|
|
103
|
+
display: 'flex',
|
|
104
|
+
flexDirection: 'row',
|
|
105
|
+
alignItems: 'center',
|
|
106
|
+
paddingTop: 24,
|
|
107
|
+
paddingBottom: 0,
|
|
108
|
+
}, children: [_jsx("div", { style: { width: '100%', height: 1, background: '#e7e7e7' } }), _jsx("div", { style: { padding: 12 }, children: "or" }), _jsx("div", { style: { width: '100%', height: 1, background: '#e7e7e7' } })] }), _jsx("div", { id: "database-details-form", children: _jsx("div", { style: {
|
|
109
|
+
display: 'grid',
|
|
110
|
+
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
111
|
+
gap: '20px',
|
|
112
|
+
justifyContent: 'space-between',
|
|
113
|
+
marginTop: '16px',
|
|
114
|
+
}, children:
|
|
115
|
+
// get a list of types in the databaseConnectionDetails object and create a form for each
|
|
116
|
+
Object.entries(databaseConnectionDetails).map(([key, value]) => {
|
|
117
|
+
if (key !== 'connectionString' && key !== 'type')
|
|
118
|
+
return (_jsxs("div", { children: [_jsx("h2", { style: {
|
|
119
|
+
...header2Style,
|
|
120
|
+
fontWeight: '600',
|
|
121
|
+
}, children: key
|
|
122
|
+
.split(/(?=[A-Z])/)
|
|
123
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
124
|
+
.join(' ') }), _jsx(TextInputPrimitive, { onChange: (e) => {
|
|
125
|
+
setConnectionDetails({
|
|
126
|
+
...databaseConnectionDetails,
|
|
127
|
+
[key]: e.target.value,
|
|
128
|
+
});
|
|
129
|
+
}, value: value, disabled: key === 'type' })] }, key));
|
|
130
|
+
}) }) }), _jsxs("div", { style: {
|
|
131
|
+
width: '100%',
|
|
132
|
+
display: 'flex',
|
|
133
|
+
justifyContent: 'space-between',
|
|
134
|
+
alignItems: 'center',
|
|
135
|
+
marginTop: '24px',
|
|
136
|
+
}, children: [showError ? (_jsx("h2", { style: { ...header2Style, color: 'red' }, children: "Couldn't connect to database." })) : (_jsx("div", {})), _jsx(ButtonPrimitive, { label: connectButtonMessage, onClick: testConnection })] })] }))] }));
|
|
137
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { SchemaDetails } from '../../utils/schema';
|
|
3
|
+
import { ConnectionError, ConnectionType } from '../../utils/databases';
|
|
4
|
+
export default function ConnectSchema({ containerStyle, header1Style, header2Style, allSchemaInfo, environmentDetails, propogateSchemaDetails, initialError, }: {
|
|
5
|
+
containerStyle?: CSSProperties;
|
|
6
|
+
header1Style?: CSSProperties;
|
|
7
|
+
header2Style?: CSSProperties;
|
|
8
|
+
allSchemaInfo?: SchemaDetails;
|
|
9
|
+
environmentDetails?: ConnectionType;
|
|
10
|
+
initialError?: ConnectionError;
|
|
11
|
+
propogateSchemaDetails: (schemaDetails?: SchemaDetails) => void;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=ConnectSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectSchema.d.ts","sourceRoot":"","sources":["../../../../src/forms/client_onboard/ConnectSchema.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAuB,MAAM,OAAO,CAAC;AAIlE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AASnD,OAAO,EACL,eAAe,EACf,cAAc,EAEf,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,YAAY,GACb,EAAE;IACD,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,kBAAkB,CAAC,EAAE,cAAc,CAAC;IACpC,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,sBAAsB,EAAE,CAAC,aAAa,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CACjE,2CA6RA"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { ButtonPrimitive } from '../../primitives';
|
|
4
|
+
import DropdownMenuWithLabel from '../../components/DropDownMenuWithLabel';
|
|
5
|
+
import { getFKInfo, getOrgInfo, getSchemaTableInfo, getTableInfo, getTablesBySchema, } from '../../api/ConnectionClient';
|
|
6
|
+
import { formConnectionString, } from '../../utils/databases';
|
|
7
|
+
export default function ConnectSchema({ containerStyle, header1Style, header2Style, allSchemaInfo, environmentDetails, propogateSchemaDetails, initialError, }) {
|
|
8
|
+
const [schemaDetails, setSchemaDetails] = useState(allSchemaInfo);
|
|
9
|
+
const [schemaError, setSchemaError] = useState(initialError);
|
|
10
|
+
const [formError, setFormError] = useState({ show: false, message: '' });
|
|
11
|
+
return (_jsxs("div", { style: { ...containerStyle }, id: "connect-database-form", children: [_jsx("h1", { style: header1Style, children: "Select Organization Table" }), _jsx("h2", { style: header2Style, children: "Select which table you use for organizations (your customers). Quill uses this table to partition data by organization." }), _jsxs("div", { style: {
|
|
12
|
+
marginTop: 16,
|
|
13
|
+
width: '100%',
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexDirection: 'row',
|
|
16
|
+
gap: '16px',
|
|
17
|
+
alignItems: 'flex-end',
|
|
18
|
+
paddingBottom: '16px',
|
|
19
|
+
}, children: [_jsx(DropdownMenuWithLabel, { items: schemaDetails?.schemas || schemaError?.schemas || [], setSelected: async (e) => {
|
|
20
|
+
const tables = await getTablesBySchema(formConnectionString(environmentDetails), e);
|
|
21
|
+
if (tables) {
|
|
22
|
+
setFormError({ show: false, message: '' });
|
|
23
|
+
setSchemaError(undefined);
|
|
24
|
+
setSchemaDetails({
|
|
25
|
+
...schemaDetails,
|
|
26
|
+
schemas: schemaDetails?.schemas || schemaError?.schemas || [],
|
|
27
|
+
tables: tables,
|
|
28
|
+
columns: [],
|
|
29
|
+
organizations: [],
|
|
30
|
+
foreignKeys: [],
|
|
31
|
+
selectedFields: {
|
|
32
|
+
schema: e,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
setSchemaDetails({
|
|
38
|
+
schemas: schemaDetails?.schemas || schemaError?.schemas || [],
|
|
39
|
+
tables: undefined,
|
|
40
|
+
columns: [],
|
|
41
|
+
organizations: [],
|
|
42
|
+
foreignKeys: [],
|
|
43
|
+
selectedFields: {
|
|
44
|
+
schema: e,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
setSchemaError({
|
|
48
|
+
schemas: schemaDetails?.schemas || schemaError?.schemas || [],
|
|
49
|
+
message: "Invalid permissions. Unable to access to '" +
|
|
50
|
+
e +
|
|
51
|
+
"' schema.",
|
|
52
|
+
schemaName: e,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}, selected: schemaDetails?.selectedFields?.schema || schemaError?.schemaName, label: 'Schema' }), schemaError?.schemas.length === 0 && (_jsx(ButtonPrimitive, { label: "Re-fetch", onClick: async () => {
|
|
56
|
+
const suspectedSchema = await getSchemaTableInfo(formConnectionString(environmentDetails), 'public');
|
|
57
|
+
if ('selectedFields' in suspectedSchema) {
|
|
58
|
+
setSchemaError(undefined);
|
|
59
|
+
setSchemaDetails(suspectedSchema);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
setSchemaError(suspectedSchema);
|
|
63
|
+
}
|
|
64
|
+
} }))] }), schemaDetails?.tables && (_jsxs("div", { children: [_jsx("div", { style: { gap: 16 }, id: "database-details-form", children: _jsxs("div", {
|
|
65
|
+
// style={{
|
|
66
|
+
// display: 'flex',
|
|
67
|
+
// flexWrap: 'wrap',
|
|
68
|
+
// width: '100%',
|
|
69
|
+
// gap: '16px',
|
|
70
|
+
// }}
|
|
71
|
+
style: {
|
|
72
|
+
display: 'grid',
|
|
73
|
+
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
74
|
+
gap: '20px',
|
|
75
|
+
justifyContent: 'space-between',
|
|
76
|
+
marginTop: '8px',
|
|
77
|
+
}, children: [_jsx(DropdownMenuWithLabel, { items: schemaDetails?.tables || [], setSelected: async (e) => {
|
|
78
|
+
const columns = await getTableInfo(formConnectionString(environmentDetails), schemaDetails?.selectedFields?.schema, e);
|
|
79
|
+
setSchemaDetails({
|
|
80
|
+
...schemaDetails,
|
|
81
|
+
columns: columns.columns,
|
|
82
|
+
foreignKeys: [],
|
|
83
|
+
organizations: [],
|
|
84
|
+
selectedFields: {
|
|
85
|
+
schema: schemaDetails?.selectedFields?.schema,
|
|
86
|
+
table: e,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
}, selected: schemaDetails?.selectedFields?.table, label: 'Organization table' }), _jsx(DropdownMenuWithLabel, { items: schemaDetails?.columns || [], setSelected: async (e) => {
|
|
90
|
+
const fkStrings = await getFKInfo(formConnectionString(environmentDetails), schemaDetails?.selectedFields?.schema, schemaDetails?.selectedFields?.table, e);
|
|
91
|
+
if (schemaDetails?.selectedFields.customerNameField) {
|
|
92
|
+
const organizations = await getOrgInfo(formConnectionString(environmentDetails), schemaDetails?.selectedFields?.schema, schemaDetails?.selectedFields?.table, e, schemaDetails?.selectedFields.customerNameField);
|
|
93
|
+
setSchemaDetails({
|
|
94
|
+
...schemaDetails,
|
|
95
|
+
organizations: organizations,
|
|
96
|
+
selectedFields: {
|
|
97
|
+
...schemaDetails?.selectedFields,
|
|
98
|
+
organizationIdField: e,
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
setSchemaDetails({
|
|
103
|
+
...schemaDetails,
|
|
104
|
+
foreignKeys: fkStrings,
|
|
105
|
+
selectedFields: {
|
|
106
|
+
...schemaDetails?.selectedFields,
|
|
107
|
+
organizationIdField: e,
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
}, selected: schemaDetails?.selectedFields?.organizationIdField, label: 'Organization ID field' }), _jsx(DropdownMenuWithLabel, { items: schemaDetails?.columns || [], setSelected: async (e) => {
|
|
111
|
+
if (schemaDetails?.selectedFields.organizationIdField) {
|
|
112
|
+
const organizations = await getOrgInfo(formConnectionString(environmentDetails), schemaDetails?.selectedFields?.schema, schemaDetails?.selectedFields?.table, schemaDetails?.selectedFields.organizationIdField, e);
|
|
113
|
+
setSchemaDetails({
|
|
114
|
+
...schemaDetails,
|
|
115
|
+
organizations: organizations,
|
|
116
|
+
selectedFields: {
|
|
117
|
+
...schemaDetails?.selectedFields,
|
|
118
|
+
customerNameField: e,
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
setSchemaDetails({
|
|
124
|
+
...schemaDetails,
|
|
125
|
+
selectedFields: {
|
|
126
|
+
...schemaDetails?.selectedFields,
|
|
127
|
+
customerNameField: e,
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}, selected: schemaDetails?.selectedFields?.customerNameField, label: 'Organization name field' }), _jsx(DropdownMenuWithLabel, { items: schemaDetails?.organizations?.map((orgObj) => orgObj.name) ||
|
|
132
|
+
[], setSelected: async (e) => {
|
|
133
|
+
const orgObj = schemaDetails?.organizations?.find((orgObj) => orgObj.name === e);
|
|
134
|
+
setSchemaDetails({
|
|
135
|
+
...schemaDetails,
|
|
136
|
+
selectedFields: {
|
|
137
|
+
...schemaDetails?.selectedFields,
|
|
138
|
+
defaultOrg: orgObj,
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
}, selected: schemaDetails?.selectedFields?.defaultOrg?.name, label: 'Default organization' }), _jsx(DropdownMenuWithLabel, { items: schemaDetails?.foreignKeys || [], setSelected: async (e) => {
|
|
142
|
+
setSchemaDetails({
|
|
143
|
+
...schemaDetails,
|
|
144
|
+
selectedFields: {
|
|
145
|
+
...schemaDetails?.selectedFields,
|
|
146
|
+
foreignKey: e,
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
}, selected: schemaDetails?.selectedFields?.foreignKey, label: 'Foreign key' })] }) }), _jsxs("div", { style: {
|
|
150
|
+
width: '100%',
|
|
151
|
+
display: 'flex',
|
|
152
|
+
justifyContent: 'space-between',
|
|
153
|
+
alignItems: 'center',
|
|
154
|
+
marginTop: '12px',
|
|
155
|
+
}, children: [formError.show ? (_jsx("h2", { style: { ...header2Style, color: 'red' }, children: formError.message })) : (_jsx("div", {})), _jsx(ButtonPrimitive, { label: "Confirm", onClick: () => {
|
|
156
|
+
if (schemaDetails?.selectedFields?.schema &&
|
|
157
|
+
schemaDetails?.selectedFields?.table &&
|
|
158
|
+
schemaDetails?.selectedFields?.organizationIdField &&
|
|
159
|
+
schemaDetails?.selectedFields?.customerNameField &&
|
|
160
|
+
schemaDetails?.selectedFields?.defaultOrg &&
|
|
161
|
+
schemaDetails?.selectedFields?.foreignKey) {
|
|
162
|
+
propogateSchemaDetails(schemaDetails);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
setFormError({
|
|
166
|
+
show: true,
|
|
167
|
+
message: 'Please complete all dropdowns',
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
} })] })] })), schemaError?.message && (_jsx("h2", { style: { ...header2Style, color: 'red' }, children: schemaError.message }))] }));
|
|
171
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { ColumnsByTable } from '../../utils/table';
|
|
3
|
+
import { SchemaDetails } from '../../utils/schema';
|
|
4
|
+
import { ConnectionType } from '../../utils/databases';
|
|
5
|
+
export default function CreateSQLViews({ containerStyle, header1Style, header2Style, columnsByTable, environmentDetails, allSchemaInfo, domainName, completeOnboarding, }: {
|
|
6
|
+
containerStyle?: CSSProperties;
|
|
7
|
+
header1Style?: CSSProperties;
|
|
8
|
+
header2Style?: CSSProperties;
|
|
9
|
+
columnsByTable: ColumnsByTable[];
|
|
10
|
+
environmentDetails?: ConnectionType;
|
|
11
|
+
allSchemaInfo?: SchemaDetails;
|
|
12
|
+
domainName: string | undefined;
|
|
13
|
+
completeOnboarding: (client: any) => void;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=CreateSqlViews.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateSqlViews.d.ts","sourceRoot":"","sources":["../../../../src/forms/client_onboard/CreateSqlViews.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAuB,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAU,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAa3D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAG7E,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,kBAAkB,GACnB,EAAE;IACD,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,EAAE,CAAC;IACjC,kBAAkB,CAAC,EAAE,cAAc,CAAC;IACpC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,kBAAkB,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;CAC3C,2CA8VA"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { ButtonPrimitive, ModalPrimitive, TextInputPrimitive, } from '../../primitives';
|
|
4
|
+
import { SqlTextEditor, Table } from '@quillsql/react';
|
|
5
|
+
import { createSQLView, getQueryFromAI, getSqlViewData, } from '../../api/ConnectionClient';
|
|
6
|
+
import { formConnectionString } from '../../utils/databases';
|
|
7
|
+
import SqlViewTile from '../../components/SqlViewTile';
|
|
8
|
+
export default function CreateSQLViews({ containerStyle, header1Style, header2Style, columnsByTable, environmentDetails, allSchemaInfo, domainName, completeOnboarding, }) {
|
|
9
|
+
const [selectedTable, setSelectedTable] = useState(undefined);
|
|
10
|
+
const [queryInfo, setQueryInfo] = useState({
|
|
11
|
+
name: '',
|
|
12
|
+
query: '',
|
|
13
|
+
});
|
|
14
|
+
const [aiPrompt, setAIPrompt] = useState('');
|
|
15
|
+
const [errorInfo, setErrorInfo] = useState({ status: false, msg: '' });
|
|
16
|
+
const [sqlQueryError, setSqlQueryInfo] = useState({ status: false, msg: '' });
|
|
17
|
+
const [tableData, setTableData] = useState(undefined);
|
|
18
|
+
const [client, setClient] = useState(undefined);
|
|
19
|
+
const [sqlTables, setSqlTables] = useState([]);
|
|
20
|
+
const [askAIButton, setAskAIButton] = useState('Ask AI');
|
|
21
|
+
const [runQueryButtonLabel, setRunQueryButtonLabel] = useState('Run query');
|
|
22
|
+
const [showFKModal, setShowFKModal] = useState(false);
|
|
23
|
+
const addSqlView = async (override) => {
|
|
24
|
+
const results = await createSQLView(environmentDetails, allSchemaInfo, columnsByTable, queryInfo, client, domainName, tableData, sqlTables.map((e) => {
|
|
25
|
+
return e.name;
|
|
26
|
+
}), override);
|
|
27
|
+
if (results.throwModal) {
|
|
28
|
+
setShowFKModal(true);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (results.success) {
|
|
32
|
+
setSqlQueryInfo({ msg: '', status: false });
|
|
33
|
+
setClient(results.client);
|
|
34
|
+
setSqlTables(results.tables);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
setSqlQueryInfo({ msg: results.message, status: true });
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
window.scrollTo({
|
|
42
|
+
behavior: 'smooth',
|
|
43
|
+
top: 900,
|
|
44
|
+
});
|
|
45
|
+
}, []);
|
|
46
|
+
return (_jsxs("div", { style: {
|
|
47
|
+
...containerStyle,
|
|
48
|
+
display: 'flex',
|
|
49
|
+
flexDirection: 'column',
|
|
50
|
+
overflow: 'hidden',
|
|
51
|
+
}, id: "create-sql-view", children: [_jsxs("div", { style: {
|
|
52
|
+
padding: 20,
|
|
53
|
+
paddingBottom: 12,
|
|
54
|
+
height: 92,
|
|
55
|
+
maxHeight: 92,
|
|
56
|
+
minHeight: 92,
|
|
57
|
+
}, children: [_jsx("h1", { style: header1Style, children: "Add SQL Views" }), _jsx("h2", { style: { ...header2Style }, children: "Create a cleaned schema that makes it easier to write queries." })] }), _jsxs("div", { style: {
|
|
58
|
+
display: 'flex',
|
|
59
|
+
flexDirection: 'row',
|
|
60
|
+
borderTop: 'solid 1px #e7e7e7',
|
|
61
|
+
height: 'calc(100vh - 143px)',
|
|
62
|
+
}, children: [_jsxs("div", { id: "form-editor-table", style: {
|
|
63
|
+
display: 'flex',
|
|
64
|
+
flexDirection: 'column',
|
|
65
|
+
width: 'calc(100% - 300px)',
|
|
66
|
+
}, children: [_jsxs("div", { style: {
|
|
67
|
+
display: 'flex',
|
|
68
|
+
flexDirection: 'row',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
justifyContent: 'space-between',
|
|
71
|
+
gap: 12,
|
|
72
|
+
paddingLeft: 16,
|
|
73
|
+
paddingRight: 16,
|
|
74
|
+
height: 70,
|
|
75
|
+
}, children: [_jsx(TextInputPrimitive, { onChange: (e) => {
|
|
76
|
+
setAIPrompt(e.target.value);
|
|
77
|
+
}, placeholder: 'Describe a query...', value: aiPrompt }), _jsx(ButtonPrimitive, { label: askAIButton, onClick: async () => {
|
|
78
|
+
setAskAIButton('Loading...');
|
|
79
|
+
const results = await getQueryFromAI(aiPrompt, columnsByTable);
|
|
80
|
+
setQueryInfo({ name: queryInfo.name, query: results });
|
|
81
|
+
setAskAIButton('Ask AI');
|
|
82
|
+
}, style: { width: '90px' } })] }), _jsx(SqlTextEditor, { value: queryInfo.query, setValue: (e) => {
|
|
83
|
+
setQueryInfo({ name: queryInfo.name, query: e });
|
|
84
|
+
}, containerStyle: { paddingLeft: 16, paddingRight: 16 } }), _jsxs("div", { style: {
|
|
85
|
+
display: 'flex',
|
|
86
|
+
flexDirection: 'row',
|
|
87
|
+
justifyContent: 'space-between',
|
|
88
|
+
alignItems: 'center',
|
|
89
|
+
paddingLeft: 16,
|
|
90
|
+
paddingRight: 16,
|
|
91
|
+
height: 70,
|
|
92
|
+
}, children: [_jsx(ButtonPrimitive, { label: runQueryButtonLabel, onClick: async () => {
|
|
93
|
+
setRunQueryButtonLabel('Querying...');
|
|
94
|
+
const connectionString = formConnectionString(environmentDetails);
|
|
95
|
+
const getSqlResults = await getSqlViewData(connectionString, queryInfo.query);
|
|
96
|
+
if (!getSqlResults.success) {
|
|
97
|
+
setErrorInfo({ status: true, msg: getSqlResults.error });
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
setErrorInfo({ status: false, msg: '' });
|
|
101
|
+
setTableData(getSqlResults);
|
|
102
|
+
}
|
|
103
|
+
setRunQueryButtonLabel('Run query');
|
|
104
|
+
} }), errorInfo.status ? (_jsx("h2", { style: {
|
|
105
|
+
...header2Style,
|
|
106
|
+
color: 'red',
|
|
107
|
+
paddingTop: '12px',
|
|
108
|
+
textTransform: 'capitalize',
|
|
109
|
+
}, children: errorInfo.msg })) : (_jsx("div", {}))] }), !errorInfo.status && tableData && (_jsxs("div", { style: {
|
|
110
|
+
paddingLeft: 16,
|
|
111
|
+
paddingRight: 16,
|
|
112
|
+
height: 'calc(100vh - 515px)',
|
|
113
|
+
}, children: [_jsx(Table, { rows: tableData.rows, columns: tableData.columns,
|
|
114
|
+
// height="400px"
|
|
115
|
+
containerStyle: {
|
|
116
|
+
height: 'calc(100vh - 589px)',
|
|
117
|
+
width: '100%',
|
|
118
|
+
}, showDownloadCsvButton: false }), _jsxs("div", { style: {
|
|
119
|
+
width: '100%',
|
|
120
|
+
display: 'flex',
|
|
121
|
+
justifyContent: 'space-between',
|
|
122
|
+
alignItems: 'center',
|
|
123
|
+
height: 70,
|
|
124
|
+
}, children: [sqlQueryError.status ? (_jsx("h2", { style: {
|
|
125
|
+
...header2Style,
|
|
126
|
+
color: 'red',
|
|
127
|
+
paddingTop: '12px',
|
|
128
|
+
// textTransform: 'capitalize',
|
|
129
|
+
}, children: sqlQueryError.msg })) : (_jsx("div", {})), _jsx(ButtonPrimitive, { label: "Add SQL View", onClick: () => addSqlView(false) })] })] }))] }), _jsxs("div", { style: {
|
|
130
|
+
// width: '30%',
|
|
131
|
+
background: '#fafafa',
|
|
132
|
+
borderLeft: 'solid 1px #e7e7e7',
|
|
133
|
+
width: 300,
|
|
134
|
+
height: 'calc(100vh - 154px)',
|
|
135
|
+
}, children: [_jsx("h1", { style: {
|
|
136
|
+
...header1Style,
|
|
137
|
+
color: '#212121',
|
|
138
|
+
paddingLeft: 16,
|
|
139
|
+
height: 70,
|
|
140
|
+
background: 'white',
|
|
141
|
+
borderBottom: 'solid 1px #e7e7e7',
|
|
142
|
+
display: 'flex',
|
|
143
|
+
flexDirection: 'column',
|
|
144
|
+
justifyContent: 'center',
|
|
145
|
+
alignItems: 'flex-start',
|
|
146
|
+
}, children: "SQL Views" }), sqlTables.length > 0 ? (_jsx("div", { style: { height: 'calc(100vh - 302px)' }, children: _jsxs("div", { style: {
|
|
147
|
+
display: 'grid',
|
|
148
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(245px, 1fr))',
|
|
149
|
+
gridAutoRows: '200px',
|
|
150
|
+
gap: '10px',
|
|
151
|
+
overflow: 'auto',
|
|
152
|
+
height: 'calc(100vh - 302px)',
|
|
153
|
+
paddingLeft: '12px',
|
|
154
|
+
paddingRight: '12px',
|
|
155
|
+
}, children: [sqlTables.map((e) => {
|
|
156
|
+
return (_jsx("div", { children: _jsx(SqlViewTile, { name: e.name, query: e.viewQuery, header1Style: header1Style, header2Style: header2Style }) }, e.name));
|
|
157
|
+
}), _jsx("div", { style: { height: 20 } })] }) })) : (_jsx("div", { style: { paddingLeft: 12, paddingRight: 12 }, children: _jsx("div", { style: {
|
|
158
|
+
display: 'flex',
|
|
159
|
+
justifyContent: 'center',
|
|
160
|
+
alignItems: 'center',
|
|
161
|
+
border: 'dashed 1px #C5C5C5',
|
|
162
|
+
marginTop: '12px',
|
|
163
|
+
borderRadius: 6,
|
|
164
|
+
height: 200,
|
|
165
|
+
}, children: _jsxs("h2", { style: {
|
|
166
|
+
...header2Style,
|
|
167
|
+
display: 'flex',
|
|
168
|
+
justifyContent: 'center',
|
|
169
|
+
alignItems: 'center',
|
|
170
|
+
color: '#565656',
|
|
171
|
+
textAlign: 'center',
|
|
172
|
+
}, children: ['No SQL views yet.', _jsx("br", {}), 'Add one with the SQL editor.'] }) }) })), sqlTables.length > 0 ? (_jsx("div", { style: {
|
|
173
|
+
display: 'flex',
|
|
174
|
+
justifyContent: 'flex-end',
|
|
175
|
+
flexDirection: 'row',
|
|
176
|
+
alignItems: 'center',
|
|
177
|
+
height: 70,
|
|
178
|
+
paddingRight: 12,
|
|
179
|
+
background: 'white',
|
|
180
|
+
borderTop: 'solid 1px #e7e7e7',
|
|
181
|
+
}, children: _jsx(ButtonPrimitive, { label: "Go to dashboard", onClick: () => {
|
|
182
|
+
completeOnboarding(client);
|
|
183
|
+
}, style: { width: 276 } }) })) : null] })] }), _jsx(ForeignKeyModal, { isOpen: showFKModal, setIsOpen: setShowFKModal, override: addSqlView, foreignKey: allSchemaInfo?.selectedFields.foreignKey, tableName: allSchemaInfo?.selectedFields.table })] }));
|
|
184
|
+
}
|
|
185
|
+
function ForeignKeyModal({ isOpen, setIsOpen, override, foreignKey, tableName, }) {
|
|
186
|
+
return (_jsx(ModalPrimitive, { isOpen: isOpen, close: () => {
|
|
187
|
+
setIsOpen(false);
|
|
188
|
+
}, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', width: '600px' }, children: [_jsx("h1", { style: {
|
|
189
|
+
fontSize: 24,
|
|
190
|
+
fontWeight: 600,
|
|
191
|
+
color: '#212121',
|
|
192
|
+
paddingBottom: 14,
|
|
193
|
+
}, children: `Organization Foreign Key "${foreignKey}" Not Found` }), _jsxs("div", { style: { marginBottom: '12px' }, children: [`Your organization table `, _jsx("strong", { children: `"${tableName}"` }), ` foreign key `, _jsx("strong", { children: `"${foreignKey}"` }), " is not present in the current query. If this query will never have organization specific data on it (this is rare), override this message.`"] }), _jsx("br", {}), _jsxs("div", { style: {
|
|
194
|
+
display: 'flex',
|
|
195
|
+
flexDirection: 'row',
|
|
196
|
+
gap: '12px',
|
|
197
|
+
justifyContent: 'flex-end',
|
|
198
|
+
}, children: [_jsx(ButtonPrimitive, { label: "Got It", onClick: () => setIsOpen(false) }), _jsx(ButtonPrimitive, { label: "Override", variant: "danger", onClick: () => {
|
|
199
|
+
override(true);
|
|
200
|
+
setIsOpen(false);
|
|
201
|
+
} })] })] }) }));
|
|
202
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useItemBeingEdited.d.ts","sourceRoot":"","sources":["../../../src/hooks/useItemBeingEdited.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EAIlB,MAAM,OAAO,CAAC;AAsCf,eAAO,MAAM,kBAAkB,YAI9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,UAAW,iBAAiB,4CAM/D,CAAC"}
|