Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: API Permissions and Collections redesign #3391

Merged
merged 161 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from 158 commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
a80b1cb
add openapi description locations
thewahome May 15, 2023
d183331
define api manifest
thewahome May 15, 2023
da834f9
generate api manifest
thewahome May 15, 2023
3c80cb7
use manifest generation
thewahome May 15, 2023
eda1220
display what to do with an api manifest
thewahome May 15, 2023
551db57
Merge branch 'dev' into feature/download-api-manifest
thewahome May 15, 2023
5a904e8
prevents default panel dismiss behaviour coz it unloads all popups
thewahome May 15, 2023
9d8cfe0
Merge branch 'feature/download-api-manifest' of https://github.com/mi…
thewahome May 15, 2023
a415c32
remove unusused imports
thewahome May 15, 2023
0118cb5
Merge branch 'dev' into feature/download-api-manifest
thewahome May 16, 2023
fc9ca3d
ensure theme is respected, methods are in pas
thewahome May 16, 2023
8c5ab0a
Merge branch 'dev' into feature/download-api-manifest
thewahome May 17, 2023
c3c984f
remove unused imports
thewahome May 17, 2023
dc16806
Merge branch 'dev' into feature/download-api-manifest
thewahome May 22, 2023
edd470f
use resource paths in manifest
thewahome May 22, 2023
4292589
Merge branch 'dev' into feature/download-api-manifest
thewahome May 23, 2023
7685e8d
update api manifest schema
thewahome May 24, 2023
4349795
Merge branch 'dev' into feature/download-api-manifest
thewahome May 25, 2023
c6b6e45
fix manifest generator
thewahome May 25, 2023
903e8d7
add translations
thewahome May 25, 2023
a45cc7c
utilise latest manifest version
thewahome May 25, 2023
4cb1388
Feature: show collection permissions (#2577)
thewahome May 25, 2023
e436a02
Merge branch 'dev' into feature/download-api-manifest
thewahome Jun 8, 2023
2aa762a
defend against api not returning empty result
thewahome Jun 12, 2023
b0066ec
Merge branch 'dev' into feature/download-api-manifest
thewahome Jun 21, 2023
e9dd4c3
fix buttons at the bottom of panel
thewahome Jun 22, 2023
fd068b2
add UX writing
thewahome Jun 22, 2023
3bee38c
make all CTA actions be primary buttons
thewahome Jun 22, 2023
2bbdf44
fix imports
thewahome Jun 22, 2023
737178c
Merge branch 'dev' into feature/download-api-manifest
thewahome Jun 26, 2023
5dcf64d
Task: Show upload collections button (#2583)
Onokaev Jul 10, 2023
922286c
Merge branch 'dev' into feature/download-api-manifest
Onokaev Jul 17, 2023
478b42e
Add button for opening manifest in vs code
Onokaev Jul 31, 2023
14ab716
Disable virtualization
Onokaev Aug 2, 2023
5497247
Merge branch 'dev' into feature/download-api-manifest
Onokaev Aug 3, 2023
7605ca8
Use only one spinner when fetching permissions
Onokaev Aug 7, 2023
6772a1a
Refactor styles
Onokaev Aug 7, 2023
e69b8e4
Merge branch 'dev' into feature/download-api-manifest
Onokaev Aug 8, 2023
df441e1
Fic code smell
Onokaev Aug 8, 2023
bb17ecc
Merge branch 'dev' into feature/download-api-manifest
Onokaev Aug 8, 2023
c830200
Merge branch 'dev' into feature/download-api-manifest
Onokaev Aug 8, 2023
a81f9d7
Add selection for scopeType
Onokaev Aug 8, 2023
b606647
Fix code smells
Onokaev Aug 9, 2023
f1877b0
Add new manifest UI
Onokaev Aug 11, 2023
296518a
Update manifest UI
Onokaev Aug 11, 2023
bba7eb5
Fix failing test
Onokaev Aug 11, 2023
73a5a9c
Merge branch 'dev' into feature/download-api-manifest
Onokaev Aug 11, 2023
a489a84
Remove unused variables
Onokaev Aug 11, 2023
bde943b
Reorder sidebar items
Onokaev Aug 11, 2023
fadd964
Make buttons styling consistent
Onokaev Aug 14, 2023
ec5b037
Add time stamp to make each download unique
Onokaev Aug 14, 2023
c4b3b2b
Merge branch 'dev' into feature/download-api-manifest
Onokaev Aug 15, 2023
34d1cd7
Add telemetry for opening manifest in vs code
Onokaev Aug 15, 2023
70c7bbb
Add new query param
Onokaev Aug 17, 2023
667abc1
Move buttons to the top
Onokaev Sep 5, 2023
5240573
Merge branch 'dev' into feature/download-api-manifest
Onokaev Sep 5, 2023
be551e9
Merge branch 'dev' into feature/download-api-manifest
Onokaev Sep 20, 2023
85cffa7
Copy to clipboard
Onokaev Sep 20, 2023
b69fa55
Copy manifest to clipboard with new URL
Onokaev Sep 21, 2023
5fe4a94
Update manifest interface
Onokaev Sep 21, 2023
8160969
Use trackedGenericCopy
Onokaev Sep 21, 2023
af10b25
Remove console statement
Onokaev Sep 21, 2023
48c52eb
Merge branch 'dev' into feature/download-api-manifest
Onokaev Oct 16, 2023
a9bd837
use former GE.json implementation
thewahome Nov 1, 2023
f4df85d
Merge branch 'dev' into feature/download-api-manifest
thewahome Nov 1, 2023
8753e98
create multiple dependencies depending on the version
thewahome Nov 1, 2023
c9adfc0
separate calls for permissions by version
thewahome Nov 1, 2023
9964551
add manifest dependency example to tests
thewahome Nov 1, 2023
c1fa2b6
show correct access values
thewahome Nov 1, 2023
233429d
interchange claims
thewahome Nov 1, 2023
bc2874f
Consolidate copy action inside the open in kiota button
thewahome Nov 2, 2023
b0c9d43
Merge branch 'dev' into feature/download-api-manifest
thewahome Nov 2, 2023
3a99bb3
Align all three buttons at the bottom
thewahome Nov 2, 2023
8a07e55
Merge branch 'dev' into feature/download-api-manifest
thewahome Nov 3, 2023
4561de9
fix undefined children
thewahome Nov 3, 2023
4a4003f
Task: scope permissions (#2867)
thewahome Nov 6, 2023
6779296
remove apiIdentifier from open in vscode url
thewahome Nov 6, 2023
27a6bfb
Add identifier if only one key exists
thewahome Nov 6, 2023
020fb25
copy raw json string to clipboard
thewahome Nov 10, 2023
a398eea
Fix: remove premature optimisation
thewahome Nov 15, 2023
e4fc7cf
Remove open in vscode button
thewahome Nov 15, 2023
cfb6ef3
Merge branch 'dev' into feature/download-api-manifest
thewahome Nov 15, 2023
730ab8b
fix linting error
thewahome Nov 15, 2023
2b537d0
Restore open in vscode button
thewahome Nov 17, 2023
f74fc3f
Preview and copy manifest
thewahome Nov 17, 2023
4239ea8
add a trailing slash in the apiDeploymentBaseUrl property
thewahome Jan 8, 2024
b3d9a4c
Merge branch 'dev' into feature/download-api-manifest
thewahome Jan 8, 2024
29e2513
make CI false for warnings not to be errors
thewahome Jan 8, 2024
6d90834
Add applicationName property to APIManifest
thewahome Jan 8, 2024
f13b085
remove CI=false
thewahome Jan 8, 2024
32aae95
Merge branch 'dev' into feature/download-api-manifest
thewahome Jan 15, 2024
ff715a8
Refactor translation messages in CollectionPermissions and ManifestDe…
thewahome Jan 15, 2024
46811ec
set CI:false in builddeploy step
thewahome Jan 16, 2024
111d8ca
Merge branch 'dev' into feature/download-api-manifest
thewahome Mar 5, 2024
4b161a7
Merge branch 'dev' into feature/download-api-manifest
thewahome Aug 12, 2024
0952b0f
fix collection permissions display
thewahome Aug 12, 2024
0cc9e17
move share button
ElinorW Sep 3, 2024
11f52d4
Merge branch 'feature/download-api-manifest' of https://github.com/mi…
ElinorW Sep 3, 2024
f94c6c0
rearrange components
ElinorW Sep 4, 2024
256d5c7
remove unused components
ElinorW Sep 4, 2024
6fd9fb3
add api collection button
ElinorW Oct 1, 2024
de61ac9
edit collection view
ElinorW Oct 2, 2024
0e505c6
remove unused import
ElinorW Oct 4, 2024
ca2d84b
Merge branch 'dev' into feature/collections-redesign
ElinorW Oct 25, 2024
f89cbf7
Update permissions message
ElinorW Oct 29, 2024
4d97a3a
add edit collection functionality
ElinorW Oct 29, 2024
4bf0cc4
remove icon
ElinorW Oct 29, 2024
5f5c246
add scope label
ElinorW Oct 29, 2024
6996bd9
add edit scope functionality
ElinorW Oct 29, 2024
e9d4f3c
Add upload functionality
ElinorW Oct 30, 2024
2a02544
merge upload collections functionality
ElinorW Oct 31, 2024
5fd2da6
rename component
ElinorW Oct 31, 2024
6eac57a
update permissions panel view
ElinorW Oct 31, 2024
6f14cbd
remove unused imports
ElinorW Oct 31, 2024
495597c
adjust API collection button
ElinorW Oct 31, 2024
397828c
add collection function on history tab
ElinorW Nov 5, 2024
7c7413b
adjust ui
ElinorW Nov 5, 2024
8d91597
Merge branch 'dev' into feature/collections-redesign
ElinorW Nov 5, 2024
37620cf
remove console statement
ElinorW Nov 5, 2024
3f0d6e2
update history collection url
ElinorW Nov 5, 2024
bb49084
Merge branch 'feature/collections-redesign' of https://github.com/mic…
ElinorW Nov 5, 2024
e659ee0
stick permissions footer
ElinorW Nov 5, 2024
3fab443
add back buttton to the permissions panel
ElinorW Nov 5, 2024
1f82857
update permission links
ElinorW Nov 5, 2024
b9c6761
update the scope display
ElinorW Nov 5, 2024
8db5ff6
update string
ElinorW Nov 5, 2024
6b819e0
fix scope updates immediately a scope is updated
ElinorW Nov 6, 2024
568ccf6
fix re-render issues
ElinorW Nov 7, 2024
aa4ac19
add timeout to load collections
ElinorW Nov 7, 2024
c85be17
add saved state
ElinorW Nov 7, 2024
36faa79
update tests
ElinorW Nov 7, 2024
eab26ee
update icons
ElinorW Nov 7, 2024
dadfc0e
add styling on permissions list
ElinorW Nov 7, 2024
19b4883
add message bar
ElinorW Nov 11, 2024
68631a7
add info message on resources
ElinorW Nov 11, 2024
2ece8bb
add pending changes list to track updates
ElinorW Nov 12, 2024
050059b
update review comments
ElinorW Nov 13, 2024
67fca08
add dropdown reset
ElinorW Nov 13, 2024
5aaa114
move button back to the resources
ElinorW Nov 18, 2024
b858810
remove unused import
ElinorW Nov 18, 2024
e700a34
add style to API collection button
ElinorW Nov 19, 2024
ef5cef5
Merge remote-tracking branch 'origin/dev' into feature/collections-re…
ElinorW Nov 19, 2024
d991f61
remove messaging
ElinorW Nov 19, 2024
9dd62fd
move button position
ElinorW Nov 19, 2024
55cef64
fix linting errors
ElinorW Nov 20, 2024
bc664e7
Update stryles
ElinorW Nov 25, 2024
1ca8ecf
adjust panel styles
ElinorW Nov 27, 2024
8dfba37
remove unused constants
ElinorW Nov 28, 2024
4db8fe2
remove unused imports
ElinorW Nov 28, 2024
4eec787
remove assertions
ElinorW Nov 28, 2024
042afc4
useMemo hook to momoize entire value object
ElinorW Nov 28, 2024
19972d0
remove unused styles
ElinorW Nov 28, 2024
64188d6
update access modifier
ElinorW Nov 28, 2024
b847b6c
Get individual state values
ElinorW Nov 29, 2024
d6d56b5
add whitespace
ElinorW Nov 29, 2024
c8a2692
add missing semi-colon
ElinorW Nov 29, 2024
15d2f58
update paths
ElinorW Nov 29, 2024
70eb1c0
extract to function
ElinorW Nov 29, 2024
f73e9fd
fix destructure error
ElinorW Nov 29, 2024
fe8f553
convert to error function
ElinorW Nov 29, 2024
bacead2
use arrow function instead
ElinorW Nov 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/app/services/actions/autocomplete-action-creators.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,20 @@ const mockState: ApplicationState = {
permissions: [],
error: null
},
collections: [],
collections: {
collections: [],
saved: false
},
proxyUrl: ''
}

store.getState = () => ({
...mockState,
proxyUrl: '',
collections: [],
collections: {
collections: [],
saved: false
},
graphExplorerMode: Mode.Complete,
queryRunnerStatus: null,
samples: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ const mockState: ApplicationState = {
permissions: [],
error: null
},
collections: [],
collections: {
collections: [],
saved: false
},
proxyUrl: ''
}
const currentState = store.getState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ const mockState: ApplicationState = {
data: {},
error: null
},
collections: [],
collections: {
collections: [],
saved: false
},
proxyUrl: ''
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { createContext } from 'react';

import { CollectionPermission, ResourcePath } from '../../../../types/resources';

interface CollectionPermissionsContext {
getPermissions: (paths: ResourcePath[]) => Promise<void>;
permissions?: { [key: string]: CollectionPermission[] };
isFetching?: boolean;
}

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const CollectionPermissionsContext = createContext<CollectionPermissionsContext>(
{} as CollectionPermissionsContext
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import { ReactNode, useMemo, useState } from 'react';

import { CollectionPermission, Method, ResourcePath } from '../../../../types/resources';
import {
getScopesFromPaths, getVersionsFromPaths, scopeOptions
} from '../../../views/sidebar/resource-explorer/collection/collection.util';
import { CollectionPermissionsContext } from './CollectionPermissionsContext';
import { useAppSelector } from '../../../../store';

interface CollectionRequest {
method: Method;
requestUrl: string;
}

function getRequestsFromPaths(paths: ResourcePath[], version: string, scope: string) {
const requests: CollectionRequest[] = [];
paths.forEach(path => {
const { method, url } = path;
const pathScope = path.scope ?? scopeOptions[0].key;
if (version === path.version && scope === pathScope) {
requests.push({
method: method as Method,
requestUrl: url
});
}
});
return requests;
}

async function getCollectionPermissions(permissionsUrl: string, paths: ResourcePath[]):
Promise<{ [key: string]: CollectionPermission[] }> {
const versions = getVersionsFromPaths(paths);
const scopes = getScopesFromPaths(paths);
const collectionPermissions: { [key: string]: CollectionPermission[] } = {};

for (const version of versions) {
for (const scope of scopes) {
const requestPaths = getRequestsFromPaths(paths, version, scope);
if (requestPaths.length === 0) {
continue;
}
const url = `${permissionsUrl}?version=${version}&scopeType=${scope}`;
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(requestPaths)
});
const perms = await response.json();
collectionPermissions[`${version}-${scope}`] = (perms.results) ? perms.results : [];
}
}
return collectionPermissions;
}

const CollectionPermissionsProvider = ({ children }: { children: ReactNode }) => {
const { baseUrl } = useAppSelector((state) => state.devxApi);
const [permissions, setPermissions] = useState<{ [key: string]: CollectionPermission[] } | undefined>(undefined);
const [isFetching, setIsFetching] = useState(false);
const [code, setCode] = useState('');

const getPermissions = async (items: ResourcePath[]): Promise<void> => {
const hashCode = window.btoa(JSON.stringify([...items]));
if (hashCode !== code) {
try {
setIsFetching(true);
const perms = await getCollectionPermissions(`${baseUrl}/permissions`, items);
setPermissions(perms);
setCode(hashCode);
} catch (error) {
setPermissions(undefined);
} finally {
setIsFetching(false);
}
}
};

const contextValue = useMemo(
() => ({ getPermissions, permissions, isFetching }),
[getPermissions, permissions, isFetching]
);

return (
<CollectionPermissionsContext.Provider value={contextValue}>
{children}
</CollectionPermissionsContext.Provider>
);
};

export default CollectionPermissionsProvider;
2 changes: 1 addition & 1 deletion src/app/services/graph-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ export const ADMIN_CONSENT_DOC_LINK = 'https://learn.microsoft.com/en-us/graph/s
// eslint-disable-next-line max-len
export const CONSENT_TYPE_DOC_LINK = 'https://learn.microsoft.com/en-us/graph/api/resources/oauth2permissiongrant?view=graph-rest-1.0#:~:text=(eq%20only).-,consentType,-String'
export const CURRENT_THEME='CURRENT_THEME';
export const EXP_URL='https://default.exp-tas.com/exptas76/9b835cbf-9742-40db-84a7-7a323a77f3eb-gedev/api/v1/tas'
export const EXP_URL='https://default.exp-tas.com/exptas76/9b835cbf-9742-40db-84a7-7a323a77f3eb-gedev/api/v1/tas';
7 changes: 7 additions & 0 deletions src/app/services/hooks/useCollectionPermissions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { useContext } from 'react';

import { CollectionPermissionsContext } from '../context/collection-permissions/CollectionPermissionsContext';

export const useCollectionPermissions = () => {
return useContext(CollectionPermissionsContext);
};
64 changes: 46 additions & 18 deletions src/app/services/slices/collections.slice.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,66 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { Collection, ResourcePath } from '../../../types/resources';

const initialState: Collection[] = [];
interface CollectionsState {
collections: Collection[];
saved: boolean;
}

const initialState: CollectionsState = {
collections: [],
saved: false
};

const collections = createSlice({
name: 'collections',
initialState,
reducers: {
createCollection: (state, action: PayloadAction<Collection>) => {
state.push(action.payload);
return state
state.collections.push(action.payload);
state.saved = false;
},
addResourcePaths:(state, action: PayloadAction<ResourcePath[]>) => {
const index = state.findIndex(collection => collection.isDefault);
addResourcePaths: (state, action: PayloadAction<ResourcePath[]>) => {
const index = state.collections.findIndex(collection => collection.isDefault);
if (index > -1) {
state[index].paths.push(...action.payload)
state.collections[index].paths.push(...action.payload);
state.saved = false;
}
},
updateResourcePaths: (state, action: PayloadAction<ResourcePath[]>) => {
const collectionIndex = state.collections.findIndex(k => k.isDefault);
if (collectionIndex > -1) {
state.collections[collectionIndex] = {
...state.collections[collectionIndex],
paths: action.payload
};
state.saved = true;
}
},
removeResourcePaths: (state, action: PayloadAction<ResourcePath[]>)=>{
const index = state.findIndex(collection => collection.isDefault);
if(index > -1) {
const defaultResourcePaths = [...state[index].paths];
action.payload.forEach((resourcePath: ResourcePath)=>{
const delIndex = defaultResourcePaths.findIndex(p=>p.key === resourcePath.key)
removeResourcePaths: (state, action: PayloadAction<ResourcePath[]>) => {
const index = state.collections.findIndex(collection => collection.isDefault);
if (index > -1) {
const defaultResourcePaths = [...state.collections[index].paths];
action.payload.forEach((resourcePath: ResourcePath) => {
const delIndex = defaultResourcePaths.findIndex(p => p.key === resourcePath.key);
if (delIndex > -1) {
defaultResourcePaths.splice(delIndex, 1)
defaultResourcePaths.splice(delIndex, 1);
}
})
state[index].paths = defaultResourcePaths;
});
state.collections[index].paths = defaultResourcePaths;
state.saved = false;
}
},
resetSaveState: (state) => {
state.saved = false;
}
}
})
});

export const {createCollection, addResourcePaths, removeResourcePaths} = collections.actions
export const
{ createCollection,
addResourcePaths,
updateResourcePaths,
removeResourcePaths,
resetSaveState } = collections.actions;

export default collections.reducer
export default collections.reducer;
2 changes: 1 addition & 1 deletion src/app/utils/searchbox.styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const searchBoxStyles: any = () => ({
root: {
width: '97%'
width: '100%'
},
field: [
{
Expand Down
8 changes: 5 additions & 3 deletions src/app/views/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Mode } from '../../types/enums';
import { IInitMessage, IQuery, IThemeChangedMessage } from '../../types/query-runner';
import { ISharedQueryParams } from '../../types/share-query';
import { ISidebarProps } from '../../types/sidebar';
import CollectionPermissionsProvider from '../services/context/collection-permissions/CollectionPermissionsProvider';
import { PopupsProvider } from '../services/context/popups-context';
import { ValidationProvider } from '../services/context/validation-context/ValidationProvider';
import { GRAPH_URL } from '../services/graph-constants';
Expand All @@ -26,12 +27,11 @@ import { changeTheme } from '../services/slices/theme.slice';
import { parseSampleUrl } from '../utils/sample-url-generation';
import { substituteTokens } from '../utils/token-helpers';
import { translateMessage } from '../utils/translate-messages';
import { TermsOfUseMessage } from './app-sections';
import { StatusMessages, TermsOfUseMessage } from './app-sections';
import { headerMessaging } from './app-sections/HeaderMessaging';
import { appStyles } from './App.styles';
import { classNames } from './classnames';
import { KeyboardCopyEvent } from './common/copy-button/KeyboardCopyEvent';
import { StatusMessages } from './common/lazy-loader/component-registry';
import PopupsWrapper from './common/popups/PopupsWrapper';
import { createShareLink } from './common/share';
import { MainHeader } from './main-header/MainHeader';
Expand Down Expand Up @@ -492,7 +492,9 @@ class App extends Component<IAppProps, IAppState> {
<TermsOfUseMessage />
</div>
</div>
<PopupsWrapper />
<CollectionPermissionsProvider>
<PopupsWrapper />
</CollectionPermissionsProvider>
</PopupsProvider>
</ThemeContext.Provider>
);
Expand Down
14 changes: 9 additions & 5 deletions src/app/views/common/download.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { telemetry, eventTypes, componentNames } from '../../../telemetry';
import { telemetry, eventTypes } from '../../../telemetry';

export function downloadToLocal(content: any, filename: string) {
function downloadToLocal(content: any, filename: string) {
const blob = new Blob([JSON.stringify(content, null, 4)], {
type: 'text/json'
});
download(blob, filename);
trackDownload(filename);
}

function download(blob: Blob, filename: string) {
Expand All @@ -17,9 +16,14 @@ function download(blob: Blob, filename: string) {
document.body.removeChild(elem);
}

function trackDownload(filename: string) {
function trackDownload(filename: string, componentName: string) {
telemetry.trackEvent(eventTypes.BUTTON_CLICK_EVENT, {
ComponentName: componentNames.DOWNLOAD_POSTMAN_COLLECTION_BUTTON,
componentName,
filename
});
}

export {
downloadToLocal,
trackDownload
};
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,4 @@ export const ResourceExplorer = (props?: any) => {
return (
<LazyResourceExplorer {...props} />
)
}

}
12 changes: 9 additions & 3 deletions src/app/views/common/lazy-loader/component-registry/popups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ import { lazy } from 'react';
export const popups = new Map<string, any>([
['share-query', lazy(() => import('../../../query-runner/query-input/share-query/ShareQuery'))],
['theme-chooser', lazy(() => import('../../../main-header/settings/ThemeChooser'))],
['preview-collection', lazy(() => import('../../../sidebar/resource-explorer/collection/PreviewCollection'))],
['full-permissions', lazy(() => import('../../../query-runner/request/permissions/Permissions.Full'))]
['preview-collection', lazy(() => import('../../../sidebar/resource-explorer/collection/APICollection'))],
['full-permissions', lazy(() => import('../../../query-runner/request/permissions/Permissions.Full'))],
['collection-permissions', lazy(() => import('../../../sidebar/resource-explorer/collection/CollectionPermissions'))],
['edit-collection-panel', lazy(() => import('../../../sidebar/resource-explorer/collection/EditCollectionPanel'))],
['edit-scope-panel', lazy(() => import('../../../sidebar/resource-explorer/collection/EditScopePanel'))]
]);

export type PopupItem =
'share-query' |
'theme-chooser' |
'preview-collection' |
'full-permissions';
'full-permissions' |
'collection-permissions' |
'edit-collection-panel' |
'edit-scope-panel'
Loading
Loading