@bynder/compact-view 5.0.3 → 5.1.0

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.
@@ -0,0 +1,14 @@
1
+ import { Asset } from '@src/views/asset/asset.type';
2
+ type NonCollectionNode = {
3
+ __typename: 'Image';
4
+ } & Asset;
5
+ export declare const testMock: {
6
+ data: {
7
+ searchAssets: {
8
+ assets: {
9
+ nodes: NonCollectionNode[];
10
+ };
11
+ };
12
+ };
13
+ };
14
+ export {};
@@ -7,7 +7,7 @@ import { Filter } from '../filter/AssetFilterContext';
7
7
  import { AssetFilterJson } from '../filter/assetFilter.type';
8
8
  import { MetapropertyType } from '../filter/filters/metaproperty/MetapropertyFilterContent';
9
9
  import { AuthInformationState } from '../auth/useAuthInformation';
10
- interface GraphqlResponse {
10
+ export interface GraphqlResponse {
11
11
  searchAssets: {
12
12
  assets: Assets;
13
13
  };
@@ -0,0 +1,25 @@
1
+ import { Result } from '@src/auth/result.type';
2
+ import { Assets, GraphqlResponse } from './filterAssets';
3
+ import { Connection } from './graphql.types';
4
+ import { AuthInformationState } from '../auth/useAuthInformation';
5
+ interface SimilarityGraphqlResponse {
6
+ similaritySearch: {
7
+ assets: Assets;
8
+ };
9
+ }
10
+ type GetSimilarityAssetsArgs = {
11
+ assetIds?: string[];
12
+ textQuery?: string;
13
+ auth: AuthInformationState | null;
14
+ noCache?: boolean;
15
+ language: string;
16
+ };
17
+ export type useSimilaritySearchInterface = {
18
+ search: (assetIds?: string[], textQuery?: string, after?: string) => Promise<boolean | undefined>;
19
+ resetData: () => void;
20
+ connection: Connection<GraphqlResponse>;
21
+ };
22
+ export declare function normalizeSimilarityResponse(response: SimilarityGraphqlResponse): GraphqlResponse;
23
+ export declare function useSimilarityAssets(): useSimilaritySearchInterface;
24
+ export declare const getSimilarityAssets: ({ assetIds, textQuery, auth, noCache, language, }: GetSimilarityAssetsArgs) => Promise<Result<SimilarityGraphqlResponse, string>>;
25
+ export {};
package/api/index.d.ts CHANGED
@@ -4,4 +4,5 @@ export declare function fetchWithGraphql(options: {
4
4
  variables: Record<string, unknown>;
5
5
  auth: AuthInformationState | null;
6
6
  noCache?: boolean;
7
+ isNewGQL?: boolean;
7
8
  }): Promise<import("@src/auth/result.type").Err<any> | import("@src/auth/result.type").Ok<unknown>>;
@@ -0,0 +1,13 @@
1
+ import React, { ReactNode } from 'react';
2
+ type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
3
+ type TooltipMargin = 'top' | 'bottom' | 'left' | 'right';
4
+ type TooltipMarginAmount = 'spacing1' | 'spacing2' | 'spacing3' | 'spacing4' | 'spacing5';
5
+ interface TooltipProps {
6
+ text: string;
7
+ position?: TooltipPosition;
8
+ margin?: TooltipMargin;
9
+ marginAmount?: TooltipMarginAmount;
10
+ children?: ReactNode;
11
+ }
12
+ export declare const Tooltip: ({ text, position, margin, marginAmount, children, }: TooltipProps) => React.JSX.Element;
13
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const Tooltip: ({ text, children }: {
3
+ text: any;
4
+ children: any;
5
+ }) => React.JSX.Element;
6
+ export { Tooltip };
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare function AssetFilter(): React.JSX.Element;
2
+ export declare function AssetFilter(): React.JSX.Element | null;