@bynder/compact-view 5.0.3 → 5.1.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/api/__tests__/testMocks/mocks.d.ts +14 -0
- package/api/filterAssets.d.ts +1 -1
- package/api/getSimilarityAssets.d.ts +25 -0
- package/api/index.d.ts +1 -0
- package/common/components/Tooltip.d.ts +13 -0
- package/common/components/__mocks__/Tooltip.d.ts +6 -0
- package/filter/AssetFilter.d.ts +1 -1
- package/index.js +308 -218
- package/index.mjs +308 -218
- package/order/DirectionSelect.d.ts +3 -1
- package/order/FieldSelect.d.ts +2 -2
- package/order/OrderingContext.d.ts +1 -1
- package/package.json +1 -1
- package/search/SimilaritySearchContext.d.ts +24 -0
- package/search/SwitchNLS.d.ts +7 -0
- package/search/__mocks__/SimilaritySearchContext.d.ts +5 -0
- package/search/index.d.ts +3 -0
- package/select/SelectionContext.d.ts +1 -1
- package/select/__tests__/utils.d.ts +2 -1
- package/utils/base64Converter.d.ts +1 -0
- package/views/asset/asset-card/AssetCard.d.ts +3 -1
- package/views/asset/asset.type.d.ts +3 -0
package/order/FieldSelect.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Field } from './OrderingContext';
|
|
3
3
|
interface FieldProps {
|
|
4
|
-
options
|
|
4
|
+
options: Field[];
|
|
5
5
|
}
|
|
6
|
-
export declare function FieldSelect({ options
|
|
6
|
+
export declare function FieldSelect({ options }: FieldProps): React.JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PageType } from '../router/RouterContext';
|
|
3
|
-
export type Field = 'CREATED_AT' | 'NAME' | 'PUBLISHED_AT' | 'UPDATED_AT';
|
|
3
|
+
export type Field = 'CREATED_AT' | 'NAME' | 'PUBLISHED_AT' | 'UPDATED_AT' | 'NL_SEARCH';
|
|
4
4
|
export type Direction = 'ASC' | 'DESC';
|
|
5
5
|
export type Ordering = {
|
|
6
6
|
field: Field;
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useSimilaritySearchInterface } from '@src/api/getSimilarityAssets';
|
|
3
|
+
import { Asset } from '../views/asset/asset.type';
|
|
4
|
+
interface State {
|
|
5
|
+
isEnabled: boolean;
|
|
6
|
+
isSelected: boolean;
|
|
7
|
+
assets: Asset[];
|
|
8
|
+
isNLSSelected: boolean;
|
|
9
|
+
NLSSearchText?: string;
|
|
10
|
+
}
|
|
11
|
+
interface Actions {
|
|
12
|
+
setIsEnabled: (isEnabled: boolean) => void;
|
|
13
|
+
setIsSelected: (isSelected: boolean) => void;
|
|
14
|
+
setIsNLSelected: React.Dispatch<React.SetStateAction<boolean>>;
|
|
15
|
+
setAssets: (assets: Asset[]) => void;
|
|
16
|
+
setNLSSearchText: (text: string | undefined) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const SimilaritySearchContext: React.Context<(State & Actions & useSimilaritySearchInterface) | null>;
|
|
19
|
+
interface SimilaritySearchProviderProps {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export declare function SimilaritySearchProvider({ children }: SimilaritySearchProviderProps): React.JSX.Element;
|
|
23
|
+
export declare function useSimilaritySearch(): State & Actions & useSimilaritySearchInterface;
|
|
24
|
+
export {};
|
|
@@ -3,8 +3,9 @@ interface Props {
|
|
|
3
3
|
assetIds?: string[];
|
|
4
4
|
collectionId?: number;
|
|
5
5
|
withExtension?: boolean;
|
|
6
|
+
withImage?: boolean;
|
|
6
7
|
selectionMode?: SelectionMode;
|
|
7
8
|
onSuccess?: () => void;
|
|
8
9
|
}
|
|
9
|
-
export declare function renderSelectionFooter({ assetIds, collectionId, withExtension, selectionMode, onSuccess, }?: Props): import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
|
|
10
|
+
export declare function renderSelectionFooter({ assetIds, collectionId, withExtension, withImage, selectionMode, onSuccess, }?: Props): import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
|
|
10
11
|
export {};
|
|
@@ -8,6 +8,8 @@ interface Props {
|
|
|
8
8
|
onClick?: (asset: Asset, event: React.MouseEvent) => void;
|
|
9
9
|
isOutlined: boolean;
|
|
10
10
|
children?: React.ReactNode;
|
|
11
|
+
isSilimilaritySearchEnabled: boolean;
|
|
12
|
+
onSimilaritySearch: (selectedAsset: string[]) => void;
|
|
11
13
|
}
|
|
12
|
-
export declare function AssetCard({ className, fadeIn, asset, isSelected, isOutlined, onClick, children, }: Props): React.JSX.Element;
|
|
14
|
+
export declare function AssetCard({ className, fadeIn, asset, isSelected, isOutlined, onClick, children, isSilimilaritySearchEnabled, onSimilaritySearch, }: Props): React.JSX.Element;
|
|
13
15
|
export {};
|
|
@@ -24,7 +24,9 @@ export interface TextMetapropertiesType {
|
|
|
24
24
|
showInListView: boolean;
|
|
25
25
|
}
|
|
26
26
|
export interface Asset {
|
|
27
|
+
__typename: string;
|
|
27
28
|
id: string;
|
|
29
|
+
databaseId: string;
|
|
28
30
|
derivatives: Derivatives;
|
|
29
31
|
extensions: string[];
|
|
30
32
|
name: string;
|
|
@@ -32,6 +34,7 @@ export interface Asset {
|
|
|
32
34
|
isArchived: boolean;
|
|
33
35
|
isWatermarked: boolean;
|
|
34
36
|
isLimitedUse: boolean;
|
|
37
|
+
similarityScore?: number;
|
|
35
38
|
metaproperties?: {
|
|
36
39
|
nodes: MetapropertyType[];
|
|
37
40
|
};
|