@postgres.ai/shared 3.5.1-pr-1027.0 → 4.0.0-pr-1028.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AlertSnackbar/index.d.ts +2 -0
- package/components/AlertSnackbar/index.js +8 -0
- package/components/AlertSnackbar/useAlertSnackbar.d.ts +16 -0
- package/components/AlertSnackbar/useAlertSnackbar.js +37 -0
- package/components/Button/index.d.ts +7 -0
- package/components/Button/index.js +40 -0
- package/components/Button2/index.d.ts +13 -0
- package/components/Button2/index.js +10 -0
- package/components/DestroyCloneModal/index.d.ts +9 -0
- package/components/DestroyCloneModal/index.js +23 -0
- package/components/DestroyCloneRestrictionModal/index.d.ts +11 -0
- package/components/DestroyCloneRestrictionModal/index.js +16 -0
- package/components/ErrorStub/index.d.ts +11 -0
- package/components/ErrorStub/index.js +42 -0
- package/components/FormattedText/index.d.ts +7 -0
- package/components/FormattedText/index.js +23 -0
- package/components/GatewayLink/index.d.ts +4 -0
- package/components/GatewayLink/index.js +13 -0
- package/components/HorizontalScrollContainer/index.d.ts +13 -0
- package/components/HorizontalScrollContainer/index.js +72 -0
- package/components/HorizontalScrollContainer/types.d.ts +5 -0
- package/components/HorizontalScrollContainer/{types.ts → types.js} +1 -6
- package/components/HorizontalScrollContainer/utils.d.ts +3 -0
- package/components/HorizontalScrollContainer/utils.js +12 -0
- package/components/ImportantText/index.d.ts +6 -0
- package/components/ImportantText/index.js +12 -0
- package/components/Link2/index.d.ts +7 -0
- package/components/Link2/index.js +17 -0
- package/components/MenuButton/index.d.ts +26 -0
- package/components/MenuButton/index.js +16 -0
- package/components/Modal/index.d.ts +15 -0
- package/components/Modal/index.js +35 -0
- package/components/PageSpinner/index.d.ts +2 -0
- package/components/PageSpinner/{index.tsx → index.js} +5 -11
- package/components/ResetCloneModal/index.d.ts +13 -0
- package/components/ResetCloneModal/index.js +89 -0
- package/components/SectionTitle/index.d.ts +12 -0
- package/components/SectionTitle/index.js +31 -0
- package/components/Select/index.d.ts +18 -0
- package/components/Select/index.js +9 -0
- package/components/SimpleModalControls/index.d.ts +11 -0
- package/components/SimpleModalControls/index.js +19 -0
- package/components/Spinner/icon.d.ts +4 -0
- package/components/Spinner/icon.js +2 -0
- package/components/Spinner/index.d.ts +7 -0
- package/components/Spinner/index.js +8 -0
- package/components/Status/index.d.ts +12 -0
- package/components/Status/index.js +23 -0
- package/components/StubContainer/index.d.ts +7 -0
- package/components/StubContainer/index.js +14 -0
- package/components/StubSpinner/index.d.ts +8 -0
- package/components/StubSpinner/index.js +29 -0
- package/components/StubSpinnerFlex/index.d.ts +9 -0
- package/components/StubSpinnerFlex/index.js +8 -0
- package/components/SyntaxHighlight/index.d.ts +7 -0
- package/components/SyntaxHighlight/index.js +65 -0
- package/components/Table/RowMenu/index.d.ts +14 -0
- package/components/Table/RowMenu/index.js +50 -0
- package/components/Table/index.d.ts +12 -0
- package/components/Table/index.js +58 -0
- package/components/Text/index.d.ts +6 -0
- package/components/Text/index.js +11 -0
- package/components/TextField/index.d.ts +27 -0
- package/components/TextField/index.js +43 -0
- package/components/Tooltip/index.d.ts +12 -0
- package/components/Tooltip/index.js +19 -0
- package/config/index.d.ts +8 -0
- package/config/index.js +23 -0
- package/config/links.d.ts +6 -0
- package/config/links.js +6 -0
- package/helpers/getEntropy.d.ts +3 -0
- package/helpers/getEntropy.js +212 -0
- package/helpers/localStorage.d.ts +6 -0
- package/helpers/localStorage.js +13 -0
- package/helpers/request.d.ts +7 -0
- package/helpers/request.js +35 -0
- package/hooks/useWindowDimensions.d.ts +1 -0
- package/hooks/useWindowDimensions.js +12 -0
- package/icons/ArrowDropDown/index.d.ts +7 -0
- package/icons/ArrowDropDown/index.js +6 -0
- package/icons/Circle/index.d.ts +6 -0
- package/icons/Circle/index.js +5 -0
- package/icons/External/index.d.ts +4 -0
- package/icons/External/index.js +2 -0
- package/icons/Info/index.d.ts +4 -0
- package/icons/Info/index.js +2 -0
- package/icons/PostgresSQL/index.d.ts +2 -0
- package/icons/PostgresSQL/index.js +40 -0
- package/icons/Renewable/index.d.ts +6 -0
- package/icons/Renewable/index.js +12 -0
- package/icons/Shield/index.d.ts +6 -0
- package/icons/Shield/index.js +12 -0
- package/icons/Warning/index.d.ts +6 -0
- package/icons/Warning/index.js +6 -0
- package/package.json +5 -13
- package/pages/Branches/Branch/context.d.ts +22 -0
- package/pages/Branches/Branch/context.js +3 -0
- package/pages/Branches/Branch/index.d.ts +9 -0
- package/pages/Branches/Branch/index.js +172 -0
- package/pages/Branches/Branch/stores/Main.d.ts +37 -0
- package/pages/Branches/Branch/stores/Main.js +90 -0
- package/pages/Branches/Branch/useCreatedStores.d.ts +6 -0
- package/pages/Branches/Branch/useCreatedStores.js +5 -0
- package/pages/Branches/components/BranchesTable/index.d.ts +10 -0
- package/pages/Branches/components/BranchesTable/index.js +107 -0
- package/pages/Branches/components/Modals/DeleteBranchModal/index.d.ts +11 -0
- package/pages/Branches/components/Modals/DeleteBranchModal/index.js +49 -0
- package/pages/Branches/components/Modals/types.d.ts +4 -0
- package/pages/Branches/components/Modals/types.js +1 -0
- package/pages/Branches/index.d.ts +6 -0
- package/pages/Branches/index.js +60 -0
- package/pages/Clone/Status/index.d.ts +8 -0
- package/pages/Clone/Status/index.js +38 -0
- package/pages/Clone/context.d.ts +21 -0
- package/pages/Clone/context.js +3 -0
- package/pages/Clone/index.d.ts +9 -0
- package/pages/Clone/index.js +252 -0
- package/pages/Clone/stores/Main.d.ts +47 -0
- package/pages/Clone/stores/Main.js +141 -0
- package/pages/Clone/useCreatedStores.d.ts +6 -0
- package/pages/Clone/useCreatedStores.js +5 -0
- package/pages/Clone/utils/index.d.ts +4 -0
- package/pages/Clone/utils/index.js +12 -0
- package/pages/CreateBranch/index.d.ts +17 -0
- package/pages/CreateBranch/index.js +135 -0
- package/pages/CreateBranch/stores/Main.d.ts +43 -0
- package/pages/CreateBranch/stores/Main.js +59 -0
- package/pages/CreateBranch/useCreatedStores.d.ts +6 -0
- package/pages/CreateBranch/useCreatedStores.js +5 -0
- package/pages/CreateBranch/useForm.d.ts +51 -0
- package/pages/CreateBranch/useForm.js +30 -0
- package/pages/CreateBranch/utils/index.d.ts +2 -0
- package/pages/CreateBranch/utils/index.js +10 -0
- package/pages/CreateClone/index.d.ts +19 -0
- package/pages/CreateClone/index.js +142 -0
- package/pages/CreateClone/stores/Main.d.ts +49 -0
- package/pages/CreateClone/stores/Main.js +85 -0
- package/pages/CreateClone/styles.module.scss +47 -4
- package/pages/CreateClone/useCreatedStores.d.ts +6 -0
- package/pages/CreateClone/useCreatedStores.js +5 -0
- package/pages/CreateClone/useForm.d.ts +55 -0
- package/pages/CreateClone/useForm.js +26 -0
- package/pages/CreateClone/utils/index.d.ts +3 -0
- package/pages/CreateClone/utils/index.js +17 -0
- package/pages/CreateSnapshot/index.d.ts +17 -0
- package/pages/CreateSnapshot/index.js +117 -0
- package/pages/CreateSnapshot/stores/Main.d.ts +21 -0
- package/pages/CreateSnapshot/stores/Main.js +31 -0
- package/pages/CreateSnapshot/useCreatedStores.d.ts +6 -0
- package/pages/CreateSnapshot/useCreatedStores.js +5 -0
- package/pages/CreateSnapshot/useForm.d.ts +53 -0
- package/pages/CreateSnapshot/useForm.js +25 -0
- package/pages/CreateSnapshot/utils/index.d.ts +1 -0
- package/pages/CreateSnapshot/utils/index.js +3 -0
- package/pages/Instance/Clones/ClonesList/ConnectionModal/index.d.ts +10 -0
- package/pages/Instance/Clones/ClonesList/ConnectionModal/index.js +74 -0
- package/pages/Instance/Clones/ClonesList/MenuCell/index.d.ts +11 -0
- package/pages/Instance/Clones/ClonesList/MenuCell/index.js +49 -0
- package/pages/Instance/Clones/ClonesList/MenuCell/utils.d.ts +3 -0
- package/pages/Instance/Clones/ClonesList/MenuCell/utils.js +18 -0
- package/pages/Instance/Clones/ClonesList/index.d.ts +9 -0
- package/pages/Instance/Clones/ClonesList/index.js +96 -0
- package/pages/Instance/{components → Clones}/ClonesList/styles.module.scss +10 -0
- package/pages/Instance/Clones/ClonesModal/index.d.ts +4 -0
- package/pages/Instance/Clones/ClonesModal/index.js +38 -0
- package/pages/Instance/Clones/ClonesModal/utils.d.ts +7 -0
- package/pages/Instance/Clones/ClonesModal/utils.js +14 -0
- package/pages/Instance/Clones/Header/Item/index.d.ts +7 -0
- package/pages/Instance/Clones/Header/Item/index.js +5 -0
- package/pages/Instance/Clones/Header/index.d.ts +9 -0
- package/pages/Instance/Clones/Header/index.js +16 -0
- package/pages/Instance/Clones/Header/styles.module.scss +4 -1
- package/pages/Instance/Clones/index.d.ts +8 -0
- package/pages/Instance/Clones/index.js +64 -0
- package/pages/Instance/Configuration/Header/index.d.ts +11 -0
- package/pages/Instance/Configuration/Header/index.js +17 -0
- package/pages/Instance/Configuration/InputWithTooltip/index.d.ts +32 -0
- package/pages/Instance/Configuration/InputWithTooltip/index.js +64 -0
- package/pages/Instance/Configuration/ResponseMessage/index.d.ts +5 -0
- package/pages/Instance/Configuration/ResponseMessage/index.js +43 -0
- package/pages/Instance/Configuration/configOptions.d.ts +9 -0
- package/pages/Instance/Configuration/configOptions.js +59 -0
- package/pages/Instance/Configuration/index.d.ts +10 -0
- package/pages/Instance/Configuration/index.js +547 -0
- package/pages/Instance/Configuration/tooltipText.d.ts +20 -0
- package/pages/Instance/Configuration/tooltipText.js +21 -0
- package/pages/Instance/Configuration/useForm.d.ts +82 -0
- package/pages/Instance/Configuration/useForm.js +74 -0
- package/pages/Instance/Configuration/utils/index.d.ts +22 -0
- package/pages/Instance/Configuration/utils/index.js +105 -0
- package/pages/Instance/InactiveInstance/index.d.ts +6 -0
- package/pages/Instance/InactiveInstance/index.js +65 -0
- package/pages/Instance/InactiveInstance/utils.d.ts +2 -0
- package/pages/Instance/InactiveInstance/utils.js +7 -0
- package/pages/Instance/Info/Connection/ConnectModal/Content/index.d.ts +4 -0
- package/pages/Instance/Info/Connection/ConnectModal/Content/index.js +73 -0
- package/pages/Instance/Info/Connection/ConnectModal/Content/utils.d.ts +3 -0
- package/pages/Instance/Info/Connection/ConnectModal/Content/utils.js +20 -0
- package/pages/Instance/Info/Connection/ConnectModal/index.d.ts +6 -0
- package/pages/Instance/Info/Connection/ConnectModal/index.js +17 -0
- package/pages/Instance/Info/Connection/index.d.ts +4 -0
- package/pages/Instance/Info/Connection/index.js +44 -0
- package/pages/Instance/Info/Details/index.d.ts +2 -0
- package/pages/Instance/Info/Details/index.js +6 -0
- package/pages/Instance/Info/Disks/Disk/ActionsMenu/index.d.ts +8 -0
- package/pages/Instance/Info/Disks/Disk/ActionsMenu/index.js +47 -0
- package/pages/Instance/Info/Disks/Disk/Marker/index.d.ts +6 -0
- package/pages/Instance/Info/Disks/Disk/Marker/index.js +15 -0
- package/pages/Instance/Info/Disks/Disk/ProgressBar/PointerIcon.d.ts +5 -0
- package/pages/Instance/Info/Disks/Disk/ProgressBar/PointerIcon.js +2 -0
- package/pages/Instance/Info/Disks/Disk/ProgressBar/index.d.ts +8 -0
- package/pages/Instance/Info/Disks/Disk/ProgressBar/index.js +45 -0
- package/pages/Instance/Info/Disks/Disk/Status/index.d.ts +6 -0
- package/pages/Instance/Info/Disks/Disk/Status/index.js +52 -0
- package/pages/Instance/Info/Disks/Disk/index.d.ts +15 -0
- package/pages/Instance/Info/Disks/Disk/index.js +71 -0
- package/pages/Instance/Info/Disks/index.d.ts +4 -0
- package/pages/Instance/Info/Disks/index.js +24 -0
- package/pages/Instance/Info/Icons/index.d.ts +7 -0
- package/pages/Instance/Info/Icons/index.js +3 -0
- package/pages/Instance/Info/Retrieval/RefreshFailedAlert/index.d.ts +4 -0
- package/pages/Instance/Info/Retrieval/RefreshFailedAlert/index.js +15 -0
- package/pages/Instance/Info/Retrieval/RetrievalModal/index.d.ts +10 -0
- package/pages/Instance/Info/Retrieval/RetrievalModal/index.js +11 -0
- package/pages/Instance/Info/Retrieval/RetrievalTable/index.d.ts +6 -0
- package/pages/Instance/Info/Retrieval/RetrievalTable/index.js +6 -0
- package/pages/Instance/Info/Retrieval/index.d.ts +4 -0
- package/pages/Instance/Info/Retrieval/index.js +47 -0
- package/pages/Instance/Info/Retrieval/utils.d.ts +2 -0
- package/pages/Instance/Info/Retrieval/utils.js +12 -0
- package/pages/Instance/Info/Snapshots/Calendar/Day/index.d.ts +11 -0
- package/pages/Instance/Info/Snapshots/Calendar/Day/index.js +71 -0
- package/pages/Instance/Info/Snapshots/Calendar/index.d.ts +8 -0
- package/pages/Instance/Info/Snapshots/Calendar/index.js +67 -0
- package/pages/Instance/Info/Snapshots/Calendar/utils.d.ts +27 -0
- package/pages/Instance/Info/Snapshots/Calendar/utils.js +41 -0
- package/pages/Instance/Info/Snapshots/TimeLine/Day/index.d.ts +6 -0
- package/pages/Instance/Info/Snapshots/TimeLine/Day/index.js +58 -0
- package/pages/Instance/Info/Snapshots/TimeLine/index.d.ts +2 -0
- package/pages/Instance/Info/Snapshots/TimeLine/index.js +32 -0
- package/pages/Instance/Info/Snapshots/index.d.ts +4 -0
- package/pages/Instance/Info/Snapshots/index.js +40 -0
- package/pages/Instance/Info/Snapshots/utils.d.ts +34 -0
- package/pages/Instance/Info/Snapshots/utils.js +26 -0
- package/pages/Instance/Info/Status/InstanceResponseModal/index.d.ts +9 -0
- package/pages/Instance/Info/Status/InstanceResponseModal/index.js +12 -0
- package/pages/Instance/Info/Status/index.d.ts +4 -0
- package/pages/Instance/Info/Status/index.js +31 -0
- package/pages/Instance/Info/Status/utils.d.ts +8 -0
- package/pages/Instance/Info/Status/utils.js +23 -0
- package/pages/Instance/Info/components/Property/index.d.ts +11 -0
- package/pages/Instance/Info/components/Property/index.js +14 -0
- package/pages/Instance/Info/components/Section/index.d.ts +8 -0
- package/pages/Instance/Info/components/Section/index.js +18 -0
- package/pages/Instance/Info/components/ValueStatus/index.d.ts +9 -0
- package/pages/Instance/Info/components/ValueStatus/index.js +18 -0
- package/pages/Instance/Info/index.d.ts +2 -0
- package/pages/Instance/Info/index.js +76 -0
- package/pages/Instance/Snapshots/components/SnapshotHeader/index.d.ts +11 -0
- package/pages/Instance/Snapshots/components/SnapshotHeader/index.js +36 -0
- package/pages/Instance/Snapshots/components/SnapshotsList/index.d.ts +11 -0
- package/pages/Instance/Snapshots/components/SnapshotsList/index.js +157 -0
- package/pages/Instance/Snapshots/components/SnapshotsModal/utils.d.ts +7 -0
- package/{components/HorizontalScrollContainer/utils.ts → pages/Instance/Snapshots/components/SnapshotsModal/utils.js} +8 -9
- package/pages/Instance/Snapshots/components/SnapshotsTable/index.d.ts +6 -0
- package/pages/Instance/Snapshots/components/SnapshotsTable/index.js +125 -0
- package/pages/Instance/Snapshots/index.d.ts +6 -0
- package/pages/Instance/Snapshots/index.js +92 -0
- package/pages/Instance/Snapshots/utils/index.d.ts +16 -0
- package/pages/Instance/Snapshots/utils/index.js +30 -0
- package/pages/Instance/SnapshotsModal/index.d.ts +4 -0
- package/pages/Instance/SnapshotsModal/index.js +81 -0
- package/pages/Instance/Tabs/PlatformTabs.d.ts +10 -0
- package/pages/Instance/Tabs/PlatformTabs.js +51 -0
- package/pages/Instance/Tabs/index.d.ts +26 -0
- package/pages/Instance/Tabs/index.js +75 -0
- package/pages/Instance/Tabs/styles.d.ts +1 -0
- package/pages/Instance/Tabs/styles.js +62 -0
- package/pages/Instance/components/ErrorStub/index.d.ts +9 -0
- package/pages/Instance/components/ErrorStub/index.js +42 -0
- package/pages/Instance/components/ModalReloadButton/index.d.ts +7 -0
- package/pages/Instance/components/ModalReloadButton/index.js +22 -0
- package/pages/Instance/components/Tags/Tag/index.d.ts +7 -0
- package/pages/Instance/components/Tags/Tag/index.js +35 -0
- package/pages/Instance/components/Tags/index.d.ts +8 -0
- package/pages/Instance/components/Tags/index.js +16 -0
- package/pages/Instance/context.d.ts +38 -0
- package/pages/Instance/{ClonesModal/utils.ts → context.js} +5 -15
- package/pages/Instance/index.d.ts +8 -0
- package/pages/Instance/index.js +94 -0
- package/pages/Instance/stores/ClonesModal.d.ts +13 -0
- package/pages/Instance/stores/ClonesModal.js +24 -0
- package/pages/Instance/stores/Main.d.ts +141 -0
- package/pages/Instance/stores/Main.js +302 -0
- package/pages/Instance/stores/SnapshotsModal.d.ts +13 -0
- package/pages/Instance/stores/SnapshotsModal.js +24 -0
- package/pages/Instance/styles.scss +1 -4
- package/pages/Instance/useCreatedStores.d.ts +10 -0
- package/pages/Instance/useCreatedStores.js +9 -0
- package/pages/Logs/Icons/PlusIcon.d.ts +2 -0
- package/pages/Logs/Icons/PlusIcon.js +2 -0
- package/pages/Logs/constants/index.d.ts +5 -0
- package/pages/Logs/constants/index.js +5 -0
- package/pages/Logs/hooks/useWsScroll.d.ts +1 -0
- package/pages/Logs/hooks/useWsScroll.js +37 -0
- package/pages/Logs/index.d.ts +6 -0
- package/pages/Logs/index.js +200 -0
- package/pages/Logs/utils/index.d.ts +2 -0
- package/pages/Logs/utils/index.js +15 -0
- package/pages/Logs/wsLogs.d.ts +3 -0
- package/pages/Logs/wsLogs.js +92 -0
- package/pages/Logs/wsSnackbar.d.ts +1 -0
- package/pages/Logs/wsSnackbar.js +25 -0
- package/pages/Snapshots/Snapshot/DestorySnapshotModal/index.d.ts +12 -0
- package/pages/Snapshots/Snapshot/DestorySnapshotModal/index.js +69 -0
- package/pages/Snapshots/Snapshot/context.d.ts +23 -0
- package/pages/Snapshots/Snapshot/context.js +3 -0
- package/pages/Snapshots/Snapshot/index.d.ts +9 -0
- package/pages/Snapshots/Snapshot/index.js +171 -0
- package/pages/Snapshots/Snapshot/stores/Main.d.ts +33 -0
- package/pages/Snapshots/Snapshot/stores/Main.js +71 -0
- package/pages/Snapshots/Snapshot/useCreatedStores.d.ts +6 -0
- package/pages/Snapshots/Snapshot/useCreatedStores.js +5 -0
- package/stores/Snapshots.d.ts +24 -0
- package/stores/Snapshots.js +59 -0
- package/styles/colors.d.ts +60 -0
- package/styles/colors.js +66 -0
- package/styles/icons.d.ts +63 -0
- package/styles/icons.js +69 -0
- package/styles/styles.d.ts +1 -0
- package/styles/styles.js +83 -0
- package/styles/theme.d.ts +1 -0
- package/styles/theme.js +50 -0
- package/styles/vars.d.ts +25 -0
- package/styles/{vars.ts → vars.js} +20 -28
- package/types/api/endpoints/createBranch.d.ts +12 -0
- package/types/api/endpoints/createBranch.js +1 -0
- package/types/api/endpoints/createClone.d.ts +13 -0
- package/types/api/endpoints/createClone.js +1 -0
- package/types/api/endpoints/createSnapshot.d.ts +5 -0
- package/types/api/endpoints/createSnapshot.js +1 -0
- package/types/api/endpoints/deleteBranch.d.ts +4 -0
- package/types/api/endpoints/deleteBranch.js +1 -0
- package/types/api/endpoints/destroyClone.d.ts +7 -0
- package/types/api/endpoints/destroyClone.js +1 -0
- package/types/api/endpoints/destroySnapshot.d.ts +4 -0
- package/types/api/endpoints/destroySnapshot.js +1 -0
- package/types/api/endpoints/getBranchSnapshot.d.ts +5 -0
- package/types/api/endpoints/getBranchSnapshot.js +1 -0
- package/types/api/endpoints/getBranches.d.ts +18 -0
- package/types/api/endpoints/getBranches.js +5 -0
- package/types/api/endpoints/getClone.d.ts +8 -0
- package/types/api/endpoints/getClone.js +1 -0
- package/types/api/endpoints/getConfig.d.ts +5 -0
- package/types/api/endpoints/getConfig.js +1 -0
- package/types/api/endpoints/getEngine.d.ts +10 -0
- package/types/api/endpoints/getEngine.js +1 -0
- package/types/api/endpoints/getFullConfig.d.ts +4 -0
- package/types/api/endpoints/getFullConfig.js +1 -0
- package/types/api/endpoints/getInstance.d.ts +7 -0
- package/types/api/endpoints/getInstance.js +1 -0
- package/types/api/endpoints/getInstanceRetrieval.d.ts +7 -0
- package/types/api/endpoints/getInstanceRetrieval.js +1 -0
- package/types/api/endpoints/getSeImages.d.ts +19 -0
- package/types/api/endpoints/getSeImages.js +1 -0
- package/types/api/endpoints/getSnapshotList.d.ts +10 -0
- package/types/api/endpoints/getSnapshotList.js +1 -0
- package/types/api/endpoints/getSnapshots.d.ts +8 -0
- package/types/api/endpoints/getSnapshots.js +1 -0
- package/types/api/endpoints/getWSToken.d.ts +7 -0
- package/types/api/endpoints/getWSToken.js +1 -0
- package/types/api/endpoints/initWS.d.ts +1 -0
- package/types/api/endpoints/initWS.js +1 -0
- package/types/api/endpoints/refreshInstance.d.ts +6 -0
- package/types/api/endpoints/refreshInstance.js +1 -0
- package/types/api/endpoints/resetClone.d.ts +8 -0
- package/types/api/endpoints/resetClone.js +1 -0
- package/types/api/endpoints/testDbSource.d.ts +22 -0
- package/types/api/endpoints/testDbSource.js +23 -0
- package/types/api/endpoints/updateClone.d.ts +10 -0
- package/types/api/endpoints/updateClone.js +1 -0
- package/types/api/endpoints/updateConfig.d.ts +5 -0
- package/types/api/endpoints/updateConfig.js +1 -0
- package/types/api/entities/branchSnapshot.d.ts +6 -0
- package/types/api/entities/branchSnapshot.js +1 -0
- package/types/api/entities/branchSnapshots.d.ts +15 -0
- package/types/api/entities/branchSnapshots.js +7 -0
- package/types/api/entities/clone.d.ts +56 -0
- package/{components/Text/index.tsx → types/api/entities/clone.js} +8 -22
- package/types/api/entities/config.d.ts +72 -0
- package/types/api/entities/config.js +35 -0
- package/types/api/entities/createBranch.d.ts +5 -0
- package/types/api/entities/createBranch.js +1 -0
- package/types/api/entities/createSnapshot.d.ts +5 -0
- package/types/api/entities/createSnapshot.js +1 -0
- package/types/api/entities/dbSource.d.ts +13 -0
- package/types/api/entities/dbSource.js +1 -0
- package/types/api/entities/instance.d.ts +114 -0
- package/types/api/entities/instance.js +31 -0
- package/types/api/entities/instanceRetrieval.d.ts +42 -0
- package/types/api/entities/instanceRetrieval.js +19 -0
- package/types/api/entities/instanceState.d.ts +114 -0
- package/types/api/entities/instanceState.js +42 -0
- package/types/api/entities/pool.d.ts +18 -0
- package/{utils/numbers.ts → types/api/entities/pool.js} +1 -5
- package/types/api/entities/snapshot.d.ts +27 -0
- package/types/api/entities/snapshot.js +6 -0
- package/types/api/entities/wsToken.d.ts +5 -0
- package/types/api/entities/wsToken.js +1 -0
- package/utils/api.d.ts +1 -0
- package/utils/api.js +28 -0
- package/utils/clone.d.ts +13 -0
- package/utils/clone.js +21 -0
- package/utils/connection.d.ts +5 -0
- package/utils/connection.js +28 -0
- package/utils/date.d.ts +18 -0
- package/utils/date.js +40 -0
- package/utils/instance.d.ts +5 -0
- package/utils/instance.js +11 -0
- package/utils/numbers.d.ts +1 -0
- package/utils/{strings.ts → numbers.js} +4 -5
- package/utils/react.d.ts +5 -0
- package/utils/react.js +8 -0
- package/utils/snapshot.d.ts +5 -0
- package/utils/snapshot.js +6 -0
- package/utils/strings.d.ts +1 -0
- package/utils/strings.js +10 -0
- package/utils/units.d.ts +5 -0
- package/utils/units.js +15 -0
- package/.gitlab-ci.yml +0 -60
- package/components/AlertSnackbar/index.tsx +0 -23
- package/components/AlertSnackbar/useAlertSnackbar.tsx +0 -65
- package/components/Button/index.tsx +0 -79
- package/components/Button2/index.tsx +0 -43
- package/components/DestroyCloneModal/index.tsx +0 -56
- package/components/DestroyCloneRestrictionModal/index.tsx +0 -50
- package/components/ErrorStub/index.tsx +0 -83
- package/components/FormattedText/index.tsx +0 -44
- package/components/GatewayLink/index.tsx +0 -33
- package/components/HorizontalScrollContainer/index.tsx +0 -131
- package/components/ImportantText/index.tsx +0 -29
- package/components/Link2/index.tsx +0 -31
- package/components/MenuButton/index.tsx +0 -80
- package/components/Modal/index.tsx +0 -93
- package/components/ResetCloneModal/index.tsx +0 -154
- package/components/SectionTitle/index.tsx +0 -74
- package/components/Select/index.tsx +0 -42
- package/components/SimpleModalControls/index.tsx +0 -56
- package/components/Spinner/icon.tsx +0 -29
- package/components/Spinner/index.tsx +0 -16
- package/components/Status/index.tsx +0 -61
- package/components/StubContainer/index.tsx +0 -41
- package/components/StubSpinner/index.tsx +0 -49
- package/components/StubSpinnerFlex/index.tsx +0 -20
- package/components/SyntaxHighlight/index.tsx +0 -107
- package/components/Table/RowMenu/index.tsx +0 -111
- package/components/Table/index.tsx +0 -140
- package/components/TextField/index.tsx +0 -117
- package/components/Tooltip/index.tsx +0 -52
- package/config/index.ts +0 -32
- package/config/links.ts +0 -6
- package/craco.config.js +0 -80
- package/helpers/getEntropy.ts +0 -232
- package/helpers/localStorage.ts +0 -15
- package/helpers/request.ts +0 -47
- package/hooks/useWindowDimensions.ts +0 -16
- package/icons/ArrowDropDown/index.tsx +0 -29
- package/icons/Circle/index.tsx +0 -27
- package/icons/External/index.tsx +0 -14
- package/icons/Info/index.tsx +0 -12
- package/icons/Renewable/index.tsx +0 -65
- package/icons/Shield/index.tsx +0 -33
- package/icons/Warning/index.tsx +0 -29
- package/pages/Clone/Status/index.tsx +0 -73
- package/pages/Clone/context.ts +0 -22
- package/pages/Clone/index.tsx +0 -634
- package/pages/Clone/stores/Main.ts +0 -206
- package/pages/Clone/useCreatedStores.ts +0 -11
- package/pages/Configuration/Header/index.tsx +0 -84
- package/pages/Configuration/InputWithTooltip/index.tsx +0 -240
- package/pages/Configuration/ResponseMessage/index.tsx +0 -71
- package/pages/Configuration/configOptions.ts +0 -60
- package/pages/Configuration/index.tsx +0 -1184
- package/pages/Configuration/tooltipText.tsx +0 -157
- package/pages/Configuration/useForm.ts +0 -108
- package/pages/Configuration/utils/index.ts +0 -153
- package/pages/CreateClone/index.tsx +0 -311
- package/pages/CreateClone/stores/Main.ts +0 -107
- package/pages/CreateClone/useCreatedStores.ts +0 -11
- package/pages/CreateClone/useForm.ts +0 -36
- package/pages/Instance/Clones/Header/Item/index.tsx +0 -15
- package/pages/Instance/Clones/Header/index.tsx +0 -74
- package/pages/Instance/Clones/index.tsx +0 -135
- package/pages/Instance/ClonesModal/index.tsx +0 -71
- package/pages/Instance/InactiveInstance/index.tsx +0 -165
- package/pages/Instance/InactiveInstance/utils.ts +0 -9
- package/pages/Instance/Info/Connection/ConnectModal/Content/index.tsx +0 -176
- package/pages/Instance/Info/Connection/ConnectModal/Content/utils.ts +0 -24
- package/pages/Instance/Info/Connection/ConnectModal/index.tsx +0 -36
- package/pages/Instance/Info/Connection/index.tsx +0 -81
- package/pages/Instance/Info/Details/index.tsx +0 -20
- package/pages/Instance/Info/Disks/Disk/ActionsMenu/index.tsx +0 -100
- package/pages/Instance/Info/Disks/Disk/Marker/index.tsx +0 -26
- package/pages/Instance/Info/Disks/Disk/ProgressBar/PointerIcon.tsx +0 -20
- package/pages/Instance/Info/Disks/Disk/ProgressBar/index.tsx +0 -73
- package/pages/Instance/Info/Disks/Disk/Status/index.tsx +0 -75
- package/pages/Instance/Info/Disks/Disk/index.tsx +0 -168
- package/pages/Instance/Info/Disks/index.tsx +0 -65
- package/pages/Instance/Info/Icons/index.tsx +0 -39
- package/pages/Instance/Info/Retrieval/RefreshFailedAlert/index.tsx +0 -32
- package/pages/Instance/Info/Retrieval/RetrievalModal/index.tsx +0 -49
- package/pages/Instance/Info/Retrieval/RetrievalTable/index.tsx +0 -53
- package/pages/Instance/Info/Retrieval/index.tsx +0 -95
- package/pages/Instance/Info/Retrieval/utils.ts +0 -10
- package/pages/Instance/Info/Snapshots/Calendar/Day/index.tsx +0 -125
- package/pages/Instance/Info/Snapshots/Calendar/index.tsx +0 -133
- package/pages/Instance/Info/Snapshots/Calendar/utils.ts +0 -74
- package/pages/Instance/Info/Snapshots/TimeLine/Day/index.tsx +0 -79
- package/pages/Instance/Info/Snapshots/TimeLine/index.tsx +0 -57
- package/pages/Instance/Info/Snapshots/index.tsx +0 -97
- package/pages/Instance/Info/Snapshots/utils.ts +0 -18
- package/pages/Instance/Info/Status/InstanceResponseModal/index.tsx +0 -32
- package/pages/Instance/Info/Status/index.tsx +0 -85
- package/pages/Instance/Info/Status/utils.ts +0 -24
- package/pages/Instance/Info/components/Property/index.tsx +0 -32
- package/pages/Instance/Info/components/Section/index.tsx +0 -50
- package/pages/Instance/Info/components/ValueStatus/index.tsx +0 -51
- package/pages/Instance/Info/index.tsx +0 -129
- package/pages/Instance/SnapshotsModal/index.tsx +0 -169
- package/pages/Instance/SnapshotsModal/utils.ts +0 -17
- package/pages/Instance/Tabs/index.tsx +0 -98
- package/pages/Instance/components/ClonesList/ConnectionModal/index.tsx +0 -196
- package/pages/Instance/components/ClonesList/MenuCell/index.tsx +0 -98
- package/pages/Instance/components/ClonesList/MenuCell/utils.ts +0 -21
- package/pages/Instance/components/ClonesList/index.tsx +0 -189
- package/pages/Instance/components/ErrorStub/index.tsx +0 -77
- package/pages/Instance/components/ModalReloadButton/index.tsx +0 -43
- package/pages/Instance/components/Tags/Tag/index.tsx +0 -60
- package/pages/Instance/components/Tags/index.tsx +0 -42
- package/pages/Instance/context.ts +0 -39
- package/pages/Instance/index.tsx +0 -235
- package/pages/Instance/stores/ClonesModal.ts +0 -35
- package/pages/Instance/stores/Main.ts +0 -335
- package/pages/Instance/stores/SnapshotsModal.ts +0 -35
- package/pages/Instance/useCreatedStores.ts +0 -14
- package/pages/Logs/Icons/PlusIcon.tsx +0 -8
- package/pages/Logs/constants/index.ts +0 -7
- package/pages/Logs/hooks/useWsScroll.tsx +0 -44
- package/pages/Logs/index.tsx +0 -267
- package/pages/Logs/utils/index.ts +0 -20
- package/pages/Logs/wsLogs.ts +0 -110
- package/pages/Logs/wsSnackbar.ts +0 -27
- package/postgres.ai-shared-3.5.0.tgz +0 -0
- package/scripts/copy-assets.js +0 -30
- package/scripts/pack.js +0 -70
- package/stores/Snapshots.ts +0 -54
- package/styles/colors.ts +0 -67
- package/styles/icons.tsx +0 -1917
- package/styles/styles.ts +0 -87
- package/styles/theme.ts +0 -53
- package/types/api/endpoints/createClone.ts +0 -10
- package/types/api/endpoints/destroyClone.ts +0 -7
- package/types/api/endpoints/getClone.ts +0 -6
- package/types/api/endpoints/getConfig.ts +0 -6
- package/types/api/endpoints/getEngine.ts +0 -13
- package/types/api/endpoints/getFullConfig.ts +0 -4
- package/types/api/endpoints/getInstance.ts +0 -6
- package/types/api/endpoints/getInstanceRetrieval.ts +0 -6
- package/types/api/endpoints/getSeImages.ts +0 -22
- package/types/api/endpoints/getSnapshots.ts +0 -6
- package/types/api/endpoints/getWSToken.ts +0 -6
- package/types/api/endpoints/initWS.ts +0 -1
- package/types/api/endpoints/refreshInstance.ts +0 -4
- package/types/api/endpoints/resetClone.ts +0 -8
- package/types/api/endpoints/testDbSource.ts +0 -48
- package/types/api/endpoints/updateClone.ts +0 -10
- package/types/api/endpoints/updateConfig.ts +0 -6
- package/types/api/entities/clone.ts +0 -42
- package/types/api/entities/config.ts +0 -114
- package/types/api/entities/dbSource.ts +0 -13
- package/types/api/entities/instance.ts +0 -67
- package/types/api/entities/instanceRetrieval.ts +0 -46
- package/types/api/entities/instanceState.ts +0 -102
- package/types/api/entities/pool.ts +0 -27
- package/types/api/entities/snapshot.ts +0 -18
- package/types/api/entities/wsToken.ts +0 -7
- package/types/byte-size/index.d.ts +0 -22
- package/utils/api.ts +0 -30
- package/utils/clone.ts +0 -31
- package/utils/connection.ts +0 -38
- package/utils/date.ts +0 -87
- package/utils/instance.ts +0 -10
- package/utils/react.ts +0 -10
- package/utils/snapshot.ts +0 -4
- package/utils/units.ts +0 -23
- /package/pages/{Configuration → Instance/Configuration}/styles.module.scss +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TextField as TextFieldBase, makeStyles, } from '@material-ui/core';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
const useStyles = makeStyles({
|
|
5
|
+
root: {
|
|
6
|
+
fontSize: '14px',
|
|
7
|
+
},
|
|
8
|
+
selectIcon: {
|
|
9
|
+
fontSize: '24px',
|
|
10
|
+
},
|
|
11
|
+
inputRoot: {
|
|
12
|
+
padding: 0,
|
|
13
|
+
},
|
|
14
|
+
input: {
|
|
15
|
+
padding: '8px',
|
|
16
|
+
},
|
|
17
|
+
helperText: {
|
|
18
|
+
fontSize: 12
|
|
19
|
+
}
|
|
20
|
+
}, { index: 1 });
|
|
21
|
+
export const TextField = (props) => {
|
|
22
|
+
var _a;
|
|
23
|
+
const classes = useStyles();
|
|
24
|
+
return (_jsx(TextFieldBase, { onKeyDown: props.onKeyDown, autoFocus: props.autoFocus, id: props.id, multiline: props.multiline, label: props.label, variant: "outlined", disabled: props.disabled, className: clsx(classes.root, props.className), defaultValue: props.defaultValue, value: props.value, margin: "normal", fullWidth: props.fullWidth, classes: {}, InputProps: {
|
|
25
|
+
...props.InputProps,
|
|
26
|
+
classes: {
|
|
27
|
+
root: classes.inputRoot,
|
|
28
|
+
input: classes.input,
|
|
29
|
+
...(_a = props.InputProps) === null || _a === void 0 ? void 0 : _a.classes,
|
|
30
|
+
},
|
|
31
|
+
}, SelectProps: {
|
|
32
|
+
classes: {
|
|
33
|
+
icon: classes.selectIcon,
|
|
34
|
+
},
|
|
35
|
+
}, InputLabelProps: {
|
|
36
|
+
shrink: true,
|
|
37
|
+
...props.InputLabelProps,
|
|
38
|
+
}, FormHelperTextProps: {
|
|
39
|
+
classes: {
|
|
40
|
+
root: classes.helperText
|
|
41
|
+
}
|
|
42
|
+
}, onChange: props.onChange, children: props.children, select: props.select, type: props.type, error: props.error, placeholder: props.placeholder, onBlur: props.onBlur, onFocus: props.onFocus, name: props.name, helperText: props.helperText }));
|
|
43
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TooltipProps } from '@material-ui/core';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
children: JSX.Element;
|
|
5
|
+
content: string | JSX.Element;
|
|
6
|
+
disableTouchListener?: boolean;
|
|
7
|
+
placement?: TooltipProps['placement'];
|
|
8
|
+
interactive?: TooltipProps['interactive'];
|
|
9
|
+
enterTouchDelay?: TooltipProps['enterTouchDelay'];
|
|
10
|
+
};
|
|
11
|
+
export declare const Tooltip: (props: Props) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*--------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) 2019-2021, Postgres.ai, Nikolay Samokhvalov nik@postgres.ai
|
|
4
|
+
* All Rights Reserved. Proprietary and confidential.
|
|
5
|
+
* Unauthorized copying of this file, via any medium is strictly prohibited
|
|
6
|
+
*--------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Tooltip as TooltipBase, makeStyles, } from '@material-ui/core';
|
|
9
|
+
const useStyles = makeStyles({
|
|
10
|
+
tooltip: {
|
|
11
|
+
fontSize: '10px',
|
|
12
|
+
padding: '4px 8px',
|
|
13
|
+
},
|
|
14
|
+
}, { index: 1 });
|
|
15
|
+
export const Tooltip = (props) => {
|
|
16
|
+
const { content, placement = 'top', enterTouchDelay = 0, ...otherProps } = props;
|
|
17
|
+
const classes = useStyles();
|
|
18
|
+
return (_jsx(TooltipBase, { ...otherProps, enterTouchDelay: enterTouchDelay, placement: placement, title: content, classes: { tooltip: classes.tooltip } }));
|
|
19
|
+
};
|
package/config/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { enUS } from 'date-fns/locale';
|
|
2
|
+
import { getUserLocale } from 'get-user-locale';
|
|
3
|
+
export const config = {
|
|
4
|
+
dateFnsLocale: enUS,
|
|
5
|
+
appName: 'Postgres.ai',
|
|
6
|
+
};
|
|
7
|
+
const loadDateFnsLocale = async () => {
|
|
8
|
+
const userLocale = getUserLocale();
|
|
9
|
+
// We are already using this locale.
|
|
10
|
+
if (userLocale === config.dateFnsLocale.code)
|
|
11
|
+
return;
|
|
12
|
+
try {
|
|
13
|
+
const locale = await import(`date-fns/locale/${userLocale}`);
|
|
14
|
+
config.dateFnsLocale = locale.default;
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
// Unavailable locale.
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export const initConfig = async () => {
|
|
22
|
+
await loadDateFnsLocale();
|
|
23
|
+
};
|
package/config/links.js
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
const replaceChars = '!@$&*';
|
|
2
|
+
const sepChars = '_-., ';
|
|
3
|
+
const otherSpecialChars = '“#%"()+/:;<=>?[\\]^{|}~';
|
|
4
|
+
const lowerChars = 'abcdefghijklmnopqrstuvwxyz';
|
|
5
|
+
const upperChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
6
|
+
const digitsChars = '0123456789';
|
|
7
|
+
export const MIN_ENTROPY = 60;
|
|
8
|
+
function getBase(password) {
|
|
9
|
+
let uniqueChars = [];
|
|
10
|
+
for (const c of password) {
|
|
11
|
+
if (!uniqueChars.includes(c)) {
|
|
12
|
+
uniqueChars.push(c);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
let hasReplace = false;
|
|
16
|
+
let hasSep = false;
|
|
17
|
+
let hasOtherSpecial = false;
|
|
18
|
+
let hasLower = false;
|
|
19
|
+
let hasUpper = false;
|
|
20
|
+
let hasDigits = false;
|
|
21
|
+
let base = 0;
|
|
22
|
+
for (let i = 0; i < uniqueChars.length; i++) {
|
|
23
|
+
switch (true) {
|
|
24
|
+
case replaceChars.includes(uniqueChars[i]):
|
|
25
|
+
hasReplace = true;
|
|
26
|
+
break;
|
|
27
|
+
case sepChars.includes(uniqueChars[i]):
|
|
28
|
+
hasSep = true;
|
|
29
|
+
break;
|
|
30
|
+
case otherSpecialChars.includes(uniqueChars[i]):
|
|
31
|
+
hasOtherSpecial = true;
|
|
32
|
+
break;
|
|
33
|
+
case lowerChars.includes(uniqueChars[i]):
|
|
34
|
+
hasLower = true;
|
|
35
|
+
break;
|
|
36
|
+
case upperChars.includes(uniqueChars[i]):
|
|
37
|
+
hasUpper = true;
|
|
38
|
+
break;
|
|
39
|
+
case digitsChars.includes(uniqueChars[i]):
|
|
40
|
+
hasDigits = true;
|
|
41
|
+
break;
|
|
42
|
+
default:
|
|
43
|
+
base++;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (hasReplace) {
|
|
48
|
+
base += replaceChars.length;
|
|
49
|
+
}
|
|
50
|
+
if (hasSep) {
|
|
51
|
+
base += sepChars.length;
|
|
52
|
+
}
|
|
53
|
+
if (hasOtherSpecial) {
|
|
54
|
+
base += otherSpecialChars.length;
|
|
55
|
+
}
|
|
56
|
+
if (hasLower) {
|
|
57
|
+
base += lowerChars.length;
|
|
58
|
+
}
|
|
59
|
+
if (hasUpper) {
|
|
60
|
+
base += upperChars.length;
|
|
61
|
+
}
|
|
62
|
+
if (hasDigits) {
|
|
63
|
+
base += digitsChars.length;
|
|
64
|
+
}
|
|
65
|
+
return base;
|
|
66
|
+
}
|
|
67
|
+
const seqNums = '0123456789';
|
|
68
|
+
const seqKeyboard0 = 'qwertyuiop';
|
|
69
|
+
const seqKeyboard1 = 'asdfghjkl';
|
|
70
|
+
const seqKeyboard2 = 'zxcvbnm';
|
|
71
|
+
const seqAlphabet = 'abcdefghijklmnopqrstuvwxyz';
|
|
72
|
+
function removeMoreThanTwoFromSequence(s, seq) {
|
|
73
|
+
const seqRunes = Array.from(seq);
|
|
74
|
+
let runes = Array.from(s);
|
|
75
|
+
let matches = 0;
|
|
76
|
+
for (let i = 0; i < runes.length; i++) {
|
|
77
|
+
for (let j = 0; j < seqRunes.length; j++) {
|
|
78
|
+
if (i >= runes.length) {
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
const r = runes[i];
|
|
82
|
+
const r2 = seqRunes[j];
|
|
83
|
+
if (r !== r2) {
|
|
84
|
+
matches = 0;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
// found a match, advance the counter
|
|
88
|
+
matches++;
|
|
89
|
+
if (matches > 2) {
|
|
90
|
+
runes.splice(i, 1);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
i++;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return runes.join('');
|
|
98
|
+
}
|
|
99
|
+
function getReversedString(s) {
|
|
100
|
+
const rune = Array.from(s);
|
|
101
|
+
const n = rune.length;
|
|
102
|
+
for (let i = 0; i < Math.floor(n / 2); i++) {
|
|
103
|
+
;
|
|
104
|
+
[rune[i], rune[n - 1 - i]] = [rune[n - 1 - i], rune[i]];
|
|
105
|
+
}
|
|
106
|
+
return rune.join('');
|
|
107
|
+
}
|
|
108
|
+
function removeMoreThanTwoRepeatingChars(s) {
|
|
109
|
+
let prevPrev = '';
|
|
110
|
+
let prev = '';
|
|
111
|
+
const runes = Array.from(s);
|
|
112
|
+
for (let i = 0; i < runes.length; i++) {
|
|
113
|
+
const r = runes[i];
|
|
114
|
+
if (r === prev && r === prevPrev) {
|
|
115
|
+
runes.splice(i, 1);
|
|
116
|
+
i--;
|
|
117
|
+
}
|
|
118
|
+
prevPrev = prev;
|
|
119
|
+
prev = r;
|
|
120
|
+
}
|
|
121
|
+
return runes.join('');
|
|
122
|
+
}
|
|
123
|
+
function getLength(password) {
|
|
124
|
+
password = removeMoreThanTwoRepeatingChars(password);
|
|
125
|
+
password = removeMoreThanTwoFromSequence(password, seqNums);
|
|
126
|
+
password = removeMoreThanTwoFromSequence(password, seqKeyboard0);
|
|
127
|
+
password = removeMoreThanTwoFromSequence(password, seqKeyboard1);
|
|
128
|
+
password = removeMoreThanTwoFromSequence(password, seqKeyboard2);
|
|
129
|
+
password = removeMoreThanTwoFromSequence(password, seqAlphabet);
|
|
130
|
+
password = removeMoreThanTwoFromSequence(password, getReversedString(seqNums));
|
|
131
|
+
password = removeMoreThanTwoFromSequence(password, getReversedString(seqKeyboard0));
|
|
132
|
+
password = removeMoreThanTwoFromSequence(password, getReversedString(seqKeyboard1));
|
|
133
|
+
password = removeMoreThanTwoFromSequence(password, getReversedString(seqKeyboard2));
|
|
134
|
+
password = removeMoreThanTwoFromSequence(password, getReversedString(seqAlphabet));
|
|
135
|
+
return password.length;
|
|
136
|
+
}
|
|
137
|
+
export function getEntropy(password) {
|
|
138
|
+
return getEntropyInternal(password);
|
|
139
|
+
}
|
|
140
|
+
function getEntropyInternal(password) {
|
|
141
|
+
const base = getBase(password);
|
|
142
|
+
const length = getLength(password);
|
|
143
|
+
// calculate log2(base^length)
|
|
144
|
+
return logPow(base, length, 2);
|
|
145
|
+
}
|
|
146
|
+
function logX(base, n) {
|
|
147
|
+
if (base == 0) {
|
|
148
|
+
return 0;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
return Math.log2(n) / Math.log2(base);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function logPow(expBase, pow, logBase) {
|
|
155
|
+
let total = 0;
|
|
156
|
+
for (let i = 0; i < pow; i++) {
|
|
157
|
+
total += logX(logBase, expBase);
|
|
158
|
+
}
|
|
159
|
+
return total;
|
|
160
|
+
}
|
|
161
|
+
export function validatePassword(password, minEntropy) {
|
|
162
|
+
const entropy = getEntropy(password);
|
|
163
|
+
if (entropy >= minEntropy) {
|
|
164
|
+
return '';
|
|
165
|
+
}
|
|
166
|
+
let hasReplace = false;
|
|
167
|
+
let hasSep = false;
|
|
168
|
+
let hasOtherSpecial = false;
|
|
169
|
+
let hasLower = false;
|
|
170
|
+
let hasUpper = false;
|
|
171
|
+
let hasDigits = false;
|
|
172
|
+
for (const c of password) {
|
|
173
|
+
switch (true) {
|
|
174
|
+
case replaceChars.includes(c):
|
|
175
|
+
hasReplace = true;
|
|
176
|
+
break;
|
|
177
|
+
case sepChars.includes(c):
|
|
178
|
+
hasSep = true;
|
|
179
|
+
break;
|
|
180
|
+
case otherSpecialChars.includes(c):
|
|
181
|
+
hasOtherSpecial = true;
|
|
182
|
+
break;
|
|
183
|
+
case lowerChars.includes(c):
|
|
184
|
+
hasLower = true;
|
|
185
|
+
break;
|
|
186
|
+
case upperChars.includes(c):
|
|
187
|
+
hasUpper = true;
|
|
188
|
+
break;
|
|
189
|
+
case digitsChars.includes(c):
|
|
190
|
+
hasDigits = true;
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
const allMessages = [];
|
|
195
|
+
if (!hasOtherSpecial || !hasSep || !hasReplace) {
|
|
196
|
+
allMessages.push('including more special characters');
|
|
197
|
+
}
|
|
198
|
+
if (!hasLower) {
|
|
199
|
+
allMessages.push('using lowercase letters');
|
|
200
|
+
}
|
|
201
|
+
if (!hasUpper) {
|
|
202
|
+
allMessages.push('using uppercase letters');
|
|
203
|
+
}
|
|
204
|
+
if (!hasDigits) {
|
|
205
|
+
allMessages.push('using numbers');
|
|
206
|
+
}
|
|
207
|
+
if (allMessages.length > 0) {
|
|
208
|
+
const errorMessage = `Weak password, try ${allMessages.join(', ')} or using a longer password`;
|
|
209
|
+
return errorMessage;
|
|
210
|
+
}
|
|
211
|
+
return 'Weak password, try using a longer password';
|
|
212
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const keys = {
|
|
2
|
+
// Keep this name.
|
|
3
|
+
authToken: 'token',
|
|
4
|
+
};
|
|
5
|
+
export class LocalStorage {
|
|
6
|
+
constructor() {
|
|
7
|
+
// Auth token.
|
|
8
|
+
this.getAuthToken = () => window.localStorage.getItem(keys.authToken);
|
|
9
|
+
this.setAuthToken = (value) => window.localStorage.setItem(keys.authToken, value);
|
|
10
|
+
this.removeAuthToken = () => window.localStorage.removeItem(keys.authToken);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export const localStorage = new LocalStorage();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import 'whatwg-fetch';
|
|
2
|
+
declare type RequestParams = Record<string, unknown>;
|
|
3
|
+
export declare type RequestOptions = RequestInit & {
|
|
4
|
+
params?: RequestParams;
|
|
5
|
+
};
|
|
6
|
+
export declare const request: (path: string, options?: RequestOptions) => Promise<Response>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import 'whatwg-fetch';
|
|
2
|
+
const serializeParams = (params) => {
|
|
3
|
+
if (!params)
|
|
4
|
+
return null;
|
|
5
|
+
const searchParams = new URLSearchParams();
|
|
6
|
+
Object.entries(params).map((param) => {
|
|
7
|
+
const [key, value] = param;
|
|
8
|
+
searchParams.append(key, String(value));
|
|
9
|
+
});
|
|
10
|
+
return searchParams.toString();
|
|
11
|
+
};
|
|
12
|
+
const createUrl = (path, params) => {
|
|
13
|
+
const serializedParams = serializeParams(params);
|
|
14
|
+
const queryString = serializedParams ? `?${serializedParams}` : '';
|
|
15
|
+
return `${path}${queryString}`;
|
|
16
|
+
};
|
|
17
|
+
export const request = async (path, options) => {
|
|
18
|
+
const { params = null, ...requestInit } = options !== null && options !== void 0 ? options : {};
|
|
19
|
+
const url = createUrl(path, params);
|
|
20
|
+
try {
|
|
21
|
+
return await window.fetch(url, {
|
|
22
|
+
...requestInit,
|
|
23
|
+
headers: {
|
|
24
|
+
'Content-Type': 'application/json',
|
|
25
|
+
...requestInit === null || requestInit === void 0 ? void 0 : requestInit.headers,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
return new Response(null, {
|
|
31
|
+
status: 500,
|
|
32
|
+
statusText: `Unknown error`,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useWindowDimensions: () => number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
export const useWindowDimensions = () => {
|
|
3
|
+
const [windowDimensions, setWindowDimensions] = useState(window.innerWidth);
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
const handleResize = () => {
|
|
6
|
+
setWindowDimensions(window.innerWidth);
|
|
7
|
+
};
|
|
8
|
+
window.addEventListener('resize', handleResize);
|
|
9
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
10
|
+
}, []);
|
|
11
|
+
return windowDimensions;
|
|
12
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const ArrowDropDownIcon = (props) => {
|
|
3
|
+
return (_jsx("svg", { className: props.className, viewBox: "0 0 8 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", onClick: props.onClick, children: _jsx("path", {
|
|
4
|
+
// eslint-disable-next-line max-len
|
|
5
|
+
d: "M7.8515 0.898419C7.75261 0.799446 7.63538 0.75 7.49994 0.75H0.500038C0.364534 0.75 0.247392 0.799446 0.148419 0.898419C0.0494455 0.997501 0 1.11464 0 1.25006C0 1.38546 0.0494455 1.5026 0.148419 1.6016L3.64838 5.10156C3.74746 5.20054 3.86461 5.25009 4 5.25009C4.13539 5.25009 4.25265 5.20054 4.35154 5.10156L7.8515 1.60157C7.95036 1.5026 8 1.38546 8 1.25004C8 1.11464 7.95036 0.997501 7.8515 0.898419Z", fill: "currentColor" }) }));
|
|
6
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const CircleIcon = (props) => {
|
|
3
|
+
const { className } = props;
|
|
4
|
+
return (_jsx("svg", { className: className, viewBox: "0 0 10 10", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: _jsx("circle", { cx: "5", cy: "5", r: "5", fill: "currentColor" }) }));
|
|
5
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const ExternalIcon = ({ className }) => (_jsx("svg", { width: "24px", height: "24px", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", className: className, children: _jsx("path", { fill: "#551A8B", d: "M18,10.82a1,1,0,0,0-1,1V19a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V8A1,1,0,0,1,5,7h7.18a1,1,0,0,0,0-2H5A3,3,0,0,0,2,8V19a3,3,0,0,0,3,3H16a3,3,0,0,0,3-3V11.82A1,1,0,0,0,18,10.82Zm3.92-8.2a1,1,0,0,0-.54-.54A1,1,0,0,0,21,2H15a1,1,0,0,0,0,2h3.59L8.29,14.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L20,5.41V9a1,1,0,0,0,2,0V3A1,1,0,0,0,21.92,2.62Z" }) }));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const InfoIcon = ({ className }) => (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 12", className: className, children: _jsxs("g", { fill: "currentColor", fillRule: "nonzero", children: [_jsx("path", { d: "M6 0C2.692 0 0 2.692 0 6s2.692 6 6 6 6-2.692 6-6-2.692-6-6-6Zm0 10.91A4.915 4.915 0 0 1 1.09 6 4.915 4.915 0 0 1 6 1.09 4.915 4.915 0 0 1 10.91 6 4.915 4.915 0 0 1 6 10.91Z" }), _jsx("path", { d: "M6 2.545A.728.728 0 0 0 6 4a.728.728 0 0 0 0-1.455ZM6 5.09a.545.545 0 0 0-.545.546V8.91a.545.545 0 0 0 1.09 0V5.636A.545.545 0 0 0 6 5.091Z" })] }) }));
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const PostgresSQLIcon = () => (_jsxs("svg", { className: "postgres-logo", width: "432.071pt", height: "445.383pt", viewBox: "0 0 432.071 445.383", xmlSpace: "preserve", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("g", { id: "orginal", style: {
|
|
3
|
+
fillRule: 'nonzero',
|
|
4
|
+
clipRule: 'nonzero',
|
|
5
|
+
stroke: '#000000',
|
|
6
|
+
strokeMiterlimit: 4,
|
|
7
|
+
} }), _jsxs("g", { id: "Layer_x0020_3", style: {
|
|
8
|
+
fillRule: 'nonzero',
|
|
9
|
+
clipRule: 'nonzero',
|
|
10
|
+
stroke: '#FFFFFF',
|
|
11
|
+
strokeWidth: 12.4651,
|
|
12
|
+
strokeLinecap: 'round',
|
|
13
|
+
strokeLinejoin: 'round',
|
|
14
|
+
strokeMiterlimit: 4,
|
|
15
|
+
}, children: [_jsx("path", { style: {
|
|
16
|
+
fill: '#000000',
|
|
17
|
+
stroke: '#000000',
|
|
18
|
+
strokeWidth: 37.3953,
|
|
19
|
+
strokeLinecap: 'butt',
|
|
20
|
+
strokeLinejoin: 'miter',
|
|
21
|
+
strokeMiterlimit: 4,
|
|
22
|
+
}, d: "M323.205,324.227c2.833-23.601,1.984-27.062,19.563-23.239l4.463,0.392c13.517,0.615,31.199-2.174,41.587-7c22.362-10.376,35.622-27.7,13.572-23.148c-50.297,10.376-53.755-6.655-53.755-6.655c53.111-78.803,75.313-178.836,56.149-203.322 C352.514-5.534,262.036,26.049,260.522,26.869l-0.482,0.089c-9.938-2.062-21.06-3.294-33.554-3.496c-22.761-0.374-40.032,5.967-53.133,15.904c0,0-161.408-66.498-153.899,83.628c1.597,31.936,45.777,241.655,98.47,178.31 c19.259-23.163,37.871-42.748,37.871-42.748c9.242,6.14,20.307,9.272,31.912,8.147l0.897-0.765c-0.281,2.876-0.157,5.689,0.359,9.019c-13.572,15.167-9.584,17.83-36.723,23.416c-27.457,5.659-11.326,15.734-0.797,18.367c12.768,3.193,42.305,7.716,62.268-20.224 l-0.795,3.188c5.325,4.26,4.965,30.619,5.72,49.452c0.756,18.834,2.017,36.409,5.856,46.771c3.839,10.36,8.369,37.05,44.036,29.406c29.809-6.388,52.6-15.582,54.677-101.107" }), _jsx("path", { style: {
|
|
23
|
+
fill: '#336791',
|
|
24
|
+
stroke: 'none',
|
|
25
|
+
}, d: "M402.395,271.23c-50.302,10.376-53.76-6.655-53.76-6.655c53.111-78.808,75.313-178.843,56.153-203.326c-52.27-66.785-142.752-35.2-144.262-34.38l-0.486,0.087c-9.938-2.063-21.06-3.292-33.56-3.496c-22.761-0.373-40.026,5.967-53.127,15.902 c0,0-161.411-66.495-153.904,83.63c1.597,31.938,45.776,241.657,98.471,178.312c19.26-23.163,37.869-42.748,37.869-42.748c9.243,6.14,20.308,9.272,31.908,8.147l0.901-0.765c-0.28,2.876-0.152,5.689,0.361,9.019c-13.575,15.167-9.586,17.83-36.723,23.416 c-27.459,5.659-11.328,15.734-0.796,18.367c12.768,3.193,42.307,7.716,62.266-20.224l-0.796,3.188c5.319,4.26,9.054,27.711,8.428,48.969c-0.626,21.259-1.044,35.854,3.147,47.254c4.191,11.4,8.368,37.05,44.042,29.406c29.809-6.388,45.256-22.942,47.405-50.555 c1.525-19.631,4.976-16.729,5.194-34.28l2.768-8.309c3.192-26.611,0.507-35.196,18.872-31.203l4.463,0.392c13.517,0.615,31.208-2.174,41.591-7c22.358-10.376,35.618-27.7,13.573-23.148z" }), _jsx("path", { d: "M215.866,286.484c-1.385,49.516,0.348,99.377,5.193,111.495c4.848,12.118,15.223,35.688,50.9,28.045c29.806-6.39,40.651-18.756,45.357-46.051c3.466-20.082,10.148-75.854,11.005-87.281" }), _jsx("path", { d: "M173.104,38.256c0,0-161.521-66.016-154.012,84.109c1.597,31.938,45.779,241.664,98.473,178.316c19.256-23.166,36.671-41.335,36.671-41.335" }), _jsx("path", { d: "M260.349,26.207c-5.591,1.753,89.848-34.889,144.087,34.417c19.159,24.484-3.043,124.519-56.153,203.329" }), _jsx("path", { style: {
|
|
26
|
+
strokeLinejoin: 'bevel',
|
|
27
|
+
}, d: "M348.282,263.953c0,0,3.461,17.036,53.764,6.653c22.04-4.552,8.776,12.774-13.577,23.155c-18.345,8.514-59.474,10.696-60.146-1.069c-1.729-30.355,21.647-21.133,19.96-28.739c-1.525-6.85-11.979-13.573-18.894-30.338 c-6.037-14.633-82.796-126.849,21.287-110.183c3.813-0.789-27.146-99.002-124.553-100.599c-97.385-1.597-94.19,119.762-94.19,119.762" }), _jsx("path", { d: "M188.604,274.334c-13.577,15.166-9.584,17.829-36.723,23.417c-27.459,5.66-11.326,15.733-0.797,18.365c12.768,3.195,42.307,7.718,62.266-20.229c6.078-8.509-0.036-22.086-8.385-25.547c-4.034-1.671-9.428-3.765-16.361,3.994z" }), _jsx("path", { d: "M187.715,274.069c-1.368-8.917,2.93-19.528,7.536-31.942c6.922-18.626,22.893-37.255,10.117-96.339c-9.523-44.029-73.396-9.163-73.436-3.193c-0.039,5.968,2.889,30.26-1.067,58.548c-5.162,36.913,23.488,68.132,56.479,64.938" }), _jsx("path", { style: {
|
|
28
|
+
fill: '#FFFFFF',
|
|
29
|
+
stroke: '#FFFFFF',
|
|
30
|
+
strokeWidth: 4.155,
|
|
31
|
+
strokeLinecap: 'butt',
|
|
32
|
+
strokeLinejoin: 'miter',
|
|
33
|
+
}, d: "M172.517,141.7c-0.288,2.039,3.733,7.48,8.976,8.207c5.234,0.73,9.714-3.522,9.998-5.559c0.284-2.039-3.732-4.285-8.977-5.015c-5.237-0.731-9.719,0.333-9.996,2.367z" }), _jsx("path", { style: {
|
|
34
|
+
fill: '#FFFFFF',
|
|
35
|
+
strokeWidth: 2.0775,
|
|
36
|
+
strokeLinecap: 'butt',
|
|
37
|
+
strokeLinejoin: 'miter',
|
|
38
|
+
}, d: "M331.941,137.543c0.284,2.039-3.732,7.48-8.976,8.207c-5.238,0.73-9.718-3.522-10.005-5.559c-0.277-2.039,3.74-4.285,8.979-5.015c5.239-0.73,9.718,0.333,10.002,2.368z" }), _jsx("path", { d: "M350.676,123.432c0.863,15.994-3.445,26.888-3.988,43.914c-0.804,24.748,11.799,53.074-7.191,81.435" }), _jsx("path", { style: {
|
|
39
|
+
strokeWidth: 3,
|
|
40
|
+
}, d: "M0,60.232" })] })] }));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*--------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) 2019-2021, Postgres.ai, Nikolay Samokhvalov nik@postgres.ai
|
|
4
|
+
* All Rights Reserved. Proprietary and confidential.
|
|
5
|
+
* Unauthorized copying of this file, via any medium is strictly prohibited
|
|
6
|
+
*--------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
export const RenewableIcon = React.forwardRef((props, ref) => {
|
|
10
|
+
const { className, ...hiddenProps } = props;
|
|
11
|
+
return (_jsxs("svg", { ...hiddenProps, ref: ref, className: className, viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.14337 0L8.19809 2.9755L4.59387 3.26718L5.16139 2.07055C4.22847 2.10806 3.3161 2.48386 2.66614 3.18795L2.20594 2.76312C3.05679 1.84141 4.26977 1.40592 5.45883 1.44339L6.14337 0Z", fill: "currentColor" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.7343 9.13905L6.12728 9.39371L7.71025 6.14261L8.45158 7.24009C8.89401 6.4179 9.03479 5.44126 8.75942 4.52346L9.35931 4.34347C9.71979 5.54495 9.47743 6.81074 8.8401 7.81527L9.7343 9.13905Z", fill: "currentColor" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 7.57495L1.61898 4.34163L3.60962 7.36037L2.28757 7.43896C2.76953 8.23862 3.53811 8.85742 4.46813 9.08819L4.3173 9.69607C3.09983 9.39397 2.13422 8.54041 1.59468 7.48015L0 7.57495Z", fill: "currentColor" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.26612 2.51078C5.07868 2.17637 3.73747 2.48899 2.89616 3.40036L1.97575 2.55072C3.17071 1.25624 5.01514 0.857134 6.60567 1.30506L6.26612 2.51078Z", fill: "currentColor" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.33938 8.11969C8.34588 7.28131 8.83847 5.87691 8.45939 4.61345L9.65917 4.25348C10.1969 6.04581 9.49312 7.95595 8.14107 9.08215L7.33938 8.11969Z", fill: "currentColor" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.07072 5.82736C2.20416 7.20026 3.19328 8.44922 4.54348 8.78425L4.24181 10C2.32911 9.5254 1.00387 7.79934 0.823976 5.94853L2.07072 5.82736Z", fill: "currentColor" })] }));
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*--------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) 2019-2021, Postgres.ai, Nikolay Samokhvalov nik@postgres.ai
|
|
4
|
+
* All Rights Reserved. Proprietary and confidential.
|
|
5
|
+
* Unauthorized copying of this file, via any medium is strictly prohibited
|
|
6
|
+
*--------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
export const ShieldIcon = React.forwardRef((props, ref) => {
|
|
10
|
+
const { className, ...hiddenProps } = props;
|
|
11
|
+
return (_jsx("svg", { ...hiddenProps, ref: ref, className: className, viewBox: "0 0 8 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M4.00195 0L0.251953 1.66667V4.16667C0.251953 6.47917 1.85195 8.64167 4.00195 9.16667C6.15195 8.64167 7.75195 6.47917 7.75195 4.16667V1.66667L4.00195 0ZM3.16862 6.66667L1.50195 5L2.08945 4.4125L3.16862 5.4875L5.91445 2.74167L6.50195 3.33333L3.16862 6.66667Z", fill: "currentColor" }) }));
|
|
12
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const WarningIcon = (props) => {
|
|
3
|
+
return (_jsx("svg", { className: props.className, viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", {
|
|
4
|
+
// eslint-disable-next-line max-len
|
|
5
|
+
d: "M9.79222 7.49885L6.2597 1.00518C5.69214 0.04969 4.30861 0.0484205 3.74029 1.00518L0.207947 7.49885C-0.372248 8.4752 0.330193 9.71157 1.46736 9.71157H8.53251C9.66873 9.71157 10.3724 8.47619 9.79222 7.49885ZM5 8.53969C4.67699 8.53969 4.41406 8.27676 4.41406 7.95375C4.41406 7.63074 4.67699 7.36782 5 7.36782C5.323 7.36782 5.58593 7.63074 5.58593 7.95375C5.58593 8.27676 5.323 8.53969 5 8.53969ZM5.58593 6.19594C5.58593 6.51895 5.323 6.78188 5 6.78188C4.67699 6.78188 4.41406 6.51895 4.41406 6.19594V3.26625C4.41406 2.94324 4.67699 2.68032 5 2.68032C5.323 2.68032 5.58593 2.94324 5.58593 3.26625V6.19594Z", fill: "currentColor" }) }));
|
|
6
|
+
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postgres.ai/shared",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
|
|
3
|
+
"version": "4.0.0-pr-1028.1",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"types": "index.d.ts",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"react": "^17.0.0 || ^18.0.0"
|
|
6
8
|
},
|
|
7
9
|
"dependencies": {
|
|
8
10
|
"@babel/core": "^7.13.0",
|
|
@@ -41,15 +43,5 @@
|
|
|
41
43
|
"typescript": "^4.8.3",
|
|
42
44
|
"use-timer": "^2.0.1",
|
|
43
45
|
"yup": "^0.32.11"
|
|
44
|
-
},
|
|
45
|
-
"peerDependencies": {
|
|
46
|
-
"react": "^17.0.0 || ^18.0.0"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"glob": "^11.0.2"
|
|
50
|
-
},
|
|
51
|
-
"scripts": {
|
|
52
|
-
"build": "tsc -p tsconfig.build.json && node scripts/copy-assets.js",
|
|
53
|
-
"pack": "node scripts/pack.js"
|
|
54
46
|
}
|
|
55
47
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Api } from './stores/Main';
|
|
3
|
+
export declare type Host = {
|
|
4
|
+
branchId: string;
|
|
5
|
+
instanceId: string;
|
|
6
|
+
routes: {
|
|
7
|
+
branch: () => string;
|
|
8
|
+
branches: () => string;
|
|
9
|
+
snapshot: (snapshotId: string) => string;
|
|
10
|
+
createClone: (branchId: string) => string;
|
|
11
|
+
};
|
|
12
|
+
api: Api;
|
|
13
|
+
elements: {
|
|
14
|
+
breadcrumbs: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const useHost: () => Host, HostProvider: import("react").Provider<Host>;
|
|
18
|
+
export declare const useStores: () => {
|
|
19
|
+
main: import("./stores/Main").MainStore;
|
|
20
|
+
}, StoresProvider: import("react").Provider<{
|
|
21
|
+
main: import("./stores/Main").MainStore;
|
|
22
|
+
}>;
|