@bynder/compact-view 2.6.1 → 3.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/index.d.ts CHANGED
@@ -32,6 +32,32 @@ interface PortalConfig {
32
32
  url: string;
33
33
  editable?: boolean;
34
34
  }
35
+ /**
36
+ * When starting the app or tests a .guard.ts file will be generated. This file
37
+ * will contain a method which is able to validate if a variable is consistent
38
+ * with the Config type.
39
+ */
40
+ /** @see {validateConfig} ts-auto-guard:type-guard */
41
+ interface Config {
42
+ assetFieldSelection?: string;
43
+ assetFilter?: AssetFilterJson;
44
+ assetTypes?: AssetType[];
45
+ container?: HTMLElement;
46
+ language?: string;
47
+ // ts-auto-guard-suppress function-type
48
+ onSuccess?: OnSuccessCallback;
49
+ mode?: SelectionMode;
50
+ portal?: PortalConfig;
51
+ defaultSearchTerm?: string;
52
+ theme?: Theme;
53
+ hideExternalAccess?: boolean;
54
+ selectedAssets?: string[];
55
+ authentication?: {
56
+ getAccessToken: () => string;
57
+ hideLogout?: boolean;
58
+ };
59
+ hideLimitedUse?: boolean;
60
+ }
35
61
  interface Props {
36
62
  assetFieldSelection?: string;
37
63
  assetFilter?: AssetFilterJson;
@@ -45,16 +71,18 @@ interface Props {
45
71
  theme?: Theme;
46
72
  hideExternalAccess?: boolean;
47
73
  selectedAssets?: string[];
74
+ hideLimitedUse?: boolean;
48
75
  }
49
76
  declare function App({ assetFieldSelection, assetFilter, assetTypes, defaultSearchTerm, language, mode,
50
77
  // eslint-disable-next-line no-console
51
- onSuccess, theme, hideExternalAccess, selectedAssets }: Props): JSX.Element;
78
+ onSuccess, theme, hideExternalAccess, selectedAssets, hideLimitedUse }: Props): JSX.Element;
52
79
  declare const CompactView: typeof App;
53
80
  type CompactViewProps = Props;
54
81
  interface Props$0 {
55
82
  portal?: PortalConfig;
56
83
  language?: string;
57
84
  children: React.ReactNode;
85
+ authentication?: Config["authentication"];
58
86
  }
59
87
  // eslint-disable-next-line react/no-multi-comp
60
88
  declare const LoginWithShield: (props: Props$0) => JSX.Element;