@bynder/compact-view 2.4.1 → 2.6.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.
- package/README.md +27 -37
- package/components.d.ts +224 -235
- package/components.js +22 -3
- package/index.d.ts +64 -104
- package/index.js +22 -3
- package/package.json +20 -20
package/index.d.ts
CHANGED
|
@@ -1,108 +1,68 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
import React from "react";
|
|
3
|
+
type AssetType = "AUDIO" | "DOCUMENT" | "IMAGE" | "VIDEO";
|
|
4
|
+
interface AssetFilterJson {
|
|
5
|
+
assetType_in?: AssetType[];
|
|
6
|
+
collectionId?: string;
|
|
7
|
+
metapropertyOptionId_in?: string[];
|
|
8
|
+
searchTerm?: string;
|
|
9
|
+
tagNames_in?: string[];
|
|
10
|
+
isLimitedUse?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface Theme {
|
|
13
|
+
colorPrimary?: string;
|
|
14
|
+
colorButtonPrimary?: string;
|
|
15
|
+
colorButtonPrimaryLabel?: string;
|
|
16
|
+
colorButtonPrimaryActive?: string;
|
|
17
|
+
colorButtonPrimaryHover?: string;
|
|
18
|
+
colorButtonPrimaryHoverLabel?: string;
|
|
19
|
+
}
|
|
20
|
+
interface File {
|
|
21
|
+
url: string;
|
|
22
|
+
width?: number;
|
|
23
|
+
height?: number;
|
|
24
|
+
fileSize?: number;
|
|
25
|
+
}
|
|
26
|
+
type AdditionalInfo = {
|
|
27
|
+
selectedFile?: File;
|
|
20
28
|
};
|
|
21
|
-
type
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
type selectionMode = "SingleSelect" | "SingleSelectFile" | "MultiSelect";
|
|
37
|
-
type ConfigProvider_selectionMode = selectionMode;
|
|
38
|
-
/* TypeScript file generated from Theming.re by genType. */
|
|
39
|
-
/* eslint-disable import/first */
|
|
40
|
-
// tslint:disable-next-line:interface-over-type-literal
|
|
41
|
-
type theme = {
|
|
42
|
-
readonly colorPrimary?: string;
|
|
43
|
-
readonly colorButtonPrimary?: string;
|
|
44
|
-
readonly colorButtonPrimaryLabel?: string;
|
|
45
|
-
readonly colorButtonPrimaryActive?: string;
|
|
46
|
-
readonly colorButtonPrimaryHover?: string;
|
|
47
|
-
readonly colorButtonPrimaryHoverLabel?: string;
|
|
48
|
-
};
|
|
49
|
-
type Theming_theme = theme;
|
|
50
|
-
// tslint:disable-next-line:interface-over-type-literal
|
|
51
|
-
type Props = {
|
|
52
|
-
readonly assetFieldSelection?: string;
|
|
53
|
-
readonly assetFilter?: AssetFilterQuery_assetFilter;
|
|
54
|
-
readonly assetTypes?: AssetType_assetType[];
|
|
55
|
-
readonly defaultSearchTerm?: string;
|
|
56
|
-
readonly hideExternalAccess?: boolean;
|
|
57
|
-
readonly language?: string;
|
|
58
|
-
readonly mode?: ConfigProvider_selectionMode;
|
|
59
|
-
readonly onSuccess?: (_1: Js_Json_t[], _2: {
|
|
60
|
-
readonly selectedFile: (null | undefined | File_file);
|
|
61
|
-
}) => void;
|
|
62
|
-
readonly selectedAssets?: string[];
|
|
63
|
-
readonly theme?: Theming_theme;
|
|
64
|
-
};
|
|
65
|
-
declare const CompactView: React.ComponentType<{
|
|
66
|
-
readonly assetFieldSelection?: string;
|
|
67
|
-
readonly assetFilter?: AssetFilterQuery_assetFilter;
|
|
68
|
-
readonly assetTypes?: AssetType_assetType[];
|
|
69
|
-
readonly defaultSearchTerm?: string;
|
|
70
|
-
readonly hideExternalAccess?: boolean;
|
|
71
|
-
readonly language?: string;
|
|
72
|
-
readonly mode?: ConfigProvider_selectionMode;
|
|
73
|
-
readonly onSuccess?: (_1: Js_Json_t[], _2: {
|
|
74
|
-
readonly selectedFile: (null | undefined | File_file);
|
|
29
|
+
type OnSuccessCallback = (assets: unknown[], additionalInfo: AdditionalInfo) => void;
|
|
30
|
+
type SelectionMode = "SingleSelect" | "SingleSelectFile" | "MultiSelect";
|
|
31
|
+
interface PortalConfig {
|
|
32
|
+
url: string;
|
|
33
|
+
editable?: boolean;
|
|
34
|
+
}
|
|
35
|
+
interface Props {
|
|
36
|
+
assetFieldSelection?: string;
|
|
37
|
+
assetFilter?: AssetFilterJson;
|
|
38
|
+
assetTypes?: AssetType[];
|
|
39
|
+
defaultSearchTerm?: string;
|
|
40
|
+
language?: string;
|
|
41
|
+
mode?: SelectionMode;
|
|
42
|
+
onSuccess?: (assets: unknown[], additionalInformation: {
|
|
43
|
+
selectedFile?: File;
|
|
75
44
|
}) => void;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
45
|
+
theme?: Theme;
|
|
46
|
+
hideExternalAccess?: boolean;
|
|
47
|
+
selectedAssets?: string[];
|
|
48
|
+
}
|
|
49
|
+
declare function App({ assetFieldSelection, assetFilter, assetTypes, defaultSearchTerm, language, mode,
|
|
50
|
+
// eslint-disable-next-line no-console
|
|
51
|
+
onSuccess, theme, hideExternalAccess, selectedAssets }: Props): JSX.Element;
|
|
52
|
+
declare const CompactView: typeof App;
|
|
79
53
|
type CompactViewProps = Props;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
declare const Login: React.ComponentType<{
|
|
96
|
-
readonly children: React.ReactNode;
|
|
97
|
-
readonly language?: string;
|
|
98
|
-
readonly portal?: AppConfig_PortalConfig_t;
|
|
99
|
-
}>;
|
|
100
|
-
type style = React.CSSProperties;
|
|
101
|
-
type ReactDOMRe_style = style;
|
|
102
|
-
declare const Modal: React.ComponentType<{
|
|
103
|
-
readonly children: React.ReactNode;
|
|
104
|
-
readonly isOpen?: boolean;
|
|
105
|
-
readonly onClose?: () => void;
|
|
106
|
-
readonly style?: ReactDOMRe_style;
|
|
107
|
-
}>;
|
|
108
|
-
export { assetFilter, assetType, File, selectionMode, Login, Modal, theme, PortalConfig, OnSuccessCallback, AdditionalInfo, CompactView, CompactViewProps };
|
|
54
|
+
interface Props$0 {
|
|
55
|
+
portal?: PortalConfig;
|
|
56
|
+
language?: string;
|
|
57
|
+
children: React.ReactNode;
|
|
58
|
+
}
|
|
59
|
+
// eslint-disable-next-line react/no-multi-comp
|
|
60
|
+
declare const LoginWithShield: (props: Props$0) => JSX.Element;
|
|
61
|
+
interface Props$1 {
|
|
62
|
+
children: React.ReactNode;
|
|
63
|
+
isOpen?: boolean;
|
|
64
|
+
style?: React.CSSProperties;
|
|
65
|
+
onClose?: () => void;
|
|
66
|
+
}
|
|
67
|
+
declare function Modal({ children, isOpen, style, onClose }: Props$1): JSX.Element | null;
|
|
68
|
+
export { File, LoginWithShield as Login, Modal, PortalConfig, OnSuccessCallback, AdditionalInfo, CompactView, CompactViewProps, SelectionMode as selectionMode, Theme as theme, AssetFilterJson as assetFilter, AssetType as assetType };
|