@emailmaker/emailmaker 1.0.93-alpha.6 → 1.0.94-alpha.1
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 +82 -28
- package/asset-manifest.json +100 -103
- package/emailmaker-esm.js +1 -1
- package/emailmaker.d.ts +325 -171
- package/emailmaker.js +1 -1
- package/iframe/429.js +1 -1
- package/iframe/766.js +1 -1
- package/iframe/css/sandbox.css +1 -1
- package/iframe/iframe-eblock.c3b2b6b1c1d7208acd2a.html +1 -0
- package/iframe/iframe.c3b2b6b1c1d7208acd2a.html +1 -0
- package/iframe/js/826.d867e975.js +1 -0
- package/iframe/sandbox-eblock.js +1 -1
- package/iframe/sandbox.js +1 -1
- package/package.json +1 -1
- package/plugin.html +43 -2
- package/plugin_blocks_test.html +1 -1
- package/plugin_default.html +1 -1
- package/plugin_idigital.html +1 -1
- package/plugin_nota.html +1 -1
- package/plugin_s.html +1 -1
- package/static/css/57.a88d95af.chunk.css +1 -0
- package/static/css/6829.2bb82edc.chunk.css +1 -0
- package/static/js/1303.0207966d.js +2 -0
- package/static/js/{6882.3ddae565.js.LICENSE.txt → 1303.0207966d.js.LICENSE.txt} +2 -0
- package/static/js/1390.25844bb5.js +2 -0
- package/static/js/1654.640dc26f.js +2 -0
- package/static/js/1880.a21db601.chunk.js +1 -0
- package/static/js/2083.bbfa987f.js +2 -0
- package/static/js/3017.2c984cb7.chunk.js +1 -0
- package/static/js/3694.794212b6.js +1 -0
- package/static/js/4972.264e4569.js +1 -0
- package/static/js/5346.4aaf9222.chunk.js +2 -0
- package/static/js/57.cb438003.chunk.js +1 -0
- package/static/js/{578.15f9f307.chunk.js → 578.068dd4e8.chunk.js} +2 -2
- package/static/js/6501.876f3ec2.chunk.js +1 -0
- package/static/js/6819.efc5bf71.chunk.js +2 -0
- package/static/js/6829.aa692d38.chunk.js +2 -0
- package/static/js/{8084.67de697a.chunk.js → 8084.5458cfaf.chunk.js} +1 -1
- package/static/js/8473.aeb827aa.chunk.js +2 -0
- package/static/js/{721.84cc17ea.chunk.js.LICENSE.txt → 8473.aeb827aa.chunk.js.LICENSE.txt} +2 -0
- package/static/js/959.ef84be6d.js +2 -0
- package/static/js/9960.218c70ae.chunk.js +2 -0
- package/static/js/ant-locale/locale-ar_EG-js.a1f4a2ee.chunk.js +1 -0
- package/static/js/ant-locale/locale-az_AZ-js.1b3f2ec6.chunk.js +1 -0
- package/static/js/ant-locale/locale-bg_BG-js.2f68d816.chunk.js +1 -0
- package/static/js/ant-locale/locale-bn_BD-js.38ca14cb.chunk.js +1 -0
- package/static/js/ant-locale/locale-by_BY-js.927570db.chunk.js +1 -0
- package/static/js/ant-locale/locale-ca_ES-js.e4bdfa2b.chunk.js +1 -0
- package/static/js/ant-locale/locale-cs_CZ-js.f1151015.chunk.js +1 -0
- package/static/js/ant-locale/locale-da_DK-js.33e12cfb.chunk.js +1 -0
- package/static/js/ant-locale/locale-de_DE-js.42497042.chunk.js +1 -0
- package/static/js/ant-locale/locale-el_GR-js.007d40b4.chunk.js +1 -0
- package/static/js/ant-locale/locale-en_GB-js.6756ba01.chunk.js +1 -0
- package/static/js/ant-locale/locale-es_ES-js.43424efe.chunk.js +1 -0
- package/static/js/ant-locale/locale-et_EE-js.3694348e.chunk.js +1 -0
- package/static/js/ant-locale/locale-eu_ES-js.e2678a29.chunk.js +1 -0
- package/static/js/ant-locale/locale-fa_IR-js.3b6bfddc.chunk.js +1 -0
- package/static/js/ant-locale/locale-fi_FI-js.8e749864.chunk.js +1 -0
- package/static/js/ant-locale/locale-fr_BE-js.2aec36ca.chunk.js +1 -0
- package/static/js/ant-locale/locale-fr_CA-js.ba00ca3a.chunk.js +1 -0
- package/static/js/ant-locale/locale-fr_FR-js.1e6d0a10.chunk.js +1 -0
- package/static/js/ant-locale/locale-ga_IE-js.cc1f0f56.chunk.js +1 -0
- package/static/js/ant-locale/locale-gl_ES-js.c1588dec.chunk.js +1 -0
- package/static/js/ant-locale/locale-he_IL-js.1be3257a.chunk.js +1 -0
- package/static/js/ant-locale/locale-hi_IN-js.8e3ea1dc.chunk.js +1 -0
- package/static/js/ant-locale/locale-hr_HR-js.94001d08.chunk.js +1 -0
- package/static/js/ant-locale/locale-hu_HU-js.50a3ffc6.chunk.js +1 -0
- package/static/js/ant-locale/locale-hy_AM-js.6b20bceb.chunk.js +1 -0
- package/static/js/ant-locale/locale-id_ID-js.b380cc8b.chunk.js +1 -0
- package/static/js/ant-locale/locale-is_IS-js.995979c0.chunk.js +1 -0
- package/static/js/ant-locale/locale-it_IT-js.46a8ce6d.chunk.js +1 -0
- package/static/js/ant-locale/locale-ja_JP-js.69f9da33.chunk.js +1 -0
- package/static/js/ant-locale/locale-ka_GE-js.8b08646c.chunk.js +1 -0
- package/static/js/ant-locale/locale-kk_KZ-js.a1cc2ddc.chunk.js +1 -0
- package/static/js/ant-locale/locale-km_KH-js.09c630f9.chunk.js +1 -0
- package/static/js/ant-locale/locale-kmr_IQ-js.c25f3afa.chunk.js +1 -0
- package/static/js/ant-locale/locale-kn_IN-js.40066823.chunk.js +1 -0
- package/static/js/ant-locale/locale-ko_KR-js.68047848.chunk.js +1 -0
- package/static/js/ant-locale/locale-ku_IQ-js.594553b1.chunk.js +1 -0
- package/static/js/ant-locale/locale-lt_LT-js.08ac662b.chunk.js +1 -0
- package/static/js/ant-locale/locale-lv_LV-js.2a33af61.chunk.js +1 -0
- package/static/js/ant-locale/locale-mk_MK-js.caa088c9.chunk.js +1 -0
- package/static/js/ant-locale/locale-ml_IN-js.3aa233eb.chunk.js +1 -0
- package/static/js/ant-locale/locale-mn_MN-js.2550caa5.chunk.js +1 -0
- package/static/js/ant-locale/locale-ms_MY-js.924bfbf0.chunk.js +1 -0
- package/static/js/ant-locale/locale-my_MM-js.bc3805ae.chunk.js +1 -0
- package/static/js/ant-locale/locale-nb_NO-js.471cc88a.chunk.js +1 -0
- package/static/js/ant-locale/locale-ne_NP-js.52b65a1a.chunk.js +1 -0
- package/static/js/ant-locale/locale-nl_BE-js.2af0a7fe.chunk.js +1 -0
- package/static/js/ant-locale/locale-nl_NL-js.453457a0.chunk.js +1 -0
- package/static/js/ant-locale/locale-pl_PL-js.1e4b27da.chunk.js +1 -0
- package/static/js/ant-locale/locale-pt_BR-js.75dc6403.chunk.js +1 -0
- package/static/js/ant-locale/locale-pt_PT-js.b07438c3.chunk.js +1 -0
- package/static/js/ant-locale/locale-ro_RO-js.4a05dc9d.chunk.js +1 -0
- package/static/js/ant-locale/locale-si_LK-js.3b54f4c4.chunk.js +1 -0
- package/static/js/ant-locale/locale-sk_SK-js.cd76b6b1.chunk.js +1 -0
- package/static/js/ant-locale/locale-sl_SI-js.8afbce30.chunk.js +1 -0
- package/static/js/ant-locale/locale-sr_RS-js.0708405f.chunk.js +1 -0
- package/static/js/ant-locale/locale-sv_SE-js.9f47a065.chunk.js +1 -0
- package/static/js/ant-locale/locale-ta_IN-js.3b46361c.chunk.js +1 -0
- package/static/js/ant-locale/locale-th_TH-js.83e732d3.chunk.js +1 -0
- package/static/js/ant-locale/locale-tk_TK-js.63d0b187.chunk.js +1 -0
- package/static/js/ant-locale/locale-tr_TR-js.b5e42917.chunk.js +1 -0
- package/static/js/ant-locale/locale-uk_UA-js.ef0d8c8e.chunk.js +1 -0
- package/static/js/ant-locale/locale-ur_PK-js.904c3e1c.chunk.js +1 -0
- package/static/js/ant-locale/locale-vi_VN-js.f0324229.chunk.js +1 -0
- package/static/js/ant-locale/locale-zh_CN-js.428a6bc7.chunk.js +1 -0
- package/static/js/ant-locale/locale-zh_HK-js.0feb368f.chunk.js +1 -0
- package/static/js/ant-locale/locale-zh_TW-js.163140fa.chunk.js +1 -0
- package/static/js/{emailmaker_core.c003dc3f.js → emailmaker_core.62287a56.js} +2 -2
- package/translations.pot +825 -813
- package/iframe/iframe-eblock.06c6c57f3b110a111d9c.html +0 -1
- package/iframe/iframe.06c6c57f3b110a111d9c.html +0 -1
- package/iframe/js/826.cb9dbe4f.js +0 -1
- package/static/css/57.54f2a3c3.chunk.css +0 -1
- package/static/css/9879.ce48a50a.chunk.css +0 -1
- package/static/js/1275.ba0dbbc3.js +0 -2
- package/static/js/1880.de5a11ab.chunk.js +0 -1
- package/static/js/3017.8341ce82.chunk.js +0 -1
- package/static/js/3403.38f7b00a.js +0 -1
- package/static/js/4972.8646ad7f.js +0 -1
- package/static/js/5346.c29e03ef.chunk.js +0 -2
- package/static/js/57.60a05e80.chunk.js +0 -1
- package/static/js/5803.8372095d.js +0 -2
- package/static/js/6501.9585176a.chunk.js +0 -1
- package/static/js/6817.96c035e4.js +0 -2
- package/static/js/6819.1a83f209.chunk.js +0 -2
- package/static/js/6882.3ddae565.js +0 -2
- package/static/js/721.84cc17ea.chunk.js +0 -2
- package/static/js/8278.29ba94e8.js +0 -2
- package/static/js/9879.65d5b4c8.chunk.js +0 -2
- package/static/js/9925.617dade8.js +0 -1
- package/static/js/9960.2bbf10c6.chunk.js +0 -2
- package/static/js/ant-locale/locale-ar_EG-js.a100b6f8.chunk.js +0 -1
- package/static/js/ant-locale/locale-az_AZ-js.2e4b7b75.chunk.js +0 -1
- package/static/js/ant-locale/locale-bg_BG-js.8641fb51.chunk.js +0 -1
- package/static/js/ant-locale/locale-bn_BD-js.82309c5b.chunk.js +0 -1
- package/static/js/ant-locale/locale-by_BY-js.b4d863ac.chunk.js +0 -1
- package/static/js/ant-locale/locale-ca_ES-js.06c8fd9e.chunk.js +0 -1
- package/static/js/ant-locale/locale-cs_CZ-js.6bbad1d2.chunk.js +0 -1
- package/static/js/ant-locale/locale-da_DK-js.aa8e3af0.chunk.js +0 -1
- package/static/js/ant-locale/locale-de_DE-js.c8f4372c.chunk.js +0 -1
- package/static/js/ant-locale/locale-el_GR-js.e1f8ebce.chunk.js +0 -1
- package/static/js/ant-locale/locale-en_GB-js.ab57cafe.chunk.js +0 -1
- package/static/js/ant-locale/locale-es_ES-js.058c3991.chunk.js +0 -1
- package/static/js/ant-locale/locale-et_EE-js.935752fe.chunk.js +0 -1
- package/static/js/ant-locale/locale-eu_ES-js.1c429370.chunk.js +0 -1
- package/static/js/ant-locale/locale-fa_IR-js.b7a717c4.chunk.js +0 -1
- package/static/js/ant-locale/locale-fi_FI-js.d8c305ef.chunk.js +0 -1
- package/static/js/ant-locale/locale-fr_BE-js.2b69e390.chunk.js +0 -1
- package/static/js/ant-locale/locale-fr_CA-js.3cc51314.chunk.js +0 -1
- package/static/js/ant-locale/locale-fr_FR-js.c77299db.chunk.js +0 -1
- package/static/js/ant-locale/locale-ga_IE-js.dd065b80.chunk.js +0 -1
- package/static/js/ant-locale/locale-gl_ES-js.73dfbbf4.chunk.js +0 -1
- package/static/js/ant-locale/locale-he_IL-js.72651512.chunk.js +0 -1
- package/static/js/ant-locale/locale-hi_IN-js.4564c58c.chunk.js +0 -1
- package/static/js/ant-locale/locale-hr_HR-js.e093af26.chunk.js +0 -1
- package/static/js/ant-locale/locale-hu_HU-js.157bb3f5.chunk.js +0 -1
- package/static/js/ant-locale/locale-hy_AM-js.4aacbfe7.chunk.js +0 -1
- package/static/js/ant-locale/locale-id_ID-js.91f9e5f9.chunk.js +0 -1
- package/static/js/ant-locale/locale-is_IS-js.c725e283.chunk.js +0 -1
- package/static/js/ant-locale/locale-it_IT-js.2569884c.chunk.js +0 -1
- package/static/js/ant-locale/locale-ja_JP-js.309995da.chunk.js +0 -1
- package/static/js/ant-locale/locale-ka_GE-js.5cba5889.chunk.js +0 -1
- package/static/js/ant-locale/locale-kk_KZ-js.470d88cc.chunk.js +0 -1
- package/static/js/ant-locale/locale-km_KH-js.3dba654f.chunk.js +0 -1
- package/static/js/ant-locale/locale-kmr_IQ-js.ba0ff14f.chunk.js +0 -1
- package/static/js/ant-locale/locale-kn_IN-js.cb3cedb4.chunk.js +0 -1
- package/static/js/ant-locale/locale-ko_KR-js.58f92673.chunk.js +0 -1
- package/static/js/ant-locale/locale-ku_IQ-js.694ba190.chunk.js +0 -1
- package/static/js/ant-locale/locale-lt_LT-js.3c9bc038.chunk.js +0 -1
- package/static/js/ant-locale/locale-lv_LV-js.8623a6ac.chunk.js +0 -1
- package/static/js/ant-locale/locale-mk_MK-js.09c1607e.chunk.js +0 -1
- package/static/js/ant-locale/locale-ml_IN-js.d3c91e07.chunk.js +0 -1
- package/static/js/ant-locale/locale-mn_MN-js.39fd5349.chunk.js +0 -1
- package/static/js/ant-locale/locale-ms_MY-js.30e61637.chunk.js +0 -1
- package/static/js/ant-locale/locale-my_MM-js.5b3f7aa1.chunk.js +0 -1
- package/static/js/ant-locale/locale-nb_NO-js.6a09c151.chunk.js +0 -1
- package/static/js/ant-locale/locale-ne_NP-js.9b68c9f3.chunk.js +0 -1
- package/static/js/ant-locale/locale-nl_BE-js.27afde77.chunk.js +0 -1
- package/static/js/ant-locale/locale-nl_NL-js.42a5d14e.chunk.js +0 -1
- package/static/js/ant-locale/locale-pl_PL-js.12e257e9.chunk.js +0 -1
- package/static/js/ant-locale/locale-pt_BR-js.a6db9561.chunk.js +0 -1
- package/static/js/ant-locale/locale-pt_PT-js.4d21d267.chunk.js +0 -1
- package/static/js/ant-locale/locale-ro_RO-js.011d80e2.chunk.js +0 -1
- package/static/js/ant-locale/locale-si_LK-js.898f755d.chunk.js +0 -1
- package/static/js/ant-locale/locale-sk_SK-js.10530400.chunk.js +0 -1
- package/static/js/ant-locale/locale-sl_SI-js.3323643b.chunk.js +0 -1
- package/static/js/ant-locale/locale-sr_RS-js.6fce960d.chunk.js +0 -1
- package/static/js/ant-locale/locale-sv_SE-js.5a78c455.chunk.js +0 -1
- package/static/js/ant-locale/locale-ta_IN-js.412b9ffc.chunk.js +0 -1
- package/static/js/ant-locale/locale-th_TH-js.120eaa89.chunk.js +0 -1
- package/static/js/ant-locale/locale-tk_TK-js.20728723.chunk.js +0 -1
- package/static/js/ant-locale/locale-tr_TR-js.65f75b8c.chunk.js +0 -1
- package/static/js/ant-locale/locale-uk_UA-js.73262da7.chunk.js +0 -1
- package/static/js/ant-locale/locale-ur_PK-js.bff27ba0.chunk.js +0 -1
- package/static/js/ant-locale/locale-uz_UZ-js.21ddeb19.chunk.js +0 -1
- package/static/js/ant-locale/locale-vi_VN-js.51d6ba13.chunk.js +0 -1
- package/static/js/ant-locale/locale-zh_CN-js.af76e8ae.chunk.js +0 -1
- package/static/js/ant-locale/locale-zh_HK-js.ef1f3bcc.chunk.js +0 -1
- package/static/js/ant-locale/locale-zh_TW-js.102c6b49.chunk.js +0 -1
- /package/iframe/js/{826.cb9dbe4f.js.LICENSE.txt → 826.d867e975.js.LICENSE.txt} +0 -0
- /package/static/js/{8278.29ba94e8.js.LICENSE.txt → 1390.25844bb5.js.LICENSE.txt} +0 -0
- /package/static/js/{1275.ba0dbbc3.js.LICENSE.txt → 1654.640dc26f.js.LICENSE.txt} +0 -0
- /package/static/js/{5803.8372095d.js.LICENSE.txt → 2083.bbfa987f.js.LICENSE.txt} +0 -0
- /package/static/js/{5346.c29e03ef.chunk.js.LICENSE.txt → 5346.4aaf9222.chunk.js.LICENSE.txt} +0 -0
- /package/static/js/{578.15f9f307.chunk.js.LICENSE.txt → 578.068dd4e8.chunk.js.LICENSE.txt} +0 -0
- /package/static/js/{6819.1a83f209.chunk.js.LICENSE.txt → 6819.efc5bf71.chunk.js.LICENSE.txt} +0 -0
- /package/static/js/{6817.96c035e4.js.LICENSE.txt → 6829.aa692d38.chunk.js.LICENSE.txt} +0 -0
- /package/static/js/{9879.65d5b4c8.chunk.js.LICENSE.txt → 959.ef84be6d.js.LICENSE.txt} +0 -0
- /package/static/js/{9960.2bbf10c6.chunk.js.LICENSE.txt → 9960.218c70ae.chunk.js.LICENSE.txt} +0 -0
- /package/static/js/{emailmaker_core.c003dc3f.js.LICENSE.txt → emailmaker_core.62287a56.js.LICENSE.txt} +0 -0
package/emailmaker.d.ts
CHANGED
|
@@ -39,17 +39,9 @@ type RemoveEventPayload<T> = {
|
|
|
39
39
|
value: T;
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
type MergeTagGroup = {
|
|
43
|
-
type?: 'group';
|
|
44
|
-
label: string;
|
|
45
|
-
value: string;
|
|
46
|
-
children?: MergeTag[];
|
|
47
|
-
};
|
|
42
|
+
type MergeTagGroup = { type?: 'group'; label: string; value: string; children?: MergeTag[] };
|
|
48
43
|
|
|
49
|
-
type MergeTagItem = {
|
|
50
|
-
label: string;
|
|
51
|
-
value: string;
|
|
52
|
-
};
|
|
44
|
+
type MergeTagItem = { label: string; value: string };
|
|
53
45
|
type MergeTag = MergeTagGroup | MergeTagItem;
|
|
54
46
|
|
|
55
47
|
type SaveListener<T> = AppListener<SaveEventPayload<T>, T | undefined | void>;
|
|
@@ -81,19 +73,9 @@ type Notify = {
|
|
|
81
73
|
role?: 'alert' | 'status';
|
|
82
74
|
};
|
|
83
75
|
|
|
84
|
-
type EmailDesc = {
|
|
85
|
-
id?: string;
|
|
86
|
-
title?: string;
|
|
87
|
-
code?: string;
|
|
88
|
-
subject?: string;
|
|
89
|
-
preheader?: string;
|
|
90
|
-
};
|
|
76
|
+
type EmailDesc = { id?: string; title?: string; code?: string; subject?: string; preheader?: string };
|
|
91
77
|
|
|
92
|
-
type BlockDesc = {
|
|
93
|
-
id?: string;
|
|
94
|
-
title?: string;
|
|
95
|
-
code?: string;
|
|
96
|
-
};
|
|
78
|
+
type BlockDesc = { id?: string; title?: string; code?: string };
|
|
97
79
|
|
|
98
80
|
interface ISelection {
|
|
99
81
|
selectionStartLineNumber: number;
|
|
@@ -106,12 +88,7 @@ interface ISingleModelEditStackData {
|
|
|
106
88
|
afterVersionId: number;
|
|
107
89
|
beforeCursorState: ISelection[];
|
|
108
90
|
beforeVersionId: number;
|
|
109
|
-
changes: {
|
|
110
|
-
oldPosition: number;
|
|
111
|
-
oldText: string;
|
|
112
|
-
newPosition: number;
|
|
113
|
-
newText: string;
|
|
114
|
-
}[];
|
|
91
|
+
changes: { oldPosition: number; oldText: string; newPosition: number; newText: string }[];
|
|
115
92
|
}
|
|
116
93
|
|
|
117
94
|
interface IFrameErrorInfo {
|
|
@@ -156,9 +133,7 @@ declare namespace Notify {
|
|
|
156
133
|
| { id: 'GET_LOCALE_ERROR'; data: any }
|
|
157
134
|
| { id: 'GET_LOCALES_ERROR'; data: any }
|
|
158
135
|
);
|
|
159
|
-
type ErrorEvent = {
|
|
160
|
-
type: 'error';
|
|
161
|
-
} & Error;
|
|
136
|
+
type ErrorEvent = { type: 'error' } & Error;
|
|
162
137
|
|
|
163
138
|
type Success =
|
|
164
139
|
| { id?: ''; data?: any }
|
|
@@ -174,9 +149,7 @@ declare namespace Notify {
|
|
|
174
149
|
| { id: 'BLOCK_CLONING_SUCCESS'; data: BlockDesc }
|
|
175
150
|
| { id: 'BLOCK_REMOVING_SUCCESS'; data: BlockDesc };
|
|
176
151
|
|
|
177
|
-
type SuccessEvent = {
|
|
178
|
-
type: 'success';
|
|
179
|
-
} & Success;
|
|
152
|
+
type SuccessEvent = { type: 'success' } & Success;
|
|
180
153
|
|
|
181
154
|
type Warning =
|
|
182
155
|
| { id?: ''; data?: any }
|
|
@@ -425,11 +398,7 @@ declare namespace ExportedApi {
|
|
|
425
398
|
}
|
|
426
399
|
|
|
427
400
|
interface CompiledEmail extends Email {
|
|
428
|
-
readonly compiled: {
|
|
429
|
-
html: string;
|
|
430
|
-
ampHtml: string;
|
|
431
|
-
text: string;
|
|
432
|
-
};
|
|
401
|
+
readonly compiled: { html: string; ampHtml: string; text: string };
|
|
433
402
|
}
|
|
434
403
|
}
|
|
435
404
|
declare namespace ExportedApi {
|
|
@@ -475,10 +444,7 @@ declare namespace ExportedApi {
|
|
|
475
444
|
}
|
|
476
445
|
|
|
477
446
|
interface CompiledEmailRevision extends EmailRevision {
|
|
478
|
-
readonly compiled: {
|
|
479
|
-
html: string;
|
|
480
|
-
ampHtml: string;
|
|
481
|
-
};
|
|
447
|
+
readonly compiled: { html: string; ampHtml: string };
|
|
482
448
|
}
|
|
483
449
|
}
|
|
484
450
|
declare namespace ExportedApi {
|
|
@@ -792,6 +758,8 @@ declare namespace ExportedApi {
|
|
|
792
758
|
disableDoubleClickNextButton?: boolean;
|
|
793
759
|
/** manually change state of next button */
|
|
794
760
|
activeNextButton?: boolean;
|
|
761
|
+
/** icons stroke width */
|
|
762
|
+
iconStrokeWidth: number
|
|
795
763
|
}
|
|
796
764
|
|
|
797
765
|
export interface User {
|
|
@@ -848,11 +816,7 @@ declare namespace ExportedApi {
|
|
|
848
816
|
}
|
|
849
817
|
|
|
850
818
|
declare namespace ExportedApi {
|
|
851
|
-
export type JWTAuthOptions = {
|
|
852
|
-
email: string;
|
|
853
|
-
password: string;
|
|
854
|
-
remember?: boolean;
|
|
855
|
-
};
|
|
819
|
+
export type JWTAuthOptions = { email: string; password: string; remember?: boolean };
|
|
856
820
|
|
|
857
821
|
type JWTOptions = {
|
|
858
822
|
/** JWT authorization credentials */
|
|
@@ -935,7 +899,7 @@ declare namespace ExportedApi {
|
|
|
935
899
|
type ReadEmailHandler = (id: string) => MayBePromise<Email>;
|
|
936
900
|
type ReadEmailAutosavesHandler = (emailId: string) => MayBePromise<EmailRevision[]>;
|
|
937
901
|
type ReadBlocksHandler = (project: string) => MayBePromise<Block[]>;
|
|
938
|
-
type ReadTemplateBlocksHandler = ({ emailId: string
|
|
902
|
+
type ReadTemplateBlocksHandler = (block: { emailId: string; project: string }) => MayBePromise<Block[]>;
|
|
939
903
|
type ReadCommentsHandler = (emailId: string) => MayBePromise<Comment[]>;
|
|
940
904
|
|
|
941
905
|
type EmailHandler = AppListener<Email>;
|
|
@@ -954,22 +918,11 @@ declare namespace ExportedApi {
|
|
|
954
918
|
|
|
955
919
|
type TestEmailModalSendHandler = AppListener<Email, false | void>;
|
|
956
920
|
|
|
957
|
-
type LivePreviewHandler = AppListener<{
|
|
958
|
-
project?: string;
|
|
959
|
-
id: string;
|
|
960
|
-
subject?: string;
|
|
961
|
-
html: string;
|
|
962
|
-
}>;
|
|
921
|
+
type LivePreviewHandler = AppListener<{ project?: string; id: string; subject?: string; html: string }>;
|
|
963
922
|
|
|
964
|
-
type ShareHandler = AppListener<{
|
|
965
|
-
project?: string;
|
|
966
|
-
id: string;
|
|
967
|
-
}>;
|
|
923
|
+
type ShareHandler = AppListener<{ project?: string; id: string }>;
|
|
968
924
|
|
|
969
|
-
type PreviewHandler = AppListener<{
|
|
970
|
-
project?: string;
|
|
971
|
-
id: string;
|
|
972
|
-
}>;
|
|
925
|
+
type PreviewHandler = AppListener<{ project?: string; id: string }>;
|
|
973
926
|
|
|
974
927
|
type ValidateEvent = AppListener<CodeError[]>;
|
|
975
928
|
|
|
@@ -1254,36 +1207,70 @@ interface IUndoRedoService {
|
|
|
1254
1207
|
}
|
|
1255
1208
|
|
|
1256
1209
|
/**
|
|
1257
|
-
*
|
|
1210
|
+
* Represents the result of a single operation within a batch request.
|
|
1211
|
+
*
|
|
1212
|
+
* @template T - The type of data returned by successful operations. Use `void` for operations
|
|
1213
|
+
* that don't return data (e.g., delete operations).
|
|
1214
|
+
*
|
|
1215
|
+
* @example
|
|
1216
|
+
* // For a successful file copy operation
|
|
1217
|
+
* const result: OperationResult<FileInfo> = {
|
|
1218
|
+
* id: 'file123',
|
|
1219
|
+
* success: true,
|
|
1220
|
+
* data: { id: 'file123-copy', name: 'file.txt', ... }
|
|
1221
|
+
* };
|
|
1222
|
+
*
|
|
1223
|
+
* @example
|
|
1224
|
+
* // For a failed operation
|
|
1225
|
+
* const result: OperationResult<void> = {
|
|
1226
|
+
* id: 'file456',
|
|
1227
|
+
* success: false,
|
|
1228
|
+
* error: 'Permission denied'
|
|
1229
|
+
* };
|
|
1258
1230
|
*/
|
|
1259
|
-
export interface
|
|
1260
|
-
/**
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
parentId?: string | null;
|
|
1231
|
+
export interface OperationResult<T = void> {
|
|
1232
|
+
/**
|
|
1233
|
+
* Unique identifier of the item that was processed.
|
|
1234
|
+
* This should match the ID of the original item from the request.
|
|
1235
|
+
*/
|
|
1236
|
+
id?: string;
|
|
1266
1237
|
|
|
1267
|
-
|
|
1268
|
-
|
|
1238
|
+
/**
|
|
1239
|
+
* Indicates whether the operation completed successfully.
|
|
1240
|
+
*/
|
|
1241
|
+
success?: boolean;
|
|
1269
1242
|
|
|
1270
|
-
|
|
1243
|
+
/**
|
|
1244
|
+
* The result data returned by successful operations.
|
|
1245
|
+
* Present only when `success` is `true` and the operation returns data.
|
|
1246
|
+
*/
|
|
1247
|
+
data?: T;
|
|
1271
1248
|
|
|
1249
|
+
/**
|
|
1250
|
+
* Error message describing why the operation failed.
|
|
1251
|
+
* Present only when `success` is `false`.
|
|
1252
|
+
*/
|
|
1253
|
+
error?: string;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
export type BatchResult<T> = { success: boolean; error?: string; detailed?: OperationResult<T>[] };
|
|
1272
1257
|
|
|
1273
1258
|
/**
|
|
1274
1259
|
* File information.
|
|
1275
1260
|
*/
|
|
1276
|
-
export interface
|
|
1261
|
+
export interface FileSystemItem {
|
|
1277
1262
|
/** Unique file identifier */
|
|
1278
1263
|
id: string;
|
|
1279
1264
|
/** File name */
|
|
1280
1265
|
name: string;
|
|
1266
|
+
/** Identifier of the folder the file belongs to */
|
|
1267
|
+
folderId: string;
|
|
1268
|
+
/** Item type - file or folder */
|
|
1269
|
+
isFolder?: boolean;
|
|
1281
1270
|
/** File size */
|
|
1282
1271
|
size?: number;
|
|
1283
1272
|
/** File creation or upload date */
|
|
1284
1273
|
date?: string;
|
|
1285
|
-
/** Identifier of the folder the file belongs to */
|
|
1286
|
-
folderId: string;
|
|
1287
1274
|
/** File MIME type */
|
|
1288
1275
|
type?: string;
|
|
1289
1276
|
/** File download URL (used if `getFile` method is not implemented) */
|
|
@@ -1300,15 +1287,17 @@ export interface FileInfo {
|
|
|
1300
1287
|
extension?: string;
|
|
1301
1288
|
/** Whether the file is selected in the UI */
|
|
1302
1289
|
selected?: boolean;
|
|
1303
|
-
/** Whether the item is a folder */
|
|
1304
|
-
isFolder?: boolean;
|
|
1305
1290
|
/** Date when the file was last edited */
|
|
1306
1291
|
lastEdited?: string;
|
|
1307
|
-
|
|
1308
|
-
|
|
1292
|
+
/** Number of children items (for folders) */
|
|
1293
|
+
childrenCount?: number;
|
|
1309
1294
|
}
|
|
1310
1295
|
|
|
1311
|
-
|
|
1296
|
+
/**
|
|
1297
|
+
* Represents partial updates to a file system item after an operation.
|
|
1298
|
+
* Contains only the fields that were changed during the operation.
|
|
1299
|
+
*/
|
|
1300
|
+
export type FileSystemItemUpdate = Partial<FileSystemItem> & { id: string };
|
|
1312
1301
|
|
|
1313
1302
|
/**
|
|
1314
1303
|
* API response with pagination details.
|
|
@@ -1338,106 +1327,199 @@ export interface SortState {
|
|
|
1338
1327
|
sortOrder: 'asc' | 'desc';
|
|
1339
1328
|
}
|
|
1340
1329
|
|
|
1330
|
+
export interface StorageProviderController {
|
|
1331
|
+
/**
|
|
1332
|
+
* Invalidates the cache for a specific file system item.
|
|
1333
|
+
*
|
|
1334
|
+
* This method should be called when an item's data has changed externally
|
|
1335
|
+
* and the cached version is no longer valid. After invalidation, the next
|
|
1336
|
+
* access to this item will trigger a fresh fetch from the storage backend.
|
|
1337
|
+
*
|
|
1338
|
+
* @param itemId - The unique identifier of the file or folder to invalidate
|
|
1339
|
+
* @example
|
|
1340
|
+
* // After renaming a file, invalidate its cache
|
|
1341
|
+
* controller.invalidateItemCache(fileId);
|
|
1342
|
+
*/
|
|
1343
|
+
invalidateItemCache(itemId: string): void;
|
|
1344
|
+
|
|
1345
|
+
/**
|
|
1346
|
+
* Retrieves a cached file system item.
|
|
1347
|
+
*
|
|
1348
|
+
* @param itemId - The unique identifier of the file or folder
|
|
1349
|
+
* @returns The cached item or undefined if not found in cache
|
|
1350
|
+
*/
|
|
1351
|
+
getCachedItem(itemId: string): FileSystemItem | undefined;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1341
1354
|
/**
|
|
1342
1355
|
* Interface for storage providers.
|
|
1343
1356
|
* Defines the contract for different storage backends (e.g., cloud APIs).
|
|
1344
1357
|
*/
|
|
1345
1358
|
export interface StorageProvider {
|
|
1346
1359
|
/**
|
|
1347
|
-
* Use the path as an identifier
|
|
1360
|
+
* Use the path as an identifier for folders
|
|
1348
1361
|
*/
|
|
1349
1362
|
pathMode?: boolean;
|
|
1363
|
+
|
|
1364
|
+
/**
|
|
1365
|
+
* Custom identifier for the root folder.
|
|
1366
|
+
* - This ID will be used internally for the root of the file tree.
|
|
1367
|
+
* - Defaults to an empty string `''` if not provided.
|
|
1368
|
+
*/
|
|
1369
|
+
rootId?: string;
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* Path to the trash/recycle bin folder.
|
|
1373
|
+
* - Used when `useSoftDelete` is enabled or for trash operations.
|
|
1374
|
+
* - The provider will resolve this path to an actual folder ID.
|
|
1375
|
+
*/
|
|
1376
|
+
trashPath?: string;
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* Path to the temporary folder for uploads and transient files.
|
|
1380
|
+
* - Used for operations where temporary storage is needed.
|
|
1381
|
+
* - The provider will resolve this path to an actual folder ID.
|
|
1382
|
+
*/
|
|
1383
|
+
tempPath?: string;
|
|
1384
|
+
/**
|
|
1385
|
+
* @default true
|
|
1386
|
+
*/
|
|
1387
|
+
ensureFolderTrailingSlash?: boolean;
|
|
1388
|
+
|
|
1389
|
+
/**
|
|
1390
|
+
* Utility method for finding system files/folders by path.
|
|
1391
|
+
* By default, searches for folders through getFiles method.
|
|
1392
|
+
*
|
|
1393
|
+
* @param path - Path to the file or folder
|
|
1394
|
+
* @returns The found item or undefined if not found
|
|
1395
|
+
*/
|
|
1396
|
+
findItemByPath?(path: string): MayBePromise<FileSystemItem | undefined>;
|
|
1397
|
+
|
|
1398
|
+
/**
|
|
1399
|
+
* Sets the controller for cache management.
|
|
1400
|
+
*
|
|
1401
|
+
* This method provides the storage provider with a controller interface
|
|
1402
|
+
* that allows it to communicate cache invalidation requests back to the file manager.
|
|
1403
|
+
*
|
|
1404
|
+
* @param controller - The controller instance for cache management
|
|
1405
|
+
* @example
|
|
1406
|
+
* // Store the controller for later use
|
|
1407
|
+
* setController(controller) {
|
|
1408
|
+
* this.controller = controller;
|
|
1409
|
+
* }
|
|
1410
|
+
*/
|
|
1411
|
+
setController?(controller: StorageProviderController): MayBePromise<void>;
|
|
1412
|
+
|
|
1413
|
+
/**
|
|
1414
|
+
* Enables client-side soft delete implementation.
|
|
1415
|
+
* When enabled, delete operations will move items to trashPath instead of permanent deletion.
|
|
1416
|
+
*
|
|
1417
|
+
* @note If your backend already implements soft delete, keep this disabled
|
|
1418
|
+
* to avoid double soft-delete logic.
|
|
1419
|
+
*
|
|
1420
|
+
* @default false
|
|
1421
|
+
*/
|
|
1422
|
+
useSoftDelete?: boolean;
|
|
1350
1423
|
/**
|
|
1351
1424
|
* Retrieve the file content as a binary blob.
|
|
1352
1425
|
*
|
|
1353
1426
|
* ⚠️ If this method is not implemented, the file will be downloaded
|
|
1354
1427
|
* using the `url` property from the `FileInfo` object.
|
|
1355
1428
|
*
|
|
1356
|
-
* @param file File
|
|
1429
|
+
* @param file - File object
|
|
1357
1430
|
* @returns File contents as a Blob
|
|
1358
1431
|
*/
|
|
1359
|
-
getFileData?: (file:
|
|
1432
|
+
getFileData?: (file: FileSystemItem) => MayBePromise<Blob>;
|
|
1360
1433
|
|
|
1361
|
-
|
|
1434
|
+
/**
|
|
1435
|
+
* Get URL for file access
|
|
1436
|
+
* @param file - File object
|
|
1437
|
+
* @returns File URL
|
|
1438
|
+
*/
|
|
1439
|
+
getUrl?: (file: FileSystemItem) => MayBePromise<string>;
|
|
1362
1440
|
|
|
1363
|
-
|
|
1441
|
+
/**
|
|
1442
|
+
* Get thumbnail URL for file
|
|
1443
|
+
* @param file - File object
|
|
1444
|
+
* @returns Thumbnail URL
|
|
1445
|
+
*/
|
|
1446
|
+
getThumbnailUrl?: (file: FileSystemItem) => MayBePromise<string>;
|
|
1364
1447
|
|
|
1365
1448
|
/**
|
|
1366
|
-
* Retrieve a list of files.
|
|
1449
|
+
* Retrieve a list of files and folders.
|
|
1367
1450
|
* Supports filtering, sorting, and pagination.
|
|
1368
1451
|
*
|
|
1369
|
-
* @param options.folderId
|
|
1370
|
-
* @param options.search Search query
|
|
1371
|
-
* @param options.sortBy Field to sort by
|
|
1372
|
-
* @param options.sortOrder Sort direction
|
|
1373
|
-
* @param options.page Page number
|
|
1374
|
-
* @param options.limit Number of items per page
|
|
1375
|
-
* @
|
|
1452
|
+
* @param options.folderId - Parent folder (or undefined for root)
|
|
1453
|
+
* @param options.search - Search query
|
|
1454
|
+
* @param options.sortBy - Field to sort by
|
|
1455
|
+
* @param options.sortOrder - Sort direction
|
|
1456
|
+
* @param options.page - Page number
|
|
1457
|
+
* @param options.limit - Number of items per page
|
|
1458
|
+
* @param options.itemType - Filter by item type
|
|
1459
|
+
* @returns List of files/folders and optional pagination details
|
|
1376
1460
|
*/
|
|
1377
|
-
|
|
1461
|
+
getItems: (options: {
|
|
1378
1462
|
folderId?: string;
|
|
1379
1463
|
search?: string;
|
|
1380
1464
|
sortBy?: SortState['sortBy'];
|
|
1381
1465
|
sortOrder?: SortState['sortOrder'];
|
|
1382
1466
|
page?: number;
|
|
1383
1467
|
limit?: number;
|
|
1384
|
-
itemType
|
|
1385
|
-
}) =>
|
|
1386
|
-
files: FileInfo[];
|
|
1387
|
-
pagination?: Partial<ApiPaginationResponse>;
|
|
1388
|
-
}>;
|
|
1468
|
+
itemType: 'all' | 'file' | 'folder';
|
|
1469
|
+
}) => MayBePromise<{ items: FileSystemItem[]; pagination?: Partial<ApiPaginationResponse> }>;
|
|
1389
1470
|
|
|
1390
1471
|
/**
|
|
1391
1472
|
* Create a new folder.
|
|
1392
1473
|
*
|
|
1393
|
-
* @param
|
|
1394
|
-
* @param
|
|
1474
|
+
* @param name - Folder name
|
|
1475
|
+
* @param parent - Parent folder (or undefined for root)
|
|
1395
1476
|
* @returns The created folder object
|
|
1396
1477
|
*/
|
|
1397
|
-
createFolder: (
|
|
1478
|
+
createFolder: (name: string, parentid?: string) => MayBePromise<FileSystemItem>;
|
|
1398
1479
|
|
|
1399
1480
|
/**
|
|
1400
|
-
* Rename
|
|
1481
|
+
* Rename an item (file or folder).
|
|
1401
1482
|
*
|
|
1402
|
-
* @param
|
|
1403
|
-
* @param newName New
|
|
1404
|
-
* @returns Updated
|
|
1483
|
+
* @param options.item - Item to rename (file or folder)
|
|
1484
|
+
* @param options.newName - New item name
|
|
1485
|
+
* @returns Updated item with changed fields
|
|
1405
1486
|
*/
|
|
1406
|
-
|
|
1487
|
+
renameItem?: (item: FileSystemItem, newName: string) => MayBePromise<FileSystemItemUpdate>;
|
|
1407
1488
|
|
|
1408
1489
|
/**
|
|
1409
|
-
* Delete
|
|
1490
|
+
* Delete an item (file or folder).
|
|
1491
|
+
* When useSoftDelete is enabled, moves item to trashPath instead of permanent deletion.
|
|
1410
1492
|
*
|
|
1411
|
-
* @param
|
|
1412
|
-
* @
|
|
1493
|
+
* @param item - Item to delete (file or folder)
|
|
1494
|
+
* @throws {Error} If deletion fails
|
|
1413
1495
|
*/
|
|
1414
|
-
|
|
1496
|
+
deleteItem?: (item: FileSystemItem) => MayBePromise<void>;
|
|
1415
1497
|
|
|
1416
1498
|
/**
|
|
1417
1499
|
* Upload a file.
|
|
1418
1500
|
*
|
|
1419
|
-
* @param file.name File name
|
|
1420
|
-
* @param file.size File size
|
|
1421
|
-
* @param file.type MIME type
|
|
1422
|
-
* @param file.folderId Target folder
|
|
1423
|
-
* @param file.data File data (Blob or base64 string)
|
|
1424
|
-
* @param file.thumbnail Thumbnail image
|
|
1425
|
-
* @param file.dimensions Image dimensions
|
|
1426
|
-
* @param file.aspectRatio Aspect ratio
|
|
1427
|
-
* @param file.extension File extension
|
|
1428
|
-
* @returns The uploaded file
|
|
1501
|
+
* @param file.name - File name
|
|
1502
|
+
* @param file.size - File size
|
|
1503
|
+
* @param file.type - MIME type
|
|
1504
|
+
* @param file.folderId - Target folder (or undefined for root)
|
|
1505
|
+
* @param file.data - File data (Blob or base64 string)
|
|
1506
|
+
* @param file.thumbnail - Thumbnail image
|
|
1507
|
+
* @param file.dimensions - Image dimensions
|
|
1508
|
+
* @param file.aspectRatio - Aspect ratio
|
|
1509
|
+
* @param file.extension - File extension
|
|
1510
|
+
* @returns The uploaded file with changed fields
|
|
1429
1511
|
*/
|
|
1430
1512
|
uploadFile: (file: {
|
|
1431
1513
|
name: string;
|
|
1432
1514
|
size: number;
|
|
1433
1515
|
type: string;
|
|
1434
|
-
folderId?: string
|
|
1516
|
+
folderId?: string;
|
|
1435
1517
|
data: Blob | string;
|
|
1436
1518
|
thumbnail?: string;
|
|
1437
1519
|
dimensions?: string;
|
|
1438
1520
|
aspectRatio?: string;
|
|
1439
1521
|
extension?: string;
|
|
1440
|
-
}) =>
|
|
1522
|
+
}) => MayBePromise<FileSystemItemUpdate>;
|
|
1441
1523
|
|
|
1442
1524
|
/**
|
|
1443
1525
|
* Upload a file by URL.
|
|
@@ -1446,64 +1528,68 @@ export interface StorageProvider {
|
|
|
1446
1528
|
* to the current server. If it does, return the existing file object
|
|
1447
1529
|
* instead of uploading it again.
|
|
1448
1530
|
*
|
|
1449
|
-
* @param
|
|
1450
|
-
* @param
|
|
1451
|
-
*
|
|
1452
|
-
*
|
|
1453
|
-
* @returns The uploaded or existing file object
|
|
1531
|
+
* @param url - File URL
|
|
1532
|
+
* @param folderId - Target folder (or undefined for root). If not specified,
|
|
1533
|
+
* uses the root folder.
|
|
1534
|
+
* @returns The uploaded or existing complete file object
|
|
1454
1535
|
*/
|
|
1455
|
-
uploadFileByUrl: (
|
|
1536
|
+
uploadFileByUrl: (url: string, folderId?: string) => MayBePromise<FileSystemItem>;
|
|
1456
1537
|
|
|
1457
1538
|
/**
|
|
1458
|
-
* Delete
|
|
1539
|
+
* Delete multiple items (files or folders).
|
|
1459
1540
|
*
|
|
1460
|
-
* @param
|
|
1461
|
-
* @returns
|
|
1541
|
+
* @param items - Array of items to delete (files or folders)
|
|
1542
|
+
* @returns Batch operation result with success/failure details
|
|
1462
1543
|
*/
|
|
1463
|
-
|
|
1544
|
+
deleteItems?: (items: FileSystemItem[]) => MayBePromise<BatchResult<never>>;
|
|
1464
1545
|
|
|
1465
1546
|
/**
|
|
1466
|
-
*
|
|
1467
|
-
*
|
|
1468
|
-
* @param
|
|
1469
|
-
* @
|
|
1470
|
-
* @returns Updated file object
|
|
1547
|
+
* Move a single item to the target folder
|
|
1548
|
+
* @param item - Item to move (file or folder)
|
|
1549
|
+
* @param targetFolderId - Destination folder. If undefined, uses root folder
|
|
1550
|
+
* @returns The moved item with changed fields
|
|
1471
1551
|
*/
|
|
1472
|
-
|
|
1552
|
+
moveItem?: (item: FileSystemItem, targetFolderId?: string) => MayBePromise<FileSystemItemUpdate>;
|
|
1473
1553
|
|
|
1474
1554
|
/**
|
|
1475
|
-
* Move
|
|
1476
|
-
*
|
|
1477
|
-
* @param
|
|
1478
|
-
* @
|
|
1479
|
-
* @param options.isFolder true if the item is a folder
|
|
1480
|
-
* @returns true if the move operation was successful
|
|
1555
|
+
* Move multiple items to the target folder
|
|
1556
|
+
* @param items - Array of items to move (files or folders)
|
|
1557
|
+
* @param targetFolderId - Destination folder. If undefined, uses root folder
|
|
1558
|
+
* @returns Batch operation result with success/failure details
|
|
1481
1559
|
*/
|
|
1482
|
-
|
|
1560
|
+
moveItems?: (
|
|
1561
|
+
items: FileSystemItem[],
|
|
1562
|
+
targetFolderId?: string
|
|
1563
|
+
) => MayBePromise<BatchResult<FileSystemItemUpdate>>;
|
|
1483
1564
|
|
|
1484
1565
|
/**
|
|
1485
|
-
* Copy a
|
|
1486
|
-
*
|
|
1487
|
-
* @param
|
|
1488
|
-
* @
|
|
1489
|
-
* @param options.isFolder true if the item is a folder
|
|
1490
|
-
* @returns Object with the new item identifier (and optionally a new URL)
|
|
1566
|
+
* Copy a single item to the target folder
|
|
1567
|
+
* @param item - Item to copy (file or folder)
|
|
1568
|
+
* @param targetFolderId - Destination folder. If undefined, uses root folder
|
|
1569
|
+
* @returns The copied item with changed fields
|
|
1491
1570
|
*/
|
|
1492
|
-
copyItem
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1571
|
+
copyItem?: (item: FileSystemItem, targetFolderId?: string) => MayBePromise<FileSystemItemUpdate>;
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* Copy multiple items to the target folder
|
|
1575
|
+
* @param items - Array of items to copy (files or folders)
|
|
1576
|
+
* @param targetFolderId - Destination folder. If undefined, uses root folder
|
|
1577
|
+
* @returns Batch operation result with success/failure details
|
|
1578
|
+
*/
|
|
1579
|
+
copyItems?: (
|
|
1580
|
+
items: FileSystemItem[],
|
|
1581
|
+
targetFolderId?: string
|
|
1582
|
+
) => MayBePromise<BatchResult<FileSystemItemUpdate>>;
|
|
1497
1583
|
|
|
1498
1584
|
/**
|
|
1499
1585
|
* Update file metadata or content.
|
|
1500
1586
|
*
|
|
1501
|
-
* @param
|
|
1502
|
-
* @param updates Object with fields to update (name, type, data, thumbnail, etc.)
|
|
1503
|
-
* @returns Updated file
|
|
1587
|
+
* @param file - File to update
|
|
1588
|
+
* @param updates - Object with fields to update (name, type, data, thumbnail, etc.)
|
|
1589
|
+
* @returns Updated file with changed fields
|
|
1504
1590
|
*/
|
|
1505
1591
|
updateFile?: (
|
|
1506
|
-
|
|
1592
|
+
file: FileSystemItem,
|
|
1507
1593
|
updates: {
|
|
1508
1594
|
name?: string;
|
|
1509
1595
|
type?: string;
|
|
@@ -1513,15 +1599,22 @@ export interface StorageProvider {
|
|
|
1513
1599
|
aspectRatio?: string;
|
|
1514
1600
|
extension?: string;
|
|
1515
1601
|
},
|
|
1516
|
-
) =>
|
|
1602
|
+
) => MayBePromise<FileSystemItemUpdate>;
|
|
1517
1603
|
}
|
|
1518
1604
|
|
|
1519
|
-
declare
|
|
1605
|
+
declare namespace ExportedApi {
|
|
1520
1606
|
export interface Options {
|
|
1521
1607
|
storageProvider?: StorageProvider;
|
|
1522
1608
|
}
|
|
1523
1609
|
|
|
1524
1610
|
export interface FileManagerOptions {
|
|
1611
|
+
/**
|
|
1612
|
+
* Enables trash functionality for deleted files.
|
|
1613
|
+
* When enabled, deleted files are moved to trash instead of permanent deletion.
|
|
1614
|
+
* @default true
|
|
1615
|
+
*/
|
|
1616
|
+
enableTrash?: boolean;
|
|
1617
|
+
|
|
1525
1618
|
/**
|
|
1526
1619
|
* Enables paging in the file manager view.
|
|
1527
1620
|
* If false or undefined, paging is disabled and all items are loaded at once.
|
|
@@ -1550,6 +1643,54 @@ declare module ExportedApi {
|
|
|
1550
1643
|
*/
|
|
1551
1644
|
enableUpdateFile?: boolean;
|
|
1552
1645
|
|
|
1646
|
+
/**
|
|
1647
|
+
* Enables file editing capabilities.
|
|
1648
|
+
* Includes functions for modifying file content or properties.
|
|
1649
|
+
* @default true
|
|
1650
|
+
*/
|
|
1651
|
+
enableEdit?: boolean;
|
|
1652
|
+
/**
|
|
1653
|
+
* Enables copying files.
|
|
1654
|
+
* Allows creating copies of files.
|
|
1655
|
+
* @default true
|
|
1656
|
+
*/
|
|
1657
|
+
enableMoveFile?: boolean;
|
|
1658
|
+
/**
|
|
1659
|
+
* Enables copying folders.
|
|
1660
|
+
* Allows creating copies of folders.
|
|
1661
|
+
* @default true
|
|
1662
|
+
*/
|
|
1663
|
+
enableMoveFolder?: boolean;
|
|
1664
|
+
/**
|
|
1665
|
+
* Enables copying files.
|
|
1666
|
+
* Allows creating copies of files.
|
|
1667
|
+
* @default true
|
|
1668
|
+
*/
|
|
1669
|
+
enableCopyFile?: boolean;
|
|
1670
|
+
/**
|
|
1671
|
+
* Enables copying folders.
|
|
1672
|
+
* Allows creating copies of folders.
|
|
1673
|
+
* @default true
|
|
1674
|
+
*/
|
|
1675
|
+
enableCopyFolder?: boolean;
|
|
1676
|
+
/**
|
|
1677
|
+
* Enables deleting files and folders.
|
|
1678
|
+
* When trash is enabled, files are moved to trash, otherwise permanently deleted.
|
|
1679
|
+
* @default true
|
|
1680
|
+
*/
|
|
1681
|
+
enableDelete?: boolean;
|
|
1682
|
+
/**
|
|
1683
|
+
* Default folder name
|
|
1684
|
+
*/
|
|
1685
|
+
defaultFolderName?: string;
|
|
1686
|
+
|
|
1687
|
+
/**
|
|
1688
|
+
* Enables multiple selection of files and folders.
|
|
1689
|
+
* Allows selecting multiple items for batch operations.
|
|
1690
|
+
* @default true
|
|
1691
|
+
*/
|
|
1692
|
+
multiSelect?: boolean;
|
|
1693
|
+
|
|
1553
1694
|
/**
|
|
1554
1695
|
* Enables client-side sorting of files.
|
|
1555
1696
|
* - If `true`, default sorting is applied (by name ascending).
|
|
@@ -1559,7 +1700,11 @@ declare module ExportedApi {
|
|
|
1559
1700
|
*/
|
|
1560
1701
|
clientSideSorting?:
|
|
1561
1702
|
| boolean
|
|
1562
|
-
| ((
|
|
1703
|
+
| ((
|
|
1704
|
+
items: FileSystemItem[],
|
|
1705
|
+
sortBy?: SortState['sortBy'],
|
|
1706
|
+
sortOrder?: SortState['sortOrder'],
|
|
1707
|
+
) => FileSystemItem[]);
|
|
1563
1708
|
|
|
1564
1709
|
/**
|
|
1565
1710
|
* Enables client-side pagination of files.
|
|
@@ -1568,7 +1713,7 @@ declare module ExportedApi {
|
|
|
1568
1713
|
* and should return a paginated array of files.
|
|
1569
1714
|
* @default false
|
|
1570
1715
|
*/
|
|
1571
|
-
clientSidePaging?: boolean | ((items:
|
|
1716
|
+
clientSidePaging?: boolean | ((items: FileSystemItem[], page?: number, limit?: number) => FileSystemItem[]);
|
|
1572
1717
|
|
|
1573
1718
|
/**
|
|
1574
1719
|
* Enables client-side filtering of files.
|
|
@@ -1577,50 +1722,59 @@ declare module ExportedApi {
|
|
|
1577
1722
|
* and should return a filtered array of files.
|
|
1578
1723
|
* @default false
|
|
1579
1724
|
*/
|
|
1580
|
-
clientSideFilter?: boolean | ((items:
|
|
1725
|
+
clientSideFilter?: boolean | ((items: FileSystemItem[], search?: string) => FileSystemItem[]);
|
|
1581
1726
|
|
|
1582
1727
|
/**
|
|
1583
1728
|
* Configuration for cache behavior in the file manager.
|
|
1729
|
+
* Defines caching strategy for performance optimization.
|
|
1584
1730
|
*/
|
|
1585
1731
|
cacheStrategy?: {
|
|
1586
1732
|
/**
|
|
1587
1733
|
* Time-to-live (TTL) in milliseconds for cached items.
|
|
1588
1734
|
* After this period, cached items will be considered stale.
|
|
1589
|
-
*
|
|
1735
|
+
* @default 300000 (5 minutes)
|
|
1590
1736
|
*/
|
|
1591
1737
|
ttl?: number;
|
|
1592
1738
|
|
|
1593
1739
|
/**
|
|
1594
1740
|
* TTL in milliseconds for cached items when an error occurs during loading.
|
|
1741
|
+
* Determines how long to keep cache on network or server errors.
|
|
1742
|
+
* @default 60000 (1 minute)
|
|
1595
1743
|
*/
|
|
1596
1744
|
errorTtl?: number;
|
|
1597
1745
|
|
|
1598
1746
|
/**
|
|
1599
1747
|
* Allows inserting new items into sorted lists without marking the view as stale.
|
|
1748
|
+
* Useful for dynamically adding items without full cache refresh.
|
|
1749
|
+
* @default false
|
|
1600
1750
|
*/
|
|
1601
1751
|
allowSortedInsert?: boolean;
|
|
1602
1752
|
|
|
1603
1753
|
/**
|
|
1604
1754
|
* Allows inserting new items that may not match current filters without marking the view as stale.
|
|
1755
|
+
* @default false
|
|
1605
1756
|
*/
|
|
1606
1757
|
allowSearchInsert?: boolean;
|
|
1607
1758
|
|
|
1608
1759
|
/**
|
|
1609
1760
|
* Marks the view as stale when a paginated page is full and cannot accommodate new items.
|
|
1761
|
+
* @default true
|
|
1610
1762
|
*/
|
|
1611
1763
|
invalidateOnPaginationFull?: boolean;
|
|
1612
1764
|
|
|
1613
1765
|
/**
|
|
1614
1766
|
* Custom comparator function for sorting entities.
|
|
1615
1767
|
* Receives two entities and optional query parameters, should return -1, 0, or 1.
|
|
1768
|
+
* @default File/folder name comparison
|
|
1616
1769
|
*/
|
|
1617
|
-
comparator?: (a:
|
|
1770
|
+
comparator?: (a: FileSystemItem, b: FileSystemItem, params?: any) => number;
|
|
1618
1771
|
|
|
1619
1772
|
/**
|
|
1620
1773
|
* Function to determine if a given entity matches the current filters.
|
|
1621
1774
|
* Returns `true` if the entity should be included.
|
|
1775
|
+
* @default File/folder name search
|
|
1622
1776
|
*/
|
|
1623
|
-
filterMatch?: (entity:
|
|
1777
|
+
filterMatch?: (entity: FileSystemItem, params?: any) => boolean;
|
|
1624
1778
|
};
|
|
1625
1779
|
}
|
|
1626
1780
|
|