@bynder/compact-view 5.0.1 → 5.0.3

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.
Files changed (149) hide show
  1. package/App.d.ts +27 -0
  2. package/Dat/Dat.d.ts +12 -0
  3. package/Dat/DatContext.d.ts +12 -0
  4. package/Dat/DatDropdownItem.d.ts +9 -0
  5. package/Dat/index.d.ts +3 -0
  6. package/Dat/types.d.ts +7 -0
  7. package/Main.d.ts +1 -0
  8. package/__tests__/utils/index.d.ts +116 -0
  9. package/accesibility/helpers.d.ts +3 -0
  10. package/api/__tests__/utils.d.ts +10 -0
  11. package/api/filterAssets.d.ts +42 -0
  12. package/api/getAsset.d.ts +15 -0
  13. package/api/getAssets.d.ts +10 -0
  14. package/api/getCollections.d.ts +18 -0
  15. package/api/getFilters.d.ts +33 -0
  16. package/api/graphql.types.d.ts +17 -0
  17. package/api/index.d.ts +7 -0
  18. package/api/rest/autocomplete.d.ts +22 -0
  19. package/api/rest/getAssetCounts.d.ts +15 -0
  20. package/api/rest/getInitialFilters.d.ts +7 -0
  21. package/api/rest/getMetapropertiesOptions.d.ts +12 -0
  22. package/api/rest/handlers.d.ts +7 -0
  23. package/api/rest/index.d.ts +6 -0
  24. package/api/rest/types.d.ts +66 -0
  25. package/app-config/ConfigContext.d.ts +13 -0
  26. package/app-config/appConfig.type.d.ts +46 -0
  27. package/app-config/appConfig.type.guard.d.ts +2 -0
  28. package/auth/auth.d.ts +7 -0
  29. package/auth/crypto.d.ts +3 -0
  30. package/auth/loginwindow.d.ts +7 -0
  31. package/auth/oauth2.d.ts +16 -0
  32. package/auth/result.type.d.ts +13 -0
  33. package/auth/useAuthInformation.d.ts +18 -0
  34. package/common/components/CardSkeleton.d.ts +8 -0
  35. package/common/components/Checkbox.styles.d.ts +11 -0
  36. package/common/components/Chip.d.ts +10 -0
  37. package/common/components/DocumentIcon.d.ts +2 -0
  38. package/common/components/DragSelect.d.ts +28 -0
  39. package/common/components/HorizontalScroll.d.ts +8 -0
  40. package/common/components/InfiniteScroll.d.ts +9 -0
  41. package/common/components/LeftArrow.d.ts +5 -0
  42. package/common/components/Modal.d.ts +12 -0
  43. package/common/components/NoResults.d.ts +6 -0
  44. package/common/components/RightArrow.d.ts +5 -0
  45. package/common/components/Skeleton.d.ts +6 -0
  46. package/common/components/Spinner.d.ts +9 -0
  47. package/common/components/__tests__/utils.d.ts +34 -0
  48. package/common/components/dropdown/Dropdown.d.ts +16 -0
  49. package/common/components/dropdown/DropdownContent.d.ts +12 -0
  50. package/common/components/dropdown/DropdownListItem.d.ts +10 -0
  51. package/common/hooks/useClickOutside.d.ts +2 -0
  52. package/common/hooks/useDimensions.d.ts +9 -0
  53. package/constants.d.ts +7 -0
  54. package/error-handling/ErrorIcon.d.ts +2 -0
  55. package/error-handling/ErrorMessage.d.ts +6 -0
  56. package/error-handling/Oops.d.ts +9 -0
  57. package/error-handling/ReportModal.d.ts +8 -0
  58. package/error-handling/Shield.d.ts +17 -0
  59. package/error-handling/__tests__/utils.d.ts +56 -0
  60. package/filter/AssetFilter.d.ts +2 -0
  61. package/filter/AssetFilterContext.d.ts +39 -0
  62. package/filter/__tests__/utils.d.ts +13 -0
  63. package/filter/active-filters/ActiveFilter.d.ts +6 -0
  64. package/filter/active-filters/ActiveFilters.d.ts +2 -0
  65. package/filter/assetFilter.type.d.ts +10 -0
  66. package/filter/filters/advanced/Advanced.d.ts +14 -0
  67. package/filter/filters/advanced/AssetTypeItem.d.ts +7 -0
  68. package/filter/filters/metaproperty/Metaproperty.d.ts +9 -0
  69. package/filter/filters/metaproperty/MetapropertyFilterContent.d.ts +25 -0
  70. package/filter/filters/metaproperty/MetapropertyOption.d.ts +15 -0
  71. package/filter/filters/metaproperty/SmartFilterContent.d.ts +20 -0
  72. package/filter/filters/smartfilters/Metaproperties/Autocomplete.d.ts +14 -0
  73. package/filter/filters/smartfilters/Metaproperties/Option.d.ts +13 -0
  74. package/filter/filters/smartfilters/Metaproperties/SmartFilterSelect.d.ts +11 -0
  75. package/filter/filters/smartfilters/Smartfilters.d.ts +8 -0
  76. package/filter/filters/tags/TagItem.d.ts +6 -0
  77. package/filter/filters/tags/Tags.d.ts +8 -0
  78. package/index.d.ts +10 -0
  79. package/index.js +7 -7
  80. package/index.mjs +1060 -0
  81. package/localization/index.d.ts +2 -0
  82. package/login/LoginComponent.d.ts +12 -0
  83. package/login/LoginContext.d.ts +19 -0
  84. package/login/__tests__/mocks.d.ts +1 -0
  85. package/login/__tests__/utils.d.ts +41 -0
  86. package/login/components/ConnectButton.d.ts +6 -0
  87. package/login/components/Container.d.ts +4 -0
  88. package/login/components/DomainInput.d.ts +11 -0
  89. package/login/components/Header.d.ts +2 -0
  90. package/login/components/RefreshingSpinner.d.ts +2 -0
  91. package/login/useAccountDomain.d.ts +2 -0
  92. package/order/DirectionSelect.d.ts +2 -0
  93. package/order/FieldSelect.d.ts +7 -0
  94. package/order/OrderingContext.d.ts +19 -0
  95. package/package.json +10 -9
  96. package/router/RouterContext.d.ts +19 -0
  97. package/search/SearchContext.d.ts +25 -0
  98. package/search/SearchInput.d.ts +2 -0
  99. package/select/FileSelector.d.ts +9 -0
  100. package/select/SelectionContext.d.ts +30 -0
  101. package/select/SelectionFooter.d.ts +2 -0
  102. package/select/__tests__/utils.d.ts +10 -0
  103. package/select/add-media/AddMedia.d.ts +7 -0
  104. package/select/add-media/ButtonAction.d.ts +6 -0
  105. package/select/add-media/addMedia.type.d.ts +15 -0
  106. package/select/current-selection/AssetItem.d.ts +5 -0
  107. package/select/current-selection/CollectionItem.d.ts +5 -0
  108. package/select/current-selection/SelectedItemContainer.d.ts +6 -0
  109. package/select/current-selection/SelectedItems.d.ts +5 -0
  110. package/select/file.type.d.ts +7 -0
  111. package/select/utils.d.ts +5 -0
  112. package/style/DesignSystemContext.d.ts +4 -0
  113. package/style/RootElementContext.d.ts +3 -0
  114. package/style/Theming.d.ts +27 -0
  115. package/style/shadowroot/ShadowRoot.d.ts +13 -0
  116. package/style/shadowroot/ShadowRootInternal.d.ts +12 -0
  117. package/style/shadowroot/__mocks__/ShadowRoot.d.ts +4 -0
  118. package/toolbar/Toolbar.d.ts +2 -0
  119. package/toolbar/ViewSwitch.d.ts +2 -0
  120. package/utils/__mocks__/logger.d.ts +4 -0
  121. package/utils/asyncDebounce.d.ts +1 -0
  122. package/utils/base64Converter.d.ts +2 -0
  123. package/utils/chunk.d.ts +1 -0
  124. package/utils/class.d.ts +25 -0
  125. package/utils/combineFilters.d.ts +8 -0
  126. package/utils/combineMetaproperties.d.ts +9 -0
  127. package/utils/filterEmptyMetaproperties.d.ts +2 -0
  128. package/utils/getMetaPropertiesForFilter.d.ts +2 -0
  129. package/utils/isObjectEmpty.d.ts +1 -0
  130. package/utils/logger.d.ts +6 -0
  131. package/utils/normalizeResponse.d.ts +3 -0
  132. package/utils/text.d.ts +2 -0
  133. package/utils/trimMetapropertyValue.d.ts +1 -0
  134. package/utils/url.d.ts +13 -0
  135. package/views/asset/AssetList.d.ts +20 -0
  136. package/views/asset/AssetsView.d.ts +2 -0
  137. package/views/asset/StatefulAssetList.d.ts +18 -0
  138. package/views/asset/__tests__/utils.d.ts +7 -0
  139. package/views/asset/asset-card/AssetCard.d.ts +13 -0
  140. package/views/asset/asset-card/AssetCardMetaproperties.d.ts +9 -0
  141. package/views/asset/asset-card/ContextAction.d.ts +8 -0
  142. package/views/asset/asset-card/utils.d.ts +5 -0
  143. package/views/asset/asset.type.d.ts +41 -0
  144. package/views/collection/CollectionView.d.ts +7 -0
  145. package/views/collection/collection.types.d.ts +7 -0
  146. package/views/collections/CollectionCard.d.ts +10 -0
  147. package/views/collections/CollectionList.d.ts +8 -0
  148. package/views/collections/CollectionsView.d.ts +2 -0
  149. package/views/collections/__tests__/utils.d.ts +5 -0
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledCheckboxWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
+ $isLoading?: boolean | undefined;
4
+ $isChecked: boolean;
5
+ $isFlex?: boolean | undefined;
6
+ }>> & string;
7
+ export declare const ListItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
8
+ export declare const Content: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
9
+ $isChecked: boolean;
10
+ }>> & string;
11
+ export declare const Label: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ loading?: boolean;
4
+ active?: boolean;
5
+ onClick?: () => void;
6
+ children: React.ReactNode;
7
+ ['data-testid']?: string;
8
+ }
9
+ export declare function Chip(props: Props): React.JSX.Element;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function DocumentIcon(): React.JSX.Element;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ export type DragAction = 'select' | 'inverse';
3
+ type Rect = {
4
+ left: number;
5
+ top: number;
6
+ height: number;
7
+ width: number;
8
+ };
9
+ type Position = {
10
+ x: number | null;
11
+ y: number | null;
12
+ };
13
+ type Props = {
14
+ dragContainer: string;
15
+ selectionBoxCustomAttr: React.HTMLAttributes<HTMLElement>;
16
+ onSelect: (selectedIds: string[]) => void;
17
+ onDeselect: (deselectedIds: string[]) => void;
18
+ onDragStart?: (action: DragAction) => void;
19
+ onDragEnd?: (action: DragAction) => void;
20
+ };
21
+ export declare const DragSelect: ({ dragContainer, selectionBoxCustomAttr, onSelect, onDeselect, onDragStart, onDragEnd, }: Props) => React.ReactPortal | null;
22
+ export declare const makeSelectable: ({ id }: {
23
+ id: string;
24
+ }) => {
25
+ "data-drag-select-id": string;
26
+ };
27
+ export declare const getSelectionBoxRect: (start: Position, end: Position, rootElement: Element | null) => Rect;
28
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ static?: React.ReactNode;
4
+ children: React.ReactNode;
5
+ isActiveFilter?: boolean;
6
+ }
7
+ export declare function HorizontalScroll(props: Props): React.JSX.Element;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ isLoading: boolean;
4
+ hasNextPage: boolean;
5
+ loadMore: () => void;
6
+ children: React.ReactNode;
7
+ }
8
+ export declare function InfiniteScroll(props: Props): React.JSX.Element;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare function LeftArrow(props: Readonly<{
3
+ isDisabled: boolean;
4
+ onClick: () => void;
5
+ }>): React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export declare const useModalContext: () => {
3
+ onClose: () => void;
4
+ } | null;
5
+ interface Props {
6
+ children: React.ReactNode;
7
+ isOpen?: boolean;
8
+ style?: React.CSSProperties;
9
+ onClose?: () => void;
10
+ }
11
+ export declare function Modal({ children, isOpen, style, onClose, }: Props): React.JSX.Element | null;
12
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ onReset: () => void;
4
+ }
5
+ export declare function NoResults(props: Props): React.JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare function RightArrow(props: Readonly<{
3
+ isDisabled: boolean;
4
+ onClick: () => void;
5
+ }>): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ width?: number;
4
+ }
5
+ export declare function Skeleton({ width }: Props): React.JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ isRelative?: boolean;
4
+ isHidden?: boolean;
5
+ isRefreshingSpinner?: boolean;
6
+ isNotUsingMargin?: boolean;
7
+ }
8
+ export declare function Spinner(props: Props): React.JSX.Element;
9
+ export {};
@@ -0,0 +1,34 @@
1
+ export declare const mockConfig: {
2
+ theme: {
3
+ colorPrimary: string;
4
+ colorButtonPrimary: string;
5
+ colorButtonPrimaryLabel: string;
6
+ colorButtonPrimaryActive: string;
7
+ colorButtonPrimaryHover: string;
8
+ colorButtonPrimaryHoverLabel: string;
9
+ };
10
+ assetTypes: import("../../..").assetType[];
11
+ language: string;
12
+ onSuccess: import("../../..").OnSuccessCallback;
13
+ assetFieldSelection?: string | undefined;
14
+ assetFilter?: import("../../..").assetFilter | undefined;
15
+ mode?: import("../../..").selectionMode | undefined;
16
+ hideExternalAccess?: boolean | undefined;
17
+ __shouldAddOriginal__?: boolean | undefined;
18
+ hideSwitch?: boolean | undefined;
19
+ noCache?: boolean | undefined;
20
+ selectAllOption?: boolean | undefined;
21
+ selectionMode: import("../../..").selectionMode;
22
+ };
23
+ export declare const regularButtonStyle: {
24
+ background: string;
25
+ color: string;
26
+ };
27
+ export declare const hoverButtonStyle: {
28
+ background: string;
29
+ color: string;
30
+ };
31
+ export declare const activeButtonStyle: {
32
+ background: string;
33
+ color: string;
34
+ };
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ className?: string;
4
+ fadeIn?: boolean;
5
+ buttonKind?: 'clean' | 'secondary';
6
+ isSmall?: boolean;
7
+ direction?: 'Down' | 'Up';
8
+ title: React.ReactNode;
9
+ alt?: string;
10
+ disabled?: boolean;
11
+ isPaddingContent?: boolean;
12
+ isMetapropertyDropdown?: boolean;
13
+ children: (toggle: () => void) => React.ReactNode;
14
+ }
15
+ export declare function Dropdown({ buttonKind, direction, isSmall, fadeIn, isMetapropertyDropdown, ...props }: Props): React.JSX.Element;
16
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface DropdownContentProps {
3
+ onClickOutside: () => void;
4
+ direction: 'Down' | 'Up';
5
+ target: React.MutableRefObject<Element | null>;
6
+ children: React.ReactNode;
7
+ id: string;
8
+ isPaddingContent?: boolean;
9
+ isMetapropertyDropdown?: boolean;
10
+ }
11
+ export declare function DropdownContent(props: DropdownContentProps): React.ReactPortal | null;
12
+ export {};
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface ListItemProps {
3
+ className?: string;
4
+ onClick?: () => void;
5
+ selected?: boolean;
6
+ children: React.ReactNode;
7
+ isFieldSelect?: boolean;
8
+ }
9
+ export declare function DropdownListItem({ selected, ...props }: ListItemProps): React.JSX.Element;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function useClickOutside(targetRefs: React.MutableRefObject<Element | null>[], handler: () => void): void;
@@ -0,0 +1,9 @@
1
+ export interface Dimensions {
2
+ width: number;
3
+ height: number;
4
+ scrollWidth: number;
5
+ }
6
+ export declare function useDimensions(node: Element | null): {
7
+ dimensions?: Dimensions;
8
+ remeasure: (newNode?: Element | null) => void;
9
+ };
package/constants.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export declare const WEBDAM_TRANSFORM_BASE_URL_NAME = "transformBaseURL";
2
+ export declare const BYNDER_TRANSFORM_BASE_URL_NAME = "transformBaseUrl";
3
+ export declare const DATE_METAPROPERTY_TYPE = "date";
4
+ export declare const DATE_METAPROPERTY_LOCALE = "en-GB";
5
+ export declare const DATE_METAPROPERTY_OPTIONS: Intl.DateTimeFormatOptions;
6
+ export declare const MAX_METAPROPERTY_LENGTH = 100;
7
+ export declare const MAX_GET_ASSETS_LIMIT = 280;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function ErrorIcon(): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare function ErrorMessage(props: {
3
+ isReportSent: boolean;
4
+ onClickSend: () => void;
5
+ onClickRetry: () => void;
6
+ }): React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { BrowserClient } from '@sentry/browser';
3
+ interface Props {
4
+ error: Error;
5
+ onRetry: () => void;
6
+ sentryClient?: BrowserClient;
7
+ }
8
+ export declare function Oops({ error, onRetry, sentryClient }: Props): React.JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare function ReportModal(props: {
3
+ isOpen: boolean;
4
+ error: Error;
5
+ container: Element;
6
+ onDone: () => void;
7
+ onCancel: () => void;
8
+ }): React.JSX.Element;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { BrowserClient } from '@sentry/browser';
3
+ interface Props {
4
+ children: React.ReactNode;
5
+ sentryClient?: BrowserClient;
6
+ }
7
+ interface State {
8
+ error: Error | null;
9
+ }
10
+ export declare class Shield extends React.Component<Props, State> {
11
+ constructor(props: Props);
12
+ static getDerivedStateFromError(error: Error): {
13
+ error: Error;
14
+ };
15
+ render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
16
+ }
17
+ export {};
@@ -0,0 +1,56 @@
1
+ export declare function renderShield(options: any, sentryClient?: any): {
2
+ rerender: (rerenderOptions: any) => any;
3
+ container: HTMLElement;
4
+ baseElement: HTMLElement;
5
+ debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
6
+ unmount: () => void;
7
+ asFragment: () => DocumentFragment;
8
+ getByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement;
9
+ getAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
10
+ queryByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement | null;
11
+ queryAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
12
+ findByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
13
+ findAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
14
+ getByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
15
+ getAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
16
+ queryByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
17
+ queryAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
18
+ findByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
19
+ findAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
20
+ getByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement;
21
+ getAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
22
+ queryByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement | null;
23
+ queryAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
24
+ findByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
25
+ findAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
26
+ getByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
27
+ getAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
28
+ queryByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
29
+ queryAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
30
+ findByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
31
+ findAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
32
+ getByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
33
+ getAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
34
+ queryByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
35
+ queryAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
36
+ findByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
37
+ findAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
38
+ getByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
39
+ getAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
40
+ queryByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
41
+ queryAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
42
+ findByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
43
+ findAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
44
+ getByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement;
45
+ getAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement[];
46
+ queryByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement | null;
47
+ queryAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement[];
48
+ findByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
49
+ findAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
50
+ getByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
51
+ getAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
52
+ queryByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
53
+ queryAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
54
+ findByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
55
+ findAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
56
+ };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function AssetFilter(): React.JSX.Element;
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { AssetType } from '../views/asset/asset.type';
3
+ import { MetapropertyOptionType as MetapropertyOption } from './filters/metaproperty/MetapropertyOption';
4
+ import { AssetFilterJson } from '@src/filter/assetFilter.type';
5
+ import { AutcompleteResponseOption, SmartfilterOption, selectedSmartfilterOptionsType, AssetCountType } from '@src/api/rest/types';
6
+ export interface Filter {
7
+ assetTypes: AssetType[];
8
+ metaproperties: MetapropertyOption[];
9
+ metapropertyIds?: string[];
10
+ tags: string[];
11
+ isLimited?: boolean;
12
+ isDropdownActive?: boolean;
13
+ selectedSmartfilterOptions?: selectedSmartfilterOptionsType;
14
+ existingFilters?: Record<string, Record<string, number>> | null;
15
+ }
16
+ interface Actions {
17
+ addAssetType: (assetType: AssetType) => void;
18
+ removeAssetType: (assetType: AssetType) => void;
19
+ addMetaproperty: (metaproperty: MetapropertyOption) => void;
20
+ removeMetaproperty: (metaproperty: MetapropertyOption) => void;
21
+ setPredefinedMetaproperties: (metaproperties: Record<string, MetapropertyOption>) => void;
22
+ addTag: (tag: string) => void;
23
+ removeTag: (tag: string) => void;
24
+ clear: () => void;
25
+ setDropdownState: (active: boolean) => void;
26
+ selectSmartfilterOption: (metapropertyName: string, option: SmartfilterOption | AutcompleteResponseOption, isMultifilter?: boolean) => void;
27
+ removeSmartfilterOption: (metapropertyName: string, optionId: string) => void;
28
+ setActiveFiltersState: (count: AssetCountType) => void;
29
+ }
30
+ type MetapropertyMapType = Record<string, MetapropertyOption>;
31
+ export declare const AssetFilterContext: React.Context<(Filter & Actions) | null>;
32
+ export declare function AssetFilterProvider({ children, hideLimitedUse, predefinedFilter, }: {
33
+ children: React.ReactNode;
34
+ hideLimitedUse?: boolean;
35
+ predefinedFilter?: AssetFilterJson;
36
+ }): React.JSX.Element;
37
+ export declare function keepPredefinedMetapropertiesInMap(metapropertyMap: MetapropertyMapType, predefinedMetaproperties: string[]): {};
38
+ export declare function useAssetFilter(): Filter & Actions;
39
+ export {};
@@ -0,0 +1,13 @@
1
+ export declare function renderAssetFilter({ options, predefinedFilters, assetIds, withExtension, }: {
2
+ options?: any;
3
+ predefinedFilters?: any;
4
+ assetIds?: string[];
5
+ withExtension?: boolean;
6
+ }): void;
7
+ export declare const customAssetFilterRender: (ui: any, { predefinedFilter, providedProps, assetIds, withExtension, ...renderOptions }: {
8
+ [x: string]: any;
9
+ predefinedFilter: any;
10
+ providedProps: any;
11
+ assetIds?: never[] | undefined;
12
+ withExtension?: boolean | undefined;
13
+ }) => void;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare function ActiveFilter(props: {
3
+ onClick?: () => void;
4
+ title: string;
5
+ icon?: React.ReactNode;
6
+ }): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function ActiveFilters(): React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { AssetType } from '../views/asset/asset.type';
2
+ export interface AssetFilterJson {
3
+ predefinedAssetType?: AssetType[];
4
+ collectionId?: string;
5
+ predefinedMetapropertiesOptions?: Record<string, Record<string, string>>;
6
+ searchTerm?: string;
7
+ predefinedTagNames?: string[];
8
+ isLimitedUse?: boolean;
9
+ showToolbar?: boolean;
10
+ }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ interface Count {
3
+ audio: number;
4
+ document: number;
5
+ image: number;
6
+ video: number;
7
+ archive: number;
8
+ }
9
+ interface AdvancedProps {
10
+ isLoading: boolean;
11
+ count: Count;
12
+ }
13
+ export declare function Advanced(props: AdvancedProps): React.JSX.Element | null;
14
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { AssetType } from '../../../views/asset/asset.type';
3
+ export declare function AssetTypeItem(props: {
4
+ type: AssetType;
5
+ count: number;
6
+ isLoading: boolean;
7
+ }): React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { MetapropertyType } from './MetapropertyFilterContent';
3
+ import { SmartfilterType } from './SmartFilterContent';
4
+ interface Props {
5
+ metapropertyFilters: Array<MetapropertyType | SmartfilterType>;
6
+ isLoading: boolean;
7
+ }
8
+ export declare function Metaproperty(props: Props): React.JSX.Element;
9
+ export {};
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { MetapropertyOptionType } from './MetapropertyOption';
3
+ export interface MetapropertyType {
4
+ __typename: 'Metaproperty';
5
+ id: string;
6
+ label: string;
7
+ zIndex: number;
8
+ options: MetapropertyOptionType[];
9
+ showInGridView: boolean;
10
+ showInListView: boolean;
11
+ }
12
+ interface MetapropertyProps {
13
+ metaproperty: MetapropertyType;
14
+ selectedOptionIds: string[];
15
+ isLoading: boolean;
16
+ onAddOption: (metapropertyOption: MetapropertyOptionType) => void;
17
+ onRemoveOption: (metapropertyOption: MetapropertyOptionType) => void;
18
+ }
19
+ export declare function MetaPropertyFilterContent(props: MetapropertyProps): React.JSX.Element;
20
+ export interface Tag {
21
+ id: string;
22
+ name: string;
23
+ assetCount: number;
24
+ }
25
+ export {};
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ export interface MetapropertyOptionType {
3
+ id: string;
4
+ label: string;
5
+ assetCount: number;
6
+ }
7
+ interface MetapropertyOptionProps {
8
+ metapropertyOption: MetapropertyOptionType;
9
+ selectedOptionIds?: string[];
10
+ isLoading?: boolean;
11
+ onAddOption: () => void;
12
+ onRemoveOption: () => void;
13
+ }
14
+ export declare function MetapropertyOptionComponent(props: MetapropertyOptionProps): React.JSX.Element;
15
+ export {};
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { MetapropertyType } from './MetapropertyFilterContent';
3
+ import { MetapropertyOptionType } from './MetapropertyOption';
4
+ export interface SmartfilterType {
5
+ __typename: 'Smartfilter';
6
+ id: string;
7
+ label: string;
8
+ metaproperties: MetapropertyType[];
9
+ icon?: string;
10
+ zIndex: number;
11
+ }
12
+ interface SmartfilterProps {
13
+ smartfilter: SmartfilterType;
14
+ selectedOptionIds: string[];
15
+ isLoading: boolean;
16
+ onAddOption: (metapropertyOption: MetapropertyOptionType) => void;
17
+ onRemoveOption: (metapropertyOption: MetapropertyOptionType) => void;
18
+ }
19
+ export declare function SmartFilterContent(props: SmartfilterProps): React.JSX.Element;
20
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { AutocompleteOptions } from '@src/api/rest/autocomplete';
3
+ import { SmartfilterSelectedOptionType, SmartfilterMetaproperty, AutocompleteOption } from '@src/api/rest/types';
4
+ type Props = {
5
+ metaproperty: SmartfilterMetaproperty;
6
+ value: string;
7
+ onChange: (metapropertyId: string, value: string) => void;
8
+ onOptionSelect: (metapropertyName: string, option: AutocompleteOption, metapropertyMultifilter: boolean) => void;
9
+ autocompleteOptions: AutocompleteOptions;
10
+ isLoading: boolean;
11
+ selectedOptions: Record<string, Record<string, SmartfilterSelectedOptionType>>;
12
+ };
13
+ export declare const Autocomplete: ({ metaproperty, value, onChange, onOptionSelect, autocompleteOptions, isLoading, selectedOptions, }: Props) => React.JSX.Element;
14
+ export {};
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { SmartfilterOption } from '@src/api/rest/types';
3
+ type Props = {
4
+ option: SmartfilterOption;
5
+ onClick: (metapropertyName: string, option: SmartfilterOption, metapropertyMultifilter: boolean) => void;
6
+ metapropertyName: string;
7
+ isSelected: boolean;
8
+ metapropertyMultifilter: boolean;
9
+ showCount?: boolean;
10
+ count?: number;
11
+ };
12
+ declare const OptionComponent: ({ option, onClick, metapropertyName, isSelected, metapropertyMultifilter, showCount, count, }: Props) => React.JSX.Element;
13
+ export { OptionComponent };
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { SmartfilterMetaproperty, SmartfilterOption, SmartfilterSelectedOptionType } from '@src/api/rest/types';
3
+ type Props = {
4
+ metaproperty: SmartfilterMetaproperty;
5
+ smartfilterId: string;
6
+ onOptionSelect: (metapropertyName: string, option: SmartfilterOption, metapropertyMultifilter: boolean) => void;
7
+ selectedOptions: Record<string, Record<string, SmartfilterSelectedOptionType>>;
8
+ filteredMetaproperty: Record<string, number>;
9
+ };
10
+ declare const SmartFilterSelect: ({ metaproperty, smartfilterId, onOptionSelect, selectedOptions, filteredMetaproperty, }: Props) => React.JSX.Element;
11
+ export { SmartFilterSelect };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Smartfilter as SmartfilterType, SmartfilterMetaproperty } from '@src/api/rest/types';
3
+ type Props = {
4
+ smartfilters: SmartfilterType[];
5
+ metaproperties: Record<string, Record<string, SmartfilterMetaproperty>>;
6
+ };
7
+ declare const Smartfilter: ({ smartfilters, metaproperties }: Props) => React.JSX.Element;
8
+ export { Smartfilter };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { Tag } from '../metaproperty/MetapropertyFilterContent';
3
+ export declare function TagItem(props: {
4
+ tag: Tag;
5
+ isLoading: boolean;
6
+ }): React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Tag } from '../metaproperty/MetapropertyFilterContent';
3
+ interface Props {
4
+ tags: Tag[];
5
+ isLoading: boolean;
6
+ }
7
+ export declare function Tags(props: Props): React.JSX.Element;
8
+ export {};
package/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { App as CompactView, Props as CompactViewProps } from './App';
2
+ export { type File } from './select/file.type';
3
+ export { Login } from './login/LoginContext';
4
+ export { Modal } from './common/components/Modal';
5
+ export { type PortalConfig, type OnSuccessCallback, type AdditionalInfo, } from './app-config/appConfig.type';
6
+ export { CompactView, type CompactViewProps };
7
+ export { type SelectionMode as selectionMode } from './app-config/appConfig.type';
8
+ export { type Theme as theme } from './style/Theming';
9
+ export { type AssetFilterJson as assetFilter } from './filter/assetFilter.type';
10
+ export { type AssetType as assetType } from './views/asset/asset.type';