@stoplight/elements-dev-portal 1.6.14 → 1.6.15

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/consts.d.ts CHANGED
@@ -16,10 +16,12 @@ export declare const devPortalCacheKeys: {
16
16
  search: () => string[];
17
17
  searchNodes: (filters: {
18
18
  projectIds?: string[];
19
+ branchSlug?: string;
19
20
  workspaceId?: string;
20
21
  search?: string;
21
22
  }) => (string | {
22
23
  projectIds?: string[] | undefined;
24
+ branchSlug?: string | undefined;
23
25
  workspaceId?: string | undefined;
24
26
  search?: string | undefined;
25
27
  })[];
@@ -1,6 +1,7 @@
1
- export declare function useGetNodes({ search, workspaceId, projectIds, pause, }: {
1
+ export declare function useGetNodes({ search, workspaceId, projectIds, branch, pause, }: {
2
2
  search: string;
3
3
  workspaceId?: string;
4
4
  projectIds?: string[];
5
+ branch?: string;
5
6
  pause?: boolean;
6
7
  }): import("react-query").UseQueryResult<import("..").NodeSearchResult[], unknown>;
package/index.esm.js CHANGED
@@ -202,7 +202,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
202
202
  React__default.createElement(Icon, { icon: faExclamationTriangle, size: "4x" }),
203
203
  React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
204
204
 
205
- const appVersion = '1.6.14';
205
+ const appVersion = '1.6.15';
206
206
 
207
207
  class ResponseError extends Error {
208
208
  constructor(message, responseCode) {
@@ -370,7 +370,7 @@ const getNodes = ({ workspaceId, branchSlug, projectIds, search, platformUrl = '
370
370
  }
371
371
  if (branchSlug) {
372
372
  const encodedBranchSlug = encodeURIComponent(branchSlug);
373
- queryParams.push(`branchSlug=${encodedBranchSlug}`);
373
+ queryParams.push(`branch=${encodedBranchSlug}`);
374
374
  }
375
375
  const query = queryParams.length ? `?${queryParams.join('&')}` : '';
376
376
  const encodedWorkspaceId = encodeURIComponent(fetchedWorkspaceId);
@@ -623,14 +623,14 @@ function useDebounce(value, delay, options) {
623
623
  return [state, { cancel: debounced.cancel, isPending: debounced.isPending, flush: debounced.flush }];
624
624
  }
625
625
 
626
- function useGetNodes({ search, workspaceId, projectIds, pause, }) {
626
+ function useGetNodes({ search, workspaceId, projectIds, branch, pause, }) {
627
627
  const { platformUrl, platformAuthToken } = React.useContext(PlatformContext);
628
628
  const [debounceSearch] = useDebounce(search, 500);
629
629
  return useQuery([
630
- ...devPortalCacheKeys.searchNodes({ projectIds, workspaceId, search: debounceSearch }),
630
+ ...devPortalCacheKeys.searchNodes({ projectIds, branchSlug: branch, workspaceId, search: debounceSearch }),
631
631
  platformUrl,
632
632
  platformAuthToken,
633
- ], () => getNodes({ workspaceId, projectIds, search: debounceSearch, platformUrl, platformAuthToken }), { enabled: !pause, keepPreviousData: true });
633
+ ], () => getNodes({ workspaceId, projectIds, branchSlug: branch, search: debounceSearch, platformUrl, platformAuthToken }), { enabled: !pause, keepPreviousData: true });
634
634
  }
635
635
 
636
636
  function useGetWorkspace({ projectIds }) {
package/index.js CHANGED
@@ -229,7 +229,7 @@ const UpgradeToStarter = () => (React__default["default"].createElement(mosaic.F
229
229
  React__default["default"].createElement(mosaic.Icon, { icon: freeSolidSvgIcons.faExclamationTriangle, size: "4x" }),
230
230
  React__default["default"].createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
231
231
 
232
- const appVersion = '1.6.14';
232
+ const appVersion = '1.6.15';
233
233
 
234
234
  class ResponseError extends Error {
235
235
  constructor(message, responseCode) {
@@ -397,7 +397,7 @@ const getNodes = ({ workspaceId, branchSlug, projectIds, search, platformUrl = '
397
397
  }
398
398
  if (branchSlug) {
399
399
  const encodedBranchSlug = encodeURIComponent(branchSlug);
400
- queryParams.push(`branchSlug=${encodedBranchSlug}`);
400
+ queryParams.push(`branch=${encodedBranchSlug}`);
401
401
  }
402
402
  const query = queryParams.length ? `?${queryParams.join('&')}` : '';
403
403
  const encodedWorkspaceId = encodeURIComponent(fetchedWorkspaceId);
@@ -650,14 +650,14 @@ function useDebounce(value, delay, options) {
650
650
  return [state, { cancel: debounced.cancel, isPending: debounced.isPending, flush: debounced.flush }];
651
651
  }
652
652
 
653
- function useGetNodes({ search, workspaceId, projectIds, pause, }) {
653
+ function useGetNodes({ search, workspaceId, projectIds, branch, pause, }) {
654
654
  const { platformUrl, platformAuthToken } = React__namespace.useContext(PlatformContext);
655
655
  const [debounceSearch] = useDebounce(search, 500);
656
656
  return reactQuery.useQuery([
657
- ...devPortalCacheKeys.searchNodes({ projectIds, workspaceId, search: debounceSearch }),
657
+ ...devPortalCacheKeys.searchNodes({ projectIds, branchSlug: branch, workspaceId, search: debounceSearch }),
658
658
  platformUrl,
659
659
  platformAuthToken,
660
- ], () => getNodes({ workspaceId, projectIds, search: debounceSearch, platformUrl, platformAuthToken }), { enabled: !pause, keepPreviousData: true });
660
+ ], () => getNodes({ workspaceId, projectIds, branchSlug: branch, search: debounceSearch, platformUrl, platformAuthToken }), { enabled: !pause, keepPreviousData: true });
661
661
  }
662
662
 
663
663
  function useGetWorkspace({ projectIds }) {
package/index.mjs CHANGED
@@ -202,7 +202,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
202
202
  React__default.createElement(Icon, { icon: faExclamationTriangle, size: "4x" }),
203
203
  React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
204
204
 
205
- const appVersion = '1.6.14';
205
+ const appVersion = '1.6.15';
206
206
 
207
207
  class ResponseError extends Error {
208
208
  constructor(message, responseCode) {
@@ -370,7 +370,7 @@ const getNodes = ({ workspaceId, branchSlug, projectIds, search, platformUrl = '
370
370
  }
371
371
  if (branchSlug) {
372
372
  const encodedBranchSlug = encodeURIComponent(branchSlug);
373
- queryParams.push(`branchSlug=${encodedBranchSlug}`);
373
+ queryParams.push(`branch=${encodedBranchSlug}`);
374
374
  }
375
375
  const query = queryParams.length ? `?${queryParams.join('&')}` : '';
376
376
  const encodedWorkspaceId = encodeURIComponent(fetchedWorkspaceId);
@@ -623,14 +623,14 @@ function useDebounce(value, delay, options) {
623
623
  return [state, { cancel: debounced.cancel, isPending: debounced.isPending, flush: debounced.flush }];
624
624
  }
625
625
 
626
- function useGetNodes({ search, workspaceId, projectIds, pause, }) {
626
+ function useGetNodes({ search, workspaceId, projectIds, branch, pause, }) {
627
627
  const { platformUrl, platformAuthToken } = React.useContext(PlatformContext);
628
628
  const [debounceSearch] = useDebounce(search, 500);
629
629
  return useQuery([
630
- ...devPortalCacheKeys.searchNodes({ projectIds, workspaceId, search: debounceSearch }),
630
+ ...devPortalCacheKeys.searchNodes({ projectIds, branchSlug: branch, workspaceId, search: debounceSearch }),
631
631
  platformUrl,
632
632
  platformAuthToken,
633
- ], () => getNodes({ workspaceId, projectIds, search: debounceSearch, platformUrl, platformAuthToken }), { enabled: !pause, keepPreviousData: true });
633
+ ], () => getNodes({ workspaceId, projectIds, branchSlug: branch, search: debounceSearch, platformUrl, platformAuthToken }), { enabled: !pause, keepPreviousData: true });
634
634
  }
635
635
 
636
636
  function useGetWorkspace({ projectIds }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements-dev-portal",
3
- "version": "1.6.14",
3
+ "version": "1.6.15",
4
4
  "description": "UI components for composing beautiful developer documentation.",
5
5
  "keywords": [],
6
6
  "main": "./index.js",
@@ -29,7 +29,7 @@
29
29
  "@fortawesome/free-solid-svg-icons": "^5.10.2",
30
30
  "@stoplight/elements-core": "~7.5.13",
31
31
  "@stoplight/markdown-viewer": "^5.4.2",
32
- "@stoplight/mosaic": "^1.15.4",
32
+ "@stoplight/mosaic": "^1.16.2",
33
33
  "@stoplight/path": "^1.3.2",
34
34
  "@stoplight/types": "^12.0.0",
35
35
  "classnames": "^2.2.6",
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const appVersion = "1.6.14";
1
+ export declare const appVersion = "1.6.15";