@wavy/react-ui 0.0.44 → 0.0.45

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/main.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { PropsWithChildren, JSX } from 'react';
4
- import * as _wavy_types from '@wavy/types';
5
- import { NoUndefinedField, SafeOmit, LocalFile, Prettify, AddPrefix, TaskResult, SanitizeFile, TaskResultStatus, Email, KnownFileTypeAlias, SuccessMessage, AuthProvider, TaskLog, UnsubscribeFunction, ErrorMessage, Name, NonFunction, CastFn } from '@wavy/types';
4
+ import * as _wavy_util from '@wavy/util';
5
+ import { NoUndefinedField, SafeOmit, FileDetails, Prettify, AddPrefix, TaskResult, TaskStatus, Email, KnownFileAlias, SuccessMessage, AuthProvider, TaskLog, UnsubscribeFunction, ErrorMessage, Name, NonFunction, CastFn } from '@wavy/util';
6
6
  import { IconType } from 'react-icons';
7
7
  import * as CSS from 'csstype';
8
8
  import CSS__default from 'csstype';
@@ -1578,7 +1578,7 @@ interface FileUploadRootProps {
1578
1578
  maxWidth?: FileUpload.RootProps["maxW"];
1579
1579
  height?: FileUpload.RootProps["height"];
1580
1580
  width?: FileUpload.RootProps["width"];
1581
- accepts: LocalFile["typeAlias"][];
1581
+ accepts: FileDetails["alias"][];
1582
1582
  children: JSX$1.Element;
1583
1583
  slotProps?: Partial<{
1584
1584
  fileList: FileUpload.ListProps;
@@ -2215,7 +2215,7 @@ declare namespace FileViewerProps {
2215
2215
  centerContent?: boolean;
2216
2216
  }
2217
2217
  interface IndicatorProps extends BasicStyleProps {
2218
- file: LocalFile | SanitizeFile<LocalFile>;
2218
+ file: FileDetails;
2219
2219
  hideFileMetadata?: boolean;
2220
2220
  /** @default "45%" */
2221
2221
  maxWidth?: BasicStyleProps["maxWidth"];
@@ -2456,7 +2456,7 @@ declare const paperStyle: (options: {
2456
2456
  }) => CSS.Properties;
2457
2457
 
2458
2458
  interface StatusProps {
2459
- status: TaskResultStatus;
2459
+ status: TaskStatus;
2460
2460
  indicatorSize?: ElementDim;
2461
2461
  indicatorOnly?: boolean;
2462
2462
  }
@@ -2608,7 +2608,7 @@ interface DisclaimerProps extends Partial<Record<"top" | "left" | "bottom" | "ri
2608
2608
  declare function Disclaimer(props: DisclaimerProps): react_jsx_runtime.JSX.Element;
2609
2609
 
2610
2610
  type ContextType = Prettify<Partial<Record<`onAttachment${"Added" | "Deleted"}`, (attachement: Attachment) => void>> & Partial<Record<`${"delete" | "open"}Disabled`, boolean | ((attachment: Attachment) => boolean)>> & {
2611
- attachments: Email["attachments"];
2611
+ attachments: FileDetails[];
2612
2612
  onOpenAttachment?: (attachment: Attachment) => void;
2613
2613
  attachmentsEventListener?: (event: "open" | "delete" | "add", attachement: Attachment) => void;
2614
2614
  uploadDisabled?: boolean;
@@ -2616,7 +2616,7 @@ type ContextType = Prettify<Partial<Record<`onAttachment${"Added" | "Deleted"}`,
2616
2616
  hideOpenAttachmentButton?: boolean;
2617
2617
  hideUploadButton?: boolean;
2618
2618
  getFilePath?: (file: File) => string;
2619
- accepts?: KnownFileTypeAlias | KnownFileTypeAlias[];
2619
+ accepts?: KnownFileAlias | KnownFileAlias[];
2620
2620
  }>;
2621
2621
  interface AttachmentsDialogProps extends ContextType {
2622
2622
  readOnly?: boolean;
@@ -3028,7 +3028,7 @@ declare function JsonViewer(props: JsonViewerProps): react_jsx_runtime.JSX.Eleme
3028
3028
 
3029
3029
  interface PictureUploaderProps {
3030
3030
  fallback?: IconType;
3031
- defaultPicture?: LocalFile | SanitizeFile<LocalFile>;
3031
+ defaultPicture?: FileDetails;
3032
3032
  label?: string;
3033
3033
  columnGap?: BasicDivProps["gap"];
3034
3034
  rowGap?: BasicDivProps["gap"];
@@ -3040,7 +3040,7 @@ interface PictureUploaderProps {
3040
3040
  }>;
3041
3041
  }>;
3042
3042
  getFilePath?: (file: File) => string;
3043
- onChange?: (picture: LocalFile) => void;
3043
+ onChange?: (picture: FileDetails) => void;
3044
3044
  }
3045
3045
  declare function PictureUploader(props: PictureUploaderProps): react_jsx_runtime.JSX.Element;
3046
3046
 
@@ -3088,7 +3088,7 @@ interface SearchTextFieldProps extends SafeOmit<TextFieldProps, "leadingContent"
3088
3088
  declare function SearchTextField(props: SearchTextFieldProps): react_jsx_runtime.JSX.Element;
3089
3089
 
3090
3090
  declare function VerifyTextField(props: SafeOmit<TextFieldProps, "leadingAdornment" | "leadingContent" | "trailingAdornment" | "trailingContent"> & {
3091
- defaultStatus?: TaskResultStatus;
3091
+ defaultStatus?: TaskStatus;
3092
3092
  verifyError?: ErrorMessage;
3093
3093
  onVerifyClick: () => Promise<TaskResult>;
3094
3094
  }): react_jsx_runtime.JSX.Element;
@@ -3195,12 +3195,12 @@ interface BasicFileInputProps extends BasicStyleProps {
3195
3195
  * Sets the 'maxFiles' property to Infinity
3196
3196
  */
3197
3197
  multiple?: boolean;
3198
- accepts?: KnownFileTypeAlias[] | KnownFileTypeAlias;
3198
+ accepts?: KnownFileAlias[] | KnownFileAlias;
3199
3199
  children?: JSX$1.Element;
3200
3200
  disabled?: boolean;
3201
3201
  getFilePath?: (file: File) => string;
3202
- onAccept?: (files: File[], localFiles: LocalFile[]) => void;
3203
- onReject?: (files: File[], localFiles: LocalFile[]) => void;
3202
+ onAccept?: (files: File[], localFiles: FileDetails[]) => void;
3203
+ onReject?: (files: File[], localFiles: FileDetails[]) => void;
3204
3204
  }
3205
3205
 
3206
3206
  interface UploadFileButtonProps extends SafeOmit<BasicFileInputProps, "children" | keyof BasicStyleProps | "allowDrop"> {
@@ -3255,7 +3255,7 @@ interface YesNoButtonGroupProps {
3255
3255
  }
3256
3256
  declare function YesNoButtonGroup(props: YesNoButtonGroupProps): react_jsx_runtime.JSX.Element;
3257
3257
 
3258
- declare function getFileIcon(alias: LocalFile["typeAlias"]): {
3258
+ declare function getFileIcon(alias: FileDetails["alias"]): {
3259
3259
  filled: IconType;
3260
3260
  outlined: IconType;
3261
3261
  };
@@ -3328,7 +3328,7 @@ declare function useEvent<EventMapper extends Record<string, any>>(options?: Par
3328
3328
  /**Subscribes to an event in the closest EventContainer (defaults to the one in `WavyUi`) */
3329
3329
  on: <Key extends keyof EventMapper>(key: Key, cb: (...args: EventMapper[Key] extends null ? [] : [payload: EventMapper[Key]]) => void, options?: Partial<{
3330
3330
  rerender: boolean;
3331
- }>) => _wavy_types.UnsubscribeFunction;
3331
+ }>) => _wavy_util.UnsubscribeFunction;
3332
3332
  /**Gets the total amount of listeners on an event */
3333
3333
  listeners: (key: keyof EventMapper) => number;
3334
3334
  /**Removes an event from the registry in the closest EventContainer (unsubscribing all listeners in the process) */