@emailmaker/emailmaker 1.0.107-dev.1 → 1.0.107-dev.2
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/README.md +1 -1
- package/cli/lib/config.js +1 -1
- package/emailmaker-esm.js +4 -4
- package/emailmaker.d.ts +44 -213
- package/emailmaker.js +2 -2
- package/iframe/js/amp.CBamu9Jy.js +1 -1
- package/iframe/js/chunk.oX6nCJbK.js +1 -1
- package/iframe/js/iframe-eblock.js +1 -1
- package/iframe/js/iframe.js +1 -1
- package/iframe/js/rules.BSaCN7eK.js +1 -1
- package/iframe/js/sanitize-html.Dy7Uwo8P.js +1 -1
- package/package.json +1 -1
- package/static/amd/{d9706ce7.js → 401182d4.js} +1 -1
- package/static/amd/{2480eb3b.js → fd995713.js} +2 -2
- package/static/core/{41900faf2.js → 3a3fd9482.js} +1 -1
- package/static/core/{f6c370402.js → fddc1ad02.js} +1 -1
- /package/iframe/{iframe-eblock.e2c5cb99.html → iframe-eblock.abd61d56.html} +0 -0
- /package/iframe/{iframe.e2c5cb99.html → iframe.abd61d56.html} +0 -0
package/README.md
CHANGED
package/cli/lib/config.js
CHANGED
|
@@ -26,7 +26,7 @@ const DEFAULT_EXTENSIONS_API_PACKAGE = '@emailmaker/extensions-app';
|
|
|
26
26
|
const DEFAULT_EXTENSIONS_REACT_PACKAGE = '@emailmaker/extensions-react';
|
|
27
27
|
const DEFAULT_EXTENSIONS_SANDBOX_PACKAGE = '@emailmaker/extensions-sandbox';
|
|
28
28
|
const DEFAULT_CLI_PACKAGE = '@emailmaker/cli';
|
|
29
|
-
const DEFAULT_VERSION = '1.0.107-dev.
|
|
29
|
+
const DEFAULT_VERSION = '1.0.107-dev.2';
|
|
30
30
|
const DEFAULT_RUNTIME_VERSION = '0.9.0-dev.1';
|
|
31
31
|
const DEFAULT_UI_KIT_VERSION = '0.1.0-dev.1';
|
|
32
32
|
const DEFAULT_OPENAPI_BASE_URL = 'https://app.emailmaker.ru/api/';
|
package/emailmaker-esm.js
CHANGED
|
@@ -3,13 +3,13 @@ import { i as r, r as i, t as a } from "./static/core/89c71a33.js";
|
|
|
3
3
|
//#region src/plugin/facade/loadEngine.ts
|
|
4
4
|
var o = null;
|
|
5
5
|
function s() {
|
|
6
|
-
return o ||= import("./static/core/
|
|
6
|
+
return o ||= import("./static/core/fddc1ad02.js"), o;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/plugin/facade/loadUiCore.ts
|
|
10
10
|
var c = null;
|
|
11
11
|
function l() {
|
|
12
|
-
return c ||= import("./static/core/
|
|
12
|
+
return c ||= import("./static/core/3a3fd9482.js"), c;
|
|
13
13
|
}
|
|
14
14
|
(function() {
|
|
15
15
|
var e = window.__emailmaker__ || (window.__emailmaker__ = {}), t = e.prefetch, n = e.modules && typeof e.modules == "object" ? e.modules : {}, r = [
|
|
@@ -136,7 +136,7 @@ function l() {
|
|
|
136
136
|
}, n.registerPackage ||= function(e) {
|
|
137
137
|
n.packages[e.id] = e, n.validateAll();
|
|
138
138
|
}, t.__compat.registerHost({
|
|
139
|
-
version: "1.0.107-dev.
|
|
139
|
+
version: "1.0.107-dev.2",
|
|
140
140
|
supports: {
|
|
141
141
|
"ui-kit": "^0.1.0",
|
|
142
142
|
"extensions-api": "^0.9.0",
|
|
@@ -225,7 +225,7 @@ function w() {
|
|
|
225
225
|
function T() {
|
|
226
226
|
Promise.resolve().then(() => x()).catch(() => {});
|
|
227
227
|
}
|
|
228
|
-
var E = "1.0.107-dev.
|
|
228
|
+
var E = "1.0.107-dev.2";
|
|
229
229
|
async function D(e) {
|
|
230
230
|
await S();
|
|
231
231
|
}
|
package/emailmaker.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare namespace notification_d_exports {
|
|
2
|
-
export { FileManageErrorInfo
|
|
2
|
+
export { FileManageErrorInfo, FileManagerErrorCode, FilesQueryParams, IFileManagerApiError, ItemContextPayload, Notify$1 as Notify, NotifyEvent$1 as NotifyEvent, NotifyPlacement };
|
|
3
3
|
}
|
|
4
|
-
interface FileManageErrorInfo
|
|
4
|
+
interface FileManageErrorInfo {
|
|
5
5
|
message?: string;
|
|
6
6
|
code?: FileManagerErrorCode;
|
|
7
7
|
status?: number;
|
|
@@ -70,7 +70,7 @@ interface FilesQueryParams {
|
|
|
70
70
|
/**
|
|
71
71
|
* Context payload for operations involving items (files/folders).
|
|
72
72
|
*/
|
|
73
|
-
interface ItemContextPayload
|
|
73
|
+
interface ItemContextPayload {
|
|
74
74
|
itemIds?: string[];
|
|
75
75
|
itemNames?: string[];
|
|
76
76
|
folderId?: string | null;
|
|
@@ -100,7 +100,7 @@ declare namespace Notify$1 {
|
|
|
100
100
|
/**
|
|
101
101
|
* Payload for successful batch operations.
|
|
102
102
|
*/
|
|
103
|
-
export interface OperationSuccessPayload extends ItemContextPayload
|
|
103
|
+
export interface OperationSuccessPayload extends ItemContextPayload {
|
|
104
104
|
successCount: number;
|
|
105
105
|
totalCount: number;
|
|
106
106
|
eventSource?: UploadEventSource;
|
|
@@ -111,13 +111,13 @@ declare namespace Notify$1 {
|
|
|
111
111
|
export interface OperationErrorDetail {
|
|
112
112
|
itemId?: string;
|
|
113
113
|
itemName?: string;
|
|
114
|
-
error: FileManageErrorInfo
|
|
114
|
+
error: FileManageErrorInfo;
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
117
|
* Payload for batch operation errors.
|
|
118
118
|
* Extends ItemContextPayload with error-specific fields.
|
|
119
119
|
*/
|
|
120
|
-
export interface OperationErrorPayload extends ItemContextPayload
|
|
120
|
+
export interface OperationErrorPayload extends ItemContextPayload {
|
|
121
121
|
failCount: number;
|
|
122
122
|
totalCount: number;
|
|
123
123
|
errors?: OperationErrorDetail[];
|
|
@@ -144,7 +144,7 @@ declare namespace Notify$1 {
|
|
|
144
144
|
/** Successful operation result data */
|
|
145
145
|
data?: T;
|
|
146
146
|
/** Error for failed operation */
|
|
147
|
-
error?: FileManageErrorInfo
|
|
147
|
+
error?: FileManageErrorInfo;
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
150
|
* Result of a batch operation with support for detailed results.
|
|
@@ -187,7 +187,7 @@ declare namespace Notify$1 {
|
|
|
187
187
|
* Payload for rename operation errors.
|
|
188
188
|
*/
|
|
189
189
|
export interface RenameErrorPayload extends SingleItemPayload {
|
|
190
|
-
error: FileManageErrorInfo
|
|
190
|
+
error: FileManageErrorInfo;
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
193
193
|
* Source of the upload event: 'upload' for file picker/drag-drop, 'uploadByUrl' for URL upload.
|
|
@@ -204,7 +204,7 @@ declare namespace Notify$1 {
|
|
|
204
204
|
* Payload for file upload errors.
|
|
205
205
|
*/
|
|
206
206
|
export interface FileUploadErrorPayload extends FileUploadPayload {
|
|
207
|
-
error?: FileManageErrorInfo
|
|
207
|
+
error?: FileManageErrorInfo;
|
|
208
208
|
}
|
|
209
209
|
/**
|
|
210
210
|
* Payload for unsupported file type errors.
|
|
@@ -215,7 +215,7 @@ declare namespace Notify$1 {
|
|
|
215
215
|
/**
|
|
216
216
|
* Payload for folder operation errors and successes.
|
|
217
217
|
*/
|
|
218
|
-
export interface FolderOperationPayload extends ItemContextPayload
|
|
218
|
+
export interface FolderOperationPayload extends ItemContextPayload {
|
|
219
219
|
folderId?: string | null;
|
|
220
220
|
folderName?: string;
|
|
221
221
|
reason?: string;
|
|
@@ -226,7 +226,7 @@ declare namespace Notify$1 {
|
|
|
226
226
|
*/
|
|
227
227
|
export interface FileUrlValidationErrorPayload {
|
|
228
228
|
url?: string | null;
|
|
229
|
-
error: FileManageErrorInfo
|
|
229
|
+
error: FileManageErrorInfo;
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
232
232
|
* Payload for image file operations.
|
|
@@ -247,7 +247,7 @@ declare namespace Notify$1 {
|
|
|
247
247
|
* Payload for URL upload errors.
|
|
248
248
|
*/
|
|
249
249
|
export interface UrlUploadErrorPayload extends UrlUploadPayload {
|
|
250
|
-
error: FileManageErrorInfo
|
|
250
|
+
error: FileManageErrorInfo;
|
|
251
251
|
}
|
|
252
252
|
/**
|
|
253
253
|
* Payload for file fetch errors.
|
|
@@ -279,7 +279,7 @@ declare namespace Notify$1 {
|
|
|
279
279
|
*/
|
|
280
280
|
export interface AIImageGenerationFailedPayload extends AIImageGenerationBasePayload {
|
|
281
281
|
response?: unknown;
|
|
282
|
-
error?: FileManageErrorInfo
|
|
282
|
+
error?: FileManageErrorInfo;
|
|
283
283
|
}
|
|
284
284
|
/**
|
|
285
285
|
* Base type for error notification events.
|
|
@@ -724,110 +724,7 @@ interface IFrameErrorInfo {
|
|
|
724
724
|
sentryEventId: string;
|
|
725
725
|
}
|
|
726
726
|
declare namespace Notify {
|
|
727
|
-
type FM_Notifications<Notifications extends Record<string, any>> = { [Key in keyof Notifications as `FM_${Key & string}`]: Notifications[Key] };
|
|
728
|
-
/**
|
|
729
|
-
* Payload types for FM_* notification events.
|
|
730
|
-
* Mirror of FileManager.Notify payloads so types are meaningful without resolving @emailmaker/filemanager.
|
|
731
|
-
*/
|
|
732
|
-
namespace FM {
|
|
733
|
-
export interface FileManageErrorInfo {
|
|
734
|
-
message?: string;
|
|
735
|
-
code?: string;
|
|
736
|
-
status?: number;
|
|
737
|
-
raw?: unknown;
|
|
738
|
-
stack?: string;
|
|
739
|
-
}
|
|
740
|
-
export interface ItemContextPayload {
|
|
741
|
-
itemIds?: string[];
|
|
742
|
-
itemNames?: string[];
|
|
743
|
-
folderId?: string | null;
|
|
744
|
-
folderName?: string | null;
|
|
745
|
-
}
|
|
746
|
-
export interface SingleItemPayload {
|
|
747
|
-
itemId?: string;
|
|
748
|
-
itemName?: string;
|
|
749
|
-
folderId?: string | null;
|
|
750
|
-
folderName?: string | null;
|
|
751
|
-
}
|
|
752
|
-
export type UploadEventSource = 'upload' | 'uploadByUrl' | 'pixie' | 'iconStock' | 'imageStock' | 'gif';
|
|
753
|
-
export interface OperationErrorDetail {
|
|
754
|
-
itemId?: string;
|
|
755
|
-
itemName?: string;
|
|
756
|
-
error: FileManageErrorInfo;
|
|
757
|
-
}
|
|
758
|
-
export interface OperationErrorPayload extends ItemContextPayload {
|
|
759
|
-
failCount: number;
|
|
760
|
-
totalCount: number;
|
|
761
|
-
errors?: OperationErrorDetail[];
|
|
762
|
-
isTrashMove?: boolean;
|
|
763
|
-
eventSource?: UploadEventSource;
|
|
764
|
-
}
|
|
765
|
-
export interface OperationSuccessPayload extends ItemContextPayload {
|
|
766
|
-
successCount: number;
|
|
767
|
-
totalCount: number;
|
|
768
|
-
eventSource?: UploadEventSource;
|
|
769
|
-
}
|
|
770
|
-
export interface FolderOperationPayload extends ItemContextPayload {
|
|
771
|
-
folderId?: string | null;
|
|
772
|
-
folderName?: string;
|
|
773
|
-
reason?: string;
|
|
774
|
-
is_force_create?: boolean;
|
|
775
|
-
}
|
|
776
|
-
export interface RenameErrorPayload extends SingleItemPayload {
|
|
777
|
-
error: FileManageErrorInfo;
|
|
778
|
-
}
|
|
779
|
-
export interface FileUploadPayload extends SingleItemPayload {
|
|
780
|
-
uploadId?: string;
|
|
781
|
-
eventSource?: UploadEventSource;
|
|
782
|
-
}
|
|
783
|
-
export interface FileUploadErrorPayload extends FileUploadPayload {
|
|
784
|
-
error?: FileManageErrorInfo;
|
|
785
|
-
}
|
|
786
|
-
export interface UnsupportedFileTypePayload extends FileUploadErrorPayload {
|
|
787
|
-
fileType: string;
|
|
788
|
-
}
|
|
789
|
-
export interface FileUrlValidationErrorPayload {
|
|
790
|
-
url?: string | null;
|
|
791
|
-
error: FileManageErrorInfo;
|
|
792
|
-
}
|
|
793
|
-
export interface ImageFilePayload extends SingleItemPayload {
|
|
794
|
-
thumbnail?: string | null;
|
|
795
|
-
}
|
|
796
|
-
export interface UrlUploadPayload {
|
|
797
|
-
url?: string | null;
|
|
798
|
-
folderId?: string | null;
|
|
799
|
-
folderName?: string | null;
|
|
800
|
-
eventSource?: UploadEventSource;
|
|
801
|
-
}
|
|
802
|
-
export interface UrlUploadErrorPayload extends UrlUploadPayload {
|
|
803
|
-
error: FileManageErrorInfo;
|
|
804
|
-
}
|
|
805
|
-
export interface FetchFilesErrorPayload {
|
|
806
|
-
params?: {
|
|
807
|
-
folderId?: string;
|
|
808
|
-
search?: string;
|
|
809
|
-
page?: number;
|
|
810
|
-
limit?: number;
|
|
811
|
-
sortBy?: string;
|
|
812
|
-
sortOrder?: string;
|
|
813
|
-
itemType?: string;
|
|
814
|
-
};
|
|
815
|
-
}
|
|
816
|
-
export interface AIImageGenerationBasePayload {
|
|
817
|
-
request: string;
|
|
818
|
-
taskId?: string | null;
|
|
819
|
-
}
|
|
820
|
-
export interface AIImageGenerationStartedPayload extends AIImageGenerationBasePayload {
|
|
821
|
-
response?: unknown;
|
|
822
|
-
}
|
|
823
|
-
export interface AIImageGenerationSuccessPayload extends AIImageGenerationBasePayload {
|
|
824
|
-
images: string[];
|
|
825
|
-
}
|
|
826
|
-
export interface AIImageGenerationFailedPayload extends AIImageGenerationBasePayload {
|
|
827
|
-
response?: unknown;
|
|
828
|
-
error?: FileManageErrorInfo;
|
|
829
|
-
}
|
|
830
|
-
} //
|
|
727
|
+
type FM_Notifications<Notifications extends Record<string, any>> = { [Key in keyof Notifications as `FM_${Key & string}`]: Notifications[Key] }; //
|
|
831
728
|
// ─────────────────────────────────────────────────────────────
|
|
832
729
|
// Base event types
|
|
833
730
|
// ─────────────────────────────────────────────────────────────
|
|
@@ -887,53 +784,9 @@ declare namespace Notify {
|
|
|
887
784
|
}
|
|
888
785
|
/**
|
|
889
786
|
* FM_* error ids from FileManager (mapped when resolved).
|
|
890
|
-
* Fallback list below ensures NotifyEvent.id includes FM_* when @emailmaker/filemanager is not resolved (e.g. on CI/Uni).
|
|
891
787
|
*/
|
|
892
788
|
type FMErrorMap = FM_Notifications<Notify$1.ErrorMap>;
|
|
893
|
-
|
|
894
|
-
interface FMErrorMapFallback {
|
|
895
|
-
FM_FILE_DELETE_ERROR: FM.OperationErrorPayload;
|
|
896
|
-
FM_FILE_MOVE_ERROR: FM.OperationErrorPayload;
|
|
897
|
-
FM_FILE_COPY_ERROR: FM.OperationErrorPayload;
|
|
898
|
-
FM_FILES_DELETE_ERROR: FM.OperationErrorPayload;
|
|
899
|
-
FM_FOLDER_DELETE_ERROR: FM.OperationErrorPayload;
|
|
900
|
-
FM_FILES_UPLOAD_BATCH_FAILED: FM.OperationErrorPayload;
|
|
901
|
-
FM_FILES_MOVE_ERROR: FM.OperationErrorPayload;
|
|
902
|
-
FM_FILES_COPY_ERROR: FM.OperationErrorPayload;
|
|
903
|
-
FM_FILE_DOWNLOAD_FAILED: FM.ImageFilePayload;
|
|
904
|
-
FM_IMAGE_DOWNLOAD_FAILED: FM.ImageFilePayload;
|
|
905
|
-
FM_IMAGE_SAVE_FAILED: FM.ImageFilePayload;
|
|
906
|
-
FM_EDITOR_INIT_FAILED: undefined;
|
|
907
|
-
FM_AI_RESPONSE_INVALID: unknown;
|
|
908
|
-
FM_AI_IMAGE_GENERATION_FAILED: FM.AIImageGenerationFailedPayload;
|
|
909
|
-
FM_AI_IMAGE_GENERATION_LIMIT_EXCEEDED: undefined;
|
|
910
|
-
FM_FILES_FETCH_FAILED: FM.FetchFilesErrorPayload;
|
|
911
|
-
FM_FILE_RENAME_DISABLED_BY_CONFIG: FM.SingleItemPayload;
|
|
912
|
-
FM_FILE_RENAME_FAILED: FM.RenameErrorPayload;
|
|
913
|
-
FM_FOLDER_RENAME_DISABLED_BY_CONFIG: FM.SingleItemPayload;
|
|
914
|
-
FM_FOLDER_RENAME_FAILED: FM.RenameErrorPayload;
|
|
915
|
-
FM_ITEM_RENAME_FAILED: FM.RenameErrorPayload;
|
|
916
|
-
FM_FILE_UPLOAD_ITEM_FAILED: FM.FileUploadErrorPayload;
|
|
917
|
-
FM_FILES_UPLOAD_URL_VALIDATION_FAILED: FM.UrlUploadPayload;
|
|
918
|
-
FM_FILES_UPLOAD_URL_NOT_SUPPORTED: FM.UrlUploadPayload;
|
|
919
|
-
FM_FILES_UPLOAD_BY_URL_FAILED: FM.UrlUploadErrorPayload;
|
|
920
|
-
FM_FILES_UPLOAD_PROVIDER_NOT_CONFIGURED: FM.FolderOperationPayload;
|
|
921
|
-
FM_FILES_MOVE_DIRECTORY_NOT_SELECTED: undefined;
|
|
922
|
-
FM_FILES_COPY_DIRECTORY_NOT_SELECTED: undefined;
|
|
923
|
-
FM_FOLDERS_FETCH_FAILED: FM.FolderOperationPayload;
|
|
924
|
-
FM_FOLDER_ALREADY_EXISTS: FM.FolderOperationPayload;
|
|
925
|
-
FM_FOLDER_ALREADY_EXISTS_COPY: FM.FolderOperationPayload;
|
|
926
|
-
FM_FOLDER_ALREADY_EXISTS_MOVE: FM.FolderOperationPayload;
|
|
927
|
-
FM_FOLDER_CREATE_PROVIDER_NOT_CONFIGURED: FM.FolderOperationPayload;
|
|
928
|
-
FM_FOLDER_CREATE_FAILED: FM.FolderOperationPayload;
|
|
929
|
-
FM_FOLDER_CHILDREN_COUNT_FAILED: FM.FolderOperationPayload;
|
|
930
|
-
FM_FOLDER_CHILDREN_FETCH_FAILED: FM.FolderOperationPayload;
|
|
931
|
-
FM_FILE_URL_VALIDATION_FAILED: FM.FileUrlValidationErrorPayload;
|
|
932
|
-
FM_TRASH_CLEAR_FAILED: FM.OperationErrorPayload;
|
|
933
|
-
FM_TRASH_CLEAR_ERROR: undefined;
|
|
934
|
-
}
|
|
935
|
-
/** FM_* keys from Fallback so they are always in NotifyEvent.id (CI/Uni); when FileManager resolves, FMErrorMap augments payload types via declaration merging in consuming code. */
|
|
936
|
-
interface ErrorMap extends FMErrorMapFallback {}
|
|
789
|
+
interface ErrorMap extends FMErrorMap {}
|
|
937
790
|
/**
|
|
938
791
|
* Union of all possible error event types.
|
|
939
792
|
* Includes both the mapped error IDs and the empty message variant.
|
|
@@ -957,29 +810,7 @@ declare namespace Notify {
|
|
|
957
810
|
BLOCK_REMOVING_SUCCESS: BlockDesc;
|
|
958
811
|
}
|
|
959
812
|
type FMSuccessMap = FM_Notifications<Notify$1.SuccessMap>;
|
|
960
|
-
|
|
961
|
-
* Fallback: FM_* success ids when @emailmaker/filemanager is not resolved at build time.
|
|
962
|
-
*/
|
|
963
|
-
interface FMSuccessMapFallback {
|
|
964
|
-
FM_FILE_DELETE_SUCCESS: FM.OperationSuccessPayload;
|
|
965
|
-
FM_FILE_MOVE_SUCCESS: FM.OperationSuccessPayload;
|
|
966
|
-
FM_FILE_COPY_SUCCESS: FM.OperationSuccessPayload;
|
|
967
|
-
FM_FILES_DELETE_SUCCESS: FM.OperationSuccessPayload;
|
|
968
|
-
FM_FILES_MOVE_SUCCESS: FM.OperationSuccessPayload;
|
|
969
|
-
FM_FILES_COPY_SUCCESS: FM.OperationSuccessPayload;
|
|
970
|
-
FM_FOLDER_DELETE_SUCCESS: FM.OperationSuccessPayload;
|
|
971
|
-
FM_FILES_UPLOAD_BATCH_SUCCESS: FM.OperationSuccessPayload;
|
|
972
|
-
FM_AI_IMAGE_GENERATION_STARTED: FM.AIImageGenerationStartedPayload;
|
|
973
|
-
FM_AI_IMAGE_GENERERATION_SUCCESS: FM.AIImageGenerationSuccessPayload;
|
|
974
|
-
FM_IMAGE_UPDATE_SUCCESS: FM.ImageFilePayload;
|
|
975
|
-
FM_FILE_RENAME_SUCCESS: FM.SingleItemPayload;
|
|
976
|
-
FM_FOLDER_RENAME_SUCCESS: FM.SingleItemPayload;
|
|
977
|
-
FM_FOLDER_CREATE_SUCCESS: FM.FolderOperationPayload;
|
|
978
|
-
FM_FILE_UPLOAD_ITEM_SUCCESS: FM.FileUploadPayload;
|
|
979
|
-
FM_TRASH_CLEARED_SUCCESS: undefined;
|
|
980
|
-
FM_FOLDER_NOT_FOUND_NAVIGATE: undefined;
|
|
981
|
-
}
|
|
982
|
-
interface SuccessMap extends FMSuccessMapFallback {}
|
|
813
|
+
interface SuccessMap extends FMSuccessMap {}
|
|
983
814
|
type Success = EmptyMessage | { [K in keyof SuccessMap]: EventBase<K, SuccessMap[K]> }[keyof SuccessMap];
|
|
984
815
|
type SuccessEvent = {
|
|
985
816
|
type: 'success';
|
|
@@ -989,15 +820,7 @@ declare namespace Notify {
|
|
|
989
820
|
EMAIL_TITLE_UPDATED: string;
|
|
990
821
|
}
|
|
991
822
|
type FMWarningMap = FM_Notifications<Notify$1.WarningMap>;
|
|
992
|
-
|
|
993
|
-
* Fallback: FM_* warning ids when @emailmaker/filemanager is not resolved at build time.
|
|
994
|
-
*/
|
|
995
|
-
interface FMWarningMapFallback {
|
|
996
|
-
FM_FILES_UPLOAD_UNSUPPORTED_TYPE: FM.UnsupportedFileTypePayload;
|
|
997
|
-
FM_FOLDER_OPERATION_VALIDATION_FAILED: FM.FolderOperationPayload;
|
|
998
|
-
FM_TRASH_CLEARED_PARTIAL: FM.OperationErrorPayload;
|
|
999
|
-
}
|
|
1000
|
-
interface WarningMap extends FMWarningMapFallback {}
|
|
823
|
+
interface WarningMap extends FMWarningMap {}
|
|
1001
824
|
type Warning = EmptyMessage | { [K in keyof WarningMap]: EventBase<K, WarningMap[K]> }[keyof WarningMap];
|
|
1002
825
|
type WarningEvent = {
|
|
1003
826
|
type: 'warning';
|
|
@@ -2890,29 +2713,37 @@ declare const version: string;
|
|
|
2890
2713
|
*/
|
|
2891
2714
|
declare const pluginRegistry: PluginRegistry;
|
|
2892
2715
|
/**
|
|
2893
|
-
*
|
|
2716
|
+
* errors
|
|
2894
2717
|
*/
|
|
2895
|
-
declare
|
|
2718
|
+
declare namespace errors {
|
|
2896
2719
|
/**
|
|
2897
|
-
*
|
|
2898
|
-
*
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2720
|
+
* FileManagerApiError
|
|
2721
|
+
* @example
|
|
2722
|
+
* ```typescript
|
|
2723
|
+
* throw new errors.FileManagerApiError(
|
|
2724
|
+
* 'File not found',
|
|
2725
|
+
* 'FileNotFound',
|
|
2726
|
+
* 404
|
|
2727
|
+
* );
|
|
2728
|
+
* ```
|
|
2729
|
+
*/
|
|
2730
|
+
export class FileManagerApiError extends Error implements IFileManagerApiError {
|
|
2731
|
+
public readonly code: FileManagerErrorCode;
|
|
2732
|
+
public readonly httpStatus?: number;
|
|
2733
|
+
public readonly details?: unknown;
|
|
2734
|
+
constructor(message: string, code: FileManagerErrorCode, httpStatus?: number, details?: unknown);
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
declare namespace helpers {
|
|
2908
2738
|
/**
|
|
2909
|
-
*
|
|
2910
|
-
* @
|
|
2911
|
-
*
|
|
2912
|
-
*
|
|
2739
|
+
* mapHttpStatusToErrorCode
|
|
2740
|
+
* @example
|
|
2741
|
+
* ```typescript
|
|
2742
|
+
* helpers.mapHttpStatusToErrorCode(404);
|
|
2743
|
+
* ```
|
|
2913
2744
|
*/
|
|
2914
|
-
mapHttpStatusToErrorCode(status: number, defaultCode?: FileManagerErrorCode): FileManagerErrorCode;
|
|
2915
|
-
}
|
|
2745
|
+
export function mapHttpStatusToErrorCode(status: number, defaultCode?: FileManagerErrorCode): FileManagerErrorCode;
|
|
2746
|
+
}
|
|
2916
2747
|
/**
|
|
2917
2748
|
* Initializes the editor and mounts it to a container.
|
|
2918
2749
|
*
|
package/emailmaker.js
CHANGED
|
@@ -61,7 +61,7 @@ __emailmaker__.define(`2f196f7c.js`,[`require`,`exports`,`module`],function(e,t,
|
|
|
61
61
|
|
|
62
62
|
__emailmaker__.define(`d5397f02.js`,[`require`,`exports`,`module`,`2f196f7c.js`,`6b52d1d3.js`,`e1ecfca6.js`],function(e,t,n){let r=e(`./2f196f7c.js`),i=e(`./6b52d1d3.js`),a=e(`./e1ecfca6.js`);function o(e=i.t){return e.getOrCreateInstance(a.r,()=>new r.t)}var s=o();Object.defineProperty(t,`t`,{enumerable:!0,get:function(){return s}})});
|
|
63
63
|
|
|
64
|
-
__emailmaker__.define(`emailmaker.js`,[`require`,`exports`,`module`,`50032f39.js`,`6b52d1d3.js`,`f1e55044.js`,`e1ecfca6.js`,`3ee69b54.js`,`d5397f02.js`],function(e,t,n){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let r=e(`./static/amd/50032f39.js`),i=e(`./static/amd/f1e55044.js`);e(`./static/amd/6b52d1d3.js`),e(`./static/amd/e1ecfca6.js`);let a=e(`./static/amd/d5397f02.js`),o=e(`./static/amd/3ee69b54.js`);var s=null;function c(){return s||=Promise.resolve().then(()=>e(`./static/amd/
|
|
64
|
+
__emailmaker__.define(`emailmaker.js`,[`require`,`exports`,`module`,`50032f39.js`,`6b52d1d3.js`,`f1e55044.js`,`e1ecfca6.js`,`3ee69b54.js`,`d5397f02.js`],function(e,t,n){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let r=e(`./static/amd/50032f39.js`),i=e(`./static/amd/f1e55044.js`);e(`./static/amd/6b52d1d3.js`),e(`./static/amd/e1ecfca6.js`);let a=e(`./static/amd/d5397f02.js`),o=e(`./static/amd/3ee69b54.js`);var s=null;function c(){return s||=Promise.resolve().then(()=>e(`./static/amd/401182d4.js`)),s}var l=null;function u(){return l||=Promise.resolve().then(()=>e(`./static/amd/fd995713.js`)),l}function d(e,t){if(e!==void 0)if(typeof e==`string`){if(e=document.querySelector(e),e)return e;let n=t.addDisposable(new i.t);return new Promise((t,r)=>{let i=new MutationObserver(()=>{e=document.querySelector(e),e&&(n.dispose(),t(e))});i.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),n.addDisposable({dispose:()=>i.disconnect()})})}else return e;else return e}var f=new Map,p=r.r({mapHttpStatusToErrorCode:()=>m});function m(e,t=`BackendError`){switch(e){case 400:return`ValidationError`;case 401:return`AuthenticationFailed`;case 403:return`AuthorizationFailed`;case 404:return`FileNotFound`;case 413:return`PayloadTooLarge`;case 415:return`UnsupportedMediaType`;case 429:return`RateLimitExceeded`;case 500:return`BackendError`;case 503:return`ServiceUnavailable`;case 504:return`Timeout`;default:return t}}(function(){"use strict";var t=window.__emailmaker__||(window.__emailmaker__={}),n=t.prefetch,r=t.modules&&typeof t.modules==`object`?t.modules:{},i=[`React`,`ReactDom`,`ReactDomClient`,`ReactJsxRuntime`,`ReactJsxDevRuntime`,`PropTypes`,`ReactRouterDom`,`Antd`,`AntDesignIcons`,`AntDesignCssinjs`,`AntDesignProLayout`,`Classnames`,`Dayjs`,`Uuid`,`Core`,`EmailmakerUiKit`];window.__emailmaker__.publicPath||(window.__emailmaker__.publicPath=(function(){var e=(function(){try{var e={}.url;return e.substring(0,e.lastIndexOf(`/`)+1)}catch{return`./`}})();e||=`./`;try{var t=String(e);if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t)||t.indexOf(`//`)===0)return t;var n=typeof document<`u`&&document.baseURI?document.baseURI:typeof window<`u`&&window.location?window.location.href:``;return n?new URL(t,n).href:t}catch{return String(e)}})()),window.__emailmaker__.assetUrl||(window.__emailmaker__.assetUrl=function(e){function t(e){try{var t=typeof document<`u`&&document.baseURI?document.baseURI:typeof window<`u`&&window.location?window.location.href:``;return t?new URL(String(e||``),t).href:String(e||``)}catch{return String(e||``)}}var n=String(e||``);if(!n)return``;if(/^(?:data:|blob:)/.test(n))return n;if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.indexOf(`//`)===0||n.charAt(0)===`/`)return t(n);var r=n.replace(/^\.\/+/,``).replace(/^\/+/,``),i=`static/media`.replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\/+$/,``),a=i&&r.indexOf(i+`/`)!==0?i+`/`+r:r,o=window.__emailmaker__.publicPath||`./`;try{return new URL(a,o).href}catch{return o.slice(-1)!==`/`&&(o+=`/`),t(o+a)}});var a=Promise.resolve().then(()=>e(`./static/amd/50c7eb6c.js`)).then(function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return e});t.modules=r,i.forEach(function(e){r[e]=a.then(function(t){var n=t[e];return r[e]=n,n})}),t.prefetch=function(){return a.then(function(){if(typeof n==`function`)return n()})}})(),(function(e){if(!(!e||typeof e!=`object`)){var t=e.__emailmaker__||={},n=t.__compat||={};n.host=n.host||null,n.packages=n.packages||{},n.warned=n.warned||{},n.normalizeVersion||=function(e){return String(e||``).split(`-`)[0]||`0.0.0`},n.parseVersion||=function(e){var t=n.normalizeVersion(e).split(`.`);return{major:parseInt(t[0]||`0`,10),minor:parseInt(t[1]||`0`,10),patch:parseInt(t[2]||`0`,10)}},n.compareVersions||=function(e,t){var r=n.parseVersion(e),i=n.parseVersion(t);return r.major===i.major?r.minor===i.minor?r.patch-i.patch:r.minor-i.minor:r.major-i.major},n.satisfies||=function(e,t){if(!t||t===`*`||t===`latest`)return!0;var r=n.normalizeVersion(e),i=String(t||``).trim();if(!i)return!0;if(i.charAt(0)===`^`){var a=n.parseVersion(i.slice(1)),o=n.parseVersion(r);return n.compareVersions(r,i.slice(1))<0?!1:a.major>0?o.major===a.major:a.minor>0?o.major===0&&o.minor===a.minor:o.major===0&&o.minor===0&&o.patch===a.patch}return n.normalizeVersion(r)===n.normalizeVersion(i)},n.warnOnce||=function(e,t,r){n.warned[e]||(n.warned[e]=!0)},n.validateAll||=function(){var e=n.host,t=n.packages||{};e&&e.supports&&Object.keys(t).forEach(function(r){var i=t[r],a=e.supports[r];a&&!n.satisfies(i.version,a)&&n.warnOnce(`host:`+r+`:`+i.version+`:`+a,`Host supports a different package version range.`,{packageId:r,packageVersion:i.version,supportedRange:a,hostVersion:e.version})}),Object.keys(t).forEach(function(r){var i=t[r],a=i.requires||{};Object.keys(a).forEach(function(o){var s=a[o],c=o===`host`?e&&e.version:t[o]&&t[o].version;c&&(n.satisfies(c,s)||n.warnOnce(r+`:`+o+`:`+c+`:`+s,`Loaded package is outside the declared compatibility range.`,{packageId:r,packageVersion:i.version,targetId:o,targetVersion:c,requiredRange:s}))})})},n.registerHost||=function(e){n.host=e,n.validateAll()},n.registerPackage||=function(e){n.packages[e.id]=e,n.validateAll()},t.__compat.registerHost({version:`1.0.107-dev.2`,supports:{"ui-kit":`^0.1.0`,"extensions-api":`^0.9.0`,"extensions-react":`^0.9.0`,"extensions-sandbox":`^0.9.0`}})}})(typeof window<`u`?window:typeof globalThis<`u`?globalThis:void 0);async function h(){typeof __emailmaker__<`u`&&typeof __emailmaker__.prefetch==`function`&&await __emailmaker__.prefetch()}var g=null,_=null,v=new WeakMap,y=`
|
|
65
65
|
.blocks-app-initial-spinner-wrapper {
|
|
66
66
|
width: 100%;
|
|
67
67
|
height: 100%;
|
|
@@ -89,7 +89,7 @@ __emailmaker__.define(`emailmaker.js`,[`require`,`exports`,`module`,`50032f39.js
|
|
|
89
89
|
100% {
|
|
90
90
|
transform: rotate(360deg);
|
|
91
91
|
}
|
|
92
|
-
}`;function b(e){let t=null;return async(n,r,i)=>(t||=Promise.resolve(e(n,r,i)).finally(()=>{t=null}),t)}function x(e){let t=e.getAuthToken;if(!t)return e;let n=v.get(t);return n||(n=b(t),v.set(t,n),Promise.resolve(n(e.user,e.project,void 0)).catch(e=>{})),{...e,getAuthToken:n}}function S(e,t){return{...e,element:t}}function C(){return()=>{}}function w(e){if(e.initialSpinner===!1||typeof document>`u`)return{options:e,cleanup:C()};let t=e.element;if(!t||typeof t==`string`)return{options:e,cleanup:C()};t.querySelectorAll(`.blocks-app-initial-spinner-wrapper`).forEach(e=>{e.remove()});let n=document.createElement(`div`);n.classList.add(`blocks-app-initial-spinner-wrapper`);let r=document.createElement(`div`);r.classList.add(`blocks-app-initial-spinner`),n.appendChild(r);let i=document.createElement(`style`);i.setAttribute(`data-emailmaker`,`true`),i.textContent=y,document.head?.appendChild(i),t.appendChild(n);let a=!1,o=()=>{a||(a=!0,n.remove(),i.remove())},s=e.handleChunkLoaded;return{options:{...e,handleChunkLoaded:()=>{o(),s?.()}},cleanup:o}}function T(){return g||=Promise.all([c(),u()]).then(()=>void 0),g}function E(){return _||=h(),_}function D(){return Promise.all([T(),E()]).then(()=>void 0)}function O(){let e=typeof __emailmaker__<`u`?__emailmaker__?.startupPrefetchMode:void 0;return e===`eager`||e===`idle`||e===`manual`||e===`off`?e:`eager`}function k(){Promise.resolve().then(()=>D()).catch(()=>{})}function A(){Promise.resolve().then(()=>E()).catch(()=>{})}var j=`1.0.107-dev.
|
|
92
|
+
}`;function b(e){let t=null;return async(n,r,i)=>(t||=Promise.resolve(e(n,r,i)).finally(()=>{t=null}),t)}function x(e){let t=e.getAuthToken;if(!t)return e;let n=v.get(t);return n||(n=b(t),v.set(t,n),Promise.resolve(n(e.user,e.project,void 0)).catch(e=>{})),{...e,getAuthToken:n}}function S(e,t){return{...e,element:t}}function C(){return()=>{}}function w(e){if(e.initialSpinner===!1||typeof document>`u`)return{options:e,cleanup:C()};let t=e.element;if(!t||typeof t==`string`)return{options:e,cleanup:C()};t.querySelectorAll(`.blocks-app-initial-spinner-wrapper`).forEach(e=>{e.remove()});let n=document.createElement(`div`);n.classList.add(`blocks-app-initial-spinner-wrapper`);let r=document.createElement(`div`);r.classList.add(`blocks-app-initial-spinner`),n.appendChild(r);let i=document.createElement(`style`);i.setAttribute(`data-emailmaker`,`true`),i.textContent=y,document.head?.appendChild(i),t.appendChild(n);let a=!1,o=()=>{a||(a=!0,n.remove(),i.remove())},s=e.handleChunkLoaded;return{options:{...e,handleChunkLoaded:()=>{o(),s?.()}},cleanup:o}}function T(){return g||=Promise.all([c(),u()]).then(()=>void 0),g}function E(){return _||=h(),_}function D(){return Promise.all([T(),E()]).then(()=>void 0)}function O(){let e=typeof __emailmaker__<`u`?__emailmaker__?.startupPrefetchMode:void 0;return e===`eager`||e===`idle`||e===`manual`||e===`off`?e:`eager`}function k(){Promise.resolve().then(()=>D()).catch(()=>{})}function A(){Promise.resolve().then(()=>E()).catch(()=>{})}var j=`1.0.107-dev.2`;async function M(e){await D()}async function N(e){let t=new i.t,n=await d(e.element,t);t.dispose();let r=x(S(e,n));if(n){let e=f.get(n);if(e)try{let t=await e;if(t.getElement()===n)return t.reset(r)}catch{f.get(n)===e&&f.delete(n)}}let a=w(r),o=a.options;await T(),A();let s=c().then(e=>e.init(o));n&&f.set(n,s);try{let e=await s;return n&&f.set(n,e),e}catch(e){throw a.cleanup(),n&&f.get(n)===s&&f.delete(n),e}}async function P(t){return(await Promise.resolve().then(()=>e(`./static/amd/26fd122c.js`))).parseAMP(t)}if(typeof window<`u`){let e=O();if(e===`eager`)k();else if(e===`idle`){let e=window.requestIdleCallback;typeof e==`function`?e(()=>k(),{timeout:1500}):setTimeout(()=>k(),0)}}Object.defineProperty(t,`errors`,{enumerable:!0,get:function(){return o.n}}),Object.defineProperty(t,`helpers`,{enumerable:!0,get:function(){return p}}),t.init=N,t.parseAMP=P,t.pluginRegistry=a.t,t.preload=M,t.version=j});
|
|
93
93
|
|
|
94
94
|
// Возвращаем API из entry модуля
|
|
95
95
|
return __emailmaker__.syncRequire("emailmaker.js");
|