useblocks 1.0.104-alpha.3 → 1.0.111
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/CHANGELOG.en.md +53 -0
- package/CHANGELOG.md +48 -0
- package/README.md +3 -1
- package/asset-manifest.json +70 -68
- package/fm_notification.d.ts +16 -0
- package/iframe/429.js +1 -1
- package/iframe/766.js +1 -1
- package/iframe/css/sandbox.css +46 -0
- package/iframe/iframe-eblock.7b382310c122b86eff21.html +1 -0
- package/iframe/iframe.7b382310c122b86eff21.html +1 -0
- package/iframe/index.html +1 -1
- package/iframe/js/174.62b19abc.js +1 -0
- package/iframe/js/525.c01787e6.js +1 -0
- package/iframe/js/882.4eca7796.js +1 -0
- package/iframe/sandbox-eblock.js +1 -1
- package/images/integrations/activecampaign.svg +4 -0
- package/images/integrations/bento.svg +9 -0
- package/images/integrations/brevo.svg +7 -0
- package/images/integrations/campaign_monitor.svg +10 -0
- package/images/integrations/constant_contact.svg +24 -0
- package/images/integrations/dotdigital.svg +144 -0
- package/images/integrations/getresponse.svg +23 -0
- package/images/integrations/hubspot.svg +3 -0
- package/images/integrations/klaviyo.svg +10 -0
- package/images/integrations/mailchimp.svg +9 -0
- package/images/integrations/salesforce.svg +20 -0
- package/js/browser-image-compression.js +9 -0
- package/package.json +1 -1
- package/static/css/3934.8026f9d8.chunk.css +2 -0
- package/static/css/6310.ce3b451b.chunk.css +2 -0
- package/static/css/{81.c6c6e3f4.chunk.css → 770.9875661a.chunk.css} +1 -1
- package/static/css/main.6dff3bf8.css +2 -0
- package/static/js/{1902.7004d313.js → 1902.b8ea2bf6.js} +2 -2
- package/static/js/1940.e8374763.js +3 -0
- package/static/js/2139.fe670ca3.js +3 -0
- package/static/js/{2278.b3ed09ee.js → 2278.29663e62.js} +3 -3
- package/static/js/284.89002158.js +2 -0
- package/static/js/{9318.c75a0d7a.js → 3080.353033ae.js} +3 -3
- package/static/js/{3158.e4c478b5.js → 3158.afc3bdd1.js} +2 -2
- package/static/js/3628.d51bff41.js +3 -0
- package/static/js/{3628.8425fc03.js.LICENSE.txt → 3628.d51bff41.js.LICENSE.txt} +0 -15
- package/static/js/{1670.d5169574.js → 3934.1b72968b.js} +3 -3
- package/static/js/4301.5da300dd.js +2 -0
- package/static/js/{476.285c6ca0.js → 476.531c09da.js} +2 -2
- package/static/js/{4863.3c9556d1.js → 4863.bc61c6b4.js} +3 -3
- package/static/js/4875.9b1d5dc8.js +3 -0
- package/static/js/5255.9c7c7b3d.js +3 -0
- package/static/js/5800.c5dc1c76.js +3 -0
- package/static/js/6310.b62546f1.js +2 -0
- package/static/js/770.88557b4b.js +3 -0
- package/static/js/{7716.a8d67437.js → 7716.45cd053a.js} +3 -3
- package/static/js/8081.95779f5d.js +2 -0
- package/static/js/{8580.4f0dc6d9.js → 8580.4a5c4223.js} +2 -2
- package/static/js/8778.37afb80d.js +2 -0
- package/static/js/{9830.76800418.js → 9830.6890d559.js} +3 -3
- package/static/js/{useblocks_core.cb605ac6.js → useblocks_core.3f3f7e7e.js} +3 -3
- package/useblocks-esm.js +1 -1
- package/useblocks.d.ts +95 -27
- package/useblocks.js +1 -1
- package/iframe/iframe-eblock.327a87d1da513ae71cd6.html +0 -1
- package/iframe/iframe.327a87d1da513ae71cd6.html +0 -1
- package/iframe/js/174.b87f9f87.js +0 -1
- package/iframe/js/525.b0e69562.js +0 -1
- package/iframe/js/882.c0a09057.js +0 -1
- package/static/css/1670.c105226d.chunk.css +0 -2
- package/static/css/5102.4bf6c54e.chunk.css +0 -2
- package/static/css/main.f1b5caa5.css +0 -2
- package/static/js/2139.5b04512a.js +0 -3
- package/static/js/284.df9cd8ae.js +0 -2
- package/static/js/3628.8425fc03.js +0 -3
- package/static/js/392.15977b83.js +0 -2
- package/static/js/4875.f29c6551.js +0 -3
- package/static/js/5102.e818d734.js +0 -2
- package/static/js/5255.c937525e.js +0 -3
- package/static/js/5844.f9960508.js +0 -3
- package/static/js/6413.a5092eb3.js +0 -2
- package/static/js/6525.6cf7ec98.js +0 -3
- package/static/js/81.45a57ae0.js +0 -3
- package/static/js/8778.7cb8cbdb.js +0 -2
- /package/iframe/js/{174.b87f9f87.js.LICENSE.txt → 174.62b19abc.js.LICENSE.txt} +0 -0
- /package/iframe/js/{525.b0e69562.js.LICENSE.txt → 525.c01787e6.js.LICENSE.txt} +0 -0
- /package/iframe/js/{882.c0a09057.js.LICENSE.txt → 882.4eca7796.js.LICENSE.txt} +0 -0
- /package/static/js/{2139.5b04512a.js.LICENSE.txt → 1940.e8374763.js.LICENSE.txt} +0 -0
- /package/static/js/{4863.3c9556d1.js.LICENSE.txt → 2139.fe670ca3.js.LICENSE.txt} +0 -0
- /package/static/js/{2278.b3ed09ee.js.LICENSE.txt → 2278.29663e62.js.LICENSE.txt} +0 -0
- /package/static/js/{9318.c75a0d7a.js.LICENSE.txt → 3080.353033ae.js.LICENSE.txt} +0 -0
- /package/static/js/{1670.d5169574.js.LICENSE.txt → 3934.1b72968b.js.LICENSE.txt} +0 -0
- /package/static/js/{6525.6cf7ec98.js.LICENSE.txt → 4863.bc61c6b4.js.LICENSE.txt} +0 -0
- /package/static/js/{4875.f29c6551.js.LICENSE.txt → 4875.9b1d5dc8.js.LICENSE.txt} +0 -0
- /package/static/js/{5255.c937525e.js.LICENSE.txt → 5255.9c7c7b3d.js.LICENSE.txt} +0 -0
- /package/static/js/{5844.f9960508.js.LICENSE.txt → 5800.c5dc1c76.js.LICENSE.txt} +0 -0
- /package/static/js/{7716.a8d67437.js.LICENSE.txt → 770.88557b4b.js.LICENSE.txt} +0 -0
- /package/static/js/{81.45a57ae0.js.LICENSE.txt → 7716.45cd053a.js.LICENSE.txt} +0 -0
- /package/static/js/{9830.76800418.js.LICENSE.txt → 9830.6890d559.js.LICENSE.txt} +0 -0
- /package/static/js/{useblocks_core.cb605ac6.js.LICENSE.txt → useblocks_core.3f3f7e7e.js.LICENSE.txt} +0 -0
package/useblocks-esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const load=function(e){var t,r=e||("undefined"!==typeof module&&"module"===module.type?{publicPath:import.meta.url.replaceAll("\\","/").split("/").slice(0,-1).join("/")+"/"}:void 0);return(()=>{var e={2783:(e,t,r)=>{"use strict";r.r(t),r.d(t,{FileManagerApiError:()=>a});class a extends Error{constructor(e,t,r,o){super(e),this.code=void 0,this.httpStatus=void 0,this.details=void 0,this.name="FileManagerApiError",this.code=t,this.httpStatus=r,this.details=o,Error.captureStackTrace&&Error.captureStackTrace(this,a)}}},32431:(e,t,a)=>{var o;let n="https://unpkg.com/useblocks@1.0.
|
|
1
|
+
const load=function(e){var t,r=e||("undefined"!==typeof module&&"module"===module.type?{publicPath:import.meta.url.replaceAll("\\","/").split("/").slice(0,-1).join("/")+"/"}:void 0);return(()=>{var e={2783:(e,t,r)=>{"use strict";r.r(t),r.d(t,{FileManagerApiError:()=>a});class a extends Error{constructor(e,t,r,o){super(e),this.code=void 0,this.httpStatus=void 0,this.details=void 0,this.name="FileManagerApiError",this.code=t,this.httpStatus=r,this.details=o,Error.captureStackTrace&&Error.captureStackTrace(this,a)}}},32431:(e,t,a)=>{var o;let n="https://unpkg.com/useblocks@1.0.111/";const c="useblocks";if("object"===typeof r&&null!==(o=r)&&void 0!==o&&o.publicPath){var i;n=null===(i=r)||void 0===i?void 0:i.publicPath}else{let e="";const t=document.querySelector(`script[src*=${c}\\.js]`)||document.querySelector(`script[src*=${c}-esm\\.js]`);t instanceof HTMLScriptElement&&(e=t.src),e&&(n=e.replaceAll("\\","/").split("/").slice(0,-1).join("/")+"/")}a.p=new URL(n,window.location.origin).href}},a={};function o(t){var r=a[t];if(void 0!==r)return r.exports;var n=a[t]={exports:{}};return e[t].call(n.exports,n,n.exports,o),n.exports}o.m=e,o.amdO={},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;o.t=function(r,a){if(1&a&&(r=this(r)),8&a)return r;if("object"===typeof r&&r){if(4&a&&r.__esModule)return r;if(16&a&&"function"===typeof r.then)return r}var n=Object.create(null);o.r(n);var c={};e=e||[null,t({}),t([]),t(t)];for(var i=2&a&&r;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(e=>c[e]=()=>r[e]);return c.default=()=>r,o.d(n,c),n}})(),o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,r)=>(o.f[r](e,t),t),[])),o.u=e=>6369===e?"static/js/6369.0993c5ab.js":3158===e?"static/js/3158.afc3bdd1.js":4875===e?"static/js/4875.9b1d5dc8.js":5255===e?"static/js/5255.9c7c7b3d.js":3080===e?"static/js/3080.353033ae.js":4301===e?"static/js/4301.5da300dd.js":8081===e?"static/js/8081.95779f5d.js":"static/js/"+e+"."+{77:"6ea8ad5d",197:"64f9fd6b",284:"89002158",290:"3b771060",494:"87c48e86",737:"fae14b35",1157:"1e6829d5",1241:"9f7c977b",1330:"607183c7",1332:"3eba834b",1377:"b486b1f4",1454:"23356a65",1502:"6be06fc7",1510:"32a77efc",1626:"0cd4dd3f",1640:"7ae88653",1729:"a0be903e",1788:"e7e85733",1807:"edd17ae4",1872:"610556e1",1902:"b8ea2bf6",1940:"e8374763",2066:"a4cfddd1",2114:"dff67863",2139:"fe670ca3",2248:"364643d4",2278:"29663e62",2408:"8dcea713",2438:"02617e55",2466:"a3a4151a",2642:"b60a63f6",2827:"e02551c9",2844:"4c02df45",2917:"f75d7ce1",2988:"6d43f35a",3302:"9b320bc9",3411:"69f4008b",3624:"a7076f34",3628:"d51bff41",3711:"d621dbad",3816:"bf684fe1",3914:"c63f1b85",3934:"1b72968b",4425:"39579a63",4504:"4f3bb0b0",4607:"25f2d561",4686:"6a800b56",4702:"de98cbd5",4813:"ca2fe39e",4823:"d4ba65be",4863:"bc61c6b4",5108:"473a7fe1",5261:"3e64116f",5322:"ce259c32",5365:"cc28300d",5466:"a0f769cb",5612:"37f3811e",5653:"5f06277c",5827:"6555a26a",5862:"225d9aac",5864:"340bc721",5902:"73cb2cc4",5980:"fbc691ed",6033:"71847c1c",6135:"ceb22131",6310:"b62546f1",6418:"5c3bf780",6428:"8b233458",6552:"9d811323",6618:"8866f1fa",6764:"9e4a7f5f",6832:"4c4f3da7",6859:"a585514c",7231:"9ca1301e",7288:"170ea51b",7426:"eaa2cbe4",7974:"5b71f208",8466:"ae622785",8534:"10b79ff1",8580:"4a5c4223",8590:"2779de33",8682:"ec99bbfe",8778:"37afb80d",8796:"a6838d71",8839:"25cace14",9169:"dee65ca6",9200:"63433716",9508:"a68ced7b",9716:"fb4af6bc",9830:"6890d559"}[e]+".js",o.miniCssF=e=>"static/css/"+e+"."+{3934:"8026f9d8",6310:"ce3b451b",8580:"aeb3f0bc",8778:"3f22f159"}[e]+".chunk.css",o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="email-maker:";o.l=(r,a,n,c)=>{if(e[r])e[r].push(a);else{var i,s;if(void 0!==n)for(var d=document.getElementsByTagName("script"),l=0;l<d.length;l++){var u=d[l];if(u.getAttribute("src")==r||u.getAttribute("data-webpack")==t+n){i=u;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,o.nc&&i.setAttribute("nonce",o.nc),i.setAttribute("data-webpack",t+n),i.src=r),e[r]=[a];var f=(t,a)=>{i.onerror=i.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(e=>e(a)),t)return t(a)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),s&&document.head.appendChild(i)}}})(),o.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.p="/",(()=>{if("undefined"!==typeof document){var e=e=>new Promise((t,r)=>{var a=o.miniCssF(e),n=o.p+a;if(((e,t)=>{for(var r=document.getElementsByTagName("link"),a=0;a<r.length;a++){var o=(c=r[a]).getAttribute("data-href")||c.getAttribute("href");if("stylesheet"===c.rel&&(o===e||o===t))return c}var n=document.getElementsByTagName("style");for(a=0;a<n.length;a++){var c;if((o=(c=n[a]).getAttribute("data-href"))===e||o===t)return c}})(a,n))return t();((e,t,r,a,n)=>{var c=document.createElement("link");c.setAttribute("data-useblocks","true"),c.rel="stylesheet",c.type="text/css",o.nc&&(c.nonce=o.nc),c.onerror=c.onload=r=>{if(c.onerror=c.onload=null,"load"===r.type)a();else{var o=r&&r.type,i=r&&r.target&&r.target.href||t,s=new Error("Loading CSS chunk "+e+" failed.\n("+o+": "+i+")");s.name="ChunkLoadError",s.code="CSS_CHUNK_LOAD_FAILED",s.type=o,s.request=i,c.parentNode&&c.parentNode.removeChild(c),n(s)}},c.href=t,r?r.parentNode.insertBefore(c,r.nextSibling):document.head.appendChild(c)})(e,n,null,t,r)}),t={884:0,5294:0};o.f.miniCss=(r,a)=>{t[r]?a.push(t[r]):0!==t[r]&&{3934:1,6310:1,8580:1,8778:1}[r]&&a.push(t[r]=e(r).then(()=>{t[r]=0},e=>{throw delete t[r],e}))}}})(),(()=>{var e={884:0,5294:0};o.f.j=(t,r)=>{var a=o.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else{var n=new Promise((r,o)=>a=e[t]=[r,o]);r.push(a[2]=n);var c=o.p+o.u(t),i=new Error;o.l(c,r=>{if(o.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var n=r&&("load"===r.type?"missing":r.type),c=r&&r.target&&r.target.src;i.message="Loading chunk "+t+" failed.\n("+n+": "+c+")",i.name="ChunkLoadError",i.type=n,i.request=c,a[1](i)}},"chunk-"+t,t)}};var t=(t,r)=>{var a,n,[c,i,s]=r,d=0;if(c.some(t=>0!==e[t])){for(a in i)o.o(i,a)&&(o.m[a]=i[a]);if(s)s(o)}for(t&&t(r);d<c.length;d++)n=c[d],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0},r=globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),o.nc=void 0;var n={};(()=>{"use strict";o.r(n),o.d(n,{errors:()=>t,helpers:()=>e,init:()=>i,parseAMP:()=>s,version:()=>d});var e={};o.r(e),o.d(e,{mapHttpStatusToErrorCode:()=>r});o(32431);var t=o(2783);function r(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}}let a,c;function i(e){return a||(a=o.e(1902).then(o.bind(o,71902))),a.then(t=>t.init(e))}function s(e){return c||(c=o.e(1807).then(o.bind(o,24188))),c.then(t=>t.parseAMP(e))}const d="1.0.111"})(),t=n})(),t},app=load("undefined"===typeof UseblocksEnvironment?void 0:UseblocksEnvironment);export const parseAMP=app.parseAMP;export const version=app.version;export const errors=app.errors;export const helpers=app.helpers;export const init=app.init;
|
|
2
2
|
//# sourceMappingURL=useblocks-esm.js.map
|
package/useblocks.d.ts
CHANGED
|
@@ -929,8 +929,13 @@ export declare namespace ExportedApi {
|
|
|
929
929
|
/** type of image editor display */
|
|
930
930
|
imageCenterFileManagerView: boolean;
|
|
931
931
|
|
|
932
|
+
/** поле загрузки файла с компьютера в Image Center */
|
|
933
|
+
imageCenterLocalUploadEnabled: boolean;
|
|
934
|
+
|
|
932
935
|
imageCenterStockEnabled: boolean;
|
|
933
936
|
imageCenterGifEnabled: boolean;
|
|
937
|
+
/** Вкладка icon stock (Streamline) в image center / file manager; при false — отключено (как stock/gif). */
|
|
938
|
+
imageCenterIconStockEnabled: boolean;
|
|
934
939
|
imageCenterEditorEnabled: boolean;
|
|
935
940
|
compressMaxSize: number;
|
|
936
941
|
compressMaxWidthOrHeight: number;
|
|
@@ -1343,15 +1348,18 @@ export declare namespace ExportedApi {
|
|
|
1343
1348
|
type FileProxyEventPayload = { url: string; project: string };
|
|
1344
1349
|
type LoadImageListener = AppListener<LoadEventPayload, string | void>;
|
|
1345
1350
|
type FileProxyListener = AppListener<FileProxyEventPayload, Blob | void>;
|
|
1351
|
+
type ProxyUrlListener = AppListener<FileProxyEventPayload, string | void>;
|
|
1346
1352
|
interface Options {
|
|
1347
1353
|
handleLoadImage?: LoadImageListener;
|
|
1348
1354
|
handleFileProxy?: FileProxyListener;
|
|
1355
|
+
handleUrlProxy?: ProxyUrlListener;
|
|
1349
1356
|
}
|
|
1350
1357
|
|
|
1351
1358
|
interface Instance {
|
|
1352
1359
|
/** fires when image loading */
|
|
1353
1360
|
handleLoadImage: AppEvent<LoadImageListener>;
|
|
1354
1361
|
handleFileProxy: AppEvent<FileProxyListener>;
|
|
1362
|
+
handleUrlProxy: AppEvent<ProxyUrlListener>;
|
|
1355
1363
|
}
|
|
1356
1364
|
}
|
|
1357
1365
|
interface Options extends ImageHandlerMixin.Options { }
|
|
@@ -1569,6 +1577,18 @@ export interface FileSystemItem {
|
|
|
1569
1577
|
*/
|
|
1570
1578
|
export type FileSystemItemUpdate = Partial<FileSystemItem> & { id: string };
|
|
1571
1579
|
|
|
1580
|
+
/**
|
|
1581
|
+
* Options for {@link StorageProvider.getFileData} when loading file bytes (blob).
|
|
1582
|
+
*/
|
|
1583
|
+
export interface GetFileDataOptions {
|
|
1584
|
+
/**
|
|
1585
|
+
* When `true`, bypass the HTTP cache (`fetch` with `cache: 'no-store'`).
|
|
1586
|
+
* When `false`, allow normal browser caching.
|
|
1587
|
+
* When omitted, normal browser caching is used unless a caller applies a one-shot bypass after overwrite.
|
|
1588
|
+
*/
|
|
1589
|
+
forceReload?: boolean;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1572
1592
|
/**
|
|
1573
1593
|
* API response with pagination details.
|
|
1574
1594
|
*/
|
|
@@ -1745,9 +1765,10 @@ export interface StorageProvider {
|
|
|
1745
1765
|
* using the `url` property from the `FileInfo` object.
|
|
1746
1766
|
*
|
|
1747
1767
|
* @param file - File object
|
|
1768
|
+
* @param options - см. {@link GetFileDataOptions}
|
|
1748
1769
|
* @returns File contents as a Blob
|
|
1749
1770
|
*/
|
|
1750
|
-
getFileData?: (file: FileSystemItem) => MayBePromise<Blob>;
|
|
1771
|
+
getFileData?: (file: FileSystemItem, options?: GetFileDataOptions) => MayBePromise<Blob>;
|
|
1751
1772
|
|
|
1752
1773
|
/**
|
|
1753
1774
|
* Get URL for file access
|
|
@@ -1855,9 +1876,15 @@ export interface StorageProvider {
|
|
|
1855
1876
|
* @param url - File URL
|
|
1856
1877
|
* @param folderId - Target folder (or undefined for root). If not specified,
|
|
1857
1878
|
* uses the root folder.
|
|
1879
|
+
* @param options - Optional. eventSource — источник загрузки для логики интегратора
|
|
1880
|
+
* (например, отключение прокси при загрузке из стоков: imageStock, iconStock, gif).
|
|
1858
1881
|
* @returns The uploaded or existing complete file object
|
|
1859
1882
|
*/
|
|
1860
|
-
uploadFileByUrl: (
|
|
1883
|
+
uploadFileByUrl: (
|
|
1884
|
+
url: string,
|
|
1885
|
+
folderId?: string,
|
|
1886
|
+
options?: { eventSource?: 'upload' | 'uploadByUrl' | 'pixie' | 'iconStock' | 'imageStock' | 'gif' }
|
|
1887
|
+
) => MayBePromise<FileSystemItem>;
|
|
1861
1888
|
|
|
1862
1889
|
/**
|
|
1863
1890
|
* Delete multiple items (files or folders).
|
|
@@ -1905,6 +1932,18 @@ export interface StorageProvider {
|
|
|
1905
1932
|
* @returns Batch operation result with success/failure details
|
|
1906
1933
|
*/
|
|
1907
1934
|
copyItems?: (items: FileSystemItem[], targetFolderId?: string) => MayBePromise<BatchResult<FileSystemItemUpdate>>;
|
|
1935
|
+
/**
|
|
1936
|
+
* Find a file by its URL.
|
|
1937
|
+
* @param url - File URL
|
|
1938
|
+
* @param folderId - Target folder (or undefined for root). If not specified,
|
|
1939
|
+
* uses the root folder.
|
|
1940
|
+
* @returns The existing file object if the file already belongs to the current server, otherwise undefined
|
|
1941
|
+
* Find file by URL. Implementation should check if the file already belongs
|
|
1942
|
+
* to the current server. If it does, return the existing file object
|
|
1943
|
+
* instead of uploading it again.
|
|
1944
|
+
* @returns
|
|
1945
|
+
*/
|
|
1946
|
+
findFileByUrl?: (url: string, folderId?: string) => MayBePromise<FileSystemItem | undefined>;
|
|
1908
1947
|
|
|
1909
1948
|
/**
|
|
1910
1949
|
* Update file metadata or content.
|
|
@@ -1933,6 +1972,18 @@ export declare namespace ExportedApi {
|
|
|
1933
1972
|
}
|
|
1934
1973
|
|
|
1935
1974
|
export interface FileManagerOptions {
|
|
1975
|
+
/**
|
|
1976
|
+
* Maximum file size in bytes for client-side compression. Files larger than this will not be compressed.
|
|
1977
|
+
* Set to 0 or undefined to disable compression.
|
|
1978
|
+
* @default 5 * 1024 * 1024 (5 MB)
|
|
1979
|
+
*/
|
|
1980
|
+
compressMaxSize?: number;
|
|
1981
|
+
/**
|
|
1982
|
+
* Maximum width or height in pixels for client-side image compression. Images larger than this will be resized.
|
|
1983
|
+
* Set to 0 or undefined to disable resizing.
|
|
1984
|
+
* @default 2000
|
|
1985
|
+
*/
|
|
1986
|
+
compressMaxWidthOrHeight?: number;
|
|
1936
1987
|
/**
|
|
1937
1988
|
* Expand all folders in root on init
|
|
1938
1989
|
* @default true
|
|
@@ -1952,6 +2003,15 @@ export declare namespace ExportedApi {
|
|
|
1952
2003
|
*/
|
|
1953
2004
|
enablePagination?: boolean;
|
|
1954
2005
|
|
|
2006
|
+
/**
|
|
2007
|
+
* When `true` (default) and {@link enablePagination} is `false` only: requests for `itemType: 'folder'` or `'file'`
|
|
2008
|
+
* load the catalog once as `all` (single `getItems` call and one TreeCache key), then filter client-side.
|
|
2009
|
+
* Ignored when server-side pagination is enabled (`enablePagination` not `false`).
|
|
2010
|
+
* Set `false` if your backend must use separate folder vs file list semantics.
|
|
2011
|
+
* @default true
|
|
2012
|
+
*/
|
|
2013
|
+
unifiedCatalogFetch?: boolean;
|
|
2014
|
+
|
|
1955
2015
|
/**
|
|
1956
2016
|
* Enables the ability to rename folders within the file manager.
|
|
1957
2017
|
* If false or undefined, renaming folders is disabled.
|
|
@@ -2021,6 +2081,36 @@ export declare namespace ExportedApi {
|
|
|
2021
2081
|
*/
|
|
2022
2082
|
multiSelect?: boolean;
|
|
2023
2083
|
|
|
2084
|
+
/**
|
|
2085
|
+
* Whitelist of entries in the file list sort dropdown.
|
|
2086
|
+
* Each string combines sort field and direction (e.g. `date-desc` for newest first).
|
|
2087
|
+
* If omitted or empty, the file-manager UI shows all built-in sort modes.
|
|
2088
|
+
* Pass a subset when the platform does not implement every `sortBy` / `sortOrder` pair.
|
|
2089
|
+
* @example ['date-desc', 'date-asc', 'name-asc', 'name-desc'] // omit size and type sorts
|
|
2090
|
+
*/
|
|
2091
|
+
sortOptions?: (
|
|
2092
|
+
| 'date-desc'
|
|
2093
|
+
| 'date-asc'
|
|
2094
|
+
| 'size-desc'
|
|
2095
|
+
| 'size-asc'
|
|
2096
|
+
| 'name-asc'
|
|
2097
|
+
| 'name-desc'
|
|
2098
|
+
| 'type-asc'
|
|
2099
|
+
)[];
|
|
2100
|
+
/*
|
|
2101
|
+
* When thumbnail/thumbnailUrl are missing, use `file.url` for table/grid preview (images only).
|
|
2102
|
+
* Forwarded to FileManager `config` (@emailmaker/filemanager).
|
|
2103
|
+
*/
|
|
2104
|
+
previewFallbackToFileUrl?: boolean;
|
|
2105
|
+
/**
|
|
2106
|
+
* Client-side deduplication of upload names and related flows (see @emailmaker/filemanager `Config`).
|
|
2107
|
+
*/
|
|
2108
|
+
dedupeUploadNamesOnClient?: boolean;
|
|
2109
|
+
/**
|
|
2110
|
+
* When enabled, "Save copy" in the image editor targets the current folder instead of the default one.
|
|
2111
|
+
*/
|
|
2112
|
+
saveCopyToCurrentFolder?: boolean;
|
|
2113
|
+
|
|
2024
2114
|
/**
|
|
2025
2115
|
* Enables client-side sorting of files.
|
|
2026
2116
|
* - If `true`, default sorting is applied (by name ascending).
|
|
@@ -2066,14 +2156,13 @@ export declare namespace ExportedApi {
|
|
|
2066
2156
|
/**
|
|
2067
2157
|
* Time-to-live (TTL) in milliseconds for cached items.
|
|
2068
2158
|
* After this period, cached items will be considered stale.
|
|
2069
|
-
* @default
|
|
2159
|
+
* @default 1800000 (30 minutes)
|
|
2070
2160
|
*/
|
|
2071
2161
|
ttl?: number;
|
|
2072
2162
|
|
|
2073
2163
|
/**
|
|
2074
|
-
* TTL in milliseconds for cached
|
|
2075
|
-
*
|
|
2076
|
-
* @default 60000 (1 minute)
|
|
2164
|
+
* TTL in milliseconds for cached errors (failed loads). While fresh, the same error is reused without a new request.
|
|
2165
|
+
* When omitted, matches {@link cacheStrategy.ttl}.
|
|
2077
2166
|
*/
|
|
2078
2167
|
errorTtl?: number;
|
|
2079
2168
|
|
|
@@ -2124,27 +2213,6 @@ export declare namespace ExportedApi {
|
|
|
2124
2213
|
*/
|
|
2125
2214
|
preloadPagesAfter?: number;
|
|
2126
2215
|
};
|
|
2127
|
-
|
|
2128
|
-
/**
|
|
2129
|
-
* Service proxy URL for Unsplash (stock images).
|
|
2130
|
-
* When set, API requests go through this proxy instead of api.unsplash.com directly.
|
|
2131
|
-
* Example: https://api.emailmaker.ru/services/stock_images
|
|
2132
|
-
*/
|
|
2133
|
-
stockImagesProxyUrl?: string;
|
|
2134
|
-
|
|
2135
|
-
/**
|
|
2136
|
-
* Service proxy URL for Giphy (stock GIFs).
|
|
2137
|
-
* When set, API requests go through this proxy instead of api.giphy.com directly.
|
|
2138
|
-
* Example: https://api.emailmaker.ru/services/stock_gifs
|
|
2139
|
-
*/
|
|
2140
|
-
stockGifsProxyUrl?: string;
|
|
2141
|
-
|
|
2142
|
-
/**
|
|
2143
|
-
* Service proxy URL for Streamline (stock icons).
|
|
2144
|
-
* When set, API requests go through this proxy instead of public-api.streamlinehq.com directly.
|
|
2145
|
-
* Example: https://api.emailmaker.ru/services/stock_icons
|
|
2146
|
-
*/
|
|
2147
|
-
stockIconsProxyUrl?: string;
|
|
2148
2216
|
}
|
|
2149
2217
|
|
|
2150
2218
|
export interface Config {
|
package/useblocks.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports.useblocks=t():e.useblocks=t()}(globalThis,()=>(()=>{var e={2783:(e,t,r)=>{"use strict";r.r(t),r.d(t,{FileManagerApiError:()=>a});class a extends Error{constructor(e,t,r,o){super(e),this.code=void 0,this.httpStatus=void 0,this.details=void 0,this.name="FileManagerApiError",this.code=t,this.httpStatus=r,this.details=o,Error.captureStackTrace&&Error.captureStackTrace(this,a)}}},32431:(e,t,r)=>{var a;let o="https://unpkg.com/useblocks@1.0.
|
|
1
|
+
!function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports.useblocks=t():e.useblocks=t()}(globalThis,()=>(()=>{var e={2783:(e,t,r)=>{"use strict";r.r(t),r.d(t,{FileManagerApiError:()=>a});class a extends Error{constructor(e,t,r,o){super(e),this.code=void 0,this.httpStatus=void 0,this.details=void 0,this.name="FileManagerApiError",this.code=t,this.httpStatus=r,this.details=o,Error.captureStackTrace&&Error.captureStackTrace(this,a)}}},32431:(e,t,r)=>{var a;let o="https://unpkg.com/useblocks@1.0.111/";const n="useblocks";if("object"===typeof UseblocksEnvironment&&null!==(a=UseblocksEnvironment)&&void 0!==a&&a.publicPath){var c;o=null===(c=UseblocksEnvironment)||void 0===c?void 0:c.publicPath}else{let e="";const t=document.querySelector(`script[src*=${n}\\.js]`)||document.querySelector(`script[src*=${n}-esm\\.js]`);t instanceof HTMLScriptElement&&(e=t.src),e&&(o=e.replaceAll("\\","/").split("/").slice(0,-1).join("/")+"/")}r.p=new URL(o,window.location.origin).href}},t={};function r(a){var o=t[a];if(void 0!==o)return o.exports;var n=t[a]={exports:{}};return e[a].call(n.exports,n,n.exports,r),n.exports}r.m=e,r.amdO={},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(a,o){if(1&o&&(a=this(a)),8&o)return a;if("object"===typeof a&&a){if(4&o&&a.__esModule)return a;if(16&o&&"function"===typeof a.then)return a}var n=Object.create(null);r.r(n);var c={};e=e||[null,t({}),t([]),t(t)];for(var i=2&o&&a;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(e=>c[e]=()=>a[e]);return c.default=()=>a,r.d(n,c),n}})(),r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,a)=>(r.f[a](e,t),t),[])),r.u=e=>6369===e?"static/js/6369.0993c5ab.js":3158===e?"static/js/3158.afc3bdd1.js":4875===e?"static/js/4875.9b1d5dc8.js":5255===e?"static/js/5255.9c7c7b3d.js":3080===e?"static/js/3080.353033ae.js":4301===e?"static/js/4301.5da300dd.js":8081===e?"static/js/8081.95779f5d.js":"static/js/"+e+"."+{77:"6ea8ad5d",197:"64f9fd6b",284:"89002158",290:"3b771060",494:"87c48e86",737:"fae14b35",1157:"1e6829d5",1241:"9f7c977b",1330:"607183c7",1332:"3eba834b",1377:"b486b1f4",1454:"23356a65",1502:"6be06fc7",1510:"32a77efc",1626:"0cd4dd3f",1640:"7ae88653",1729:"a0be903e",1788:"e7e85733",1807:"edd17ae4",1872:"610556e1",1902:"b8ea2bf6",1940:"e8374763",2066:"a4cfddd1",2114:"dff67863",2139:"fe670ca3",2248:"364643d4",2278:"29663e62",2408:"8dcea713",2438:"02617e55",2466:"a3a4151a",2642:"b60a63f6",2827:"e02551c9",2844:"4c02df45",2917:"f75d7ce1",2988:"6d43f35a",3302:"9b320bc9",3411:"69f4008b",3624:"a7076f34",3628:"d51bff41",3711:"d621dbad",3816:"bf684fe1",3914:"c63f1b85",3934:"1b72968b",4425:"39579a63",4504:"4f3bb0b0",4607:"25f2d561",4686:"6a800b56",4702:"de98cbd5",4813:"ca2fe39e",4823:"d4ba65be",4863:"bc61c6b4",5108:"473a7fe1",5261:"3e64116f",5322:"ce259c32",5365:"cc28300d",5466:"a0f769cb",5612:"37f3811e",5653:"5f06277c",5827:"6555a26a",5862:"225d9aac",5864:"340bc721",5902:"73cb2cc4",5980:"fbc691ed",6033:"71847c1c",6135:"ceb22131",6310:"b62546f1",6418:"5c3bf780",6428:"8b233458",6552:"9d811323",6618:"8866f1fa",6764:"9e4a7f5f",6832:"4c4f3da7",6859:"a585514c",7231:"9ca1301e",7288:"170ea51b",7426:"eaa2cbe4",7974:"5b71f208",8466:"ae622785",8534:"10b79ff1",8580:"4a5c4223",8590:"2779de33",8682:"ec99bbfe",8778:"37afb80d",8796:"a6838d71",8839:"25cace14",9169:"dee65ca6",9200:"63433716",9508:"a68ced7b",9716:"fb4af6bc",9830:"6890d559"}[e]+".js",r.miniCssF=e=>"static/css/"+e+"."+{3934:"8026f9d8",6310:"ce3b451b",8580:"aeb3f0bc",8778:"3f22f159"}[e]+".chunk.css",r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="email-maker:";r.l=(a,o,n,c)=>{if(e[a])e[a].push(o);else{var i,s;if(void 0!==n)for(var d=document.getElementsByTagName("script"),u=0;u<d.length;u++){var l=d[u];if(l.getAttribute("src")==a||l.getAttribute("data-webpack")==t+n){i=l;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,r.nc&&i.setAttribute("nonce",r.nc),i.setAttribute("data-webpack",t+n),i.src=a),e[a]=[o];var f=(t,r)=>{i.onerror=i.onload=null,clearTimeout(b);var o=e[a];if(delete e[a],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(e=>e(r)),t)return t(r)},b=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),s&&document.head.appendChild(i)}}})(),r.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",(()=>{if("undefined"!==typeof document){var e=e=>new Promise((t,a)=>{var o=r.miniCssF(e),n=r.p+o;if(((e,t)=>{for(var r=document.getElementsByTagName("link"),a=0;a<r.length;a++){var o=(c=r[a]).getAttribute("data-href")||c.getAttribute("href");if("stylesheet"===c.rel&&(o===e||o===t))return c}var n=document.getElementsByTagName("style");for(a=0;a<n.length;a++){var c;if((o=(c=n[a]).getAttribute("data-href"))===e||o===t)return c}})(o,n))return t();((e,t,a,o,n)=>{var c=document.createElement("link");c.setAttribute("data-useblocks","true"),c.rel="stylesheet",c.type="text/css",r.nc&&(c.nonce=r.nc),c.onerror=c.onload=r=>{if(c.onerror=c.onload=null,"load"===r.type)o();else{var a=r&&r.type,i=r&&r.target&&r.target.href||t,s=new Error("Loading CSS chunk "+e+" failed.\n("+a+": "+i+")");s.name="ChunkLoadError",s.code="CSS_CHUNK_LOAD_FAILED",s.type=a,s.request=i,c.parentNode&&c.parentNode.removeChild(c),n(s)}},c.href=t,a?a.parentNode.insertBefore(c,a.nextSibling):document.head.appendChild(c)})(e,n,null,t,a)}),t={5294:0,884:0};r.f.miniCss=(r,a)=>{t[r]?a.push(t[r]):0!==t[r]&&{3934:1,6310:1,8580:1,8778:1}[r]&&a.push(t[r]=e(r).then(()=>{t[r]=0},e=>{throw delete t[r],e}))}}})(),(()=>{var e={5294:0,884:0};r.f.j=(t,a)=>{var o=r.o(e,t)?e[t]:void 0;if(0!==o)if(o)a.push(o[2]);else{var n=new Promise((r,a)=>o=e[t]=[r,a]);a.push(o[2]=n);var c=r.p+r.u(t),i=new Error;r.l(c,a=>{if(r.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=a&&("load"===a.type?"missing":a.type),c=a&&a.target&&a.target.src;i.message="Loading chunk "+t+" failed.\n("+n+": "+c+")",i.name="ChunkLoadError",i.type=n,i.request=c,o[1](i)}},"chunk-"+t,t)}};var t=(t,a)=>{var o,n,[c,i,s]=a,d=0;if(c.some(t=>0!==e[t])){for(o in i)r.o(i,o)&&(r.m[o]=i[o]);if(s)s(r)}for(t&&t(a);d<c.length;d++)n=c[d],r.o(e,n)&&e[n]&&e[n][0](),e[n]=0},a=globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})(),r.nc=void 0;var a={};return(()=>{"use strict";r.r(a),r.d(a,{errors:()=>t,helpers:()=>e,init:()=>i,parseAMP:()=>s,version:()=>d});var e={};r.r(e),r.d(e,{mapHttpStatusToErrorCode:()=>o});r(32431);var t=r(2783);function o(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}}let n,c;function i(e){return n||(n=r.e(1902).then(r.bind(r,71902))),n.then(t=>t.init(e))}function s(e){return c||(c=r.e(1807).then(r.bind(r,24188))),c.then(t=>t.parseAMP(e))}const d="1.0.111"})(),a})());
|
|
2
2
|
//# sourceMappingURL=useblocks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!doctype html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><script defer="defer" src="js/174.b87f9f87.js?327a87d1da513ae71cd6"></script><script defer="defer" src="sandbox-eblock.js?327a87d1da513ae71cd6"></script></head><body></body></html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!doctype html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><script defer="defer" src="js/174.b87f9f87.js?327a87d1da513ae71cd6"></script><script defer="defer" src="js/525.b0e69562.js?327a87d1da513ae71cd6"></script><script defer="defer" src="js/882.c0a09057.js?327a87d1da513ae71cd6"></script></head><body></body></html>
|