@omnia/fx 8.0.120-dev → 8.0.122-dev
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/internal-do-not-import-from-here/manifests/omnia.fx.ux.manifest.json +1 -1
- package/internal-do-not-import-from-here/ux/app/management/tabs/templates/Template.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/colorschemapicker/ColorSchemaEditor.d.ts +45 -5
- package/internal-do-not-import-from-here/ux/colorschemapicker/ColorSchemaPicker.d.ts +117 -91
- package/internal-do-not-import-from-here/ux/fileuploader/FileUploader.d.ts +26 -0
- package/internal-do-not-import-from-here/ux/layoutcanvas/shared/layoutitemsrenderer/LayoutBlockRenderer.d.ts +32 -4
- package/internal-do-not-import-from-here/ux/layoutcanvas/shared/layoutitemsrenderer/LayoutSectionRenderer.d.ts +32 -4
- package/internal-do-not-import-from-here/ux/mediapickerV2/Utils/getMediaProvider.d.ts +8 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/Utils/index.d.ts +1 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/chrome/MediaPicker.css.d.ts +2 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/chrome/MediaPicker.d.ts +75 -50
- package/internal-do-not-import-from-here/ux/mediapickerV2/chrome/components/MediaGallerySelector.css.d.ts +1 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/chrome/core/MediaFileProcessor.d.ts +2 -2
- package/internal-do-not-import-from-here/ux/mediapickerV2/chrome/core/MediaPickerImageHandler.d.ts +2 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/chrome/core/utils.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/mediapickerV2/chrome/types.d.ts +2 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/handlers/gallery/ImageHandler.d.ts +12 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/handlers/gallery/VideoHandler.d.ts +9 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/handlers/gallery/index.d.ts +2 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/handlers/imagetransformer/cropByRatio.d.ts +24 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/handlers/imagetransformer/filter.d.ts +11 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/handlers/imagetransformer/flip.d.ts +8 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/handlers/imagetransformer/index.d.ts +4 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/handlers/imagetransformer/utils.d.ts +13 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/handlers/index.d.ts +3 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/handlers/provider/BaseImageHandler.d.ts +47 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/handlers/provider/BaseVideoHandler.d.ts +36 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/handlers/provider/index.d.ts +2 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagegrid/ImageGrid.d.ts +22 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagetransformer/Components/cropper/ImageCropper.d.ts +6 -38
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagetransformer/Components/editor/ImageEditor.css.d.ts +1 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagetransformer/Components/editor/ImageEditorCanvas.d.ts +51 -66
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagetransformer/Components/filters/ImageFilters.d.ts +5 -20
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagetransformer/ImageTransformer.d.ts +4 -19
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagetransformer/Utils/cropUtils.d.ts +21 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagetransformer/Utils/index.d.ts +2 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagetransformer/Utils/transformUtils.d.ts +7 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagetransformer/loc/localize.d.ts +2 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagetransformer/store/ImageTransformerStore.d.ts +236 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagetransformer/store/index.d.ts +1 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/interfaces/IImageTransformHandler.d.ts +16 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/interfaces/IMediaPickerGalleryHandler.d.ts +10 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/interfaces/IMediaPickerProviderMediaHandler.d.ts +56 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/interfaces/index.d.ts +3 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/mediaprovider/MediaProvider.css.d.ts +0 -2
- package/internal-do-not-import-from-here/ux/mediapickerV2/mediaprovider/MediaProvider.d.ts +53 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/stores/MediaPickerCommonStore.d.ts +84 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/stores/MediaPickerGalleryStore.d.ts +190 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/stores/ProviderStore.d.ts +241 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/stores/constants.d.ts +2 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/stores/index.d.ts +5 -3
- package/internal-do-not-import-from-here/ux/mediapickerV2/stores/types.d.ts +55 -0
- package/internal-do-not-import-from-here/ux/mediapickerproviders/Youtube/YouTubeProvider.d.ts +48 -0
- package/internal-do-not-import-from-here/ux/mediapickerproviders/bingprovider-v2/BingProvider.d.ts +4 -395
- package/internal-do-not-import-from-here/ux/mediapickerproviders/bingprovider-v2/handler.d.ts +9 -0
- package/internal-do-not-import-from-here/ux/mediapickerproviders/bingprovider-v2/searchFilters.d.ts +19 -0
- package/internal-do-not-import-from-here/ux/mediapickerproviders/mycomputerprovider/MyComputerProvider.css.d.ts +4 -0
- package/internal-do-not-import-from-here/ux/mediapickerproviders/pexelsprovider-V2/PexelProvider.d.ts +4 -395
- package/internal-do-not-import-from-here/ux/multitextinput/MultiTextInput.d.ts +7 -3
- package/internal-do-not-import-from-here/ux/organizationtree/OrganizationTree.css.d.ts +9 -1
- package/internal-do-not-import-from-here/ux/organizationtree/OrganizationTree.d.ts +68 -31
- package/internal-do-not-import-from-here/ux/organizationtree/reportees/Reportees.d.ts +63 -18
- package/internal-do-not-import-from-here/ux/oxide/column/ColumnGrid.d.ts +1 -1
- package/internal-do-not-import-from-here/ux/oxide/image/Image.d.ts +21 -0
- package/internal-do-not-import-from-here/ux/persona/Persona.css.d.ts +7 -1
- package/internal-do-not-import-from-here/ux/persona/Persona.d.ts +71 -26
- package/internal-do-not-import-from-here/ux/theming-v2/themeprovider/ThemeProvider.d.ts +707 -681
- package/internal-do-not-import-from-here/wctypings.d.ts +149 -101
- package/package.json +2 -2
- package/internal-do-not-import-from-here/ux/depricated-mediapicker/components/ImageSelector.css.d.ts +0 -6
- package/internal-do-not-import-from-here/ux/depricated-mediapicker/components/ImageSelector.d.ts +0 -30
- package/internal-do-not-import-from-here/ux/imagegrid/ImageGrid copy.d.ts +0 -1
- package/internal-do-not-import-from-here/ux/imagegrid/ImageGrid.css.d.ts +0 -1
- package/internal-do-not-import-from-here/ux/imagegrid/ImageGrid.d.ts +0 -138
- package/internal-do-not-import-from-here/ux/imagegrid/loc/index.d.ts +0 -1
- package/internal-do-not-import-from-here/ux/imagegrid/loc/localize.d.ts +0 -8
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagegrid/index.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/imagetransformer/Components/Interfaces.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/mediapickerV2/stores/MediaGalleryStore.d.ts +0 -59
- package/internal-do-not-import-from-here/ux/mediapickerV2/stores/MediaPickerEditorStore.d.ts +0 -159
- package/internal-do-not-import-from-here/ux/mediapickerV2/stores/MediaPickerProviderStore.d.ts +0 -116
- package/internal-do-not-import-from-here/ux/mediapickerproviders/Youtube/IYouTubeProvider.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/mediapickerproviders/bingprovider-v2/BingProvider_old.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/mediapickerproviders/mediaproviderbase/GridViewMediaProviderComponent.css.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/mediapickerproviders/mediaproviderbase/GridViewMediaProviderComponent.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/mediapickerproviders/mediaproviderbase/MediaProviderComponentBase.css.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/mediapickerproviders/mediaproviderbase/MediaProviderComponentBase.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/mediapickerproviders/mediaproviderbase/MultiSelectMediaProviderComponentBase.d.ts +0 -0
- package/internal-do-not-import-from-here/ux/organizationtree/IOrganizationTree.d.ts +0 -22
- package/internal-do-not-import-from-here/ux/organizationtree/reportees/IReportees.d.ts +0 -21
- package/internal-do-not-import-from-here/ux/persona/IPersona.d.ts +0 -23
- /package/internal-do-not-import-from-here/ux/{imagegrid → mediapickerV2}/index.d.ts +0 -0
@@ -0,0 +1,236 @@
|
|
1
|
+
import { MediaPickerCropTransformation, MediaPickerImageRatio, MediaPickerRenditionData, ImageTransformerOptions, MediaPickerImageSettings, MediaPickerImageInformation, MediaPickerImageTransformationResult, MediaPickerTransformation, MediaPickerRollupImageRatio, MediaPickerFilterTransformation } from "@omnia/fx-models";
|
2
|
+
import ImageEditor from "tui-image-editor";
|
3
|
+
import { ImageRendition, MediaState } from "../../stores";
|
4
|
+
import { IImageTransformHandler } from "../../interfaces";
|
5
|
+
export declare const useMediaPickerImageTransformerStore: () => {
|
6
|
+
actions: {
|
7
|
+
onDispatching: {
|
8
|
+
resetState: {
|
9
|
+
subscribe(fn: () => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
10
|
+
};
|
11
|
+
changeEditingImage: {
|
12
|
+
subscribe(fn: (mediaState: MediaState) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
13
|
+
};
|
14
|
+
transform: {
|
15
|
+
subscribe(fn: (options: MediaPickerTransformation, handler: IImageTransformHandler) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
16
|
+
};
|
17
|
+
updateTransformedData: {
|
18
|
+
subscribe(fn: (options: MediaPickerTransformation, handler: IImageTransformHandler) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
19
|
+
};
|
20
|
+
updateTransformedImageToGallery: {
|
21
|
+
subscribe(fn: () => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
22
|
+
};
|
23
|
+
ratio: {
|
24
|
+
subscribe(fn: () => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
25
|
+
};
|
26
|
+
setBase64Image: {
|
27
|
+
subscribe(fn: (base64: string) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
28
|
+
};
|
29
|
+
initUiOptions: {
|
30
|
+
subscribe(fn: () => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
31
|
+
};
|
32
|
+
ensureImageRenditionData: {
|
33
|
+
subscribe(fn: () => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
34
|
+
};
|
35
|
+
toggleImageTransformer: {
|
36
|
+
subscribe(fn: (show: boolean) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
37
|
+
};
|
38
|
+
transformImageFromSource: {
|
39
|
+
subscribe(fn: () => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
40
|
+
};
|
41
|
+
initCropper: {
|
42
|
+
subscribe(fn: () => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
43
|
+
};
|
44
|
+
};
|
45
|
+
onDispatched: {
|
46
|
+
resetState: {
|
47
|
+
subscribe(fn: (result: void) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
48
|
+
};
|
49
|
+
changeEditingImage: {
|
50
|
+
subscribe(fn: (result: void, mediaState: MediaState) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
51
|
+
};
|
52
|
+
transform: {
|
53
|
+
subscribe(fn: (result: void, options: MediaPickerTransformation, handler: IImageTransformHandler) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
54
|
+
};
|
55
|
+
updateTransformedData: {
|
56
|
+
subscribe(fn: (result: void, options: MediaPickerTransformation, handler: IImageTransformHandler) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
57
|
+
};
|
58
|
+
updateTransformedImageToGallery: {
|
59
|
+
subscribe(fn: (result: void) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
60
|
+
};
|
61
|
+
ratio: {
|
62
|
+
subscribe(fn: (result: {
|
63
|
+
addDefault(ratio: MediaPickerImageRatio): void;
|
64
|
+
add4Rollup(ratio: MediaPickerRollupImageRatio): void;
|
65
|
+
loadRatios(): Promise<void>;
|
66
|
+
}) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
67
|
+
};
|
68
|
+
setBase64Image: {
|
69
|
+
subscribe(fn: (result: void, base64: string) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
70
|
+
};
|
71
|
+
initUiOptions: {
|
72
|
+
subscribe(fn: (result: void) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
73
|
+
};
|
74
|
+
ensureImageRenditionData: {
|
75
|
+
subscribe(fn: (result: void) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
76
|
+
};
|
77
|
+
toggleImageTransformer: {
|
78
|
+
subscribe(fn: (result: void, show: boolean) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
79
|
+
};
|
80
|
+
transformImageFromSource: {
|
81
|
+
subscribe(fn: (result: void) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
82
|
+
};
|
83
|
+
initCropper: {
|
84
|
+
subscribe(fn: (result: void) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
85
|
+
};
|
86
|
+
};
|
87
|
+
onFailure: {
|
88
|
+
resetState: {
|
89
|
+
subscribe(fn: (failureReason: any) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
90
|
+
};
|
91
|
+
changeEditingImage: {
|
92
|
+
subscribe(fn: (failureReason: any, mediaState: MediaState) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
93
|
+
};
|
94
|
+
transform: {
|
95
|
+
subscribe(fn: (failureReason: any, options: MediaPickerTransformation, handler: IImageTransformHandler) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
96
|
+
};
|
97
|
+
updateTransformedData: {
|
98
|
+
subscribe(fn: (failureReason: any, options: MediaPickerTransformation, handler: IImageTransformHandler) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
99
|
+
};
|
100
|
+
updateTransformedImageToGallery: {
|
101
|
+
subscribe(fn: (failureReason: any) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
102
|
+
};
|
103
|
+
ratio: {
|
104
|
+
subscribe(fn: (failureReason: any) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
105
|
+
};
|
106
|
+
setBase64Image: {
|
107
|
+
subscribe(fn: (failureReason: any, base64: string) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
108
|
+
};
|
109
|
+
initUiOptions: {
|
110
|
+
subscribe(fn: (failureReason: any) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
111
|
+
};
|
112
|
+
ensureImageRenditionData: {
|
113
|
+
subscribe(fn: (failureReason: any) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
114
|
+
};
|
115
|
+
toggleImageTransformer: {
|
116
|
+
subscribe(fn: (failureReason: any, show: boolean) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
117
|
+
};
|
118
|
+
transformImageFromSource: {
|
119
|
+
subscribe(fn: (failureReason: any) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
120
|
+
};
|
121
|
+
initCropper: {
|
122
|
+
subscribe(fn: (failureReason: any) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
123
|
+
};
|
124
|
+
};
|
125
|
+
} & {
|
126
|
+
resetState(): void;
|
127
|
+
changeEditingImage(mediaState: MediaState): void;
|
128
|
+
transform(options: MediaPickerTransformation, handler: IImageTransformHandler): void;
|
129
|
+
updateTransformedData(options: MediaPickerTransformation, handler: IImageTransformHandler): void;
|
130
|
+
/**
|
131
|
+
* Update the image transform back to the gallery
|
132
|
+
*/
|
133
|
+
updateTransformedImageToGallery(): void;
|
134
|
+
/**
|
135
|
+
* Used after the image is transformed to update the image data transformation
|
136
|
+
* @param imageTransformHandler the image transform handler
|
137
|
+
* @param options options for specific transformation handler
|
138
|
+
*/
|
139
|
+
ratio: () => {
|
140
|
+
addDefault(ratio: MediaPickerImageRatio): void;
|
141
|
+
add4Rollup(ratio: MediaPickerRollupImageRatio): void;
|
142
|
+
loadRatios(): Promise<void>;
|
143
|
+
};
|
144
|
+
/**
|
145
|
+
* Set the new base64 image
|
146
|
+
*/
|
147
|
+
setBase64Image(base64: string): void;
|
148
|
+
/**
|
149
|
+
* initialize the image transformer
|
150
|
+
*/
|
151
|
+
initUiOptions: () => void;
|
152
|
+
ensureImageRenditionData(): void;
|
153
|
+
toggleImageTransformer(show: boolean): void;
|
154
|
+
transformImageFromSource(): Promise<void>;
|
155
|
+
initCropper(): void;
|
156
|
+
};
|
157
|
+
events: {
|
158
|
+
onMutatedShowImageTransformer: import("@omnia/fx").MessageBusExposeOnlySubscription<boolean>;
|
159
|
+
onMutatedImageRatios: import("@omnia/fx").MessageBusExposeOnlySubscription<MediaPickerImageRatio[]>;
|
160
|
+
onMutatedRollupRatios: import("@omnia/fx").MessageBusExposeOnlySubscription<MediaPickerRollupImageRatio[]>;
|
161
|
+
onMutatedEditorOptions: import("@omnia/fx").MessageBusExposeOnlySubscription<ImageTransformerOptions>;
|
162
|
+
onMutatedSettings: import("@omnia/fx").MessageBusExposeOnlySubscription<MediaPickerImageSettings>;
|
163
|
+
onMutatedImageTransformedResult: import("@omnia/fx").MessageBusExposeOnlySubscription<MediaPickerImageTransformationResult>;
|
164
|
+
onMutatedCurrentImageFileInfo: import("@omnia/fx").MessageBusExposeOnlySubscription<MediaPickerImageInformation>;
|
165
|
+
onMutatedUiOptions: import("@omnia/fx").MessageBusExposeOnlySubscription<ImageTransformerOptions>;
|
166
|
+
onMutatedEditorInstance: import("@omnia/fx").MessageBusExposeOnlySubscription<ImageEditor>;
|
167
|
+
onMutatedSelectedCropArea: import("@omnia/fx").MessageBusExposeOnlySubscription<MediaPickerCropTransformation>;
|
168
|
+
onMutatedSelectedRatio: import("@omnia/fx").MessageBusExposeOnlySubscription<MediaPickerImageRatio>;
|
169
|
+
onMutatedSelectedRendition: import("@omnia/fx").MessageBusExposeOnlySubscription<MediaPickerRenditionData>;
|
170
|
+
onMutatedShowWarningCropInvalidDialog: import("@omnia/fx").MessageBusExposeOnlySubscription<boolean>;
|
171
|
+
onMutatedCustomCropZone: import("@omnia/fx").MessageBusExposeOnlySubscription<MediaPickerCropTransformation>;
|
172
|
+
onMutatedCurrentFilter: import("@omnia/fx").MessageBusExposeOnlySubscription<MediaPickerFilterTransformation>;
|
173
|
+
} & Record<string, import("@omnia/fx-models").IMessageBusTopicPublishSubscriber<any>>;
|
174
|
+
mutate: {
|
175
|
+
showImageTransformer: (value: boolean | ((prev: boolean) => boolean)) => void;
|
176
|
+
imageRatios: (value: MediaPickerImageRatio[] | ((prev: MediaPickerImageRatio[]) => MediaPickerImageRatio[])) => void;
|
177
|
+
rollupRatios: (value: MediaPickerRollupImageRatio[] | ((prev: MediaPickerRollupImageRatio[]) => MediaPickerRollupImageRatio[])) => void;
|
178
|
+
editorOptions: (value: ImageTransformerOptions | ((prev: ImageTransformerOptions) => ImageTransformerOptions)) => void;
|
179
|
+
settings: (value: MediaPickerImageSettings | ((prev: MediaPickerImageSettings) => MediaPickerImageSettings)) => void;
|
180
|
+
imageTransformedResult: (value: MediaPickerImageTransformationResult | ((prev: MediaPickerImageTransformationResult) => MediaPickerImageTransformationResult)) => void;
|
181
|
+
currentImageFileInfo: (value: MediaPickerImageInformation | ((prev: MediaPickerImageInformation) => MediaPickerImageInformation)) => void;
|
182
|
+
uiOptions: (value: ImageTransformerOptions | ((prev: ImageTransformerOptions) => ImageTransformerOptions)) => void;
|
183
|
+
editorInstance: (value: ImageEditor | ((prev: ImageEditor) => ImageEditor)) => void;
|
184
|
+
selectedCropArea: (value: MediaPickerCropTransformation | ((prev: MediaPickerCropTransformation) => MediaPickerCropTransformation)) => void;
|
185
|
+
selectedRatio: (value: MediaPickerImageRatio | ((prev: MediaPickerImageRatio) => MediaPickerImageRatio)) => void;
|
186
|
+
selectedRendition: (value: MediaPickerRenditionData | ((prev: MediaPickerRenditionData) => MediaPickerRenditionData)) => void;
|
187
|
+
showWarningCropInvalidDialog: (value: boolean | ((prev: boolean) => boolean)) => void;
|
188
|
+
customCropZone: (value: MediaPickerCropTransformation | ((prev: MediaPickerCropTransformation) => MediaPickerCropTransformation)) => void;
|
189
|
+
currentFilter: (value: MediaPickerFilterTransformation | ((prev: MediaPickerFilterTransformation) => MediaPickerFilterTransformation)) => void;
|
190
|
+
};
|
191
|
+
get: {
|
192
|
+
renditions(): {
|
193
|
+
/**
|
194
|
+
*
|
195
|
+
* @returns the default rendition, which is the one that will be rendered on the page or anywhere
|
196
|
+
*/
|
197
|
+
default: () => {
|
198
|
+
cropArea: () => MediaPickerCropTransformation;
|
199
|
+
ratioId(): number;
|
200
|
+
};
|
201
|
+
/**
|
202
|
+
*
|
203
|
+
* @returns the variants of the rendition, which is the one that will be rolled up
|
204
|
+
*/
|
205
|
+
variants: () => {
|
206
|
+
getByRatioId: (ratioId: number) => MediaPickerRenditionData;
|
207
|
+
getCropAreaByRatioId: (ratioId: number) => MediaPickerCropTransformation;
|
208
|
+
};
|
209
|
+
current: () => ImageRendition;
|
210
|
+
};
|
211
|
+
editorInstance(): ImageEditor;
|
212
|
+
currentTransformation(): MediaPickerImageTransformationResult;
|
213
|
+
showImageEditingMenu: () => boolean;
|
214
|
+
ratio(): {
|
215
|
+
getById: (id: number) => MediaPickerImageRatio;
|
216
|
+
};
|
217
|
+
};
|
218
|
+
state: {
|
219
|
+
showImageTransformer: boolean;
|
220
|
+
imageRatios: MediaPickerImageRatio[];
|
221
|
+
rollupRatios: MediaPickerRollupImageRatio[];
|
222
|
+
editorOptions: ImageTransformerOptions;
|
223
|
+
settings: MediaPickerImageSettings;
|
224
|
+
imageTransformedResult: MediaPickerImageTransformationResult;
|
225
|
+
currentImageFileInfo: MediaPickerImageInformation;
|
226
|
+
uiOptions: ImageTransformerOptions;
|
227
|
+
editorInstance: ImageEditor;
|
228
|
+
selectedCropArea: MediaPickerCropTransformation;
|
229
|
+
selectedRatio: MediaPickerImageRatio;
|
230
|
+
selectedRendition: MediaPickerRenditionData;
|
231
|
+
showWarningCropInvalidDialog: boolean;
|
232
|
+
customCropZone: MediaPickerCropTransformation;
|
233
|
+
currentFilter: MediaPickerFilterTransformation;
|
234
|
+
};
|
235
|
+
};
|
236
|
+
export type ImageTransformerStore = ReturnType<typeof useMediaPickerImageTransformerStore>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./ImageTransformerStore";
|
package/internal-do-not-import-from-here/ux/mediapickerV2/interfaces/IImageTransformHandler.d.ts
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
import { MediaPickerTransformation } from "@omnia/fx-models";
|
2
|
+
/**
|
3
|
+
* Interface for image transform handlers
|
4
|
+
* Each handler must implement this interface
|
5
|
+
*/
|
6
|
+
export interface IImageTransformHandler {
|
7
|
+
/**
|
8
|
+
* @param options parameters needed for the transformation
|
9
|
+
*/
|
10
|
+
transform(options: MediaPickerTransformation): Promise<void>;
|
11
|
+
/**
|
12
|
+
* Update the transformation data in the store
|
13
|
+
* @param options parameters needed for the transformation
|
14
|
+
*/
|
15
|
+
updateTransformationData(options: MediaPickerTransformation): Promise<void>;
|
16
|
+
}
|
package/internal-do-not-import-from-here/ux/mediapickerV2/interfaces/IMediaPickerGalleryHandler.d.ts
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
import { MediaState } from "../stores";
|
2
|
+
/**
|
3
|
+
* @description interface for the gallery handler
|
4
|
+
*/
|
5
|
+
export interface IMediaPickerGalleryHandler {
|
6
|
+
/**
|
7
|
+
* @description the handler for when a media is selected, which handles the way the media is updated/transformed
|
8
|
+
*/
|
9
|
+
onSelectMedia: (index: number, media: MediaState) => void;
|
10
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import { GuidValue, ImageInformation, MediaItem, MediaPickerImageScaling, MediaPickerVideo } from "@omnia/fx-models";
|
2
|
+
/**
|
3
|
+
* @description interface for media picker provider, which contains the logic for **handling the media picker provider** events
|
4
|
+
*/
|
5
|
+
export interface IMediaPickerProviderHandler {
|
6
|
+
/**
|
7
|
+
* @description handle select media event in the provider
|
8
|
+
* @param media the media that gets selected in the provider
|
9
|
+
*/
|
10
|
+
selectMedia: (media: MediaItem | MediaPickerVideo) => Promise<void>;
|
11
|
+
/**
|
12
|
+
* @param searchKeyword handle the search event in the provider
|
13
|
+
* @returns {Promise<Array<MediaItem>>} the result of the search
|
14
|
+
*/
|
15
|
+
search: (searchKeyword: string) => Promise<Array<MediaItem>>;
|
16
|
+
/**
|
17
|
+
* @description handle the search more event in the provider, when the user scrolls to the bottom of the search result
|
18
|
+
* @param searchQueryText search query text
|
19
|
+
* @param lastLoadedIndex index of the last loaded item
|
20
|
+
* @returns {Promise<Array<MediaItem>>} the result of the search
|
21
|
+
*/
|
22
|
+
searchMore: (searchQueryText: string, lastLoadedIndex: number) => Promise<Array<MediaItem>>;
|
23
|
+
}
|
24
|
+
export type ProcessImageOptions = {
|
25
|
+
needScaling: boolean;
|
26
|
+
imageInfo: ImageInformation;
|
27
|
+
scalingOptions?: MediaPickerImageScaling;
|
28
|
+
};
|
29
|
+
export interface IMediaPickerImageProviderHandler extends IMediaPickerProviderHandler {
|
30
|
+
/**
|
31
|
+
* @description handle the image scaling event in the provider, when the user selects the image scaling option
|
32
|
+
* @param imageInfo the image info of the selected image
|
33
|
+
* @returns {Promise<boolean>} if the image needs scaling
|
34
|
+
*/
|
35
|
+
handleImageScaling: (imageInfo: ImageInformation) => Promise<boolean>;
|
36
|
+
/**
|
37
|
+
* @description check if the image supports transformation, This is because we need to handle the event when user selecting scaling options in a provider
|
38
|
+
* @param imageInfo the image info of the selected image
|
39
|
+
* @returns {boolean} if the image supports transformation
|
40
|
+
*/
|
41
|
+
processImageAndAddToGallery: (options: ProcessImageOptions) => Promise<void>;
|
42
|
+
/**
|
43
|
+
* @description handle the select image event in the provider, when the provider already process the image.
|
44
|
+
* @param imageInfo the image info of the selected image
|
45
|
+
*/
|
46
|
+
selectImageInfo: (imageInfo: ImageInformation) => Promise<void>;
|
47
|
+
}
|
48
|
+
export interface IMediaPickerVideoProviderHandler extends IMediaPickerProviderHandler {
|
49
|
+
/**
|
50
|
+
* @description handle the update media event in the provider, when the user updates the media in the gallery
|
51
|
+
* @note This will probably be used only for video providers, because in omnia the video provider will update the video, while the image transformer will transform the image **NOT** the provider
|
52
|
+
* @param media This will be the media that gets updated in the gallery
|
53
|
+
* @param id the id of the media that gets updated in gallery store
|
54
|
+
*/
|
55
|
+
updateMedia: (media: MediaItem | MediaPickerVideo, id: GuidValue) => Promise<void>;
|
56
|
+
}
|
@@ -1,5 +1,18 @@
|
|
1
|
+
import { VNode } from "vue";
|
2
|
+
import { IMediaPickerProviderHandler } from "../interfaces";
|
1
3
|
declare const _default: {
|
2
4
|
new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
5
|
+
handler: {
|
6
|
+
type: import("vue").PropType<IMediaPickerProviderHandler>;
|
7
|
+
} & {
|
8
|
+
type: import("vue").PropType<IMediaPickerProviderHandler>;
|
9
|
+
};
|
10
|
+
"v-slots": import("vue").Prop<{
|
11
|
+
default?: import("../../DefineVueTypings").Slot<any[]>;
|
12
|
+
} & {
|
13
|
+
search?: () => VNode | JSX.Element;
|
14
|
+
provider?: () => VNode | JSX.Element;
|
15
|
+
}>;
|
3
16
|
"infinite-scroll": {
|
4
17
|
type: import("vue").PropType<boolean>;
|
5
18
|
};
|
@@ -18,6 +31,17 @@ declare const _default: {
|
|
18
31
|
type: import("vue").PropType<boolean>;
|
19
32
|
};
|
20
33
|
}>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
34
|
+
handler: {
|
35
|
+
type: import("vue").PropType<IMediaPickerProviderHandler>;
|
36
|
+
} & {
|
37
|
+
type: import("vue").PropType<IMediaPickerProviderHandler>;
|
38
|
+
};
|
39
|
+
"v-slots": import("vue").Prop<{
|
40
|
+
default?: import("../../DefineVueTypings").Slot<any[]>;
|
41
|
+
} & {
|
42
|
+
search?: () => VNode | JSX.Element;
|
43
|
+
provider?: () => VNode | JSX.Element;
|
44
|
+
}>;
|
21
45
|
"infinite-scroll": {
|
22
46
|
type: import("vue").PropType<boolean>;
|
23
47
|
};
|
@@ -43,6 +67,17 @@ declare const _default: {
|
|
43
67
|
M: {};
|
44
68
|
Defaults: {};
|
45
69
|
}, Readonly<import("vue").ExtractPropTypes<{
|
70
|
+
handler: {
|
71
|
+
type: import("vue").PropType<IMediaPickerProviderHandler>;
|
72
|
+
} & {
|
73
|
+
type: import("vue").PropType<IMediaPickerProviderHandler>;
|
74
|
+
};
|
75
|
+
"v-slots": import("vue").Prop<{
|
76
|
+
default?: import("../../DefineVueTypings").Slot<any[]>;
|
77
|
+
} & {
|
78
|
+
search?: () => VNode | JSX.Element;
|
79
|
+
provider?: () => VNode | JSX.Element;
|
80
|
+
}>;
|
46
81
|
"infinite-scroll": {
|
47
82
|
type: import("vue").PropType<boolean>;
|
48
83
|
};
|
@@ -65,6 +100,17 @@ declare const _default: {
|
|
65
100
|
__isTeleport?: never;
|
66
101
|
__isSuspense?: never;
|
67
102
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
103
|
+
handler: {
|
104
|
+
type: import("vue").PropType<IMediaPickerProviderHandler>;
|
105
|
+
} & {
|
106
|
+
type: import("vue").PropType<IMediaPickerProviderHandler>;
|
107
|
+
};
|
108
|
+
"v-slots": import("vue").Prop<{
|
109
|
+
default?: import("../../DefineVueTypings").Slot<any[]>;
|
110
|
+
} & {
|
111
|
+
search?: () => VNode | JSX.Element;
|
112
|
+
provider?: () => VNode | JSX.Element;
|
113
|
+
}>;
|
68
114
|
"infinite-scroll": {
|
69
115
|
type: import("vue").PropType<boolean>;
|
70
116
|
};
|
@@ -84,11 +130,18 @@ declare const _default: {
|
|
84
130
|
};
|
85
131
|
}>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
86
132
|
propsDefinition: Omit<Readonly<{} & {
|
133
|
+
"v-slots"?: {
|
134
|
+
default?: import("../../DefineVueTypings").Slot<any[]>;
|
135
|
+
} & {
|
136
|
+
search?: () => VNode | JSX.Element;
|
137
|
+
provider?: () => VNode | JSX.Element;
|
138
|
+
};
|
87
139
|
searchable?: boolean;
|
88
140
|
welcomeMessage?: boolean;
|
89
141
|
"welcome-message"?: boolean;
|
90
142
|
infiniteScroll?: boolean;
|
91
143
|
"infinite-scroll"?: boolean;
|
144
|
+
handler?: IMediaPickerProviderHandler;
|
92
145
|
}>, never>;
|
93
146
|
};
|
94
147
|
export default _default;
|
@@ -0,0 +1,84 @@
|
|
1
|
+
/**
|
2
|
+
* @description The store that holds the common state for the media picker
|
3
|
+
* At the time this store was created, the only common state was the loading flags
|
4
|
+
* This store should not depend on any other store in the media picker
|
5
|
+
*/
|
6
|
+
export declare const MediaPickerCommonStore: () => {
|
7
|
+
state: {
|
8
|
+
showLoadingOverlay: boolean;
|
9
|
+
showLoadingProgress: boolean;
|
10
|
+
enableMediaCaption: boolean;
|
11
|
+
};
|
12
|
+
events: {
|
13
|
+
onMutatedShowLoadingOverlay: import("@omnia/fx").MessageBusExposeOnlySubscription<boolean>;
|
14
|
+
onMutatedShowLoadingProgress: import("@omnia/fx").MessageBusExposeOnlySubscription<boolean>;
|
15
|
+
onMutatedEnableMediaCaption: import("@omnia/fx").MessageBusExposeOnlySubscription<boolean>;
|
16
|
+
} & Record<string, import("@omnia/fx-models").IMessageBusTopicPublishSubscriber<any>>;
|
17
|
+
mutate: {
|
18
|
+
showLoadingOverlay: (value: boolean | ((prev: boolean) => boolean)) => void;
|
19
|
+
showLoadingProgress: (value: boolean | ((prev: boolean) => boolean)) => void;
|
20
|
+
enableMediaCaption: (value: boolean | ((prev: boolean) => boolean)) => void;
|
21
|
+
};
|
22
|
+
actions: {
|
23
|
+
onDispatching: {
|
24
|
+
toggleLoadingOverlay: {
|
25
|
+
subscribe(fn: (show: boolean) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
26
|
+
};
|
27
|
+
toggleLoadingProgress: {
|
28
|
+
subscribe(fn: (show: boolean) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
29
|
+
};
|
30
|
+
showLoading: {
|
31
|
+
subscribe(fn: () => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
32
|
+
};
|
33
|
+
finishLoading: {
|
34
|
+
subscribe(fn: () => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
35
|
+
};
|
36
|
+
resetState: {
|
37
|
+
subscribe(fn: () => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
38
|
+
};
|
39
|
+
};
|
40
|
+
onDispatched: {
|
41
|
+
toggleLoadingOverlay: {
|
42
|
+
subscribe(fn: (result: void, show: boolean) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
43
|
+
};
|
44
|
+
toggleLoadingProgress: {
|
45
|
+
subscribe(fn: (result: void, show: boolean) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
46
|
+
};
|
47
|
+
showLoading: {
|
48
|
+
subscribe(fn: (result: void) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
49
|
+
};
|
50
|
+
finishLoading: {
|
51
|
+
subscribe(fn: (result: void) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
52
|
+
};
|
53
|
+
resetState: {
|
54
|
+
subscribe(fn: (result: void) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
55
|
+
};
|
56
|
+
};
|
57
|
+
onFailure: {
|
58
|
+
toggleLoadingOverlay: {
|
59
|
+
subscribe(fn: (failureReason: any, show: boolean) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
60
|
+
};
|
61
|
+
toggleLoadingProgress: {
|
62
|
+
subscribe(fn: (failureReason: any, show: boolean) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
63
|
+
};
|
64
|
+
showLoading: {
|
65
|
+
subscribe(fn: (failureReason: any) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
66
|
+
};
|
67
|
+
finishLoading: {
|
68
|
+
subscribe(fn: (failureReason: any) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
69
|
+
};
|
70
|
+
resetState: {
|
71
|
+
subscribe(fn: (failureReason: any) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
|
72
|
+
};
|
73
|
+
};
|
74
|
+
} & {
|
75
|
+
toggleLoadingOverlay(show: boolean): void;
|
76
|
+
toggleLoadingProgress(show: boolean): void;
|
77
|
+
showLoading(): void;
|
78
|
+
finishLoading(): void;
|
79
|
+
resetState(): void;
|
80
|
+
};
|
81
|
+
get: {
|
82
|
+
isLoading: () => boolean;
|
83
|
+
};
|
84
|
+
};
|