@bynder/compact-view 4.2.4 → 4.3.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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import React from "react";
1
+ import React from 'react';
2
+
3
3
  interface File {
4
4
  url: string;
5
5
  width?: number;
@@ -7,7 +7,9 @@ interface File {
7
7
  fileSize?: number;
8
8
  isFakeOriginal?: boolean;
9
9
  }
10
- type AssetType = "AUDIO" | "DOCUMENT" | "IMAGE" | "VIDEO" | "ARCHIVE";
10
+
11
+ type AssetType = 'AUDIO' | 'DOCUMENT' | 'IMAGE' | 'VIDEO' | 'ARCHIVE';
12
+
11
13
  interface AssetFilterJson {
12
14
  assetType_in?: AssetType[];
13
15
  collectionId?: string;
@@ -17,6 +19,7 @@ interface AssetFilterJson {
17
19
  isLimitedUse?: boolean;
18
20
  showToolbar?: boolean;
19
21
  }
22
+
20
23
  interface Theme {
21
24
  colorPrimary?: string;
22
25
  colorButtonPrimary?: string;
@@ -25,11 +28,12 @@ interface Theme {
25
28
  colorButtonPrimaryHover?: string;
26
29
  colorButtonPrimaryHoverLabel?: string;
27
30
  }
31
+
28
32
  type AdditionalInfo = {
29
33
  selectedFile?: File;
30
34
  };
31
35
  type OnSuccessCallback = (assets: unknown[], additionalInfo: AdditionalInfo) => void;
32
- type SelectionMode = "SingleSelect" | "SingleSelectFile" | "MultiSelect";
36
+ type SelectionMode = 'SingleSelect' | 'SingleSelectFile' | 'MultiSelect';
33
37
  interface PortalConfig {
34
38
  url: string;
35
39
  editable?: boolean;
@@ -46,7 +50,6 @@ interface Config {
46
50
  assetTypes?: AssetType[];
47
51
  container?: HTMLElement;
48
52
  language?: string;
49
- // ts-auto-guard-suppress function-type
50
53
  onSuccess?: OnSuccessCallback;
51
54
  mode?: SelectionMode;
52
55
  portal?: PortalConfig;
@@ -66,8 +69,10 @@ interface Config {
66
69
  hideSwitch?: boolean;
67
70
  __shouldAddOriginal__?: boolean;
68
71
  noCache?: boolean;
72
+ selectAllOption?: boolean;
69
73
  }
70
- interface Props {
74
+
75
+ interface Props$2 {
71
76
  assetFieldSelection?: string;
72
77
  assetFilter?: AssetFilterJson;
73
78
  assetTypes?: AssetType[];
@@ -85,26 +90,25 @@ interface Props {
85
90
  __shouldAddOriginal__?: boolean;
86
91
  hideSwitch?: boolean;
87
92
  noCache?: boolean;
93
+ selectAllOption?: boolean;
88
94
  }
89
- declare function App({ assetFieldSelection, assetFilter, assetTypes, defaultSearchTerm, language, mode,
90
- // eslint-disable-next-line no-console
91
- onSuccess, theme, hideExternalAccess, selectedAssets, hideLimitedUse, isContainerMode, __shouldAddOriginal__, hideSwitch, noCache }: Props): React.JSX.Element;
92
- declare const CompactView: typeof App;
93
- type CompactViewProps = Props;
94
- interface Props$0 {
95
+ declare function App({ assetFieldSelection, assetFilter, assetTypes, defaultSearchTerm, language, mode, onSuccess, theme, hideExternalAccess, selectedAssets, hideLimitedUse, isContainerMode, __shouldAddOriginal__, hideSwitch, noCache, selectAllOption, }: Props$2): React.JSX.Element;
96
+
97
+ interface Props$1 {
95
98
  portal?: PortalConfig;
96
99
  language?: string;
97
100
  children: React.ReactNode;
98
- authentication?: Config["authentication"];
99
- onLogout?: Config["onLogout"];
101
+ authentication?: Config['authentication'];
102
+ onLogout?: Config['onLogout'];
100
103
  }
101
- // eslint-disable-next-line react/no-multi-comp
102
- declare const LoginWithShield: (props: Props$0) => React.JSX.Element;
103
- interface Props$1 {
104
+ declare const LoginWithShield: (props: Props$1) => React.JSX.Element;
105
+
106
+ interface Props {
104
107
  children: React.ReactNode;
105
108
  isOpen?: boolean;
106
109
  style?: React.CSSProperties;
107
110
  onClose?: () => void;
108
111
  }
109
- declare function Modal({ children, isOpen, style, onClose }: Props$1): React.JSX.Element | null;
110
- export { File, LoginWithShield as Login, Modal, PortalConfig, OnSuccessCallback, AdditionalInfo, CompactView, CompactViewProps, SelectionMode as selectionMode, Theme as theme, AssetFilterJson as assetFilter, AssetType as assetType };
112
+ declare function Modal({ children, isOpen, style, onClose, }: Props): React.JSX.Element | null;
113
+
114
+ export { type AdditionalInfo, App as CompactView, type Props$2 as CompactViewProps, type File, LoginWithShield as Login, Modal, type OnSuccessCallback, type PortalConfig, type AssetFilterJson as assetFilter, type AssetType as assetType, type SelectionMode as selectionMode, type Theme as theme };