@webiny/app-admin 6.0.0-rc.0 → 6.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,18 @@ import { AdminConfig } from "../../config/AdminConfig.js";
14
14
  import { HasPermission } from "../../presentation/security/components/HasPermission.js";
15
15
  import { Menu } from "../../config/AdminConfig/Menu.js";
16
16
  export const Menus = /*#__PURE__*/React.memo(() => {
17
- return /*#__PURE__*/React.createElement(AdminConfig, null, /*#__PURE__*/React.createElement(HasPermission, {
17
+ return /*#__PURE__*/React.createElement(AdminConfig, null, /*#__PURE__*/React.createElement(Menu, {
18
+ name: "home",
19
+ pin: "start",
20
+ element: /*#__PURE__*/React.createElement(Menu.Link, {
21
+ to: "/",
22
+ text: "Home",
23
+ icon: /*#__PURE__*/React.createElement(Menu.Link.Icon, {
24
+ label: "Home",
25
+ element: /*#__PURE__*/React.createElement(DashboardIcon, null)
26
+ })
27
+ })
28
+ }), /*#__PURE__*/React.createElement(HasPermission, {
18
29
  name: "fm.file"
19
30
  }, /*#__PURE__*/React.createElement(Menu, {
20
31
  name: "fileManager",
@@ -28,17 +39,6 @@ export const Menus = /*#__PURE__*/React.memo(() => {
28
39
  to: "/file-manager"
29
40
  })
30
41
  })), /*#__PURE__*/React.createElement(Menu, {
31
- name: "home",
32
- pin: "start",
33
- element: /*#__PURE__*/React.createElement(Menu.Link, {
34
- to: "/",
35
- text: "Home",
36
- icon: /*#__PURE__*/React.createElement(Menu.Link.Icon, {
37
- label: "Home",
38
- element: /*#__PURE__*/React.createElement(DashboardIcon, null)
39
- })
40
- })
41
- }), /*#__PURE__*/React.createElement(Menu, {
42
42
  name: "settings",
43
43
  hideIfEmpty: true,
44
44
  pin: "end",
@@ -1 +1 @@
1
- {"version":3,"names":["React","ReactComponent","DashboardIcon","SettingsIcon","FileManagerIcon","InfoIcon","SlackIcon","DocsIcon","GithubIcon","MoreIcon","DropdownMenu","WebinyVersion","SupportMenuItems","AdminConfig","HasPermission","Menu","Menus","memo","createElement","name","pin","element","Link","text","icon","Item","Icon","label","to","hideIfEmpty","Support","rel","target","Fragment","Separator","readOnly","Footer","className","trigger","action","Action","displayName"],"sources":["Menus.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as DashboardIcon } from \"@webiny/icons/space_dashboard.svg\";\nimport { ReactComponent as SettingsIcon } from \"@webiny/icons/settings.svg\";\nimport { ReactComponent as FileManagerIcon } from \"@webiny/icons/folder_open.svg\";\nimport { ReactComponent as InfoIcon } from \"@webiny/icons/info.svg\";\nimport { ReactComponent as SlackIcon } from \"@webiny/icons/numbers.svg\";\nimport { ReactComponent as DocsIcon } from \"@webiny/icons/summarize.svg\";\nimport { ReactComponent as GithubIcon } from \"@webiny/icons/route.svg\";\nimport { ReactComponent as MoreIcon } from \"@webiny/icons/more_vert.svg\";\nimport { DropdownMenu } from \"@webiny/admin-ui\";\nimport { WebinyVersion } from \"./Menus/WebinyVersion.js\";\nimport { SupportMenuItems } from \"./Menus/SupportMenuItems.js\";\nimport { AdminConfig } from \"~/config/AdminConfig.js\";\nimport { HasPermission } from \"~/presentation/security/components/HasPermission.js\";\nimport { Menu } from \"~/config/AdminConfig/Menu.js\";\n\nexport const Menus = React.memo(() => {\n return (\n <AdminConfig>\n <HasPermission name={\"fm.file\"}>\n <Menu\n name={\"fileManager\"}\n pin={\"start\"}\n element={\n <Menu.Link\n text={\"File Manager\"}\n icon={\n <Menu.Item.Icon\n label=\"File Manager\"\n element={<FileManagerIcon />}\n />\n }\n to={\"/file-manager\"}\n />\n }\n />\n </HasPermission>\n <Menu\n name={\"home\"}\n pin={\"start\"}\n element={\n <Menu.Link\n to={\"/\"}\n text={\"Home\"}\n icon={<Menu.Link.Icon label=\"Home\" element={<DashboardIcon />} />}\n />\n }\n />\n <Menu\n name={\"settings\"}\n hideIfEmpty={true}\n pin={\"end\"}\n element={\n <Menu.Item\n text={\"Settings\"}\n icon={<Menu.Link.Icon label=\"Settings\" element={<SettingsIcon />} />}\n />\n }\n />\n\n <Menu.Support\n name={\"docs\"}\n element={\n <Menu.Support.Link\n text={\"Documentation\"}\n icon={<Menu.Support.Link.Icon label=\"Docs\" element={<DocsIcon />} />}\n to={\"https://www.webiny.com/docs\"}\n rel={\"noopener noreferrer\"}\n target={\"_blank\"}\n />\n }\n />\n\n <Menu.Support\n name={\"github\"}\n element={\n <Menu.Support.Link\n text={\"GitHub\"}\n icon={<Menu.Support.Link.Icon label=\"GitHub\" element={<GithubIcon />} />}\n to={\"https://github.com/webiny/webiny-js\"}\n rel={\"noopener noreferrer\"}\n target={\"_blank\"}\n />\n }\n />\n\n <Menu.Support\n name={\"slack\"}\n element={\n <Menu.Support.Link\n text={\"Slack\"}\n icon={<Menu.Support.Link.Icon label=\"Slack\" element={<SlackIcon />} />}\n to={\"https://www.webiny.com/slack\"}\n rel={\"noopener noreferrer\"}\n target={\"_blank\"}\n />\n }\n />\n\n <Menu.Support\n name={\"webiny-version\"}\n pin={\"end\"}\n element={\n <>\n <DropdownMenu.Separator />\n <DropdownMenu.Item text={<WebinyVersion />} readOnly />\n </>\n }\n />\n\n <Menu.Footer\n name={\"support\"}\n element={\n <DropdownMenu\n className={\"w-[225px]\"}\n trigger={\n <Menu.Item\n text={\"Support\"}\n icon={<Menu.Item.Icon label=\"Support\" element={<InfoIcon />} />}\n action={<Menu.Item.Action element={<MoreIcon />} />}\n />\n }\n >\n <SupportMenuItems />\n </DropdownMenu>\n }\n />\n </AdminConfig>\n );\n});\n\nMenus.displayName = \"Menus\";\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,IAAIC,aAAa,QAAQ,mCAAmC;AACnF,SAASD,cAAc,IAAIE,YAAY,QAAQ,4BAA4B;AAC3E,SAASF,cAAc,IAAIG,eAAe,QAAQ,+BAA+B;AACjF,SAASH,cAAc,IAAII,QAAQ,QAAQ,wBAAwB;AACnE,SAASJ,cAAc,IAAIK,SAAS,QAAQ,2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AkB,aAAA,CAACH,IAAI,CAACU,IAAI;QACNF,IAAI,EAAE,SAAU;QAChBC,IAAI,eAAExB,KAAA,CAAAkB,aAAA,CAACH,IAAI,CAACU,IAAI,CAACC,IAAI;UAACC,KAAK,EAAC,SAAS;UAACN,OAAO,eAAErB,KAAA,CAAAkB,aAAA,CAACb,QAAQ,MAAE;QAAE,CAAE,CAAE;QAChEkC,MAAM,eAAEvC,KAAA,CAAAkB,aAAA,CAACH,IAAI,CAACU,IAAI,CAACe,MAAM;UAACnB,OAAO,eAAErB,KAAA,CAAAkB,aAAA,CAACT,QAAQ,MAAE;QAAE,CAAE;MAAE,CACvD;IACJ,gBAEDT,KAAA,CAAAkB,aAAA,CAACN,gBAAgB,MAAE,CACT;EACjB,CACJ,CACQ,CAAC;AAEtB,CAAC,CAAC;AAEFI,KAAK,CAACyB,WAAW,GAAG,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["React","ReactComponent","DashboardIcon","SettingsIcon","FileManagerIcon","InfoIcon","SlackIcon","DocsIcon","GithubIcon","MoreIcon","DropdownMenu","WebinyVersion","SupportMenuItems","AdminConfig","HasPermission","Menu","Menus","memo","createElement","name","pin","element","Link","to","text","icon","Icon","label","Item","hideIfEmpty","Support","rel","target","Fragment","Separator","readOnly","Footer","className","trigger","action","Action","displayName"],"sources":["Menus.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as DashboardIcon } from \"@webiny/icons/space_dashboard.svg\";\nimport { ReactComponent as SettingsIcon } from \"@webiny/icons/settings.svg\";\nimport { ReactComponent as FileManagerIcon } from \"@webiny/icons/folder_open.svg\";\nimport { ReactComponent as InfoIcon } from \"@webiny/icons/info.svg\";\nimport { ReactComponent as SlackIcon } from \"@webiny/icons/numbers.svg\";\nimport { ReactComponent as DocsIcon } from \"@webiny/icons/summarize.svg\";\nimport { ReactComponent as GithubIcon } from \"@webiny/icons/route.svg\";\nimport { ReactComponent as MoreIcon } from \"@webiny/icons/more_vert.svg\";\nimport { DropdownMenu } from \"@webiny/admin-ui\";\nimport { WebinyVersion } from \"./Menus/WebinyVersion.js\";\nimport { SupportMenuItems } from \"./Menus/SupportMenuItems.js\";\nimport { AdminConfig } from \"~/config/AdminConfig.js\";\nimport { HasPermission } from \"~/presentation/security/components/HasPermission.js\";\nimport { Menu } from \"~/config/AdminConfig/Menu.js\";\n\nexport const Menus = React.memo(() => {\n return (\n <AdminConfig>\n <Menu\n name={\"home\"}\n pin={\"start\"}\n element={\n <Menu.Link\n to={\"/\"}\n text={\"Home\"}\n icon={<Menu.Link.Icon label=\"Home\" element={<DashboardIcon />} />}\n />\n }\n />\n <HasPermission name={\"fm.file\"}>\n <Menu\n name={\"fileManager\"}\n pin={\"start\"}\n element={\n <Menu.Link\n text={\"File Manager\"}\n icon={\n <Menu.Item.Icon\n label=\"File Manager\"\n element={<FileManagerIcon />}\n />\n }\n to={\"/file-manager\"}\n />\n }\n />\n </HasPermission>\n <Menu\n name={\"settings\"}\n hideIfEmpty={true}\n pin={\"end\"}\n element={\n <Menu.Item\n text={\"Settings\"}\n icon={<Menu.Link.Icon label=\"Settings\" element={<SettingsIcon />} />}\n />\n }\n />\n\n <Menu.Support\n name={\"docs\"}\n element={\n <Menu.Support.Link\n text={\"Documentation\"}\n icon={<Menu.Support.Link.Icon label=\"Docs\" element={<DocsIcon />} />}\n to={\"https://www.webiny.com/docs\"}\n rel={\"noopener noreferrer\"}\n target={\"_blank\"}\n />\n }\n />\n\n <Menu.Support\n name={\"github\"}\n element={\n <Menu.Support.Link\n text={\"GitHub\"}\n icon={<Menu.Support.Link.Icon label=\"GitHub\" element={<GithubIcon />} />}\n to={\"https://github.com/webiny/webiny-js\"}\n rel={\"noopener noreferrer\"}\n target={\"_blank\"}\n />\n }\n />\n\n <Menu.Support\n name={\"slack\"}\n element={\n <Menu.Support.Link\n text={\"Slack\"}\n icon={<Menu.Support.Link.Icon label=\"Slack\" element={<SlackIcon />} />}\n to={\"https://www.webiny.com/slack\"}\n rel={\"noopener noreferrer\"}\n target={\"_blank\"}\n />\n }\n />\n\n <Menu.Support\n name={\"webiny-version\"}\n pin={\"end\"}\n element={\n <>\n <DropdownMenu.Separator />\n <DropdownMenu.Item text={<WebinyVersion />} readOnly />\n </>\n }\n />\n\n <Menu.Footer\n name={\"support\"}\n element={\n <DropdownMenu\n className={\"w-[225px]\"}\n trigger={\n <Menu.Item\n text={\"Support\"}\n icon={<Menu.Item.Icon label=\"Support\" element={<InfoIcon />} />}\n action={<Menu.Item.Action element={<MoreIcon />} />}\n />\n }\n >\n <SupportMenuItems />\n </DropdownMenu>\n }\n />\n </AdminConfig>\n );\n});\n\nMenus.displayName = \"Menus\";\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,IAAIC,aAAa,QAAQ,mCAAmC;AACnF,SAASD,cAAc,IAAIE,YAAY,QAAQ,4BAA4B;AAC3E,SAASF,cAAc,IAAIG,eAAe,QAAQ,+BAA+B;AACjF,SAASH,cAAc,IAAII,QAAQ,QAAQ,wBAAwB;AACnE,SAASJ,cAAc,IAAIK,SAAS,QAAQ,2BAA2B;AACvE,SAASL,cAAc,IAAIM,QAAQ,QAAQ,6BAA6B;AACxE,SAASN,cAAc,IAAIO,UAAU,QAAQ,yBAAyB;AACtE,SAASP,cAAc,IAAIQ,QAAQ,QAAQ,6BAA6B;AACxE,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,aAAa;AACtB,SAASC,gBAAgB;AACzB,SAASC,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,IAAI;AAEb,OAAO,MAAMC,KAAK,gBAAGhB,KAAK,CAACiB,IAAI,CAAC,MAAM;EAClC,oBACIjB,KAAA,CAAAkB,aAAA,CAACL,WAAW,qBACRb,KAAA,CAAAkB,aAAA,CAACH,IAAI;IACDI,IAAI,EAAE,MAAO;IACbC,GAAG,EAAE,OAAQ;IACbC,OAAO,eACHrB,KAAA,CAAAkB,aAAA,CAACH,IAAI,CAACO,IAAI;MACNC,EAA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","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Component is used to display something that you want to be hidden to everyone except Webiny team.
3
+ * Example usage is in Workflow State Bar, where we need some button to be present only while developing the feature - and debugging.
4
+ * @see packages/app-workflows/src/Components/WorkflowState/Bar/Bars/WorkflowStateBarApproved.tsx
5
+ * @see packages/app-workflows/src/Components/WorkflowState/Bar/Bars/WorkflowStateBarRejected.tsx
6
+ */
7
+ import React from "react";
8
+ export interface IDeveloperModeProps {
9
+ children: React.ReactNode;
10
+ }
11
+ export declare const DeveloperMode: ({ children }: IDeveloperModeProps) => React.JSX.Element | null;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Component is used to display something that you want to be hidden to everyone except Webiny team.
3
+ * Example usage is in Workflow State Bar, where we need some button to be present only while developing the feature - and debugging.
4
+ * @see packages/app-workflows/src/Components/WorkflowState/Bar/Bars/WorkflowStateBarApproved.tsx
5
+ * @see packages/app-workflows/src/Components/WorkflowState/Bar/Bars/WorkflowStateBarRejected.tsx
6
+ */
7
+ import React from "react";
8
+ export const DeveloperMode = ({
9
+ children
10
+ }) => {
11
+ if (process.env.WEBINY_ADMIN_DEV_MODE !== "true") {
12
+ return null;
13
+ }
14
+ return /*#__PURE__*/React.createElement(React.Fragment, null, children);
15
+ };
16
+
17
+ //# sourceMappingURL=DeveloperMode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","DeveloperMode","children","process","env","WEBINY_ADMIN_DEV_MODE","createElement","Fragment"],"sources":["DeveloperMode.tsx"],"sourcesContent":["/**\n * Component is used to display something that you want to be hidden to everyone except Webiny team.\n * Example usage is in Workflow State Bar, where we need some button to be present only while developing the feature - and debugging.\n * @see packages/app-workflows/src/Components/WorkflowState/Bar/Bars/WorkflowStateBarApproved.tsx\n * @see packages/app-workflows/src/Components/WorkflowState/Bar/Bars/WorkflowStateBarRejected.tsx\n */\nimport React from \"react\";\n\nexport interface IDeveloperModeProps {\n children: React.ReactNode;\n}\n\nexport const DeveloperMode = ({ children }: IDeveloperModeProps) => {\n if (process.env.WEBINY_ADMIN_DEV_MODE !== \"true\") {\n return null;\n }\n return <>{children}</>;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAMzB,OAAO,MAAMC,aAAa,GAAGA,CAAC;EAAEC;AAA8B,CAAC,KAAK;EAChE,IAAIC,OAAO,CAACC,GAAG,CAACC,qBAAqB,KAAK,MAAM,EAAE;IAC9C,OAAO,IAAI;EACf;EACA,oBAAOL,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGL,QAAW,CAAC;AAC1B,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export { DeveloperMode } from "./DeveloperMode.js";
2
+ export type { IDeveloperModeProps } from "./DeveloperMode.js";
@@ -0,0 +1,3 @@
1
+ export { DeveloperMode } from "./DeveloperMode.js";
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DeveloperMode"],"sources":["index.ts"],"sourcesContent":["export { DeveloperMode } from \"./DeveloperMode.js\";\nexport type { IDeveloperModeProps } from \"./DeveloperMode.js\";\n"],"mappings":"AAAA,SAASA,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","useWcp","CanUseTeams","children","wcp","canUseTeams","createElement","Fragment","CanUsePrivateFiles","canUsePrivateFiles","CanUseFileManagerThreatDetection","canUseFileManagerThreatDetection","CanUseWorkflows","canUseWorkflows","Wcp"],"sources":["Wcp.tsx"],"sourcesContent":["import React from \"react\";\nimport { useWcp } from \"~/presentation/wcp/useWcp.js\";\n\ninterface ChildrenProps {\n children: React.ReactNode;\n}\n\nfunction CanUseTeams({ children }: ChildrenProps) {\n const wcp = useWcp();\n\n return wcp.canUseTeams() ? <>{children}</> : null;\n}\n\nfunction CanUsePrivateFiles({ children }: ChildrenProps) {\n const wcp = useWcp();\n\n return wcp.canUsePrivateFiles() ? <>{children}</> : null;\n}\n\nfunction CanUseFileManagerThreatDetection({ children }: ChildrenProps) {\n const wcp = useWcp();\n\n return wcp.canUseFileManagerThreatDetection() ? <>{children}</> : null;\n}\n\nfunction CanUseWorkflows({ children }: ChildrenProps) {\n const wcp = useWcp();\n\n return wcp.canUseWorkflows() ? <>{children}</> : null;\n}\n\nexport const Wcp = {\n CanUseTeams,\n CanUsePrivateFiles,\n CanUseFileManagerThreatDetection,\n CanUseWorkflows\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM;AAMf,SAASC,WAAWA,CAAC;EAAEC;AAAwB,CAAC,EAAE;EAC9C,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EAEpB,OAAOG,GAAG,CAACC,WAAW,CAAC,CAAC,gBAAGL,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AACrD;AAEA,SAASK,kBAAkBA,CAAC;EAAEL;AAAwB,CAAC,EAAE;EACrD,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EAEpB,OAAOG,GAAG,CAACK,kBAAkB,CAAC,CAAC,gBAAGT,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AAC5D;AAEA,SAASO,gCAAgCA,CAAC;EAAEP;AAAwB,CAAC,EAAE;EACnE,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EAEpB,OAAOG,GAAG,CAACO,gCAAgC,CAAC,CAAC,gBAAGX,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AAC1E;AAEA,SAASS,eAAeA,CAAC;EAAET;AAAwB,CAAC,EAAE;EAClD,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EAEpB,OAAOG,GAAG,CAACS,eAAe,CAAC,CAAC,gBAAGb,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AACzD;AAEA,OAAO,MAAMW,GAAG,GAAG;EACfZ,WAAW;EACXM,kBAAkB;EAClBE,gCAAgC;EAChCE;AACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useWcp","CanUseTeams","children","wcp","canUseTeams","createElement","Fragment","CanUsePrivateFiles","canUsePrivateFiles","CanUseFileManagerThreatDetection","canUseFileManagerThreatDetection","CanUseWorkflows","canUseWorkflows","Wcp"],"sources":["Wcp.tsx"],"sourcesContent":["import React from \"react\";\nimport { useWcp } from \"~/presentation/wcp/useWcp.js\";\n\ninterface ChildrenProps {\n children: React.ReactNode;\n}\n\nfunction CanUseTeams({ children }: ChildrenProps) {\n const wcp = useWcp();\n return wcp.canUseTeams() ? <>{children}</> : null;\n}\n\nfunction CanUsePrivateFiles({ children }: ChildrenProps) {\n const wcp = useWcp();\n return wcp.canUsePrivateFiles() ? <>{children}</> : null;\n}\n\nfunction CanUseFileManagerThreatDetection({ children }: ChildrenProps) {\n const wcp = useWcp();\n return wcp.canUseFileManagerThreatDetection() ? <>{children}</> : null;\n}\n\nfunction CanUseWorkflows({ children }: ChildrenProps) {\n const wcp = useWcp();\n return wcp.canUseWorkflows() ? <>{children}</> : null;\n}\n\nexport const Wcp = {\n CanUseTeams,\n CanUsePrivateFiles,\n CanUseFileManagerThreatDetection,\n CanUseWorkflows\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM;AAMf,SAASC,WAAWA,CAAC;EAAEC;AAAwB,CAAC,EAAE;EAC9C,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EACpB,OAAOG,GAAG,CAACC,WAAW,CAAC,CAAC,gBAAGL,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AACrD;AAEA,SAASK,kBAAkBA,CAAC;EAAEL;AAAwB,CAAC,EAAE;EACrD,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EACpB,OAAOG,GAAG,CAACK,kBAAkB,CAAC,CAAC,gBAAGT,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AAC5D;AAEA,SAASO,gCAAgCA,CAAC;EAAEP;AAAwB,CAAC,EAAE;EACnE,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EACpB,OAAOG,GAAG,CAACO,gCAAgC,CAAC,CAAC,gBAAGX,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AAC1E;AAEA,SAASS,eAAeA,CAAC;EAAET;AAAwB,CAAC,EAAE;EAClD,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EACpB,OAAOG,GAAG,CAACS,eAAe,CAAC,CAAC,gBAAGb,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AACzD;AAEA,OAAO,MAAMW,GAAG,GAAG;EACfZ,WAAW;EACXM,kBAAkB;EAClBE,gCAAgC;EAChCE;AACJ,CAAC","ignoreList":[]}
@@ -27,3 +27,4 @@ export * from "../components/RolesMultiAutocomplete/index.js";
27
27
  export * from "../components/RoleAutocomplete/index.js";
28
28
  export * from "../components/TeamAutocomplete/index.js";
29
29
  export * from "../components/TeamsMultiAutocomplete/index.js";
30
+ export * from "./DeveloperMode/index.js";
@@ -26,5 +26,6 @@ export * from "./RolesMultiAutocomplete/index.js";
26
26
  export * from "./RoleAutocomplete/index.js";
27
27
  export * from "./TeamAutocomplete/index.js";
28
28
  export * from "./TeamsMultiAutocomplete/index.js";
29
+ export * from "./DeveloperMode/index.js";
29
30
 
30
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["FileManager","FloatingPanel","StateInspector","NavigationPrompt","DialogsProvider","OverlayLayout","EmptyView","SimpleFormContent","SimpleForm","SimpleFormFooter","SimpleFormHeader","default","SingleImageUpload","LexicalEditor","LexicalLinkForm","Wcp","RegisterFeature"],"sources":["index.ts"],"sourcesContent":["export { FileManager } from \"~/base/ui/FileManager.js\";\nexport { FloatingPanel } from \"~/components/FloatingPanel.js\";\nexport { StateInspector } from \"~/components/StateInspector.js\";\nexport { NavigationPrompt } from \"~/components/NavigationPrompt.js\";\nexport * from \"~/components/AdminLayout.js\";\nexport * from \"~/components/Buttons/index.js\";\nexport { DialogsProvider } from \"~/components/Dialogs/DialogsContext.js\";\nexport * from \"~/components/OptionsMenu/index.js\";\nexport * from \"~/components/Filters/index.js\";\nexport * from \"~/components/BulkActions/index.js\";\nexport { OverlayLayout, type OverlayLayoutProps } from \"~/components/OverlayLayout/index.js\";\nexport { type EmptyViewProps, EmptyView } from \"~/components/EmptyView.js\";\nexport {\n SimpleFormContent,\n SimpleForm,\n SimpleFormFooter,\n SimpleFormHeader\n} from \"~/components/SimpleForm/index.js\";\nexport {\n default as SingleImageUpload,\n type SingleImageUploadProps\n} from \"~/components/SingleImageUpload.js\";\nexport { LexicalEditor } from \"~/components/LexicalEditor/index.js\";\nexport type { RichTextValueWithHtml } from \"~/components/LexicalEditor/index.js\";\nexport { LexicalLinkForm } from \"~/components/LexicalEditor/index.js\";\nexport { Wcp } from \"~/components/Wcp.js\";\nexport * from \"~/components/IconPicker/index.js\";\nexport * from \"~/components/NavigationPrompt.js\";\nexport * from \"~/components/SplitView/index.js\";\nexport * from \"~/components/Permissions/index.js\";\nexport * from \"~/components/SearchUI.js\";\nexport * from \"~/components/RegisterFeature.js\";\nexport { RegisterFeature } from \"~/components/RegisterFeature.js\";\nexport * from \"~/components/RolesMultiAutocomplete/index.js\";\nexport * from \"~/components/RoleAutocomplete/index.js\";\nexport * from \"~/components/TeamAutocomplete/index.js\";\nexport * from \"~/components/TeamsMultiAutocomplete/index.js\";\n"],"mappings":"AAAA,SAASA,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,cAAc;AACvB,SAASC,gBAAgB;AACzB;AACA;AACA,SAASC,eAAe;AACxB;AACA;AACA;AACA,SAASC,aAAa;AACtB,SAA8BC,SAAS;AACvC,SACIC,iBAAiB,EACjBC,UAAU,EACVC,gBAAgB,EAChBC,gBAAgB;AAEpB,SACIC,OAAO,IAAIC,iBAAiB;AAGhC,SAASC,aAAa;AAEtB,SAASC,eAAe;AACxB,SAASC,GAAG;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,eAAe;AACxB;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["FileManager","FloatingPanel","StateInspector","NavigationPrompt","DialogsProvider","OverlayLayout","EmptyView","SimpleFormContent","SimpleForm","SimpleFormFooter","SimpleFormHeader","default","SingleImageUpload","LexicalEditor","LexicalLinkForm","Wcp","RegisterFeature"],"sources":["index.ts"],"sourcesContent":["export { FileManager } from \"~/base/ui/FileManager.js\";\nexport { FloatingPanel } from \"~/components/FloatingPanel.js\";\nexport { StateInspector } from \"~/components/StateInspector.js\";\nexport { NavigationPrompt } from \"~/components/NavigationPrompt.js\";\nexport * from \"~/components/AdminLayout.js\";\nexport * from \"~/components/Buttons/index.js\";\nexport { DialogsProvider } from \"~/components/Dialogs/DialogsContext.js\";\nexport * from \"~/components/OptionsMenu/index.js\";\nexport * from \"~/components/Filters/index.js\";\nexport * from \"~/components/BulkActions/index.js\";\nexport { OverlayLayout, type OverlayLayoutProps } from \"~/components/OverlayLayout/index.js\";\nexport { type EmptyViewProps, EmptyView } from \"~/components/EmptyView.js\";\nexport {\n SimpleFormContent,\n SimpleForm,\n SimpleFormFooter,\n SimpleFormHeader\n} from \"~/components/SimpleForm/index.js\";\nexport {\n default as SingleImageUpload,\n type SingleImageUploadProps\n} from \"~/components/SingleImageUpload.js\";\nexport { LexicalEditor } from \"~/components/LexicalEditor/index.js\";\nexport type { RichTextValueWithHtml } from \"~/components/LexicalEditor/index.js\";\nexport { LexicalLinkForm } from \"~/components/LexicalEditor/index.js\";\nexport { Wcp } from \"~/components/Wcp.js\";\nexport * from \"~/components/IconPicker/index.js\";\nexport * from \"~/components/NavigationPrompt.js\";\nexport * from \"~/components/SplitView/index.js\";\nexport * from \"~/components/Permissions/index.js\";\nexport * from \"~/components/SearchUI.js\";\nexport * from \"~/components/RegisterFeature.js\";\nexport { RegisterFeature } from \"~/components/RegisterFeature.js\";\nexport * from \"~/components/RolesMultiAutocomplete/index.js\";\nexport * from \"~/components/RoleAutocomplete/index.js\";\nexport * from \"~/components/TeamAutocomplete/index.js\";\nexport * from \"~/components/TeamsMultiAutocomplete/index.js\";\nexport * from \"./DeveloperMode/index.js\";\n"],"mappings":"AAAA,SAASA,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,cAAc;AACvB,SAASC,gBAAgB;AACzB;AACA;AACA,SAASC,eAAe;AACxB;AACA;AACA;AACA,SAASC,aAAa;AACtB,SAA8BC,SAAS;AACvC,SACIC,iBAAiB,EACjBC,UAAU,EACVC,gBAAgB,EAChBC,gBAAgB;AAEpB,SACIC,OAAO,IAAIC,iBAAiB;AAGhC,SAASC,aAAa;AAEtB,SAASC,eAAe;AACxB,SAASC,GAAG;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,eAAe;AACxB;AACA;AACA;AACA;AACA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-admin",
3
- "version": "6.0.0-rc.0",
3
+ "version": "6.0.0-rc.2",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "description": "A collection of plugins that together form a complete admin interface, customizable and extensible with Webiny apps and plugins.",
@@ -15,29 +15,28 @@
15
15
  "@apollo/react-hooks": "3.1.5",
16
16
  "@emotion/react": "11.10.8",
17
17
  "@emotion/styled": "11.10.6",
18
- "@iconify/json": "2.2.441",
18
+ "@iconify/json": "2.2.443",
19
19
  "@monaco-editor/react": "4.7.0",
20
20
  "@svgr/webpack": "6.5.1",
21
21
  "@types/mime": "2.0.3",
22
22
  "@types/react": "18.2.79",
23
- "@webiny/admin-ui": "6.0.0-rc.0",
24
- "@webiny/app": "6.0.0-rc.0",
23
+ "@webiny/admin-ui": "6.0.0-rc.2",
24
+ "@webiny/app": "6.0.0-rc.2",
25
25
  "@webiny/di": "0.2.3",
26
- "@webiny/feature": "6.0.0-rc.0",
27
- "@webiny/form": "6.0.0-rc.0",
28
- "@webiny/icons": "6.0.0-rc.0",
29
- "@webiny/lexical-converter": "6.0.0-rc.0",
30
- "@webiny/lexical-editor": "6.0.0-rc.0",
31
- "@webiny/lexical-theme": "6.0.0-rc.0",
32
- "@webiny/plugins": "6.0.0-rc.0",
33
- "@webiny/project": "6.0.0-rc.0",
34
- "@webiny/react-composition": "6.0.0-rc.0",
35
- "@webiny/react-properties": "6.0.0-rc.0",
36
- "@webiny/telemetry": "6.0.0-rc.0",
37
- "@webiny/ui": "6.0.0-rc.0",
38
- "@webiny/utils": "6.0.0-rc.0",
39
- "@webiny/validation": "6.0.0-rc.0",
40
- "@webiny/wcp": "6.0.0-rc.0",
26
+ "@webiny/feature": "6.0.0-rc.2",
27
+ "@webiny/form": "6.0.0-rc.2",
28
+ "@webiny/icons": "6.0.0-rc.2",
29
+ "@webiny/lexical-converter": "6.0.0-rc.2",
30
+ "@webiny/lexical-editor": "6.0.0-rc.2",
31
+ "@webiny/lexical-theme": "6.0.0-rc.2",
32
+ "@webiny/plugins": "6.0.0-rc.2",
33
+ "@webiny/react-composition": "6.0.0-rc.2",
34
+ "@webiny/react-properties": "6.0.0-rc.2",
35
+ "@webiny/telemetry": "6.0.0-rc.2",
36
+ "@webiny/ui": "6.0.0-rc.2",
37
+ "@webiny/utils": "6.0.0-rc.2",
38
+ "@webiny/validation": "6.0.0-rc.2",
39
+ "@webiny/wcp": "6.0.0-rc.2",
41
40
  "apollo-cache": "1.3.5",
42
41
  "apollo-client": "2.6.10",
43
42
  "apollo-link": "1.2.14",
@@ -45,13 +44,13 @@
45
44
  "apollo-utilities": "1.3.4",
46
45
  "classnames": "2.5.1",
47
46
  "emotion": "10.0.27",
48
- "graphql": "16.12.0",
47
+ "graphql": "16.13.0",
49
48
  "graphql-tag": "2.12.6",
50
49
  "history": "5.3.0",
51
50
  "is-hotkey": "0.2.0",
52
51
  "lodash": "4.17.23",
53
- "markdown-to-jsx": "9.7.5",
54
- "minimatch": "10.2.2",
52
+ "markdown-to-jsx": "9.7.6",
53
+ "minimatch": "10.2.4",
55
54
  "mobx": "6.15.0",
56
55
  "mobx-react-lite": "3.4.3",
57
56
  "monaco-editor": "0.53.0",
@@ -60,14 +59,12 @@
60
59
  "react-dom": "18.2.0",
61
60
  "react-draggable": "4.5.0",
62
61
  "react-resizable": "3.1.3",
63
- "react-resizable-panels": "4.6.4",
62
+ "react-resizable-panels": "4.6.5",
64
63
  "react-transition-group": "4.4.5",
65
64
  "react-virtualized": "9.22.6",
66
65
  "reset-css": "5.0.2",
67
66
  "tinycolor2": "1.6.0",
68
- "ts-morph": "27.0.2",
69
- "unicode-emoji-json": "0.8.0",
70
- "zod": "3.25.76"
67
+ "unicode-emoji-json": "0.8.0"
71
68
  },
72
69
  "devDependencies": {
73
70
  "@emotion/babel-plugin": "11.13.5",
@@ -79,7 +76,7 @@
79
76
  "@types/react-transition-group": "4.4.12",
80
77
  "@types/store": "2.0.5",
81
78
  "@types/tinycolor2": "1.4.6",
82
- "@webiny/build-tools": "6.0.0-rc.0",
79
+ "@webiny/build-tools": "6.0.0-rc.2",
83
80
  "rimraf": "6.1.3",
84
81
  "typescript": "5.9.3",
85
82
  "vitest": "4.0.18"
@@ -105,5 +102,5 @@
105
102
  ]
106
103
  }
107
104
  },
108
- "gitHead": "0f2aa699f4642e550ab62c96fcd050e8d02345c9"
105
+ "gitHead": "5facada4cbb8617cc60e3c98be0f1839f44be38e"
109
106
  }
@@ -1,11 +0,0 @@
1
- import { z } from "zod";
2
- export declare const AdminBuildParam: import("@webiny/project/defineExtension").ExtensionComponent<z.ZodObject<{
3
- paramName: z.ZodString;
4
- value: z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny, "many">, z.ZodNumber, z.ZodBoolean]>;
5
- }, "strip", z.ZodTypeAny, {
6
- value: string | number | boolean | any[] | Record<string, any>;
7
- paramName: string;
8
- }, {
9
- value: string | number | boolean | any[] | Record<string, any>;
10
- paramName: string;
11
- }>>;
@@ -1,184 +0,0 @@
1
- import { z } from "zod";
2
- import { defineExtension } from "@webiny/project/defineExtension";
3
- import crypto from "crypto";
4
- import path from "path";
5
- import fs from "fs";
6
- import { Node, Project } from "ts-morph";
7
- async function generateBuildParamsFeature(buildParamsDir, ctx) {
8
- const featureFilePath = path.join(buildParamsDir, "feature.ts");
9
-
10
- // Get all BuildParam_*.ts files.
11
- const files = fs.readdirSync(buildParamsDir).filter(f => f.startsWith("BuildParam_") && f.endsWith(".ts") && f !== "feature.ts");
12
-
13
- // Generate imports and registrations.
14
- const imports = files.map(file => {
15
- const className = path.parse(file).name;
16
- return `import ${className} from "./${className}.js";`;
17
- }).join("\n");
18
- const registrations = files.map(file => {
19
- const className = path.parse(file).name;
20
- return ` container.register(${className});`;
21
- }).join("\n");
22
- const featureContent = `import { createFeature } from "@webiny/feature/admin";
23
- import { Container } from "@webiny/di";
24
- ${imports}
25
-
26
- export const BuildParamsInternalFeature = createFeature({
27
- name: "BuildParamsInternal",
28
- register(container: Container) {
29
- ${registrations}
30
- }
31
- });
32
- `;
33
- fs.writeFileSync(featureFilePath, featureContent, "utf8");
34
-
35
- // Now we need to update Extensions.tsx to use RegisterFeature with this feature.
36
- await updateExtensionsTsx(ctx);
37
- }
38
- async function updateExtensionsTsx(ctx) {
39
- const extensionsTsxFilePath = ctx.project.paths.workspaceFolder.join("apps", "admin", "src", "Extensions.tsx").toString();
40
- const project = new Project();
41
- project.addSourceFileAtPath(extensionsTsxFilePath);
42
- const source = project.getSourceFileOrThrow(extensionsTsxFilePath);
43
-
44
- // Check if we already have the imports.
45
- const buildParamsFeatureImport = "./buildParams/feature.js";
46
- const existingFeatureImport = source.getImportDeclaration(buildParamsFeatureImport);
47
- if (!existingFeatureImport) {
48
- let index = 1;
49
- const importDeclarations = source.getImportDeclarations();
50
- if (importDeclarations.length) {
51
- const last = importDeclarations[importDeclarations.length - 1];
52
- index = last.getChildIndex() + 1;
53
- }
54
-
55
- // Add import for BuildParamsInternalFeature.
56
- source.insertImportDeclaration(index, {
57
- namedImports: ["BuildParamsInternalFeature"],
58
- moduleSpecifier: buildParamsFeatureImport
59
- });
60
-
61
- // Add import for BuildParamsFeature.
62
- const buildParamsFeatureImportPath = "@webiny/app-admin";
63
- const existingBuildParamsImport = source.getImportDeclaration(buildParamsFeatureImportPath);
64
- if (!existingBuildParamsImport) {
65
- source.insertImportDeclaration(index, {
66
- namedImports: ["BuildParamsFeature"],
67
- moduleSpecifier: buildParamsFeatureImportPath
68
- });
69
- } else {
70
- // Add to existing import if BuildParamsFeature not already there.
71
- const namedImports = existingBuildParamsImport.getNamedImports();
72
- const hasBuildParamsFeature = namedImports.some(ni => ni.getName() === "BuildParamsFeature");
73
- if (!hasBuildParamsFeature) {
74
- existingBuildParamsImport.addNamedImport("BuildParamsFeature");
75
- }
76
- }
77
-
78
- // Add import for RegisterFeature if not present.
79
- const registerFeatureImportPath = "@webiny/app-admin";
80
- const existingRegisterFeatureImport = source.getImportDeclaration(registerFeatureImportPath);
81
- if (existingRegisterFeatureImport) {
82
- const namedImports = existingRegisterFeatureImport.getNamedImports();
83
- const hasRegisterFeature = namedImports.some(ni => ni.getName() === "RegisterFeature");
84
- if (!hasRegisterFeature) {
85
- existingRegisterFeatureImport.addNamedImport("RegisterFeature");
86
- }
87
- } else {
88
- source.insertImportDeclaration(index, {
89
- namedImports: ["RegisterFeature"],
90
- moduleSpecifier: registerFeatureImportPath
91
- });
92
- }
93
- }
94
-
95
- // Now add <RegisterFeature> components to the Extensions component.
96
- const extensionsIdentifier = source.getFirstDescendant(node => {
97
- if (!Node.isIdentifier(node)) {
98
- return false;
99
- }
100
- return node.getText() === "Extensions";
101
- });
102
- if (!extensionsIdentifier) {
103
- throw new Error(`Could not find the "Extensions" React component in "${extensionsTsxFilePath}".`);
104
- }
105
- const extensionsArrowFn = extensionsIdentifier.getNextSibling(node => Node.isArrowFunction(node));
106
- if (!extensionsArrowFn) {
107
- throw new Error(`Could not find the "Extensions" React component arrow function.`);
108
- }
109
- const extensionsArrowFnFragment = extensionsArrowFn.getFirstDescendant(node => {
110
- return Node.isJsxFragment(node);
111
- });
112
- if (!extensionsArrowFnFragment) {
113
- throw new Error(`Could not find JSX fragment in Extensions component.`);
114
- }
115
- const currentContent = extensionsArrowFnFragment.getFullText().replace("<>", "").replace("</>", "").trim();
116
-
117
- // Check if we already have the RegisterFeature components.
118
- if (!currentContent.includes("BuildParamsFeature")) {
119
- const newContent = `<><RegisterFeature feature={BuildParamsFeature} /><RegisterFeature feature={BuildParamsInternalFeature} />${currentContent}</>`;
120
- extensionsArrowFnFragment.replaceWithText(newContent);
121
- }
122
- await source.save();
123
- }
124
- export const AdminBuildParam = defineExtension({
125
- type: "Admin/BuildParam",
126
- tags: {
127
- runtimeContext: "app-build",
128
- appName: "admin"
129
- },
130
- description: "Add build-time parameter to Admin app.",
131
- multiple: true,
132
- paramsSchema: () => {
133
- return z.object({
134
- paramName: z.string(),
135
- value: z.union([z.string(), z.record(z.any()), z.array(z.any()), z.number(), z.boolean()])
136
- });
137
- },
138
- async build(params, ctx) {
139
- const buildParamsDir = ctx.project.paths.workspaceFolder.join("apps", "admin", "src", "buildParams").toString();
140
- const {
141
- paramName,
142
- value
143
- } = params;
144
-
145
- // Serialize value to a TypeScript literal.
146
- const valueStr = JSON.stringify(value, null, 4);
147
-
148
- // Generate a unique class name based on the paramName.
149
- const hash = crypto.createHash("sha256").update(paramName).digest("hex");
150
- const className = `BuildParam_${hash.slice(-10)}`;
151
- const fileName = `${className}.ts`;
152
- const filePath = path.join(buildParamsDir, fileName);
153
-
154
- // Ensure buildParams directory exists.
155
- if (!fs.existsSync(buildParamsDir)) {
156
- fs.mkdirSync(buildParamsDir, {
157
- recursive: true
158
- });
159
- }
160
-
161
- // Check if file already exists.
162
- if (!fs.existsSync(filePath)) {
163
- // Create the BuildParam implementation file.
164
- const fileContent = `import { BuildParam } from "webiny/admin/buildParams";
165
-
166
- class ${className} implements BuildParam.Interface {
167
- key = "${paramName}";
168
- value = ${valueStr};
169
- }
170
-
171
- export default BuildParam.createImplementation({
172
- implementation: ${className},
173
- dependencies: []
174
- });
175
- `;
176
- fs.writeFileSync(filePath, fileContent, "utf8");
177
- }
178
-
179
- // Now we need to generate/update the feature file that imports all BuildParams.
180
- await generateBuildParamsFeature(buildParamsDir, ctx);
181
- }
182
- });
183
-
184
- //# sourceMappingURL=AdminBuildParam.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["z","defineExtension","crypto","path","fs","Node","Project","generateBuildParamsFeature","buildParamsDir","ctx","featureFilePath","join","files","readdirSync","filter","f","startsWith","endsWith","imports","map","file","className","parse","name","registrations","featureContent","writeFileSync","updateExtensionsTsx","extensionsTsxFilePath","project","paths","workspaceFolder","toString","addSourceFileAtPath","source","getSourceFileOrThrow","buildParamsFeatureImport","existingFeatureImport","getImportDeclaration","index","importDeclarations","getImportDeclarations","length","last","getChildIndex","insertImportDeclaration","namedImports","moduleSpecifier","buildParamsFeatureImportPath","existingBuildParamsImport","getNamedImports","hasBuildParamsFeature","some","ni","getName","addNamedImport","registerFeatureImportPath","existingRegisterFeatureImport","hasRegisterFeature","extensionsIdentifier","getFirstDescendant","node","isIdentifier","getText","Error","extensionsArrowFn","getNextSibling","isArrowFunction","extensionsArrowFnFragment","isJsxFragment","currentContent","getFullText","replace","trim","includes","newContent","replaceWithText","save","AdminBuildParam","type","tags","runtimeContext","appName","description","multiple","paramsSchema","object","paramName","string","value","union","record","any","array","number","boolean","build","params","valueStr","JSON","stringify","hash","createHash","update","digest","slice","fileName","filePath","existsSync","mkdirSync","recursive","fileContent"],"sources":["AdminBuildParam.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { defineExtension } from \"@webiny/project/defineExtension\";\nimport crypto from \"crypto\";\nimport path from \"path\";\nimport fs from \"fs\";\nimport { Node, Project } from \"ts-morph\";\n\nasync function generateBuildParamsFeature(buildParamsDir: string, ctx: any) {\n const featureFilePath = path.join(buildParamsDir, \"feature.ts\");\n\n // Get all BuildParam_*.ts files.\n const files = fs\n .readdirSync(buildParamsDir)\n .filter(f => f.startsWith(\"BuildParam_\") && f.endsWith(\".ts\") && f !== \"feature.ts\");\n\n // Generate imports and registrations.\n const imports = files\n .map(file => {\n const className = path.parse(file).name;\n return `import ${className} from \"./${className}.js\";`;\n })\n .join(\"\\n\");\n\n const registrations = files\n .map(file => {\n const className = path.parse(file).name;\n return ` container.register(${className});`;\n })\n .join(\"\\n\");\n\n const featureContent = `import { createFeature } from \"@webiny/feature/admin\";\nimport { Container } from \"@webiny/di\";\n${imports}\n\nexport const BuildParamsInternalFeature = createFeature({\n name: \"BuildParamsInternal\",\n register(container: Container) {\n${registrations}\n }\n});\n`;\n\n fs.writeFileSync(featureFilePath, featureContent, \"utf8\");\n\n // Now we need to update Extensions.tsx to use RegisterFeature with this feature.\n await updateExtensionsTsx(ctx);\n}\n\nasync function updateExtensionsTsx(ctx: any) {\n const extensionsTsxFilePath = ctx.project.paths.workspaceFolder\n .join(\"apps\", \"admin\", \"src\", \"Extensions.tsx\")\n .toString();\n\n const project = new Project();\n project.addSourceFileAtPath(extensionsTsxFilePath);\n\n const source = project.getSourceFileOrThrow(extensionsTsxFilePath);\n\n // Check if we already have the imports.\n const buildParamsFeatureImport = \"./buildParams/feature.js\";\n const existingFeatureImport = source.getImportDeclaration(buildParamsFeatureImport);\n\n if (!existingFeatureImport) {\n let index = 1;\n const importDeclarations = source.getImportDeclarations();\n if (importDeclarations.length) {\n const last = importDeclarations[importDeclarations.length - 1];\n index = last.getChildIndex() + 1;\n }\n\n // Add import for BuildParamsInternalFeature.\n source.insertImportDeclaration(index, {\n namedImports: [\"BuildParamsInternalFeature\"],\n moduleSpecifier: buildParamsFeatureImport\n });\n\n // Add import for BuildParamsFeature.\n const buildParamsFeatureImportPath = \"@webiny/app-admin\";\n const existingBuildParamsImport = source.getImportDeclaration(buildParamsFeatureImportPath);\n\n if (!existingBuildParamsImport) {\n source.insertImportDeclaration(index, {\n namedImports: [\"BuildParamsFeature\"],\n moduleSpecifier: buildParamsFeatureImportPath\n });\n } else {\n // Add to existing import if BuildParamsFeature not already there.\n const namedImports = existingBuildParamsImport.getNamedImports();\n const hasBuildParamsFeature = namedImports.some(\n ni => ni.getName() === \"BuildParamsFeature\"\n );\n if (!hasBuildParamsFeature) {\n existingBuildParamsImport.addNamedImport(\"BuildParamsFeature\");\n }\n }\n\n // Add import for RegisterFeature if not present.\n const registerFeatureImportPath = \"@webiny/app-admin\";\n const existingRegisterFeatureImport =\n source.getImportDeclaration(registerFeatureImportPath);\n\n if (existingRegisterFeatureImport) {\n const namedImports = existingRegisterFeatureImport.getNamedImports();\n const hasRegisterFeature = namedImports.some(ni => ni.getName() === \"RegisterFeature\");\n if (!hasRegisterFeature) {\n existingRegisterFeatureImport.addNamedImport(\"RegisterFeature\");\n }\n } else {\n source.insertImportDeclaration(index, {\n namedImports: [\"RegisterFeature\"],\n moduleSpecifier: registerFeatureImportPath\n });\n }\n }\n\n // Now add <RegisterFeature> components to the Extensions component.\n const extensionsIdentifier = source.getFirstDescendant(node => {\n if (!Node.isIdentifier(node)) {\n return false;\n }\n return node.getText() === \"Extensions\";\n });\n\n if (!extensionsIdentifier) {\n throw new Error(\n `Could not find the \"Extensions\" React component in \"${extensionsTsxFilePath}\".`\n );\n }\n\n const extensionsArrowFn = extensionsIdentifier.getNextSibling(node =>\n Node.isArrowFunction(node)\n );\n\n if (!extensionsArrowFn) {\n throw new Error(`Could not find the \"Extensions\" React component arrow function.`);\n }\n\n const extensionsArrowFnFragment = extensionsArrowFn.getFirstDescendant(node => {\n return Node.isJsxFragment(node);\n });\n\n if (!extensionsArrowFnFragment) {\n throw new Error(`Could not find JSX fragment in Extensions component.`);\n }\n\n const currentContent = extensionsArrowFnFragment\n .getFullText()\n .replace(\"<>\", \"\")\n .replace(\"</>\", \"\")\n .trim();\n\n // Check if we already have the RegisterFeature components.\n if (!currentContent.includes(\"BuildParamsFeature\")) {\n const newContent = `<><RegisterFeature feature={BuildParamsFeature} /><RegisterFeature feature={BuildParamsInternalFeature} />${currentContent}</>`;\n extensionsArrowFnFragment.replaceWithText(newContent);\n }\n\n await source.save();\n}\n\nexport const AdminBuildParam = defineExtension({\n type: \"Admin/BuildParam\",\n tags: { runtimeContext: \"app-build\", appName: \"admin\" },\n description: \"Add build-time parameter to Admin app.\",\n multiple: true,\n paramsSchema: () => {\n return z.object({\n paramName: z.string(),\n value: z.union([\n z.string(),\n z.record(z.any()),\n z.array(z.any()),\n z.number(),\n z.boolean()\n ])\n });\n },\n async build(params, ctx) {\n const buildParamsDir = ctx.project.paths.workspaceFolder\n .join(\"apps\", \"admin\", \"src\", \"buildParams\")\n .toString();\n\n const { paramName, value } = params;\n\n // Serialize value to a TypeScript literal.\n const valueStr = JSON.stringify(value, null, 4);\n\n // Generate a unique class name based on the paramName.\n const hash = crypto.createHash(\"sha256\").update(paramName).digest(\"hex\");\n const className = `BuildParam_${hash.slice(-10)}`;\n const fileName = `${className}.ts`;\n const filePath = path.join(buildParamsDir, fileName);\n\n // Ensure buildParams directory exists.\n if (!fs.existsSync(buildParamsDir)) {\n fs.mkdirSync(buildParamsDir, { recursive: true });\n }\n\n // Check if file already exists.\n if (!fs.existsSync(filePath)) {\n // Create the BuildParam implementation file.\n const fileContent = `import { BuildParam } from \"webiny/admin/buildParams\";\n\nclass ${className} implements BuildParam.Interface {\n key = \"${paramName}\";\n value = ${valueStr};\n}\n\nexport default BuildParam.createImplementation({\n implementation: ${className},\n dependencies: []\n});\n`;\n fs.writeFileSync(filePath, fileContent, \"utf8\");\n }\n\n // Now we need to generate/update the feature file that imports all BuildParams.\n await generateBuildParamsFeature(build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MAAMI,WAAW,GAAG;AAChC;AACA,QAAQ1F,SAAS;AACjB,aAAakE,SAAS;AACtB,cAAcW,QAAQ;AACtB;AACA;AACA;AACA,sBAAsB7E,SAAS;AAC/B;AACA;AACA,CAAC;MACWjB,EAAE,CAACsB,aAAa,CAACiF,QAAQ,EAAEI,WAAW,EAAE,MAAM,CAAC;IACnD;;IAEA;IACA,MAAMxG,0BAA0B,CAACC,cAAc,EAAEC,GAAG,CAAC;EACzD;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- import { z } from "zod";
2
- export declare const AdminExtension: import("@webiny/project/defineExtension/defineExtension").ExtensionComponent<z.ZodObject<{
3
- src: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
4
- exportName: z.ZodOptional<z.ZodString>;
5
- }, "strip", z.ZodTypeAny, {
6
- src: string;
7
- exportName?: string | undefined;
8
- }, {
9
- src: string;
10
- exportName?: string | undefined;
11
- }>>;
@@ -1,99 +0,0 @@
1
- import { defineExtension, zodSrcPath } from "@webiny/project/extensions/index.js";
2
- import { ExtensionSrcResolver } from "@webiny/project";
3
- import { z } from "zod";
4
- import path from "path";
5
- import { Node, Project } from "ts-morph";
6
- import crypto from "crypto";
7
- export const AdminExtension = defineExtension({
8
- type: "Admin/Extension",
9
- tags: {
10
- runtimeContext: "app-build",
11
- appName: "admin"
12
- },
13
- description: "Extend the Admin application with custom functionality.",
14
- multiple: true,
15
- paramsSchema: ({
16
- project
17
- }) => {
18
- return z.object({
19
- src: zodSrcPath({
20
- project
21
- }),
22
- exportName: z.string().optional()
23
- });
24
- },
25
- async build(params, ctx) {
26
- const extensionsTsxFilePath = ctx.project.paths.workspaceFolder.join("apps", "admin", "src", "Extensions.tsx").toString();
27
- const {
28
- src: extensionFilePath
29
- } = params;
30
-
31
- // Resolve to absolute path for file operations.
32
- const absoluteExtensionFilePath = ExtensionSrcResolver.resolvePath(extensionFilePath, ctx.project);
33
- const extensionFileName = path.basename(absoluteExtensionFilePath);
34
-
35
- // Export name can be customized or defaults to the file name without extension.
36
- const exportName = params.exportName ?? path.parse(extensionFileName).name;
37
-
38
- // Generate a constant hash-based component name to avoid using timestamps.
39
- const hash = crypto.createHash("sha256").update(extensionFilePath).digest("hex");
40
- const componentName = `AdminExtension_${hash.slice(-10)}`;
41
- const project = new Project();
42
- const importPath = path.relative(path.dirname(extensionsTsxFilePath), absoluteExtensionFilePath).replace(/\.tsx?$/, ".js");
43
- project.addSourceFileAtPath(extensionsTsxFilePath);
44
- const source = project.getSourceFileOrThrow(extensionsTsxFilePath);
45
- const existingImportDeclaration = source.getImportDeclaration(importPath);
46
- if (existingImportDeclaration) {
47
- return;
48
- }
49
-
50
- // Check if the extension file has a default export or named export
51
- const extensionProject = new Project();
52
- extensionProject.addSourceFileAtPath(absoluteExtensionFilePath);
53
- const extensionSource = extensionProject.getSourceFileOrThrow(absoluteExtensionFilePath);
54
- const hasDefaultExport = extensionSource.getDefaultExportSymbol() !== undefined;
55
- let index = 1;
56
- const importDeclarations = source.getImportDeclarations();
57
- if (importDeclarations.length) {
58
- const last = importDeclarations[importDeclarations.length - 1];
59
- index = last.getChildIndex() + 1;
60
- }
61
-
62
- // Import as default export if available, otherwise import named export
63
- if (hasDefaultExport) {
64
- source.insertImportDeclaration(index, {
65
- defaultImport: componentName,
66
- moduleSpecifier: importPath
67
- });
68
- } else {
69
- source.insertImportDeclaration(index, {
70
- namedImports: [{
71
- name: exportName,
72
- alias: componentName
73
- }],
74
- moduleSpecifier: importPath
75
- });
76
- }
77
- const extensionsIdentifier = source.getFirstDescendant(node => {
78
- if (!Node.isIdentifier(node)) {
79
- return false;
80
- }
81
- return node.getText() === "Extensions";
82
- });
83
- if (!extensionsIdentifier) {
84
- throw new Error(`Could not find the "Extensions" React component in "${extensionsTsxFilePath}". Did you maybe change the name of the component?`);
85
- }
86
- const extensionsArrowFn = extensionsIdentifier.getNextSibling(node => Node.isArrowFunction(node));
87
- if (!extensionsArrowFn) {
88
- throw new Error(`Could not find the "Extensions" React component in "${extensionsTsxFilePath}". Did you maybe change its definition? It should be an arrow function.`);
89
- }
90
- const extensionsArrowFnFragment = extensionsArrowFn.getFirstDescendant(node => {
91
- return Node.isJsxFragment(node);
92
- });
93
- const extensionsArrowFnFragmentChildrenText = extensionsArrowFnFragment.getFullText().replace("<>", "").replace("</>", "").trim();
94
- extensionsArrowFnFragment.replaceWithText(`<><${componentName}/>${extensionsArrowFnFragmentChildrenText}</>`);
95
- await source.save();
96
- }
97
- });
98
-
99
- //# sourceMappingURL=AdminExtension.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["defineExtension","zodSrcPath","ExtensionSrcResolver","z","path","Node","Project","crypto","AdminExtension","type","tags","runtimeContext","appName","description","multiple","paramsSchema","project","object","src","exportName","string","optional","build","params","ctx","extensionsTsxFilePath","paths","workspaceFolder","join","toString","extensionFilePath","absoluteExtensionFilePath","resolvePath","extensionFileName","basename","parse","name","hash","createHash","update","digest","componentName","slice","importPath","relative","dirname","replace","addSourceFileAtPath","source","getSourceFileOrThrow","existingImportDeclaration","getImportDeclaration","extensionProject","extensionSource","hasDefaultExport","getDefaultExportSymbol","undefined","index","importDeclarations","getImportDeclarations","length","last","getChildIndex","insertImportDeclaration","defaultImport","moduleSpecifier","namedImports","alias","extensionsIdentifier","getFirstDescendant","node","isIdentifier","getText","Error","extensionsArrowFn","getNextSibling","isArrowFunction","extensionsArrowFnFragment","isJsxFragment","extensionsArrowFnFragmentChildrenText","getFullText","trim","replaceWithText","save"],"sources":["AdminExtension.ts"],"sourcesContent":["import { defineExtension, zodSrcPath } from \"@webiny/project/extensions/index.js\";\nimport { ExtensionSrcResolver } from \"@webiny/project\";\nimport { z } from \"zod\";\nimport path from \"path\";\nimport { type JsxFragment, Node, Project } from \"ts-morph\";\nimport crypto from \"crypto\";\n\nexport const AdminExtension = defineExtension({\n type: \"Admin/Extension\",\n tags: { runtimeContext: \"app-build\", appName: \"admin\" },\n description: \"Extend the Admin application with custom functionality.\",\n multiple: true,\n paramsSchema: ({ project }) => {\n return z.object({\n src: zodSrcPath({ project }),\n exportName: z.string().optional()\n });\n },\n async build(params, ctx) {\n const extensionsTsxFilePath = ctx.project.paths.workspaceFolder\n .join(\"apps\", \"admin\", \"src\", \"Extensions.tsx\")\n .toString();\n\n const { src: extensionFilePath } = params;\n\n // Resolve to absolute path for file operations.\n const absoluteExtensionFilePath = ExtensionSrcResolver.resolvePath(\n extensionFilePath,\n ctx.project\n );\n\n const extensionFileName = path.basename(absoluteExtensionFilePath);\n\n // Export name can be customized or defaults to the file name without extension.\n const exportName = params.exportName ?? path.parse(extensionFileName).name;\n\n // Generate a constant hash-based component name to avoid using timestamps.\n const hash = crypto.createHash(\"sha256\").update(extensionFilePath).digest(\"hex\");\n const componentName = `AdminExtension_${hash.slice(-10)}`;\n\n const project = new Project();\n\n const importPath = path\n .relative(path.dirname(extensionsTsxFilePath), absoluteExtensionFilePath)\n .replace(/\\.tsx?$/, \".js\");\n\n project.addSourceFileAtPath(extensionsTsxFilePath);\n\n const source = project.getSourceFileOrThrow(extensionsTsxFilePath);\n\n const existingImportDeclaration = source.getImportDeclaration(importPath);\n if (existingImportDeclaration) {\n return;\n }\n\n // Check if the extension file has a default export or named export\n const extensionProject = new Project();\n extensionProject.addSourceFileAtPath(absoluteExtensionFilePath);\n const extensionSource = extensionProject.getSourceFileOrThrow(absoluteExtensionFilePath);\n const hasDefaultExport = extensionSource.getDefaultExportSymbol() !== undefined;\n\n let index = 1;\n\n const importDeclarations = source.getImportDeclarations();\n if (importDeclarations.length) {\n const last = importDeclarations[importDeclarations.length - 1];\n index = last.getChildIndex() + 1;\n }\n\n // Import as default export if available, otherwise import named export\n if (hasDefaultExport) {\n source.insertImportDeclaration(index, {\n defaultImport: componentName,\n moduleSpecifier: importPath\n });\n } else {\n source.insertImportDeclaration(index, {\n namedImports: [{ name: exportName, alias: componentName }],\n moduleSpecifier: importPath\n });\n }\n\n const extensionsIdentifier = source.getFirstDescendant(node => {\n if (!Node.isIdentifier(node)) {\n return false;\n }\n\n return node.getText() === \"Extensions\";\n });\n\n if (!extensionsIdentifier) {\n throw new Error(\n `Could not find the \"Extensions\" React component in \"${extensionsTsxFilePath}\". Did you maybe change the name of the component?`\n );\n }\n\n const extensionsArrowFn = extensionsIdentifier.getNextSibling(node =>\n Node.isArrowFunction(node)\n );\n if (!extensionsArrowFn) {\n throw new Error(\n `Could not find the \"Extensions\" React component in \"${extensionsTsxFilePath}\". Did you maybe change its definition? It should be an arrow function.`\n );\n }\n\n const extensionsArrowFnFragment = extensionsArrowFn.getFirstDescendant(node => {\n return Node.isJsxFragment(node);\n }) as JsxFragment;\n\n const extensionsArrowFnFragmentChildrenText = extensionsArrowFnFragment\n .getFullText()\n .replace(\"<>\", \"\")\n .replace(\"</>\", \"\")\n .trim();\n\n extensionsArrowFnFragment.replaceWithText(\n `<><${componentName}/>${extensionsArrowFnFragmentChildrenText}</>`\n );\n\n await source.save();\n }\n});\n"],"mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,QAAQ,qCAAqC;AACjF,SAASC,oBAAoB,QAAQ,iBAAiB;AACtD,SAASC,CAAC,QAAQ,KAAK;AACvB,OAAOC,IAAI,MAAM,MAAM;AACvB,SAA2BC,IAAI,EAAEC,OAAO,QAAQ,UAAU;AAC1D,OAAOC,MAAM,MAAM,QAAQ;AAE3B,OAAO,MAAMC,cAAc,GAAGR,eAAe,CAAC;EAC1CS,IAAI,EAAE,iBAAiB;EACvBC,IAAI,EAAE;IAAEC,cAAc,EAAE,WAAW;IAAEC,OAAO,EAAE;EAAQ,CAAC;EACvDC,WAAW,EAAE,yDAAyD;EACtEC,QAAQ,EAAE,IAAI;EACdC,YAAY,EAAEA,CAAC;IAAEC;EAAQ,CAAC,KAAK;IAC3B,OAAOb,CAAC,CAACc,MAAM,CAAC;MACZC,GAAG,EAAEjB,UAAU,CAAC;QAAEe;MAAQ,CAAC,CAAC;MAC5BG,UAAU,EAAEhB,CAAC,CAACiB,MAAM,CAAC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AE;MACvB,MAAM,IAAIK,KAAK,CACX,uDAAuDhD,qBAAqB,oDAChF,CAAC;IACL;IAEA,MAAMiD,iBAAiB,GAAGN,oBAAoB,CAACO,cAAc,CAACL,IAAI,IAC9DjE,IAAI,CAACuE,eAAe,CAACN,IAAI,CAC7B,CAAC;IACD,IAAI,CAACI,iBAAiB,EAAE;MACpB,MAAM,IAAID,KAAK,CACX,uDAAuDhD,qBAAqB,yEAChF,CAAC;IACL;IAEA,MAAMoD,yBAAyB,GAAGH,iBAAiB,CAACL,kBAAkB,CAACC,IAAI,IAAI;MAC3E,OAAOjE,IAAI,CAACyE,aAAa,CAACR,IAAI,CAAC;IACnC,CAAC,CAAgB;IAEjB,MAAMS,qCAAqC,GAAGF,yBAAyB,CAClEG,WAAW,CAAC,CAAC,CACblC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CACjBA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAClBmC,IAAI,CAAC,CAAC;IAEXJ,yBAAyB,CAACK,eAAe,CACrC,MAAMzC,aAAa,KAAKsC,qCAAqC,KACjE,CAAC;IAED,MAAM/B,MAAM,CAACmC,IAAI,CAAC,CAAC;EACvB;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,23 +0,0 @@
1
- import { AdminExtension } from "./AdminExtension.js";
2
- import { AdminBuildParam } from "./AdminBuildParam.js";
3
- export { AdminExtension };
4
- export { AdminBuildParam };
5
- export declare const definitions: (import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
6
- src: import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, string, string>;
7
- exportName: import("zod").ZodOptional<import("zod").ZodString>;
8
- }, "strip", import("zod").ZodTypeAny, {
9
- src: string;
10
- exportName?: string | undefined;
11
- }, {
12
- src: string;
13
- exportName?: string | undefined;
14
- }>> | import("@webiny/project/defineExtension/index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
15
- paramName: import("zod").ZodString;
16
- value: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>, import("zod").ZodArray<import("zod").ZodAny, "many">, import("zod").ZodNumber, import("zod").ZodBoolean]>;
17
- }, "strip", import("zod").ZodTypeAny, {
18
- value: string | number | boolean | any[] | Record<string, any>;
19
- paramName: string;
20
- }, {
21
- value: string | number | boolean | any[] | Record<string, any>;
22
- paramName: string;
23
- }>>)[];
@@ -1,7 +0,0 @@
1
- import { AdminExtension } from "./AdminExtension.js";
2
- import { AdminBuildParam } from "./AdminBuildParam.js";
3
- export { AdminExtension };
4
- export { AdminBuildParam };
5
- export const definitions = [AdminExtension.def, AdminBuildParam.def];
6
-
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["AdminExtension","AdminBuildParam","definitions","def"],"sources":["index.ts"],"sourcesContent":["import { AdminExtension } from \"./AdminExtension.js\";\nimport { AdminBuildParam } from \"./AdminBuildParam.js\";\n\nexport { AdminExtension };\nexport { AdminBuildParam };\n\nexport const definitions = [AdminExtension.def, AdminBuildParam.def];\n"],"mappings":"AAAA,SAASA,cAAc;AACvB,SAASC,eAAe;AAExB,SAASD,cAAc;AACvB,SAASC,eAAe;AAExB,OAAO,MAAMC,WAAW,GAAG,CAACF,cAAc,CAACG,GAAG,EAAEF,eAAe,CAACE,GAAG,CAAC","ignoreList":[]}