@webiny/app-admin 6.4.0-beta.3 → 6.4.0-beta.4
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/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js.map +1 -1
- package/base/ui/FileManager.d.ts +15 -14
- package/base/ui/FileManager.js +5 -2
- package/base/ui/FileManager.js.map +1 -1
- package/config/AdminConfig/Menu/MenuItem.d.ts +1 -0
- package/config/AdminConfig/Menu/MenuItem.js +2 -1
- package/config/AdminConfig/Menu/MenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/MenuLink.d.ts +1 -0
- package/config/AdminConfig/Menu/MenuLink.js +2 -1
- package/config/AdminConfig/Menu/MenuLink.js.map +1 -1
- package/config/AdminConfig/Menu.d.ts +2 -0
- package/config/AdminConfig.d.ts +2 -0
- package/config/AdminConfig.js +1 -0
- package/config/AdminConfig.js.map +1 -1
- package/exports/admin/ui/file-manager.d.ts +3 -0
- package/exports/admin/ui/file-manager.js +2 -0
- package/features/formModel/FormModel.js +2 -2
- package/features/formModel/FormModel.js.map +1 -1
- package/features/formModel/FormModel.test.js +3 -1
- package/features/formModel/FormModel.test.js.map +1 -1
- package/features/newsletter/NewsletterSubscriptionService.d.ts +13 -0
- package/features/newsletter/NewsletterSubscriptionService.js +36 -0
- package/features/newsletter/NewsletterSubscriptionService.js.map +1 -0
- package/features/newsletter/abstractions.d.ts +11 -0
- package/features/newsletter/abstractions.js +5 -0
- package/features/newsletter/abstractions.js.map +1 -0
- package/features/newsletter/index.d.ts +1 -0
- package/features/newsletter/index.js +1 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +30 -28
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleRestartInstallation.d.ts +1 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleRestartInstallation.js +6 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleRestartInstallation.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.d.ts +2 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.js +27 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js +4 -4
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.d.ts +3 -1
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js +9 -3
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/feature.js +2 -0
- package/presentation/installation/presenters/SystemInstaller/feature.js.map +1 -1
- package/presentation/listPresenter/ListPresenter.d.ts +1 -0
- package/presentation/listPresenter/ListPresenter.js +8 -2
- package/presentation/listPresenter/ListPresenter.js.map +1 -1
- package/presentation/listPresenter/feature.js +1 -1
- package/presentation/listPresenter/feature.js.map +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EnvConfig } from "@webiny/app/features/envConfig";
|
|
2
|
+
import { NewsletterSubscriptionService as Abstraction } from "./abstractions.js";
|
|
3
|
+
declare class NewsletterSubscriptionServiceImpl implements Abstraction.Interface {
|
|
4
|
+
private envConfig;
|
|
5
|
+
constructor(envConfig: EnvConfig.Interface);
|
|
6
|
+
subscribe(params: {
|
|
7
|
+
email: string;
|
|
8
|
+
firstName: string;
|
|
9
|
+
lastName: string;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare const NewsletterSubscriptionService: import("@webiny/di").Implementation<typeof NewsletterSubscriptionServiceImpl>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createImplementation } from "@webiny/di";
|
|
2
|
+
import { EnvConfig } from "@webiny/app/features/envConfig";
|
|
3
|
+
import { NewsletterSubscriptionService } from "./abstractions.js";
|
|
4
|
+
class NewsletterSubscriptionServiceImpl {
|
|
5
|
+
constructor(envConfig){
|
|
6
|
+
this.envConfig = envConfig;
|
|
7
|
+
}
|
|
8
|
+
async subscribe(params) {
|
|
9
|
+
if (!this.envConfig.get("telemetryEnabled")) return;
|
|
10
|
+
if (!params.email || !params.firstName || !params.lastName) return;
|
|
11
|
+
try {
|
|
12
|
+
await fetch("https://t.webiny.com/newsletter", {
|
|
13
|
+
method: "POST",
|
|
14
|
+
headers: {
|
|
15
|
+
"Content-Type": "text/plain;charset=UTF-8"
|
|
16
|
+
},
|
|
17
|
+
body: JSON.stringify({
|
|
18
|
+
firstName: params.firstName,
|
|
19
|
+
lastName: params.lastName,
|
|
20
|
+
email: params.email,
|
|
21
|
+
source: "install-wizard"
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
} catch {}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const NewsletterSubscriptionService_NewsletterSubscriptionService = createImplementation({
|
|
28
|
+
abstraction: NewsletterSubscriptionService,
|
|
29
|
+
implementation: NewsletterSubscriptionServiceImpl,
|
|
30
|
+
dependencies: [
|
|
31
|
+
EnvConfig
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
export { NewsletterSubscriptionService_NewsletterSubscriptionService as NewsletterSubscriptionService };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=NewsletterSubscriptionService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/newsletter/NewsletterSubscriptionService.js","sources":["../../../src/features/newsletter/NewsletterSubscriptionService.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { EnvConfig } from \"@webiny/app/features/envConfig\";\nimport { NewsletterSubscriptionService as Abstraction } from \"./abstractions.js\";\n\nclass NewsletterSubscriptionServiceImpl implements Abstraction.Interface {\n constructor(private envConfig: EnvConfig.Interface) {}\n\n async subscribe(params: { email: string; firstName: string; lastName: string }): Promise<void> {\n if (!this.envConfig.get(\"telemetryEnabled\")) {\n return;\n }\n if (!params.email || !params.firstName || !params.lastName) {\n return;\n }\n\n try {\n // TODO: use an injectable service here.\n await fetch(\"https://t.webiny.com/newsletter\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"text/plain;charset=UTF-8\" },\n body: JSON.stringify({\n firstName: params.firstName,\n lastName: params.lastName,\n email: params.email,\n source: \"install-wizard\"\n })\n });\n } catch {\n // Best-effort: never surface to the user.\n }\n }\n}\n\nexport const NewsletterSubscriptionService = createImplementation({\n abstraction: Abstraction,\n implementation: NewsletterSubscriptionServiceImpl,\n dependencies: [EnvConfig]\n});\n"],"names":["NewsletterSubscriptionServiceImpl","envConfig","params","fetch","JSON","NewsletterSubscriptionService","createImplementation","Abstraction","EnvConfig"],"mappings":";;;AAIA,MAAMA;IACF,YAAoBC,SAA8B,CAAE;aAAhCA,SAAS,GAATA;IAAiC;IAErD,MAAM,UAAUC,MAA8D,EAAiB;QAC3F,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,qBACpB;QAEJ,IAAI,CAACA,OAAO,KAAK,IAAI,CAACA,OAAO,SAAS,IAAI,CAACA,OAAO,QAAQ,EACtD;QAGJ,IAAI;YAEA,MAAMC,MAAM,mCAAmC;gBAC3C,QAAQ;gBACR,SAAS;oBAAE,gBAAgB;gBAA2B;gBACtD,MAAMC,KAAK,SAAS,CAAC;oBACjB,WAAWF,OAAO,SAAS;oBAC3B,UAAUA,OAAO,QAAQ;oBACzB,OAAOA,OAAO,KAAK;oBACnB,QAAQ;gBACZ;YACJ;QACJ,EAAE,OAAM,CAER;IACJ;AACJ;AAEO,MAAMG,8DAAgCC,qBAAqB;IAC9D,aAAaC;IACb,gBAAgBP;IAChB,cAAc;QAACQ;KAAU;AAC7B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface INewsletterSubscriptionService {
|
|
2
|
+
subscribe(params: {
|
|
3
|
+
email: string;
|
|
4
|
+
firstName: string;
|
|
5
|
+
lastName: string;
|
|
6
|
+
}): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare const NewsletterSubscriptionService: import("@webiny/di").Abstraction<INewsletterSubscriptionService>;
|
|
9
|
+
export declare namespace NewsletterSubscriptionService {
|
|
10
|
+
type Interface = INewsletterSubscriptionService;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/newsletter/abstractions.js","sources":["../../../src/features/newsletter/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface INewsletterSubscriptionService {\n subscribe(params: { email: string; firstName: string; lastName: string }): Promise<void>;\n}\n\nexport const NewsletterSubscriptionService = createAbstraction<INewsletterSubscriptionService>(\n \"NewsletterSubscriptionService\"\n);\n\nexport namespace NewsletterSubscriptionService {\n export type Interface = INewsletterSubscriptionService;\n}\n"],"names":["NewsletterSubscriptionService","createAbstraction"],"mappings":";AAMO,MAAMA,gCAAgCC,kBACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NewsletterSubscriptionService } from "./abstractions.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NewsletterSubscriptionService } from "./abstractions.js";
|
package/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export * from "./components/index.js";
|
|
|
21
21
|
export type { RichTextValueWithHtml } from "./components/index.js";
|
|
22
22
|
export { HasPermission } from "./presentation/security/components/HasPermission.js";
|
|
23
23
|
export { SecureRoute } from "./presentation/security/components/SecureRoute.js";
|
|
24
|
-
export { FileManager
|
|
24
|
+
export { FileManager } from "./base/ui/FileManager.js";
|
|
25
25
|
export type { FileManagerProps, FileManagerRendererProps, FileManagerFileItem, FileManagerOnChange } from "./base/ui/FileManager.js";
|
|
26
26
|
export { SystemInstallerProvider } from "./presentation/installation/components/SystemInstaller/index.js";
|
|
27
27
|
export type { AaclPermission } from "./features/wcp/types.js";
|
package/index.js
CHANGED
|
@@ -28,7 +28,7 @@ export * from "@webiny/app/renderApp.js";
|
|
|
28
28
|
export { Admin } from "./base/Admin.js";
|
|
29
29
|
export { HasPermission } from "./presentation/security/components/HasPermission.js";
|
|
30
30
|
export { SecureRoute } from "./presentation/security/components/SecureRoute.js";
|
|
31
|
-
export { FileManager
|
|
31
|
+
export { FileManager } from "./base/ui/FileManager.js";
|
|
32
32
|
export { SystemInstallerProvider } from "./presentation/installation/components/SystemInstaller/index.js";
|
|
33
33
|
export { BuildParamsFeature } from "./features/buildParams/feature.js";
|
|
34
34
|
export { ToolsFeature } from "./features/tools/feature.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-admin",
|
|
3
|
-
"version": "6.4.0-beta.
|
|
3
|
+
"version": "6.4.0-beta.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -21,28 +21,28 @@
|
|
|
21
21
|
"@emotion/styled": "11.14.1",
|
|
22
22
|
"@fortawesome/fontawesome-svg-core": "7.2.0",
|
|
23
23
|
"@fortawesome/react-fontawesome": "3.3.1",
|
|
24
|
-
"@iconify/json": "2.2.
|
|
24
|
+
"@iconify/json": "2.2.478",
|
|
25
25
|
"@lexical/utils": "0.44.0",
|
|
26
26
|
"@svgr/webpack": "8.1.0",
|
|
27
|
-
"@types/react": "18.3.
|
|
28
|
-
"@webiny/admin-ui": "6.4.0-beta.
|
|
29
|
-
"@webiny/app": "6.4.0-beta.
|
|
27
|
+
"@types/react": "18.3.29",
|
|
28
|
+
"@webiny/admin-ui": "6.4.0-beta.4",
|
|
29
|
+
"@webiny/app": "6.4.0-beta.4",
|
|
30
30
|
"@webiny/di": "1.0.1",
|
|
31
|
-
"@webiny/feature": "6.4.0-beta.
|
|
32
|
-
"@webiny/form": "6.4.0-beta.
|
|
33
|
-
"@webiny/icons": "6.4.0-beta.
|
|
34
|
-
"@webiny/lexical-converter": "6.4.0-beta.
|
|
35
|
-
"@webiny/lexical-editor": "6.4.0-beta.
|
|
36
|
-
"@webiny/lexical-nodes": "6.4.0-beta.
|
|
37
|
-
"@webiny/lexical-theme": "6.4.0-beta.
|
|
38
|
-
"@webiny/plugins": "6.4.0-beta.
|
|
39
|
-
"@webiny/react-composition": "6.4.0-beta.
|
|
40
|
-
"@webiny/react-properties": "6.4.0-beta.
|
|
41
|
-
"@webiny/sdk": "6.4.0-beta.
|
|
42
|
-
"@webiny/telemetry": "6.4.0-beta.
|
|
43
|
-
"@webiny/utils": "6.4.0-beta.
|
|
44
|
-
"@webiny/validation": "6.4.0-beta.
|
|
45
|
-
"@webiny/wcp": "6.4.0-beta.
|
|
31
|
+
"@webiny/feature": "6.4.0-beta.4",
|
|
32
|
+
"@webiny/form": "6.4.0-beta.4",
|
|
33
|
+
"@webiny/icons": "6.4.0-beta.4",
|
|
34
|
+
"@webiny/lexical-converter": "6.4.0-beta.4",
|
|
35
|
+
"@webiny/lexical-editor": "6.4.0-beta.4",
|
|
36
|
+
"@webiny/lexical-nodes": "6.4.0-beta.4",
|
|
37
|
+
"@webiny/lexical-theme": "6.4.0-beta.4",
|
|
38
|
+
"@webiny/plugins": "6.4.0-beta.4",
|
|
39
|
+
"@webiny/react-composition": "6.4.0-beta.4",
|
|
40
|
+
"@webiny/react-properties": "6.4.0-beta.4",
|
|
41
|
+
"@webiny/sdk": "6.4.0-beta.4",
|
|
42
|
+
"@webiny/telemetry": "6.4.0-beta.4",
|
|
43
|
+
"@webiny/utils": "6.4.0-beta.4",
|
|
44
|
+
"@webiny/validation": "6.4.0-beta.4",
|
|
45
|
+
"@webiny/wcp": "6.4.0-beta.4",
|
|
46
46
|
"apollo-cache": "1.3.5",
|
|
47
47
|
"apollo-client": "2.6.10",
|
|
48
48
|
"apollo-link": "1.2.14",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"is-hotkey": "0.2.0",
|
|
57
57
|
"lexical": "0.44.0",
|
|
58
58
|
"lodash": "4.18.1",
|
|
59
|
-
"markdown-to-jsx": "9.8.
|
|
59
|
+
"markdown-to-jsx": "9.8.1",
|
|
60
60
|
"mime": "4.1.0",
|
|
61
61
|
"minimatch": "10.2.5",
|
|
62
62
|
"mobx": "6.15.3",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"monaco-editor": "0.53.0",
|
|
65
65
|
"react": "18.3.1",
|
|
66
66
|
"react-dom": "18.3.1",
|
|
67
|
-
"react-resizable-panels": "4.11.
|
|
67
|
+
"react-resizable-panels": "4.11.2",
|
|
68
68
|
"react-transition-group": "4.4.5",
|
|
69
69
|
"react-virtualized": "9.22.6",
|
|
70
70
|
"reset-css": "5.0.2",
|
|
@@ -77,18 +77,17 @@
|
|
|
77
77
|
"@types/bytes": "3.1.5",
|
|
78
78
|
"@types/graphlib": "2.1.12",
|
|
79
79
|
"@types/is-hotkey": "0.1.10",
|
|
80
|
-
"@types/react-resizable": "
|
|
80
|
+
"@types/react-resizable": "4.0.0",
|
|
81
81
|
"@types/react-transition-group": "4.4.12",
|
|
82
82
|
"@types/store": "2.0.5",
|
|
83
83
|
"@types/tinycolor2": "1.4.6",
|
|
84
|
-
"@webiny/build-tools": "6.4.0-beta.
|
|
84
|
+
"@webiny/build-tools": "6.4.0-beta.4",
|
|
85
85
|
"rimraf": "6.1.3",
|
|
86
86
|
"typescript": "6.0.3",
|
|
87
|
-
"vitest": "4.1.
|
|
87
|
+
"vitest": "4.1.7"
|
|
88
88
|
},
|
|
89
89
|
"publishConfig": {
|
|
90
|
-
"access": "public"
|
|
91
|
-
"directory": "dist"
|
|
90
|
+
"access": "public"
|
|
92
91
|
},
|
|
93
92
|
"adio": {
|
|
94
93
|
"ignore": {
|
|
@@ -107,5 +106,8 @@
|
|
|
107
106
|
]
|
|
108
107
|
}
|
|
109
108
|
},
|
|
110
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "b8aec8a1be3f25c3b428b357fe1e352c7cbff9ae",
|
|
110
|
+
"webiny": {
|
|
111
|
+
"publishFrom": "dist"
|
|
112
|
+
}
|
|
111
113
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const handleRestartInstallation: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/installation/components/SystemInstaller/steps/FinishSetup/handleRestartInstallation.js","sources":["../../../../../../../src/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleRestartInstallation.ts"],"sourcesContent":["export const handleRestartInstallation = () => {\n window.location.reload();\n};\n"],"names":["handleRestartInstallation","window"],"mappings":"AAAO,MAAMA,4BAA4B;IACrCC,OAAO,QAAQ,CAAC,MAAM;AAC1B"}
|
package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getMachineId } from "@webiny/telemetry/react.js";
|
|
2
|
+
const INSTALL_FINISH_URL = process.env.REACT_APP_WEBINY_INSTALL_FINISH_URL || "https://www.webiny.com/install/finish";
|
|
3
|
+
const buildInstallFinishHref = ()=>{
|
|
4
|
+
if ("false" === process.env.REACT_APP_WEBINY_TELEMETRY) return null;
|
|
5
|
+
if ("u" < typeof window) return null;
|
|
6
|
+
const isCloudFrontHost = window.location.hostname.endsWith(".cloudfront.net");
|
|
7
|
+
const allowAlternate = Boolean(process.env.REACT_APP_WEBINY_INSTALL_FINISH_URL);
|
|
8
|
+
if (!isCloudFrontHost && !allowAlternate) return null;
|
|
9
|
+
const machineId = getMachineId();
|
|
10
|
+
if (!machineId) return null;
|
|
11
|
+
const currentUrl = window.location.origin + window.location.pathname;
|
|
12
|
+
const params = new URLSearchParams({
|
|
13
|
+
machine_id: machineId,
|
|
14
|
+
return_to: currentUrl
|
|
15
|
+
});
|
|
16
|
+
return `${INSTALL_FINISH_URL}?${params.toString()}`;
|
|
17
|
+
};
|
|
18
|
+
const handleStartUsing = (finishInstallation)=>{
|
|
19
|
+
if ("u" > typeof window) {
|
|
20
|
+
const handoff = buildInstallFinishHref();
|
|
21
|
+
if (handoff) return void window.location.assign(handoff);
|
|
22
|
+
}
|
|
23
|
+
finishInstallation();
|
|
24
|
+
};
|
|
25
|
+
export { handleStartUsing };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=handleStartUsing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.js","sources":["../../../../../../../src/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.ts"],"sourcesContent":["import { getMachineId } from \"@webiny/telemetry/react.js\";\nimport type { ISystemInstallerPresenter } from \"~/presentation/installation/presenters/SystemInstaller/abstractions.js\";\n\nconst INSTALL_FINISH_URL =\n process.env.REACT_APP_WEBINY_INSTALL_FINISH_URL || \"https://www.webiny.com/install/finish\";\n\n/**\n * If telemetry is enabled AND the admin is hosted on CloudFront (production\n * deployment), route the \"Start using Webiny\" CTA through the marketing\n * site's /install/finish page so the website's anonymous wts_did cookie can\n * be aliased to the deployer's machine_id. Falls through to the local\n * `finishInstallation` flow otherwise.\n */\nconst buildInstallFinishHref = (): string | null => {\n if (process.env.REACT_APP_WEBINY_TELEMETRY === \"false\") {\n return null;\n }\n\n if (typeof window === \"undefined\") {\n return null;\n }\n const isCloudFrontHost = window.location.hostname.endsWith(\".cloudfront.net\");\n const allowAlternate = Boolean(process.env.REACT_APP_WEBINY_INSTALL_FINISH_URL);\n if (!isCloudFrontHost && !allowAlternate) {\n return null;\n }\n\n const machineId = getMachineId();\n if (!machineId) {\n return null;\n }\n\n const currentUrl = window.location.origin + window.location.pathname;\n const params = new URLSearchParams({\n machine_id: machineId,\n return_to: currentUrl\n });\n return `${INSTALL_FINISH_URL}?${params.toString()}`;\n};\n\nexport const handleStartUsing = (\n finishInstallation: ISystemInstallerPresenter[\"finishInstallation\"]\n) => {\n if (typeof window !== \"undefined\") {\n const handoff = buildInstallFinishHref();\n if (handoff) {\n window.location.assign(handoff);\n return;\n }\n }\n finishInstallation();\n};\n"],"names":["INSTALL_FINISH_URL","process","buildInstallFinishHref","window","isCloudFrontHost","allowAlternate","Boolean","machineId","getMachineId","currentUrl","params","URLSearchParams","handleStartUsing","finishInstallation","handoff"],"mappings":";AAGA,MAAMA,qBACFC,QAAQ,GAAG,CAAC,mCAAmC,IAAI;AASvD,MAAMC,yBAAyB;IAC3B,IAAID,AAA2C,YAA3CA,QAAQ,GAAG,CAAC,0BAA0B,EACtC,OAAO;IAGX,IAAI,AAAkB,MAAlB,OAAOE,QACP,OAAO;IAEX,MAAMC,mBAAmBD,OAAO,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC3D,MAAME,iBAAiBC,QAAQL,QAAQ,GAAG,CAAC,mCAAmC;IAC9E,IAAI,CAACG,oBAAoB,CAACC,gBACtB,OAAO;IAGX,MAAME,YAAYC;IAClB,IAAI,CAACD,WACD,OAAO;IAGX,MAAME,aAAaN,OAAO,QAAQ,CAAC,MAAM,GAAGA,OAAO,QAAQ,CAAC,QAAQ;IACpE,MAAMO,SAAS,IAAIC,gBAAgB;QAC/B,YAAYJ;QACZ,WAAWE;IACf;IACA,OAAO,GAAGT,mBAAmB,CAAC,EAAEU,OAAO,QAAQ,IAAI;AACvD;AAEO,MAAME,mBAAmB,CAC5BC;IAEA,IAAI,AAAkB,MAAlB,OAAOV,QAAwB;QAC/B,MAAMW,UAAUZ;QAChB,IAAIY,SAAS,YACTX,OAAO,QAAQ,CAAC,MAAM,CAACW;IAG/B;IACAD;AACJ"}
|
|
@@ -2,6 +2,8 @@ import react, { useEffect } from "react";
|
|
|
2
2
|
import { Alert, Button, Grid, Loader } from "@webiny/admin-ui";
|
|
3
3
|
import { Center } from "./Center.js";
|
|
4
4
|
import { Container } from "./Container.js";
|
|
5
|
+
import { handleStartUsing } from "./FinishSetup/handleStartUsing.js";
|
|
6
|
+
import { handleRestartInstallation } from "./FinishSetup/handleRestartInstallation.js";
|
|
5
7
|
const FinishSetupStep = ({ error, isInstalled, installing, installSystem, finishInstallation })=>{
|
|
6
8
|
useEffect(()=>{
|
|
7
9
|
installSystem();
|
|
@@ -25,9 +27,7 @@ const FinishSetupStep = ({ error, isInstalled, installing, installSystem, finish
|
|
|
25
27
|
variant: "secondary",
|
|
26
28
|
size: "lg",
|
|
27
29
|
text: "Restart installation",
|
|
28
|
-
onClick:
|
|
29
|
-
window.location.reload();
|
|
30
|
-
}
|
|
30
|
+
onClick: handleRestartInstallation
|
|
31
31
|
})) : /*#__PURE__*/ react.createElement(react.Fragment, null), installing ? /*#__PURE__*/ react.createElement(Grid.Column, {
|
|
32
32
|
span: 12
|
|
33
33
|
}, /*#__PURE__*/ react.createElement("div", {
|
|
@@ -45,7 +45,7 @@ const FinishSetupStep = ({ error, isInstalled, installing, installSystem, finish
|
|
|
45
45
|
variant: "primary",
|
|
46
46
|
size: "lg",
|
|
47
47
|
text: "Start using Webiny",
|
|
48
|
-
onClick: finishInstallation
|
|
48
|
+
onClick: ()=>handleStartUsing(finishInstallation)
|
|
49
49
|
})) : /*#__PURE__*/ react.createElement(react.Fragment, null)))));
|
|
50
50
|
};
|
|
51
51
|
export { FinishSetupStep };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/installation/components/SystemInstaller/steps/FinishSetup.js","sources":["../../../../../../src/presentation/installation/components/SystemInstaller/steps/FinishSetup.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { Button, Grid, Loader, Alert } from \"@webiny/admin-ui\";\nimport { Center } from \"./Center.js\";\nimport { Container } from \"./Container.js\";\nimport type {\n ErrorObject,\n ISystemInstallerPresenter\n} from \"~/presentation/installation/presenters/SystemInstaller/abstractions.js\";\n\ninterface StepProps {\n error?: ErrorObject;\n isInstalled: boolean;\n installing: boolean;\n installSystem: ISystemInstallerPresenter[\"installSystem\"];\n finishInstallation: ISystemInstallerPresenter[\"finishInstallation\"];\n}\n\nexport const FinishSetupStep = ({\n error,\n isInstalled,\n installing,\n installSystem,\n finishInstallation\n}: StepProps) => {\n useEffect(() => {\n installSystem();\n }, []);\n\n const subtitle = isInstalled\n ? \"Setup complete! Everything went smooth as a breeze!\"\n : \"We're finalizing installation of Webiny...please wait.\";\n\n return (\n <Container title={\"Finish setup\"} message={subtitle}>\n <Center>\n <div style={{ width: 400 }}>\n <Grid>\n {error ? (\n <Grid.Column span={12} className={\"flex flex-col gap-4\"}>\n <Alert type={\"danger\"}>{error.data.reason}</Alert>\n <Button\n containerClassName={\"w-full\"}\n className={\"w-full\"}\n variant={\"secondary\"}\n size={\"lg\"}\n text={\"Restart installation\"}\n onClick={
|
|
1
|
+
{"version":3,"file":"presentation/installation/components/SystemInstaller/steps/FinishSetup.js","sources":["../../../../../../src/presentation/installation/components/SystemInstaller/steps/FinishSetup.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { Button, Grid, Loader, Alert } from \"@webiny/admin-ui\";\nimport { Center } from \"./Center.js\";\nimport { Container } from \"./Container.js\";\nimport type {\n ErrorObject,\n ISystemInstallerPresenter\n} from \"~/presentation/installation/presenters/SystemInstaller/abstractions.js\";\nimport { handleStartUsing } from \"./FinishSetup/handleStartUsing.js\";\nimport { handleRestartInstallation } from \"./FinishSetup/handleRestartInstallation.js\";\n\ninterface StepProps {\n error?: ErrorObject;\n isInstalled: boolean;\n installing: boolean;\n installSystem: ISystemInstallerPresenter[\"installSystem\"];\n finishInstallation: ISystemInstallerPresenter[\"finishInstallation\"];\n}\n\nexport const FinishSetupStep = ({\n error,\n isInstalled,\n installing,\n installSystem,\n finishInstallation\n}: StepProps) => {\n useEffect(() => {\n installSystem();\n }, []);\n\n const subtitle = isInstalled\n ? \"Setup complete! Everything went smooth as a breeze!\"\n : \"We're finalizing installation of Webiny...please wait.\";\n\n return (\n <Container title={\"Finish setup\"} message={subtitle}>\n <Center>\n <div style={{ width: 400 }}>\n <Grid>\n {error ? (\n <Grid.Column span={12} className={\"flex flex-col gap-4\"}>\n <Alert type={\"danger\"}>{error.data.reason}</Alert>\n <Button\n containerClassName={\"w-full\"}\n className={\"w-full\"}\n variant={\"secondary\"}\n size={\"lg\"}\n text={\"Restart installation\"}\n onClick={handleRestartInstallation}\n />\n </Grid.Column>\n ) : (\n <></>\n )}\n {installing ? (\n <Grid.Column span={12}>\n <div className=\"flex flex-col items-center gap-4 mt-8\">\n <Loader\n size=\"lg\"\n variant=\"accent\"\n indeterminate={true}\n text=\"Installing Webiny...\"\n />\n </div>\n </Grid.Column>\n ) : (\n <></>\n )}\n {!error && isInstalled ? (\n <Grid.Column span={12}>\n <Button\n containerClassName={\"w-full\"}\n className={\"w-full\"}\n variant={\"primary\"}\n size={\"lg\"}\n text={\"Start using Webiny\"}\n onClick={() => handleStartUsing(finishInstallation)}\n />\n </Grid.Column>\n ) : (\n <></>\n )}\n </Grid>\n </div>\n </Center>\n </Container>\n );\n};\n"],"names":["FinishSetupStep","error","isInstalled","installing","installSystem","finishInstallation","useEffect","subtitle","Container","Center","Grid","Alert","Button","handleRestartInstallation","Loader","handleStartUsing"],"mappings":";;;;;;AAmBO,MAAMA,kBAAkB,CAAC,EAC5BC,KAAK,EACLC,WAAW,EACXC,UAAU,EACVC,aAAa,EACbC,kBAAkB,EACV;IACRC,UAAU;QACNF;IACJ,GAAG,EAAE;IAEL,MAAMG,WAAWL,cACX,wDACA;IAEN,OAAO,WAAP,GACI,oBAACM,WAASA;QAAC,OAAO;QAAgB,SAASD;qBACvC,oBAACE,QAAMA,MAAAA,WAAAA,GACH,oBAAC;QAAI,OAAO;YAAE,OAAO;QAAI;qBACrB,oBAACC,MAAIA,MACAT,QAAQ,WAARA,GACG,oBAACS,KAAK,MAAM;QAAC,MAAM;QAAI,WAAW;qBAC9B,oBAACC,OAAKA;QAAC,MAAM;OAAWV,MAAM,IAAI,CAAC,MAAM,iBACzC,oBAACW,QAAMA;QACH,oBAAoB;QACpB,WAAW;QACX,SAAS;QACT,MAAM;QACN,MAAM;QACN,SAASC;wBAIjB,2CAEHV,aAAa,WAAbA,GACG,oBAACO,KAAK,MAAM;QAAC,MAAM;qBACf,oBAAC;QAAI,WAAU;qBACX,oBAACI,QAAMA;QACH,MAAK;QACL,SAAQ;QACR,eAAe;QACf,MAAK;yBAKjB,2CAEH,CAACb,SAASC,cAAc,WAAdA,GACP,oBAACQ,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACE,QAAMA;QACH,oBAAoB;QACpB,WAAW;QACX,SAAS;QACT,MAAM;QACN,MAAM;QACN,SAAS,IAAMG,iBAAiBV;wBAIxC;AAO5B"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { SystemInstallerPresenter as Abstraction, SystemInstallerRepository, type SystemInstallerViewModel, type WizardStep } from "./abstractions.js";
|
|
2
2
|
import { TelemetryService } from "../../../../features/telemetry/index.js";
|
|
3
|
+
import { NewsletterSubscriptionService } from "../../../../features/newsletter/index.js";
|
|
3
4
|
declare class SystemInstallerPresenterImpl implements Abstraction.Interface {
|
|
4
5
|
private telemetry;
|
|
6
|
+
private newsletter;
|
|
5
7
|
private repository;
|
|
6
8
|
private loading;
|
|
7
9
|
private isInstalled;
|
|
@@ -11,7 +13,7 @@ declare class SystemInstallerPresenterImpl implements Abstraction.Interface {
|
|
|
11
13
|
private startUsing;
|
|
12
14
|
private installerData;
|
|
13
15
|
private wizardSteps;
|
|
14
|
-
constructor(telemetry: TelemetryService.Interface, repository: SystemInstallerRepository.Interface);
|
|
16
|
+
constructor(telemetry: TelemetryService.Interface, newsletter: NewsletterSubscriptionService.Interface, repository: SystemInstallerRepository.Interface);
|
|
15
17
|
private initialize;
|
|
16
18
|
get vm(): SystemInstallerViewModel;
|
|
17
19
|
nextStep: (data?: Record<string, any>) => void;
|
|
@@ -2,9 +2,11 @@ import { makeAutoObservable, runInAction, toJS } from "mobx";
|
|
|
2
2
|
import { createImplementation } from "@webiny/di";
|
|
3
3
|
import { SystemInstallerPresenter, SystemInstallerRepository } from "./abstractions.js";
|
|
4
4
|
import { TelemetryService } from "../../../../features/telemetry/index.js";
|
|
5
|
+
import { NewsletterSubscriptionService } from "../../../../features/newsletter/index.js";
|
|
5
6
|
class SystemInstallerPresenterImpl {
|
|
6
|
-
constructor(telemetry, repository){
|
|
7
|
+
constructor(telemetry, newsletter, repository){
|
|
7
8
|
this.telemetry = telemetry;
|
|
9
|
+
this.newsletter = newsletter;
|
|
8
10
|
this.repository = repository;
|
|
9
11
|
this.loading = true;
|
|
10
12
|
this.isInstalled = false;
|
|
@@ -38,14 +40,17 @@ class SystemInstallerPresenterImpl {
|
|
|
38
40
|
}));
|
|
39
41
|
await this.repository.installSystem(installationInput);
|
|
40
42
|
await this.telemetry.sendEvent("install-wizard-end", {
|
|
41
|
-
project: basicInfo.projectName,
|
|
42
|
-
organization: basicInfo.organizationName,
|
|
43
43
|
referralSource: basicInfo.referralSource
|
|
44
44
|
});
|
|
45
45
|
runInAction(()=>{
|
|
46
46
|
this.isInstalled = true;
|
|
47
47
|
this.installing = false;
|
|
48
48
|
});
|
|
49
|
+
this.newsletter.subscribe({
|
|
50
|
+
email: installerData.Cognito.email,
|
|
51
|
+
firstName: installerData.Cognito.firstName,
|
|
52
|
+
lastName: installerData.Cognito.lastName
|
|
53
|
+
});
|
|
49
54
|
} catch (error) {
|
|
50
55
|
runInAction(()=>{
|
|
51
56
|
this.error = error;
|
|
@@ -123,6 +128,7 @@ const SystemInstallerPresenter_SystemInstallerPresenter = createImplementation({
|
|
|
123
128
|
implementation: SystemInstallerPresenterImpl,
|
|
124
129
|
dependencies: [
|
|
125
130
|
TelemetryService,
|
|
131
|
+
NewsletterSubscriptionService,
|
|
126
132
|
SystemInstallerRepository
|
|
127
133
|
]
|
|
128
134
|
});
|
package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js","sources":["../../../../../src/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.ts"],"sourcesContent":["import { makeAutoObservable, runInAction, toJS } from \"mobx\";\nimport { createImplementation } from \"@webiny/di\";\nimport {\n SystemInstallerPresenter as Abstraction,\n InstallationInput,\n SystemInstallerRepository,\n type SystemInstallerViewModel,\n type WizardStep,\n type WizardStepState,\n type ErrorObject\n} from \"./abstractions.js\";\nimport { TelemetryService } from \"~/features/telemetry/index.js\";\n\nclass SystemInstallerPresenterImpl implements Abstraction.Interface {\n private loading = true;\n private isInstalled = false;\n private currentStep = 0;\n private error: ErrorObject | undefined = undefined;\n private installing = false;\n private startUsing = false;\n private installerData: Record<string, any> = {};\n private wizardSteps: WizardStep[];\n\n constructor(\n private telemetry: TelemetryService.Interface,\n private repository: SystemInstallerRepository.Interface\n ) {\n // TODO: Wizard steps need to be implemented via plugins, but this will do for now.\n this.wizardSteps = [\n { name: \"introduction\", label: \"Introduction\" },\n { name: \"basic-info\", label: \"Basic info\" },\n process.env.REACT_APP_IDP_TYPE === \"cognito\"\n ? { name: \"admin-account\", label: \"Admin account\" }\n : undefined,\n { name: \"finish\", label: \"Finish setup\" }\n ].filter(Boolean) as WizardStep[];\n\n makeAutoObservable(this, {}, { autoBind: true });\n this.initialize();\n }\n\n private async initialize(): Promise<void> {\n runInAction(() => {\n this.loading = true;\n });\n\n try {\n const isInstalled = await this.repository.isSystemInstalled();\n runInAction(() => {\n this.isInstalled = isInstalled;\n this.startUsing = isInstalled;\n this.loading = false;\n });\n\n if (!isInstalled) {\n await this.telemetry.sendEvent(\"install-wizard-start\");\n }\n } catch {\n runInAction(() => {\n this.loading = false;\n });\n }\n }\n\n get vm(): SystemInstallerViewModel {\n return {\n error: this.error,\n loading: this.loading,\n isInstalled: this.isInstalled,\n startUsing: this.startUsing,\n currentStep: this.wizardSteps[this.currentStep].name,\n steps: this.wizardSteps.map((step, index) => {\n let state: WizardStepState = \"idle\";\n if (index === this.currentStep) {\n state = \"current\";\n }\n\n if (index < this.currentStep) {\n state = \"completed\";\n }\n\n return {\n ...step,\n state\n };\n }),\n installing: this.installing\n };\n }\n\n nextStep = (data: Record<string, any> = {}): void => {\n if (this.currentStep < this.wizardSteps.length - 1) {\n Object.assign(this.installerData, data ?? {});\n this.currentStep++;\n }\n };\n\n previousStep = (): void => {\n if (this.currentStep > 0) {\n this.currentStep--;\n }\n };\n\n goToStep = (name: WizardStep[\"name\"]): void => {\n const stepIndex = this.wizardSteps.findIndex(step => step.name === name);\n\n if (stepIndex > -1) {\n this.currentStep = stepIndex;\n }\n };\n\n installSystem = async (): Promise<void> => {\n runInAction(() => {\n this.installing = true;\n });\n try {\n const { basicInfo, ...installerData } = toJS(this.installerData);\n const installationInput: InstallationInput = Object.keys(installerData).map(key => {\n return {\n app: key,\n data: installerData[key]\n };\n });\n await this.repository.installSystem(installationInput);\n\n await this.telemetry.sendEvent(\"install-wizard-end\", {\n
|
|
1
|
+
{"version":3,"file":"presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js","sources":["../../../../../src/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.ts"],"sourcesContent":["import { makeAutoObservable, runInAction, toJS } from \"mobx\";\nimport { createImplementation } from \"@webiny/di\";\nimport {\n SystemInstallerPresenter as Abstraction,\n InstallationInput,\n SystemInstallerRepository,\n type SystemInstallerViewModel,\n type WizardStep,\n type WizardStepState,\n type ErrorObject\n} from \"./abstractions.js\";\nimport { TelemetryService } from \"~/features/telemetry/index.js\";\nimport { NewsletterSubscriptionService } from \"~/features/newsletter/index.js\";\n\nclass SystemInstallerPresenterImpl implements Abstraction.Interface {\n private loading = true;\n private isInstalled = false;\n private currentStep = 0;\n private error: ErrorObject | undefined = undefined;\n private installing = false;\n private startUsing = false;\n private installerData: Record<string, any> = {};\n private wizardSteps: WizardStep[];\n\n constructor(\n private telemetry: TelemetryService.Interface,\n private newsletter: NewsletterSubscriptionService.Interface,\n private repository: SystemInstallerRepository.Interface\n ) {\n // TODO: Wizard steps need to be implemented via plugins, but this will do for now.\n this.wizardSteps = [\n { name: \"introduction\", label: \"Introduction\" },\n { name: \"basic-info\", label: \"Basic info\" },\n process.env.REACT_APP_IDP_TYPE === \"cognito\"\n ? { name: \"admin-account\", label: \"Admin account\" }\n : undefined,\n { name: \"finish\", label: \"Finish setup\" }\n ].filter(Boolean) as WizardStep[];\n\n makeAutoObservable(this, {}, { autoBind: true });\n this.initialize();\n }\n\n private async initialize(): Promise<void> {\n runInAction(() => {\n this.loading = true;\n });\n\n try {\n const isInstalled = await this.repository.isSystemInstalled();\n runInAction(() => {\n this.isInstalled = isInstalled;\n this.startUsing = isInstalled;\n this.loading = false;\n });\n\n if (!isInstalled) {\n await this.telemetry.sendEvent(\"install-wizard-start\");\n }\n } catch {\n runInAction(() => {\n this.loading = false;\n });\n }\n }\n\n get vm(): SystemInstallerViewModel {\n return {\n error: this.error,\n loading: this.loading,\n isInstalled: this.isInstalled,\n startUsing: this.startUsing,\n currentStep: this.wizardSteps[this.currentStep].name,\n steps: this.wizardSteps.map((step, index) => {\n let state: WizardStepState = \"idle\";\n if (index === this.currentStep) {\n state = \"current\";\n }\n\n if (index < this.currentStep) {\n state = \"completed\";\n }\n\n return {\n ...step,\n state\n };\n }),\n installing: this.installing\n };\n }\n\n nextStep = (data: Record<string, any> = {}): void => {\n if (this.currentStep < this.wizardSteps.length - 1) {\n Object.assign(this.installerData, data ?? {});\n this.currentStep++;\n }\n };\n\n previousStep = (): void => {\n if (this.currentStep > 0) {\n this.currentStep--;\n }\n };\n\n goToStep = (name: WizardStep[\"name\"]): void => {\n const stepIndex = this.wizardSteps.findIndex(step => step.name === name);\n\n if (stepIndex > -1) {\n this.currentStep = stepIndex;\n }\n };\n\n installSystem = async (): Promise<void> => {\n runInAction(() => {\n this.installing = true;\n });\n try {\n const { basicInfo, ...installerData } = toJS(this.installerData);\n const installationInput: InstallationInput = Object.keys(installerData).map(key => {\n return {\n app: key,\n data: installerData[key]\n };\n });\n await this.repository.installSystem(installationInput);\n\n // We intentionally do NOT send `projectName` or `organizationName` to\n // telemetry — those are user-typed free-text fields that risk\n // identifying the user's company. Only the categorical\n // `referralSource` is forwarded for funnel attribution.\n await this.telemetry.sendEvent(\"install-wizard-end\", {\n referralSource: basicInfo.referralSource\n });\n\n runInAction(() => {\n this.isInstalled = true;\n this.installing = false;\n });\n\n // ToS acceptance in the basic-info step covers consent. Fire-and-forget\n // so a slow/failed newsletter call never blocks the wizard.\n this.newsletter.subscribe({\n email: installerData.Cognito.email,\n firstName: installerData.Cognito.firstName,\n lastName: installerData.Cognito.lastName\n });\n } catch (error) {\n runInAction(() => {\n this.error = error;\n this.installing = false;\n console.log(\"error\", error);\n });\n }\n };\n\n finishInstallation = () => {\n this.startUsing = true;\n };\n}\n\nexport const SystemInstallerPresenter = createImplementation({\n abstraction: Abstraction,\n implementation: SystemInstallerPresenterImpl,\n dependencies: [TelemetryService, NewsletterSubscriptionService, SystemInstallerRepository]\n});\n"],"names":["SystemInstallerPresenterImpl","telemetry","newsletter","repository","undefined","data","Object","name","stepIndex","step","runInAction","basicInfo","installerData","toJS","installationInput","key","error","console","process","Boolean","makeAutoObservable","isInstalled","index","state","SystemInstallerPresenter","createImplementation","Abstraction","TelemetryService","NewsletterSubscriptionService","SystemInstallerRepository"],"mappings":";;;;;AAcA,MAAMA;IAUF,YACYC,SAAqC,EACrCC,UAAmD,EACnDC,UAA+C,CACzD;aAHUF,SAAS,GAATA;aACAC,UAAU,GAAVA;aACAC,UAAU,GAAVA;aAZJ,OAAO,GAAG;aACV,WAAW,GAAG;aACd,WAAW,GAAG;aACd,KAAK,GAA4BC;aACjC,UAAU,GAAG;aACb,UAAU,GAAG;aACb,aAAa,GAAwB,CAAC;aAuE9C,QAAQ,GAAG,CAACC,OAA4B,CAAC,CAAC;YACtC,IAAI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,GAAG;gBAChDC,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,EAAED,QAAQ,CAAC;gBAC3C,IAAI,CAAC,WAAW;YACpB;QACJ;aAEA,Y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IAChB,cAAc;QAAC2B;QAAkBC;QAA+BC;KAA0B;AAC9F"}
|
|
@@ -3,12 +3,14 @@ import { SystemInstallerPresenter } from "./abstractions.js";
|
|
|
3
3
|
import { SystemInstallerGateway } from "./SystemInstallerGateway.js";
|
|
4
4
|
import { SystemInstallerRepository } from "./SystemInstallerRepository.js";
|
|
5
5
|
import { SystemInstallerPresenter as external_SystemInstallerPresenter_js_SystemInstallerPresenter } from "./SystemInstallerPresenter.js";
|
|
6
|
+
import { NewsletterSubscriptionService } from "../../../../features/newsletter/NewsletterSubscriptionService.js";
|
|
6
7
|
const SystemInstallerFeature = createFeature({
|
|
7
8
|
name: "SystemInstaller",
|
|
8
9
|
register (container) {
|
|
9
10
|
container.register(SystemInstallerGateway).inSingletonScope();
|
|
10
11
|
container.register(SystemInstallerRepository).inSingletonScope();
|
|
11
12
|
container.register(external_SystemInstallerPresenter_js_SystemInstallerPresenter).inSingletonScope();
|
|
13
|
+
container.register(NewsletterSubscriptionService).inSingletonScope();
|
|
12
14
|
},
|
|
13
15
|
resolve (container) {
|
|
14
16
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/installation/presenters/SystemInstaller/feature.js","sources":["../../../../../src/presentation/installation/presenters/SystemInstaller/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { Container } from \"@webiny/di\";\nimport { SystemInstallerPresenter as SystemInstallerPresenterAbstraction } from \"./abstractions.js\";\nimport { SystemInstallerGateway } from \"./SystemInstallerGateway.js\";\nimport { SystemInstallerRepository } from \"./SystemInstallerRepository.js\";\nimport { SystemInstallerPresenter } from \"./SystemInstallerPresenter.js\";\n\nexport const SystemInstallerFeature = createFeature({\n name: \"SystemInstaller\",\n register(container: Container) {\n container.register(SystemInstallerGateway).inSingletonScope();\n container.register(SystemInstallerRepository).inSingletonScope();\n container.register(SystemInstallerPresenter).inSingletonScope();\n },\n resolve(container: Container) {\n return {\n presenter: container.resolve(SystemInstallerPresenterAbstraction)\n };\n }\n});\n"],"names":["SystemInstallerFeature","createFeature","container","SystemInstallerGateway","SystemInstallerRepository","SystemInstallerPresenter","SystemInstallerPresenterAbstraction"],"mappings":"
|
|
1
|
+
{"version":3,"file":"presentation/installation/presenters/SystemInstaller/feature.js","sources":["../../../../../src/presentation/installation/presenters/SystemInstaller/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { Container } from \"@webiny/di\";\nimport { SystemInstallerPresenter as SystemInstallerPresenterAbstraction } from \"./abstractions.js\";\nimport { SystemInstallerGateway } from \"./SystemInstallerGateway.js\";\nimport { SystemInstallerRepository } from \"./SystemInstallerRepository.js\";\nimport { SystemInstallerPresenter } from \"./SystemInstallerPresenter.js\";\nimport { NewsletterSubscriptionService } from \"~/features/newsletter/NewsletterSubscriptionService.js\";\n\nexport const SystemInstallerFeature = createFeature({\n name: \"SystemInstaller\",\n register(container: Container) {\n container.register(SystemInstallerGateway).inSingletonScope();\n container.register(SystemInstallerRepository).inSingletonScope();\n container.register(SystemInstallerPresenter).inSingletonScope();\n container.register(NewsletterSubscriptionService).inSingletonScope();\n },\n resolve(container: Container) {\n return {\n presenter: container.resolve(SystemInstallerPresenterAbstraction)\n };\n }\n});\n"],"names":["SystemInstallerFeature","createFeature","container","SystemInstallerGateway","SystemInstallerRepository","SystemInstallerPresenter","NewsletterSubscriptionService","SystemInstallerPresenterAbstraction"],"mappings":";;;;;;AAQO,MAAMA,yBAAyBC,cAAc;IAChD,MAAM;IACN,UAASC,SAAoB;QACzBA,UAAU,QAAQ,CAACC,wBAAwB,gBAAgB;QAC3DD,UAAU,QAAQ,CAACE,2BAA2B,gBAAgB;QAC9DF,UAAU,QAAQ,CAACG,+DAA0B,gBAAgB;QAC7DH,UAAU,QAAQ,CAACI,+BAA+B,gBAAgB;IACtE;IACA,SAAQJ,SAAoB;QACxB,OAAO;YACH,WAAWA,UAAU,OAAO,CAACK;QACjC;IACJ;AACJ"}
|
|
@@ -14,6 +14,7 @@ class ListPresenterImpl {
|
|
|
14
14
|
this._requeryScheduled = false;
|
|
15
15
|
this._limit = void 0;
|
|
16
16
|
this._initialized = false;
|
|
17
|
+
this._loadingMore = false;
|
|
17
18
|
this.actions = {
|
|
18
19
|
search: {
|
|
19
20
|
set: (query)=>{
|
|
@@ -77,6 +78,7 @@ class ListPresenterImpl {
|
|
|
77
78
|
if (!this._dataSource) return;
|
|
78
79
|
const meta = this._dataSource.meta;
|
|
79
80
|
if (!meta.hasMoreItems || this._dataSource.loading) return;
|
|
81
|
+
this._loadingMore = true;
|
|
80
82
|
try {
|
|
81
83
|
await this._dataSource.loadMore(this.buildQuery(meta.cursor));
|
|
82
84
|
runInAction(()=>{
|
|
@@ -86,6 +88,10 @@ class ListPresenterImpl {
|
|
|
86
88
|
runInAction(()=>{
|
|
87
89
|
this._error = this.toListError(err);
|
|
88
90
|
});
|
|
91
|
+
} finally{
|
|
92
|
+
runInAction(()=>{
|
|
93
|
+
this._loadingMore = false;
|
|
94
|
+
});
|
|
89
95
|
}
|
|
90
96
|
},
|
|
91
97
|
refresh: async ()=>{
|
|
@@ -116,8 +122,8 @@ class ListPresenterImpl {
|
|
|
116
122
|
appliedQuery: this._appliedQuery,
|
|
117
123
|
pagination: {
|
|
118
124
|
hasMore: meta.hasMoreItems,
|
|
119
|
-
loading,
|
|
120
|
-
loadingMore:
|
|
125
|
+
loading: loading && !this._loadingMore,
|
|
126
|
+
loadingMore: this._loadingMore,
|
|
121
127
|
totalCount: meta.totalCount,
|
|
122
128
|
currentCount: rows.length
|
|
123
129
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/listPresenter/ListPresenter.js","sources":["../../../src/presentation/listPresenter/ListPresenter.ts"],"sourcesContent":["import { makeAutoObservable, runInAction, computed } from \"mobx\";\nimport {\n ListPresenter as Abstraction,\n type IListPresenter,\n type IListPresenterConfig,\n type IListViewModel,\n type IListActions,\n type IListError,\n type IDataSource,\n type IDataSourceQuery\n} from \"./abstractions.js\";\nimport { SelectionController } from \"./SelectionController.js\";\n\nclass ListPresenterImpl<TRow> implements IListPresenter<TRow> {\n private _sort: { field: string; direction: \"ASC\" | \"DESC\" } | null = null;\n private _filters: Record<string, unknown> = {};\n private _search = \"\";\n private _selection: SelectionController<TRow>;\n private _error: IListError | null = null;\n private _appliedQuery: IDataSourceQuery | null = null;\n private _dataSource: IDataSource<TRow> | null = null;\n private _debounceMs = 300;\n private _debounceTimer: ReturnType<typeof setTimeout> | null = null;\n private _requeryScheduled = false;\n private _limit: number | undefined = undefined;\n private _initialized = false;\n\n constructor() {\n this._selection = new SelectionController<TRow>(\n () => this._dataSource?.rows ?? [],\n row => this.getRowId(row)\n );\n\n makeAutoObservable<ListPresenterImpl<TRow>, \"_debounceTimer\">(this, {\n _debounceTimer: false,\n vm: computed\n });\n }\n\n get vm(): IListViewModel<TRow> {\n const ds = this._dataSource;\n const rows = ds ? ds.rows : [];\n const meta = ds ? ds.meta : { cursor: null, hasMoreItems: false, totalCount: 0 };\n const loading = ds ? ds.loading : false;\n const hasFilters = Object.keys(this._filters).length > 0 || this._search.length > 0;\n\n return {\n rows,\n sort: this._sort,\n filters: this._filters,\n search: this._search,\n appliedQuery: this._appliedQuery,\n pagination: {\n hasMore: meta.hasMoreItems,\n loading,\n loadingMore: false,\n totalCount: meta.totalCount,\n currentCount: rows.length\n },\n selection: {\n selectedIds: this._selection.selectedIds,\n selectedCount: this._selection.selectedCount,\n allSelected: this._selection.allSelected\n },\n empty: rows.length === 0 && !loading,\n emptyWithFilters: rows.length === 0 && !loading && hasFilters,\n error: this._error\n };\n }\n\n actions: IListActions = {\n search: {\n set: (query: string) => {\n if (this._search === query) {\n return;\n }\n this._search = query;\n this.debouncedRequery();\n },\n clear: () => {\n if (this._search === \"\") {\n return;\n }\n this._search = \"\";\n this.requery();\n }\n },\n sort: {\n set: (field: string, direction: \"ASC\" | \"DESC\") => {\n this._sort = { field, direction };\n this.requery();\n },\n toggle: (field: string) => {\n if (this._sort && this._sort.field === field) {\n this._sort = {\n field,\n direction: this._sort.direction === \"ASC\" ? \"DESC\" : \"ASC\"\n };\n } else {\n this._sort = { field, direction: \"ASC\" };\n }\n this.requery();\n }\n },\n filter: {\n set: (key: string, value: unknown) => {\n this._filters = { ...this._filters, [key]: value };\n this.requery();\n },\n clear: (key: string) => {\n const { [key]: _, ...rest } = this._filters;\n this._filters = rest;\n this.requery();\n },\n clearAll: () => {\n this._filters = {};\n this.requery();\n }\n },\n selection: {\n toggle: (id: string) => this._selection.toggle(id),\n selectRangeTo: (id: string) => this._selection.selectRangeTo(id),\n selectAll: () => this._selection.selectAll(),\n deselectAll: () => this._selection.deselectAll(),\n selectRows: (ids: string[]) => this._selection.selectRows(ids),\n isSelected: (id: string) => this._selection.isSelected(id)\n },\n loadMore: async () => {\n if (!this._dataSource) {\n return;\n }\n const meta = this._dataSource.meta;\n if (!meta.hasMoreItems || this._dataSource.loading) {\n return;\n }\n try {\n await this._dataSource.loadMore(this.buildQuery(meta.cursor));\n runInAction(() => {\n this._error = null;\n });\n } catch (err) {\n runInAction(() => {\n this._error = this.toListError(err);\n });\n }\n },\n refresh: async () => {\n await this.executeQuery();\n }\n };\n\n init(config: IListPresenterConfig<TRow>): void {\n this._dataSource = config.dataSource;\n this._sort = config.initialSort ?? null;\n this._filters = config.initialFilters ?? {};\n this._debounceMs = config.debounceMs ?? 300;\n this._limit = config.limit;\n this._search = \"\";\n this._appliedQuery = null;\n this._selection.reset();\n this._initialized = true;\n this.executeQuery();\n }\n\n private buildQuery(cursor?: string | null): IDataSourceQuery {\n return {\n search: this._search || undefined,\n filters: Object.keys(this._filters).length > 0 ? this._filters : undefined,\n sort: this._sort ?? undefined,\n cursor: cursor ?? undefined,\n limit: this._limit\n };\n }\n\n private async executeQuery(): Promise<void> {\n if (!this._dataSource) {\n return;\n }\n this._error = null;\n const query = this.buildQuery();\n try {\n await this._dataSource.query(query);\n runInAction(() => {\n this._appliedQuery = query;\n });\n } catch (err) {\n runInAction(() => {\n this._error = this.toListError(err);\n });\n }\n }\n\n private requery(): void {\n this.clearDebounce();\n this._selection.reset();\n\n if (!this._requeryScheduled) {\n this._requeryScheduled = true;\n queueMicrotask(() => {\n this._requeryScheduled = false;\n this.executeQuery();\n });\n }\n }\n\n private debouncedRequery(): void {\n this.clearDebounce();\n this._debounceTimer = setTimeout(() => {\n this._selection.reset();\n this.executeQuery();\n }, this._debounceMs);\n }\n\n private clearDebounce(): void {\n if (this._debounceTimer) {\n clearTimeout(this._debounceTimer);\n this._debounceTimer = null;\n }\n }\n\n private getRowId(row: TRow): string {\n return (row as any).id;\n }\n\n private toListError(err: unknown): IListError {\n if (err instanceof Error) {\n return { code: \"UNKNOWN\", message: err.message, retryable: true };\n }\n return { code: \"UNKNOWN\", message: String(err), retryable: true };\n }\n}\n\nexport const ListPresenter = Abstraction.createImplementation({\n implementation: ListPresenterImpl,\n dependencies: []\n});\n"],"names":["ListPresenterImpl","undefined","query","field","direction","key","value","_","rest","id","ids","meta","runInAction","err","SelectionController","row","makeAutoObservable","computed","ds","rows","loading","hasFilters","Object","config","cursor","queueMicrotask","setTimeout","clearTimeout","Error","String","ListPresenter","Abstraction"],"mappings":";;;AAaA,MAAMA;IAcF,aAAc;aAbN,KAAK,GAAwD;aAC7D,QAAQ,GAA4B,CAAC;aACrC,OAAO,GAAG;aAEV,MAAM,GAAsB;aAC5B,aAAa,GAA4B;aACzC,WAAW,GAA6B;aACxC,WAAW,GAAG;aACd,cAAc,GAAyC;aACvD,iBAAiB,GAAG;aACpB,MAAM,GAAuBC;aAC7B,YAAY,GAAG;aA6CvB,OAAO,GAAiB;YACpB,QAAQ;gBACJ,KAAK,CAACC;oBACF,IAAI,IAAI,CAAC,OAAO,KAAKA,OACjB;oBAEJ,IAAI,CAAC,OAAO,GAAGA;oBACf,IAAI,CAAC,gBAAgB;gBACzB;gBACA,OAAO;oBACH,IAAI,AAAiB,OAAjB,IAAI,CAAC,OAAO,EACZ;oBAEJ,IAAI,CAAC,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resenter.ts"],"sourcesContent":["import { makeAutoObservable, runInAction, computed } from \"mobx\";\nimport {\n ListPresenter as Abstraction,\n type IListPresenter,\n type IListPresenterConfig,\n type IListViewModel,\n type IListActions,\n type IListError,\n type IDataSource,\n type IDataSourceQuery\n} from \"./abstractions.js\";\nimport { SelectionController } from \"./SelectionController.js\";\n\nclass ListPresenterImpl<TRow> implements IListPresenter<TRow> {\n private _sort: { field: string; direction: \"ASC\" | \"DESC\" } | null = null;\n private _filters: Record<string, unknown> = {};\n private _search = \"\";\n private _selection: SelectionController<TRow>;\n private _error: IListError | null = null;\n private _appliedQuery: IDataSourceQuery | null = null;\n private _dataSource: IDataSource<TRow> | null = null;\n private _debounceMs = 300;\n private _debounceTimer: ReturnType<typeof setTimeout> | null = null;\n private _requeryScheduled = false;\n private _limit: number | undefined = undefined;\n private _initialized = false;\n private _loadingMore = false;\n\n constructor() {\n this._selection = new SelectionController<TRow>(\n () => this._dataSource?.rows ?? [],\n row => this.getRowId(row)\n );\n\n makeAutoObservable<ListPresenterImpl<TRow>, \"_debounceTimer\">(this, {\n _debounceTimer: false,\n vm: computed\n });\n }\n\n get vm(): IListViewModel<TRow> {\n const ds = this._dataSource;\n const rows = ds ? ds.rows : [];\n const meta = ds ? ds.meta : { cursor: null, hasMoreItems: false, totalCount: 0 };\n const loading = ds ? ds.loading : false;\n const hasFilters = Object.keys(this._filters).length > 0 || this._search.length > 0;\n\n return {\n rows,\n sort: this._sort,\n filters: this._filters,\n search: this._search,\n appliedQuery: this._appliedQuery,\n pagination: {\n hasMore: meta.hasMoreItems,\n loading: loading && !this._loadingMore,\n loadingMore: this._loadingMore,\n totalCount: meta.totalCount,\n currentCount: rows.length\n },\n selection: {\n selectedIds: this._selection.selectedIds,\n selectedCount: this._selection.selectedCount,\n allSelected: this._selection.allSelected\n },\n empty: rows.length === 0 && !loading,\n emptyWithFilters: rows.length === 0 && !loading && hasFilters,\n error: this._error\n };\n }\n\n actions: IListActions = {\n search: {\n set: (query: string) => {\n if (this._search === query) {\n return;\n }\n this._search = query;\n this.debouncedRequery();\n },\n clear: () => {\n if (this._search === \"\") {\n return;\n }\n this._search = \"\";\n this.requery();\n }\n },\n sort: {\n set: (field: string, direction: \"ASC\" | \"DESC\") => {\n this._sort = { field, direction };\n this.requery();\n },\n toggle: (field: string) => {\n if (this._sort && this._sort.field === field) {\n this._sort = {\n field,\n direction: this._sort.direction === \"ASC\" ? \"DESC\" : \"ASC\"\n };\n } else {\n this._sort = { field, direction: \"ASC\" };\n }\n this.requery();\n }\n },\n filter: {\n set: (key: string, value: unknown) => {\n this._filters = { ...this._filters, [key]: value };\n this.requery();\n },\n clear: (key: string) => {\n const { [key]: _, ...rest } = this._filters;\n this._filters = rest;\n this.requery();\n },\n clearAll: () => {\n this._filters = {};\n this.requery();\n }\n },\n selection: {\n toggle: (id: string) => this._selection.toggle(id),\n selectRangeTo: (id: string) => this._selection.selectRangeTo(id),\n selectAll: () => this._selection.selectAll(),\n deselectAll: () => this._selection.deselectAll(),\n selectRows: (ids: string[]) => this._selection.selectRows(ids),\n isSelected: (id: string) => this._selection.isSelected(id)\n },\n loadMore: async () => {\n if (!this._dataSource) {\n return;\n }\n const meta = this._dataSource.meta;\n if (!meta.hasMoreItems || this._dataSource.loading) {\n return;\n }\n this._loadingMore = true;\n try {\n await this._dataSource.loadMore(this.buildQuery(meta.cursor));\n runInAction(() => {\n this._error = null;\n });\n } catch (err) {\n runInAction(() => {\n this._error = this.toListError(err);\n });\n } finally {\n runInAction(() => {\n this._loadingMore = false;\n });\n }\n },\n refresh: async () => {\n await this.executeQuery();\n }\n };\n\n init(config: IListPresenterConfig<TRow>): void {\n this._dataSource = config.dataSource;\n this._sort = config.initialSort ?? null;\n this._filters = config.initialFilters ?? {};\n this._debounceMs = config.debounceMs ?? 300;\n this._limit = config.limit;\n this._search = \"\";\n this._appliedQuery = null;\n this._selection.reset();\n this._initialized = true;\n this.executeQuery();\n }\n\n private buildQuery(cursor?: string | null): IDataSourceQuery {\n return {\n search: this._search || undefined,\n filters: Object.keys(this._filters).length > 0 ? this._filters : undefined,\n sort: this._sort ?? undefined,\n cursor: cursor ?? undefined,\n limit: this._limit\n };\n }\n\n private async executeQuery(): Promise<void> {\n if (!this._dataSource) {\n return;\n }\n this._error = null;\n const query = this.buildQuery();\n try {\n await this._dataSource.query(query);\n runInAction(() => {\n this._appliedQuery = query;\n });\n } catch (err) {\n runInAction(() => {\n this._error = this.toListError(err);\n });\n }\n }\n\n private requery(): void {\n this.clearDebounce();\n this._selection.reset();\n\n if (!this._requeryScheduled) {\n this._requeryScheduled = true;\n queueMicrotask(() => {\n this._requeryScheduled = false;\n this.executeQuery();\n });\n }\n }\n\n private debouncedRequery(): void {\n this.clearDebounce();\n this._debounceTimer = setTimeout(() => {\n this._selection.reset();\n this.executeQuery();\n }, this._debounceMs);\n }\n\n private clearDebounce(): void {\n if (this._debounceTimer) {\n clearTimeout(this._debounceTimer);\n this._debounceTimer = null;\n }\n }\n\n private getRowId(row: TRow): string {\n return (row as any).id;\n }\n\n private toListError(err: unknown): IListError {\n if (err instanceof Error) {\n return { code: \"UNKNOWN\", message: err.message, retryable: true };\n }\n return { code: \"UNKNOWN\", message: String(err), retryable: true };\n }\n}\n\nexport const ListPresenter = Abstraction.createImplementation({\n implementation: ListPresenterImpl,\n dependencies: []\n});\n"],"names":["ListPresenterImpl","undefined","query","field","direction","key","value","_","rest","id","ids","meta","runInAction","err","SelectionController","row","makeAutoObservable","computed","ds","rows","loading","hasFilters","Object","config","cursor","queueMicrotask","setTimeout","clearTimeout","Error","String","ListPresenter","Abstraction"],"mappings":";;;AAaA,MAAMA;IAeF,aAAc;aAdN,KAAK,GAAwD;aAC7D,QAAQ,GAA4B,CAAC;aACrC,OAAO,GAAG;aAEV,MAAM,GAAsB;aAC5B,aAAa,GAA4B;aACzC,WAAW,GAA6B;aACxC,WAAW,GAAG;aACd,cAAc,GAAyC;aACvD,iBAAiB,GAAG;aACpB,MAAM,GAAuBC;aAC7B,YAAY,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1B;IACJ;IAEQ,SAASZ,GAAS,EAAU;QAChC,OAAQA,IAAY,EAAE;IAC1B;IAEQ,YAAYF,GAAY,EAAc;QAC1C,IAAIA,eAAee,OACf,OAAO;YAAE,MAAM;YAAW,SAASf,IAAI,OAAO;YAAE,WAAW;QAAK;QAEpE,OAAO;YAAE,MAAM;YAAW,SAASgB,OAAOhB;YAAM,WAAW;QAAK;IACpE;AACJ;AAEO,MAAMiB,8BAAgBC,cAAAA,oBAAgC,CAAC;IAC1D,gBAAgB/B;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -4,7 +4,7 @@ import { ListPresenter as external_ListPresenter_js_ListPresenter } from "./List
|
|
|
4
4
|
const ListPresenterFeature = createFeature({
|
|
5
5
|
name: "ListPresenter",
|
|
6
6
|
register (container) {
|
|
7
|
-
container.register(external_ListPresenter_js_ListPresenter)
|
|
7
|
+
container.register(external_ListPresenter_js_ListPresenter);
|
|
8
8
|
},
|
|
9
9
|
resolve (container) {
|
|
10
10
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/listPresenter/feature.js","sources":["../../../src/presentation/listPresenter/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { ListPresenter as Abstraction } from \"./abstractions.js\";\nimport { ListPresenter } from \"./ListPresenter.js\";\n\nexport const ListPresenterFeature = createFeature({\n name: \"ListPresenter\",\n register(container) {\n container.register(ListPresenter)
|
|
1
|
+
{"version":3,"file":"presentation/listPresenter/feature.js","sources":["../../../src/presentation/listPresenter/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { ListPresenter as Abstraction } from \"./abstractions.js\";\nimport { ListPresenter } from \"./ListPresenter.js\";\n\nexport const ListPresenterFeature = createFeature({\n name: \"ListPresenter\",\n register(container) {\n container.register(ListPresenter);\n },\n resolve(container) {\n return {\n presenter: container.resolve(Abstraction)\n };\n }\n});\n"],"names":["ListPresenterFeature","createFeature","container","ListPresenter","Abstraction"],"mappings":";;;AAIO,MAAMA,uBAAuBC,cAAc;IAC9C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;IACvB;IACA,SAAQD,SAAS;QACb,OAAO;YACH,WAAWA,UAAU,OAAO,CAACE;QACjC;IACJ;AACJ"}
|