@mcurros2/microm 1.1.357-0 → 1.1.360-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/dist/index.d.ts CHANGED
@@ -1169,7 +1169,9 @@ export interface ImageEditorProps {
1169
1169
  sourceFile?: File;
1170
1170
  options: ResolvedBrowserImageProcessingOptions;
1171
1171
  onSave: (file: File) => Promise<void> | void;
1172
+ onBeforeSave?: (file: File) => boolean | Promise<boolean>;
1172
1173
  onCancel: () => Promise<void> | void;
1174
+ initiallyDirty?: boolean;
1173
1175
  saveLabel?: string;
1174
1176
  cancelLabel?: string;
1175
1177
  rotateClockwiseLabel?: string;
@@ -1208,7 +1210,7 @@ interface UseFileUploadActions {
1208
1210
  uploadFiles: (selectedFiles: File[]) => Promise<UploadProgressReport[]>;
1209
1211
  replaceFile: (fileGUID: string, replacementFile: File) => Promise<UploadProgressReport | null>;
1210
1212
  editImage: (file: string | UploadProgressReport) => Promise<UploadProgressReport | null>;
1211
- openImageEditor: (file?: File) => Promise<File | null>;
1213
+ openImageEditor: (file?: File, options?: OpenImageEditorOptions) => Promise<File | null>;
1212
1214
  captureImage: () => Promise<UploadProgressReport | null>;
1213
1215
  canEditImage: (file: string | UploadProgressReport) => boolean;
1214
1216
  refreshFiles: () => Promise<Record<string, UploadProgressReport>>;
@@ -1228,6 +1230,10 @@ export type ValidateFileReturnType = {
1228
1230
  };
1229
1231
  export type UploadCompletionResult = ValidateFileReturnType;
1230
1232
  export type ImageEditorConfigurationProps = Partial<Pick<ImageEditorProps, 'saveLabel' | 'cancelLabel' | 'rotateClockwiseLabel' | 'rotateCounterClockwiseLabel' | 'takePhotoLabel' | 'camera'>>;
1233
+ export interface OpenImageEditorOptions {
1234
+ initiallyDirty?: boolean;
1235
+ onBeforeSave?: NonNullable<ImageEditorProps['onBeforeSave']>;
1236
+ }
1231
1237
  export interface UseFileUploadProps {
1232
1238
  client: MicroMClient;
1233
1239
  fileProcessColumn: EntityColumn<string>;