@uniformdev/mesh-sdk-react 16.0.1-alpha.221 → 16.0.1-nuxt.156

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;
@@ -140,7 +144,6 @@ declare const selectedItemDetails: _emotion_react.SerializedStyles;
140
144
  declare const selectedItemCopy: _emotion_react.SerializedStyles;
141
145
  declare const selectedItemTitle: _emotion_react.SerializedStyles;
142
146
  declare const selectedItemIcon: _emotion_react.SerializedStyles;
143
- declare const selectedItemCloseIcon: _emotion_react.SerializedStyles;
144
147
  declare const selectItemPopover: _emotion_react.SerializedStyles;
145
148
  declare const selectItemSmallText: _emotion_react.SerializedStyles;
146
149
  declare const selectItemPopoverLabel: _emotion_react.SerializedStyles;
@@ -181,8 +184,10 @@ declare type ProductSearchResult = EntrySearchResult & {
181
184
  id: string;
182
185
  name: string;
183
186
  }>;
187
+ /** @deprecated Use `editLink` instead. */
184
188
  url?: string;
185
- name: string;
189
+ /** @deprecated Use `title` instead. */
190
+ name?: string;
186
191
  };
187
192
  interface ProductSearchResults {
188
193
  total: number;
@@ -207,7 +212,7 @@ interface ProductDynamicSelectorValue {
207
212
  sortOrder?: string;
208
213
  }
209
214
  interface ProductQueryProps<TValue extends ProductDynamicSelectorValue = ProductDynamicSelectorValue> {
210
- value: TValue;
215
+ value: TValue | undefined;
211
216
  setValue: (value: TValue) => Promise<void>;
212
217
  brands: Brand[] | undefined;
213
218
  categories: ProductQueryCategory[] | undefined;
@@ -291,6 +296,10 @@ declare const productSelectedItemContainer: _emotion_react.SerializedStyles;
291
296
  declare const productSelectedItemDetails: _emotion_react.SerializedStyles;
292
297
  declare const productSelectedItemContent: _emotion_react.SerializedStyles;
293
298
  declare const productSelectedItemImage: _emotion_react.SerializedStyles;
299
+ declare const productedSelectedItemLinkBtn: _emotion_react.SerializedStyles;
300
+ declare const productedSelectedItemSmallText: _emotion_react.SerializedStyles;
301
+ declare const productSelectedItemIcon: _emotion_react.SerializedStyles;
302
+ declare const productSelectedItemLinkContainer: _emotion_react.SerializedStyles;
294
303
 
295
304
  declare function ProductSelectedItem({ selectedItem, onDeselect, }: EntrySearchSelectedItemProps<ProductSearchResult>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
296
305
 
@@ -314,6 +323,53 @@ declare const SelectionField: ({ id, label, loading, selectedValues, values, onA
314
323
  onRemove: (id: string) => void;
315
324
  }) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
316
325
 
326
+ declare const damSelectedItemContainer: _emotion_react.SerializedStyles;
327
+ declare const damSelectedItemInner: _emotion_react.SerializedStyles;
328
+ declare const damSelectedItemDetails: _emotion_react.SerializedStyles;
329
+ declare const damSelectedItemCopy: _emotion_react.SerializedStyles;
330
+ declare const damSelectedItemTitle: _emotion_react.SerializedStyles;
331
+ declare const damSelectedItemIcon: _emotion_react.SerializedStyles;
332
+ declare const damSelectedItemPopover: _emotion_react.SerializedStyles;
333
+ declare const damSelectedItemSmallText: _emotion_react.SerializedStyles;
334
+ declare const damSelectedItemPopoverLabel: _emotion_react.SerializedStyles;
335
+ declare const damSelectedItemLinkContainer: _emotion_react.SerializedStyles;
336
+ declare const damSelectedItemLinkBtn: _emotion_react.SerializedStyles;
337
+ declare const damSelectedItemMediaContainer: _emotion_react.SerializedStyles;
338
+ declare const damSelectedItemInfoBtn: _emotion_react.SerializedStyles;
339
+ declare const damSelectItemImage: _emotion_react.SerializedStyles;
340
+
341
+ interface DamItem {
342
+ id: string;
343
+ title: string | JSX.Element;
344
+ createdDate?: Date | string | number;
345
+ editLink?: string | JSX.Element;
346
+ metadata?: Record<string, string | JSX.Element>;
347
+ popoverData?: Record<string, string | JSX.Element>;
348
+ previewUrl?: string | JSX.Element;
349
+ type: 'image' | 'video' | 'file' | 'other';
350
+ }
351
+
352
+ interface DamSelectedItemProps<TResult extends DamItem = DamItem> {
353
+ /** The item used for rendering this component. */
354
+ selectedItem: TResult;
355
+ /** Logo icon is used for the `editLink` if `editLink` is a string value, otherwise the icon is not used. */
356
+ logoIcon?: string | React__default.ComponentType<{
357
+ className?: string;
358
+ }>;
359
+ /** Callback that is invoked when the "Unlink" (deselect) button is clicked. */
360
+ onDeselect: (item: TResult) => void;
361
+ /** If `editLink` is a string value, an `<a>` element will be rendered for the `editLink` and
362
+ * the `onEditClosed` callback will be invoked when the tab opened by clicking the `<a>` element is closed. */
363
+ onEditClosed?: (item: TResult) => void;
364
+ /** Allows for customizing how item details, e.g. item preview, item metadata, are rendered. If not defined,
365
+ * item details will be rendered using the default (built-in) renderer.
366
+ */
367
+ itemDetailsRendererComponent?: React__default.ComponentType<{
368
+ item: TResult;
369
+ }>;
370
+ }
371
+ declare function DamSelectedItem({ selectedItem, onDeselect, onEditClosed, logoIcon, itemDetailsRendererComponent, }: DamSelectedItemProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
372
+
317
373
  declare const SvgCaution: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
318
374
 
319
375
  declare const SvgCheckmark: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
@@ -358,4 +414,4 @@ declare namespace index {
358
414
  };
359
415
  }
360
416
 
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 };
417
+ 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, damSelectItemImage, damSelectedItemContainer, damSelectedItemCopy, damSelectedItemDetails, damSelectedItemIcon, damSelectedItemInfoBtn, 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, productSelectedItemIcon, productSelectedItemImage, productSelectedItemLinkContainer, productedSelectedItemLinkBtn, productedSelectedItemSmallText, searchRowBtn, searchRowContainer, searchRowContainerActive, searchRowContainerWithPopover, searchRowPopover, searchRowText, searchRowTextSmall, selectItemLinkBtn, selectItemLinkContainer, selectItemPopover, selectItemPopoverLabel, selectItemSmallText, selectedItemContainer, selectedItemCopy, selectedItemDetails, selectedItemIcon, selectedItemInner, selectedItemTitle, useInitializeUniformMeshSdk, useProductQueryContext, useProductSearchContext, useUniformMeshLocation, useUniformMeshLocationContext, useUniformMeshSdk, useUniformMeshSdkContext };