@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/index.d.ts CHANGED
@@ -1,108 +1,68 @@
1
1
  /// <reference types="react" />
2
- /* TypeScript file generated from App.re by genType. */
3
- /* eslint-disable import/first */
4
- import * as React from "react";
5
- type Json_t = unknown;
6
- type Js_Json_t = Json_t;
7
- /* TypeScript file generated from AssetType.re by genType. */
8
- /* eslint-disable import/first */
9
- // tslint:disable-next-line:interface-over-type-literal
10
- type assetType = "AUDIO" | "DOCUMENT" | "IMAGE" | "VIDEO";
11
- type AssetType_assetType = assetType;
12
- // tslint:disable-next-line:interface-over-type-literal
13
- type assetFilter = {
14
- readonly assetType_in?: AssetType_assetType[];
15
- readonly collectionId?: string;
16
- readonly metapropertyOptionId_in?: string[];
17
- readonly searchTerm?: string;
18
- readonly tagNames_in?: string[];
19
- readonly isLimitedUse?: boolean;
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 AssetFilterQuery_assetFilter = assetFilter;
22
- /* TypeScript file generated from File.re by genType. */
23
- /* eslint-disable import/first */
24
- // tslint:disable-next-line:interface-over-type-literal
25
- type file = {
26
- readonly url: string;
27
- readonly width?: number;
28
- readonly height?: number;
29
- readonly fileSize?: number;
30
- };
31
- type File = file;
32
- type File_file = file;
33
- /* TypeScript file generated from ConfigProvider.re by genType. */
34
- /* eslint-disable import/first */
35
- // tslint:disable-next-line:interface-over-type-literal
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
- readonly selectedAssets?: string[];
77
- readonly theme?: Theming_theme;
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
- // tslint:disable-next-line:interface-over-type-literal
81
- type PortalConfig_t = {
82
- readonly url: string;
83
- readonly editable: boolean;
84
- };
85
- type PortalConfig = PortalConfig_t; // tslint:disable-next-line:interface-over-type-literal
86
- // tslint:disable-next-line:interface-over-type-literal
87
- type additionalInfo = {
88
- readonly selectedFile?: File_file;
89
- };
90
- type AdditionalInfo = additionalInfo; // tslint:disable-next-line:interface-over-type-literal
91
- // tslint:disable-next-line:interface-over-type-literal
92
- type onSuccessCallback = (_1: Js_Json_t[], _2: additionalInfo) => void;
93
- type OnSuccessCallback = onSuccessCallback;
94
- type AppConfig_PortalConfig_t = PortalConfig_t;
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 };