@uniformdev/mesh-sdk-react 16.1.0 → 16.1.1-alpha.169

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/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import React__default, { SVGProps } from 'react';
6
6
  import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
7
7
  import { TDate } from 'timeago.js';
8
8
  import * as _emotion_react from '@emotion/react';
9
- export { Button, ButtonProps, Callout, CalloutProps, Heading, HeadingProps, Input, InputProps, InputSelect, InputToggle, InputToggleProps, InputKeywordSearch as KeywordSearchInput, Label, LabelProps, LoadingIndicator, LoadingOverlay, Menu, MenuItem, MenuItemProps, MenuProps, ScrollableList, ScrollableListItem, ScrollableListItemProps, ScrollableListProps, Switch, SwitchProps, Textarea, TextareaProps, Theme, ThemeProps } from '@uniformdev/design-system';
9
+ export { AddListButton, AddListButtonProps, Button, ButtonProps, Callout, CalloutProps, Heading, HeadingProps, Input, InputProps, InputSelect, InputToggle, InputToggleProps, InputKeywordSearch as KeywordSearchInput, Label, LabelProps, LoadingIndicator, LoadingOverlay, Menu, MenuItem, MenuItemProps, MenuProps, ScrollableList, ScrollableListItem, ScrollableListItemProps, ScrollableListProps, Switch, SwitchProps, Textarea, TextareaProps, Theme, ThemeProps } from '@uniformdev/design-system';
10
10
 
11
11
  /**
12
12
  * Provides convenient access to the current Uniform Mesh location via React hook.
@@ -107,6 +107,10 @@ declare type EntrySearchProps<TResult extends EntrySearchResult = EntrySearchRes
107
107
  onSort?: (items: TResult[]) => void;
108
108
  typeSelectorLabel?: string;
109
109
  typeSelectorAllTypesOptionText?: string;
110
+ /** Specifies how long (in milliseconds) to wait before showing the loading indicator when `resultsLoading` is true.
111
+ * @default 1000
112
+ */
113
+ loadingIndicatorDelay?: number;
110
114
  };
111
115
  interface EntrySearchResult {
112
116
  id: string;
@@ -124,7 +128,7 @@ interface NoResultsProps {
124
128
  searchText: string | undefined;
125
129
  selectedContentType: string | undefined;
126
130
  }
127
- declare const EntrySearch: <TResult extends EntrySearchResult>({ search, results, contentTypes, selectedItems, logoIcon, select, multiSelect, multiSelectId, rowComponent, selectedItemComponent, totalResults, resultsLoading, requireContentType, onAddNew, onEditClosed, onCancel, noResultsComponent, helpComponent, onSort, typeSelectorLabel, typeSelectorAllTypesOptionText, }: EntrySearchProps<TResult>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
131
+ declare const EntrySearch: <TResult extends EntrySearchResult>({ search, results, contentTypes, selectedItems, logoIcon, select, multiSelect, multiSelectId, rowComponent, selectedItemComponent, totalResults, resultsLoading, requireContentType, onAddNew, onEditClosed, onCancel, noResultsComponent, helpComponent, onSort, typeSelectorLabel, typeSelectorAllTypesOptionText, loadingIndicatorDelay, }: EntrySearchProps<TResult>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
128
132
 
129
133
  declare const searchRowContainer: _emotion_react.SerializedStyles;
130
134
  declare const searchRowContainerWithPopover: _emotion_react.SerializedStyles;
@@ -181,8 +185,10 @@ declare type ProductSearchResult = EntrySearchResult & {
181
185
  id: string;
182
186
  name: string;
183
187
  }>;
188
+ /** @deprecated Use `editLink` instead. */
184
189
  url?: string;
185
- name: string;
190
+ /** @deprecated Use `title` instead. */
191
+ name?: string;
186
192
  };
187
193
  interface ProductSearchResults {
188
194
  total: number;
@@ -207,7 +213,7 @@ interface ProductDynamicSelectorValue {
207
213
  sortOrder?: string;
208
214
  }
209
215
  interface ProductQueryProps<TValue extends ProductDynamicSelectorValue = ProductDynamicSelectorValue> {
210
- value: TValue;
216
+ value: TValue | undefined;
211
217
  setValue: (value: TValue) => Promise<void>;
212
218
  brands: Brand[] | undefined;
213
219
  categories: ProductQueryCategory[] | undefined;
@@ -314,6 +320,52 @@ declare const SelectionField: ({ id, label, loading, selectedValues, values, onA
314
320
  onRemove: (id: string) => void;
315
321
  }) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
316
322
 
323
+ declare const damSelectedItemContainer: _emotion_react.SerializedStyles;
324
+ declare const damSelectedItemInner: _emotion_react.SerializedStyles;
325
+ declare const damSelectedItemDetails: _emotion_react.SerializedStyles;
326
+ declare const damSelectedItemCopy: _emotion_react.SerializedStyles;
327
+ declare const damSelectedItemTitle: _emotion_react.SerializedStyles;
328
+ declare const damSelectedItemIcon: _emotion_react.SerializedStyles;
329
+ declare const damSelectedItemCloseIcon: _emotion_react.SerializedStyles;
330
+ declare const damSelectedItemPopover: _emotion_react.SerializedStyles;
331
+ declare const damSelectedItemSmallText: _emotion_react.SerializedStyles;
332
+ declare const damSelectedItemPopoverLabel: _emotion_react.SerializedStyles;
333
+ declare const damSelectedItemLinkContainer: _emotion_react.SerializedStyles;
334
+ declare const damSelectedItemLinkBtn: _emotion_react.SerializedStyles;
335
+ declare const damSelectedItemMediaContainer: _emotion_react.SerializedStyles;
336
+
337
+ interface DamItem {
338
+ id: string;
339
+ title: string | JSX.Element;
340
+ createdDate?: Date | string | number;
341
+ editLink?: string | JSX.Element;
342
+ metadata?: Record<string, string | JSX.Element>;
343
+ popoverData?: Record<string, string | JSX.Element>;
344
+ previewUrl?: string | JSX.Element;
345
+ type: 'image' | 'video' | 'file' | 'other';
346
+ }
347
+
348
+ interface DamSelectedItemProps<TResult extends DamItem = DamItem> {
349
+ /** The item used for rendering this component. */
350
+ selectedItem: TResult;
351
+ /** Logo icon is used for the `editLink` if `editLink` is a string value, otherwise the icon is not used. */
352
+ logoIcon?: string | React__default.ComponentType<{
353
+ className?: string;
354
+ }>;
355
+ /** Callback that is invoked when the "Unlink" (deselect) button is clicked. */
356
+ onDeselect: (item: TResult) => void;
357
+ /** If `editLink` is a string value, an `<a>` element will be rendered for the `editLink` and
358
+ * the `onEditClosed` callback will be invoked when the tab opened by clicking the `<a>` element is closed. */
359
+ onEditClosed?: (item: TResult) => void;
360
+ /** Allows for customizing how item details, e.g. item preview, item metadata, are rendered. If not defined,
361
+ * item details will be rendered using the default (built-in) renderer.
362
+ */
363
+ itemDetailsRendererComponent?: React__default.ComponentType<{
364
+ item: TResult;
365
+ }>;
366
+ }
367
+ declare function DamSelectedItem({ selectedItem, onDeselect, onEditClosed, logoIcon, itemDetailsRendererComponent, }: DamSelectedItemProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
368
+
317
369
  declare const SvgCaution: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
318
370
 
319
371
  declare const SvgCheckmark: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
@@ -358,4 +410,4 @@ declare namespace index {
358
410
  };
359
411
  }
360
412
 
361
- export { Brand, DefaultSearchRow, DefaultSelectedItem, EntrySearch, EntrySearchContentType, EntrySearchProps, EntrySearchQueryOptions, EntrySearchResult, EntrySearchRowProps, EntrySearchSelectedItemProps, GetProductOptions, GetProductsOptions, index as Icons, NoResultsProps, ProductCategory, ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, ProductQueryCategory, ProductQueryContext, ProductQueryContextValue, ProductQueryProps, ProductSearch, ProductSearchContext, ProductSearchContextValue, ProductSearchProps, ProductSearchResult, ProductSearchResults, ProductSearchRow, ProductSelectedItem, ResolvableLoadingValue, SelectionField, SelectionFieldValue, UniformMeshLocationContext, UniformMeshLocationContextProvider, UniformMeshLocationContextValue, UniformMeshSdkContext, UniformMeshSdkContextProvider, UniformMeshSdkContextValue, UseUniformMeshSdkOptions, badgeIcon, draggableContainer, draggableIcon, draggableIconOffset, draggableIconWrapper, entrySearchBtn, entrySearchConfig, entrySearchConfigHidden, entrySearchLoadMoreBtn, entrySearchResultList, entrySearchSelectIcon, entrySearchSelectImg, entrySearchSelectInput, entrySearchSelectOption, entrySearchWrapper, productSearchRowActiveIcon, productSearchRowCategory, productSearchRowContainer, productSearchRowContent, productSearchRowContentActive, productSearchRowDetails, productSearchRowTitle, productSelectedItemContainer, productSelectedItemContent, productSelectedItemDetails, productSelectedItemImage, searchRowBtn, searchRowContainer, searchRowContainerActive, searchRowContainerWithPopover, searchRowPopover, searchRowText, searchRowTextSmall, selectItemLinkBtn, selectItemLinkContainer, selectItemPopover, selectItemPopoverLabel, selectItemSmallText, selectedItemCloseIcon, selectedItemContainer, selectedItemCopy, selectedItemDetails, selectedItemIcon, selectedItemInner, selectedItemTitle, useInitializeUniformMeshSdk, useProductQueryContext, useProductSearchContext, useUniformMeshLocation, useUniformMeshLocationContext, useUniformMeshSdk, useUniformMeshSdkContext };
413
+ export { Brand, DamItem, DamSelectedItem, DamSelectedItemProps, DefaultSearchRow, DefaultSelectedItem, EntrySearch, EntrySearchContentType, EntrySearchProps, EntrySearchQueryOptions, EntrySearchResult, EntrySearchRowProps, EntrySearchSelectedItemProps, GetProductOptions, GetProductsOptions, index as Icons, NoResultsProps, ProductCategory, ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, ProductQueryCategory, ProductQueryContext, ProductQueryContextValue, ProductQueryProps, ProductSearch, ProductSearchContext, ProductSearchContextValue, ProductSearchProps, ProductSearchResult, ProductSearchResults, ProductSearchRow, ProductSelectedItem, ResolvableLoadingValue, SelectionField, SelectionFieldValue, UniformMeshLocationContext, UniformMeshLocationContextProvider, UniformMeshLocationContextValue, UniformMeshSdkContext, UniformMeshSdkContextProvider, UniformMeshSdkContextValue, UseUniformMeshSdkOptions, badgeIcon, damSelectedItemCloseIcon, damSelectedItemContainer, damSelectedItemCopy, damSelectedItemDetails, damSelectedItemIcon, damSelectedItemInner, damSelectedItemLinkBtn, damSelectedItemLinkContainer, damSelectedItemMediaContainer, damSelectedItemPopover, damSelectedItemPopoverLabel, damSelectedItemSmallText, damSelectedItemTitle, draggableContainer, draggableIcon, draggableIconOffset, draggableIconWrapper, entrySearchBtn, entrySearchConfig, entrySearchConfigHidden, entrySearchLoadMoreBtn, entrySearchResultList, entrySearchSelectIcon, entrySearchSelectImg, entrySearchSelectInput, entrySearchSelectOption, entrySearchWrapper, productSearchRowActiveIcon, productSearchRowCategory, productSearchRowContainer, productSearchRowContent, productSearchRowContentActive, productSearchRowDetails, productSearchRowTitle, productSelectedItemContainer, productSelectedItemContent, productSelectedItemDetails, productSelectedItemImage, searchRowBtn, searchRowContainer, searchRowContainerActive, searchRowContainerWithPopover, searchRowPopover, searchRowText, searchRowTextSmall, selectItemLinkBtn, selectItemLinkContainer, selectItemPopover, selectItemPopoverLabel, selectItemSmallText, selectedItemCloseIcon, selectedItemContainer, selectedItemCopy, selectedItemDetails, selectedItemIcon, selectedItemInner, selectedItemTitle, useInitializeUniformMeshSdk, useProductQueryContext, useProductSearchContext, useUniformMeshLocation, useUniformMeshLocationContext, useUniformMeshSdk, useUniformMeshSdkContext };