@social-mail/social-mail-client 1.2.301 → 1.2.303

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.
@@ -0,0 +1,4 @@
1
+ export default class Modules {
2
+ static import<T = any>(name: string): Promise<T>;
3
+ }
4
+ //# sourceMappingURL=Modules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Modules.d.ts","sourceRoot":"","sources":["../../src/common/Modules.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,OAAO,OAAO;WAEX,MAAM,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CAsBzD"}
@@ -0,0 +1,44 @@
1
+ System.register(["tslib"], function (_export, _context) {
2
+ "use strict";
3
+
4
+ var __awaiter, Modules, modules, pendingModules;
5
+ _export("default", void 0);
6
+ return {
7
+ setters: [function (_tslib) {
8
+ __awaiter = _tslib.__awaiter;
9
+ }],
10
+ execute: function () {
11
+ modules = new Map();
12
+ pendingModules = new Map();
13
+ window.pendingModules = pendingModules;
14
+ _export("default", Modules = class Modules {
15
+ static import(name) {
16
+ return __awaiter(this, void 0, void 0, function* () {
17
+ let m = modules.get(name);
18
+ if (!m) {
19
+ m = new Promise((resolve, reject) => {
20
+ const script = document.createElement("script");
21
+ pendingModules.set(name, {
22
+ resolve,
23
+ reject,
24
+ script
25
+ });
26
+ script.type = "module";
27
+ script.textContent = `
28
+ import * as result from "${name}";
29
+ const { resolve, script } = window.pendingModules.get("${name}");
30
+ resolve(result);
31
+ script.remove();
32
+ `;
33
+ document.body.append(script);
34
+ });
35
+ modules.set(name, m);
36
+ }
37
+ return m;
38
+ });
39
+ }
40
+ });
41
+ }
42
+ };
43
+ });
44
+ //# sourceMappingURL=Modules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Modules","modules","pendingModules","_export","setters","_tslib","Map","window","import","name","m","get","Promise","resolve","reject","script","document","createElement","set","type","textContent","body","append"],"sources":["../../src/common/Modules.ts"],"sourcesContent":[null],"mappings":";;;iBAMqBA,OAAO,EAAAC,OAAA,EAAAC,cAAA;EAAAC,OAAA;EAAA;IAAAC,OAAA,aAAAC,MAAA;;;;MANtBJ,OAAO,GAAG,IAAIK,GAAG,EAAwB;MAEzCJ,cAAc,GAAG,IAAII,GAAG,EAAuC;MAEpEC,MAAc,CAACL,cAAc,GAAGA,cAAc;MAACC,OAAA,YAE3BH,OAAO,GAAd,MAAOA,OAAO;QAExB,OAAaQ,MAAMA,CAAUC,IAAY;;YAErC,IAAIC,CAAC,GAAGT,OAAO,CAACU,GAAG,CAACF,IAAI,CAAC;YACzB,IAAI,CAACC,CAAC,EAAE;cACJA,CAAC,GAAG,IAAIE,OAAO,CAAM,CAACC,OAAO,EAAEC,MAAM,KAAI;gBAErC,MAAMC,MAAM,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;gBAC/Cf,cAAc,CAACgB,GAAG,CAACT,IAAI,EAAE;kBAAEI,OAAO;kBAAEC,MAAM;kBAAEC;gBAAM,CAAE,CAAC;gBACrDA,MAAM,CAACI,IAAI,GAAG,QAAQ;gBACtBJ,MAAM,CAACK,WAAW,GAAG;+CACUX,IAAI;6EAC0BA,IAAI;;;iBAGhE;gBACDO,QAAQ,CAACK,IAAI,CAACC,MAAM,CAACP,MAAM,CAAC;cAChC,CAAC,CAAC;cACFd,OAAO,CAACiB,GAAG,CAACT,IAAI,EAAEC,CAAC,CAAC;;YAExB,OAAOA,CAAC;UACZ,CAAC;;OAEJ;IAAA;EAAA;AAAA","ignoreList":[]}