@webiny/app-admin 0.0.0-unstable.df7a8bb475 → 0.0.0-unstable.e2758ee1cf
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/Admin.js +3 -1
- package/base/Admin.js.map +1 -1
- package/base/Base/LexicalPreset.js +4 -5
- package/base/Base/LexicalPreset.js.map +1 -1
- package/base/Base/Menus.js +28 -18
- package/base/Base/Menus.js.map +1 -1
- package/base/Base.js +1 -2
- package/base/Base.js.map +1 -1
- package/components/DeveloperMode/DeveloperMode.d.ts +11 -0
- package/components/DeveloperMode/DeveloperMode.js +17 -0
- package/components/DeveloperMode/DeveloperMode.js.map +1 -0
- package/components/DeveloperMode/index.d.ts +2 -0
- package/components/DeveloperMode/index.js +3 -0
- package/components/DeveloperMode/index.js.map +1 -0
- package/components/LexicalEditor/LexicalLinkForm.d.ts +6 -0
- package/components/LexicalEditor/LexicalLinkForm.js +92 -0
- package/components/LexicalEditor/LexicalLinkForm.js.map +1 -0
- package/components/LexicalEditor/index.d.ts +1 -0
- package/components/LexicalEditor/index.js +1 -0
- package/components/LexicalEditor/index.js.map +1 -1
- package/components/Permissions/Permissions.d.ts +1 -3
- package/components/Permissions/Permissions.js +37 -31
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/SimpleForm/SimpleForm.d.ts +1 -1
- package/components/Wcp.d.ts +2 -0
- package/components/Wcp.js +8 -1
- package/components/Wcp.js.map +1 -1
- package/components/index.d.ts +4 -1
- package/components/index.js +3 -1
- package/components/index.js.map +1 -1
- package/config/AdminConfig/Security.d.ts +3 -0
- package/config/AdminConfig/Security.js +6 -0
- package/config/AdminConfig/Security.js.map +1 -0
- package/config/AdminConfig/SecurityPermissions.d.ts +17 -0
- package/config/AdminConfig/SecurityPermissions.js +31 -0
- package/config/AdminConfig/SecurityPermissions.js.map +1 -0
- package/config/AdminConfig.d.ts +8 -1
- package/config/AdminConfig.js +8 -3
- package/config/AdminConfig.js.map +1 -1
- package/domain/Identity.js +1 -1
- package/domain/Identity.js.map +1 -1
- package/exports/admin/{buildParams.js → build-params.js} +1 -1
- package/exports/admin/build-params.js.map +1 -0
- package/exports/admin/form.d.ts +11 -0
- package/exports/admin/form.js +12 -0
- package/exports/admin/form.js.map +1 -0
- package/exports/admin/ui.d.ts +1 -0
- package/exports/admin/ui.js +1 -0
- package/exports/admin/ui.js.map +1 -1
- package/exports/admin.d.ts +4 -0
- package/exports/admin.js +4 -0
- package/exports/admin.js.map +1 -1
- package/features/wcp/ReactLicense.d.ts +1 -0
- package/features/wcp/ReactLicense.js +3 -0
- package/features/wcp/ReactLicense.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +26 -29
- package/permissions/PermissionRenderer.d.ts +6 -0
- package/permissions/PermissionRenderer.js +219 -0
- package/permissions/PermissionRenderer.js.map +1 -0
- package/permissions/PermissionValueContext.d.ts +11 -0
- package/permissions/PermissionValueContext.js +23 -0
- package/permissions/PermissionValueContext.js.map +1 -0
- package/permissions/createHasPermission.d.ts +3 -0
- package/permissions/createHasPermission.js +36 -0
- package/permissions/createHasPermission.js.map +1 -0
- package/permissions/createPermissionSchema.d.ts +2 -0
- package/permissions/createPermissionSchema.js +8 -0
- package/permissions/createPermissionSchema.js.map +1 -0
- package/permissions/index.d.ts +8 -0
- package/permissions/index.js +8 -0
- package/permissions/index.js.map +1 -0
- package/permissions/types.d.ts +242 -0
- package/permissions/types.js +3 -0
- package/permissions/types.js.map +1 -0
- package/permissions/usePermissionForm.d.ts +17 -0
- package/permissions/usePermissionForm.js +256 -0
- package/permissions/usePermissionForm.js.map +1 -0
- package/permissions/usePermissions.d.ts +3 -0
- package/permissions/usePermissions.js +180 -0
- package/permissions/usePermissions.js.map +1 -0
- package/types.d.ts +0 -7
- package/types.js.map +1 -1
- package/base/Base/LexicalPreset/LinkEditForm.d.ts +0 -6
- package/base/Base/LexicalPreset/LinkEditForm.js +0 -63
- package/base/Base/LexicalPreset/LinkEditForm.js.map +0 -1
- package/exports/admin/buildParams.js.map +0 -1
- package/extensions/AdminBuildParam.d.ts +0 -11
- package/extensions/AdminBuildParam.js +0 -184
- package/extensions/AdminBuildParam.js.map +0 -1
- package/extensions/AdminExtension.d.ts +0 -11
- package/extensions/AdminExtension.js +0 -105
- package/extensions/AdminExtension.js.map +0 -1
- package/extensions/index.d.ts +0 -23
- package/extensions/index.js +0 -7
- package/extensions/index.js.map +0 -1
- package/plugins/PermissionRendererPlugin.d.ts +0 -22
- package/plugins/PermissionRendererPlugin.js +0 -19
- package/plugins/PermissionRendererPlugin.js.map +0 -1
- /package/exports/admin/{buildParams.d.ts → build-params.d.ts} +0 -0
package/base/Admin.js
CHANGED
|
@@ -14,6 +14,7 @@ import { createTenancyProvider } from "../presentation/tenancy/createTenancyProv
|
|
|
14
14
|
import { TelemetryAdminAppStart } from "./TelemetryAdminAppStart.js";
|
|
15
15
|
import { ApolloClientFeature } from "../features/apolloClient/feature.js";
|
|
16
16
|
import { SecurityFeature } from "../features/security/SecurityFeature.js";
|
|
17
|
+
import { AdminConfigPlugin, AdminConfigProvider } from "../config/AdminConfig.js";
|
|
17
18
|
const container = createRootContainer();
|
|
18
19
|
export const Admin = ({
|
|
19
20
|
children,
|
|
@@ -36,8 +37,9 @@ export const Admin = ({
|
|
|
36
37
|
return /*#__PURE__*/React.createElement(DiContainerProvider, {
|
|
37
38
|
container: container
|
|
38
39
|
}, /*#__PURE__*/React.createElement(TelemetryAdminAppStart, null), /*#__PURE__*/React.createElement(ApolloProvider, null, /*#__PURE__*/React.createElement(WcpProvider, null, /*#__PURE__*/React.createElement(App, {
|
|
40
|
+
plugins: [AdminConfigPlugin],
|
|
39
41
|
routes: [],
|
|
40
|
-
providers: [UIProviders, UiStateProvider, DialogsProvider, IconPickerConfigProvider, AdminUiStateProvider, TenancyProvider]
|
|
42
|
+
providers: [AdminConfigProvider, UIProviders, UiStateProvider, DialogsProvider, IconPickerConfigProvider, AdminUiStateProvider, TenancyProvider]
|
|
41
43
|
}, /*#__PURE__*/React.createElement(Base, null), /*#__PURE__*/React.createElement(DefaultIcons, null), children))));
|
|
42
44
|
};
|
|
43
45
|
|
package/base/Admin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","plugins","App","DiContainerProvider","createApolloProvider","Base","createUiStateProvider","createAdminUiStateProvider","createUiProviders","createDialogsProvider","DefaultIcons","IconPickerConfigProvider","createRootContainer","WcpProvider","createTenancyProvider","TelemetryAdminAppStart","ApolloClientFeature","SecurityFeature","container","Admin","children","createApolloClient","createLegacyPlugins","uri","process","env","REACT_APP_GRAPHQL_API_URL","apolloClient","register","ApolloProvider","UIProviders","UiStateProvider","AdminUiStateProvider","DialogsProvider","TenancyProvider","createElement","routes","providers"],"sources":["Admin.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Container } from \"@webiny/di\";\nimport { plugins } from \"@webiny/plugins\";\nimport { App, DiContainerProvider } from \"@webiny/app\";\nimport type { ApolloClientFactory } from \"./providers/ApolloProvider.js\";\nimport { createApolloProvider } from \"./providers/ApolloProvider.js\";\nimport { Base } from \"./Base.js\";\nimport { createUiStateProvider } from \"./providers/UiStateProvider.js\";\nimport { createAdminUiStateProvider } from \"./providers/AdminUiStateProvider.js\";\nimport { createUiProviders } from \"./providers/UiProviders.js\";\nimport { createDialogsProvider } from \"~/components/Dialogs/DialogsContext.js\";\nimport { DefaultIcons, IconPickerConfigProvider } from \"~/components/IconPicker/config/index.js\";\nimport { createRootContainer } from \"~/base/createRootContainer.js\";\nimport { WcpProvider } from \"~/presentation/wcp/WcpProvider.js\";\nimport { createTenancyProvider } from \"~/presentation/tenancy/createTenancyProvider.js\";\nimport { TelemetryAdminAppStart } from \"./TelemetryAdminAppStart.js\";\nimport { ApolloClientFeature } from \"~/features/apolloClient/feature.js\";\nimport { SecurityFeature } from \"~/features/security/SecurityFeature.js\";\nimport type { PluginCollection } from \"@webiny/plugins/types.js\";\n\nexport interface AdminProps {\n createApolloClient: ApolloClientFactory;\n createLegacyPlugins: (container: Container) => PluginCollection;\n children?: React.ReactNode;\n}\n\nconst container = createRootContainer();\n\nexport const Admin = ({ children, createApolloClient, createLegacyPlugins }: AdminProps) => {\n const uri = process.env.REACT_APP_GRAPHQL_API_URL as string;\n const apolloClient = createApolloClient({ uri });\n\n plugins.register(...createLegacyPlugins(container));\n\n ApolloClientFeature.register(container, apolloClient);\n SecurityFeature.register(container);\n\n const ApolloProvider = createApolloProvider(apolloClient);\n const UIProviders = createUiProviders();\n const UiStateProvider = createUiStateProvider();\n const AdminUiStateProvider = createAdminUiStateProvider();\n const DialogsProvider = createDialogsProvider();\n const TenancyProvider = createTenancyProvider();\n\n return (\n <DiContainerProvider container={container}>\n <TelemetryAdminAppStart />\n <ApolloProvider>\n <WcpProvider>\n <App\n routes={[]}\n providers={[\n UIProviders,\n UiStateProvider,\n DialogsProvider,\n IconPickerConfigProvider,\n AdminUiStateProvider,\n TenancyProvider\n ]}\n >\n <Base />\n <DefaultIcons />\n {children}\n </App>\n </WcpProvider>\n </ApolloProvider>\n </DiContainerProvider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,GAAG,EAAEC,mBAAmB,QAAQ,aAAa;AAEtD,SAASC,oBAAoB;AAC7B,SAASC,IAAI;AACb,SAASC,qBAAqB;AAC9B,SAASC,0BAA0B;AACnC,SAASC,iBAAiB;AAC1B,SAASC,qBAAqB;AAC9B,SAASC,YAAY,EAAEC,wBAAwB;AAC/C,SAASC,mBAAmB;AAC5B,SAASC,WAAW;AACpB,SAASC,qBAAqB;AAC9B,SAASC,sBAAsB;AAC/B,SAASC,mBAAmB;AAC5B,SAASC,eAAe;
|
|
1
|
+
{"version":3,"names":["React","plugins","App","DiContainerProvider","createApolloProvider","Base","createUiStateProvider","createAdminUiStateProvider","createUiProviders","createDialogsProvider","DefaultIcons","IconPickerConfigProvider","createRootContainer","WcpProvider","createTenancyProvider","TelemetryAdminAppStart","ApolloClientFeature","SecurityFeature","AdminConfigPlugin","AdminConfigProvider","container","Admin","children","createApolloClient","createLegacyPlugins","uri","process","env","REACT_APP_GRAPHQL_API_URL","apolloClient","register","ApolloProvider","UIProviders","UiStateProvider","AdminUiStateProvider","DialogsProvider","TenancyProvider","createElement","routes","providers"],"sources":["Admin.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Container } from \"@webiny/di\";\nimport { plugins } from \"@webiny/plugins\";\nimport { App, DiContainerProvider } from \"@webiny/app\";\nimport type { ApolloClientFactory } from \"./providers/ApolloProvider.js\";\nimport { createApolloProvider } from \"./providers/ApolloProvider.js\";\nimport { Base } from \"./Base.js\";\nimport { createUiStateProvider } from \"./providers/UiStateProvider.js\";\nimport { createAdminUiStateProvider } from \"./providers/AdminUiStateProvider.js\";\nimport { createUiProviders } from \"./providers/UiProviders.js\";\nimport { createDialogsProvider } from \"~/components/Dialogs/DialogsContext.js\";\nimport { DefaultIcons, IconPickerConfigProvider } from \"~/components/IconPicker/config/index.js\";\nimport { createRootContainer } from \"~/base/createRootContainer.js\";\nimport { WcpProvider } from \"~/presentation/wcp/WcpProvider.js\";\nimport { createTenancyProvider } from \"~/presentation/tenancy/createTenancyProvider.js\";\nimport { TelemetryAdminAppStart } from \"./TelemetryAdminAppStart.js\";\nimport { ApolloClientFeature } from \"~/features/apolloClient/feature.js\";\nimport { SecurityFeature } from \"~/features/security/SecurityFeature.js\";\nimport type { PluginCollection } from \"@webiny/plugins/types.js\";\nimport { AdminConfigPlugin, AdminConfigProvider } from \"~/config/AdminConfig.js\";\n\nexport interface AdminProps {\n createApolloClient: ApolloClientFactory;\n createLegacyPlugins: (container: Container) => PluginCollection;\n children?: React.ReactNode;\n}\n\nconst container = createRootContainer();\n\nexport const Admin = ({ children, createApolloClient, createLegacyPlugins }: AdminProps) => {\n const uri = process.env.REACT_APP_GRAPHQL_API_URL as string;\n const apolloClient = createApolloClient({ uri });\n\n plugins.register(...createLegacyPlugins(container));\n\n ApolloClientFeature.register(container, apolloClient);\n SecurityFeature.register(container);\n\n const ApolloProvider = createApolloProvider(apolloClient);\n const UIProviders = createUiProviders();\n const UiStateProvider = createUiStateProvider();\n const AdminUiStateProvider = createAdminUiStateProvider();\n const DialogsProvider = createDialogsProvider();\n const TenancyProvider = createTenancyProvider();\n\n return (\n <DiContainerProvider container={container}>\n <TelemetryAdminAppStart />\n <ApolloProvider>\n <WcpProvider>\n <App\n plugins={[AdminConfigPlugin]}\n routes={[]}\n providers={[\n AdminConfigProvider,\n UIProviders,\n UiStateProvider,\n DialogsProvider,\n IconPickerConfigProvider,\n AdminUiStateProvider,\n TenancyProvider\n ]}\n >\n <Base />\n <DefaultIcons />\n {children}\n </App>\n </WcpProvider>\n </ApolloProvider>\n </DiContainerProvider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,GAAG,EAAEC,mBAAmB,QAAQ,aAAa;AAEtD,SAASC,oBAAoB;AAC7B,SAASC,IAAI;AACb,SAASC,qBAAqB;AAC9B,SAASC,0BAA0B;AACnC,SAASC,iBAAiB;AAC1B,SAASC,qBAAqB;AAC9B,SAASC,YAAY,EAAEC,wBAAwB;AAC/C,SAASC,mBAAmB;AAC5B,SAASC,WAAW;AACpB,SAASC,qBAAqB;AAC9B,SAASC,sBAAsB;AAC/B,SAASC,mBAAmB;AAC5B,SAASC,eAAe;AAExB,SAASC,iBAAiB,EAAEC,mBAAmB;AAQ/C,MAAMC,SAAS,GAAGR,mBAAmB,CAAC,CAAC;AAEvC,OAAO,MAAMS,KAAK,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,kBAAkB;EAAEC;AAAgC,CAAC,KAAK;EACxF,MAAMC,GAAG,GAAGC,OAAO,CAACC,GAAG,CAACC,yBAAmC;EAC3D,MAAMC,YAAY,GAAGN,kBAAkB,CAAC;IAAEE;EAAI,CAAC,CAAC;EAEhDxB,OAAO,CAAC6B,QAAQ,CAAC,GAAGN,mBAAmB,CAACJ,SAAS,CAAC,CAAC;EAEnDJ,mBAAmB,CAACc,QAAQ,CAACV,SAAS,EAAES,YAAY,CAAC;EACrDZ,eAAe,CAACa,QAAQ,CAACV,SAAS,CAAC;EAEnC,MAAMW,cAAc,GAAG3B,oBAAoB,CAACyB,YAAY,CAAC;EACzD,MAAMG,WAAW,GAAGxB,iBAAiB,CAAC,CAAC;EACvC,MAAMyB,eAAe,GAAG3B,qBAAqB,CAAC,CAAC;EAC/C,MAAM4B,oBAAoB,GAAG3B,0BAA0B,CAAC,CAAC;EACzD,MAAM4B,eAAe,GAAG1B,qBAAqB,CAAC,CAAC;EAC/C,MAAM2B,eAAe,GAAGtB,qBAAqB,CAAC,CAAC;EAE/C,oBACId,KAAA,CAAAqC,aAAA,CAAClC,mBAAmB;IAACiB,SAAS,EAAEA;EAAU,gBACtCpB,KAAA,CAAAqC,aAAA,CAACtB,sBAAsB,MAAE,CAAC,eAC1Bf,KAAA,CAAAqC,aAAA,CAACN,cAAc,qBACX/B,KAAA,CAAAqC,aAAA,CAACxB,WAAW,qBACRb,KAAA,CAAAqC,aAAA,CAACnC,GAAG;IACAD,OAAO,EAAE,CAACiB,iBAAiB,CAAE;IAC7BoB,MAAM,EAAE,EAAG;IACXC,SAAS,EAAE,CACPpB,mBAAmB,EACnBa,WAAW,EACXC,eAAe,EACfE,eAAe,EACfxB,wBAAwB,EACxBuB,oBAAoB,EACpBE,eAAe;EACjB,gBAEFpC,KAAA,CAAAqC,aAAA,CAAChC,IAAI,MAAE,CAAC,eACRL,KAAA,CAAAqC,aAAA,CAAC3B,YAAY,MAAE,CAAC,EACfY,QACA,CACI,CACD,CACC,CAAC;AAE9B,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { AdminConfig } from "../../config/AdminConfig.js";
|
|
3
|
-
import { LexicalTheme } from "../../config/AdminConfig/LexicalTheme.js";
|
|
4
2
|
import { LexicalEditorConfig } from "@webiny/lexical-editor/components/LexicalEditorConfig/LexicalEditorConfig.js";
|
|
5
3
|
import { FloatingLinkEditorPlugin } from "@webiny/lexical-editor";
|
|
6
|
-
import {
|
|
4
|
+
import { AdminConfig } from "../../config/AdminConfig.js";
|
|
5
|
+
import { LexicalTheme } from "../../config/AdminConfig/LexicalTheme.js";
|
|
6
|
+
import { LexicalLinkForm } from "../../components/index.js";
|
|
7
7
|
const {
|
|
8
8
|
Color,
|
|
9
9
|
Typography
|
|
@@ -59,8 +59,7 @@ export const LexicalPreset = () => {
|
|
|
59
59
|
})), /*#__PURE__*/React.createElement(LexicalEditorConfig, null, /*#__PURE__*/React.createElement(LexicalEditorConfig.Plugin, {
|
|
60
60
|
name: "floatingLinkEditor",
|
|
61
61
|
element: /*#__PURE__*/React.createElement(FloatingLinkEditorPlugin, {
|
|
62
|
-
|
|
63
|
-
LinkEditForm: LinkEditForm
|
|
62
|
+
LinkForm: LexicalLinkForm
|
|
64
63
|
})
|
|
65
64
|
})));
|
|
66
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","LexicalEditorConfig","FloatingLinkEditorPlugin","AdminConfig","LexicalTheme","LexicalLinkForm","Color","Typography","LexicalPreset","createElement","Fragment","id","label","value","Heading","tag","className","Paragraph","Quote","List","Plugin","name","element","LinkForm"],"sources":["LexicalPreset.tsx"],"sourcesContent":["import React from \"react\";\nimport { LexicalEditorConfig } from \"@webiny/lexical-editor/components/LexicalEditorConfig/LexicalEditorConfig.js\";\nimport { FloatingLinkEditorPlugin } from \"@webiny/lexical-editor\";\nimport { AdminConfig } from \"../../config/AdminConfig.js\";\nimport { LexicalTheme } from \"~/config/AdminConfig/LexicalTheme.js\";\nimport { LexicalLinkForm } from \"~/components/index.js\";\n\nconst { Color, Typography } = LexicalTheme;\n\nexport const LexicalPreset = () => {\n return (\n <>\n <AdminConfig>\n {/* Colors */}\n <Color id={\"color1\"} label=\"Primary color\" value={\"var(--wa-theme-color1)\"} />\n <Color id={\"color2\"} label=\"Secondary color\" value={\"var(--wa-theme-color2)\"} />\n <Color id={\"color3\"} label=\"Regular color\" value={\"var(--wa-theme-color3)\"} />\n {/* Typography */}\n <Typography.Heading\n id={\"heading1\"}\n label={\"Heading 1\"}\n tag={\"h1\"}\n className={\"wa-heading-1\"}\n />\n <Typography.Heading\n id={\"heading2\"}\n label={\"Heading 2\"}\n tag={\"h2\"}\n className={\"wa-heading-2\"}\n />\n <Typography.Heading\n id={\"heading3\"}\n label={\"Heading 3\"}\n tag={\"h3\"}\n className={\"wa-heading-3\"}\n />\n\n <Typography.Paragraph\n id={\"paragraph1\"}\n label={\"Paragraph\"}\n tag={\"p\"}\n className={\"wa-paragraph-1\"}\n />\n\n <Typography.Quote\n id={\"quote\"}\n label={\"Quote\"}\n tag={\"blockquote\"}\n className={\"wa-blockquote-1\"}\n />\n <Typography.List\n id={\"list1\"}\n label={\"Unordered list\"}\n tag={\"ul\"}\n className={\"wa-unordered-list-1\"}\n />\n <Typography.List\n id={\"list2\"}\n label={\"Ordered list\"}\n tag={\"ol\"}\n className={\"wa-ordered-list-1\"}\n />\n </AdminConfig>\n <LexicalEditorConfig>\n <LexicalEditorConfig.Plugin\n name={\"floatingLinkEditor\"}\n element={<FloatingLinkEditorPlugin LinkForm={LexicalLinkForm} />}\n />\n </LexicalEditorConfig>\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB,QAAQ,8EAA8E;AAClH,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,WAAW;AACpB,SAASC,YAAY;AACrB,SAASC,eAAe;AAExB,MAAM;EAAEC,KAAK;EAAEC;AAAW,CAAC,GAAGH,YAAY;AAE1C,OAAO,MAAMI,aAAa,GAAGA,CAAA,KAAM;EAC/B,oBACIR,KAAA,CAAAS,aAAA,CAAAT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;EAAkB,CAChC,CAAC,eACFhB,KAAA,CAAAS,aAAA,CAACF,UAAU,CAACY,IAAI;IACZR,EAAE,EAAE,OAAQ;IACZC,KAAK,EAAE,gBAAiB;IACxBG,GAAG,EAAE,IAAK;IACVC,SAAS,EAAE;EAAsB,CACpC,CAAC,eACFhB,KAAA,CAAAS,aAAA,CAACF,UAAU,CAACY,IAAI;IACZR,EAAE,EAAE,OAAQ;IACZC,KAAK,EAAE,cAAe;IACtBG,GAAG,EAAE,IAAK;IACVC,SAAS,EAAE;EAAoB,CAClC,CACQ,CAAC,eACdhB,KAAA,CAAAS,aAAA,CAACR,mBAAmB,qBAChBD,KAAA,CAAAS,aAAA,CAACR,mBAAmB,CAACmB,MAAM;IACvBC,IAAI,EAAE,oBAAqB;IAC3BC,OAAO,eAAEtB,KAAA,CAAAS,aAAA,CAACP,wBAAwB;MAACqB,QAAQ,EAAElB;IAAgB,CAAE;EAAE,CACpE,CACgB,CACvB,CAAC;AAEX,CAAC","ignoreList":[]}
|
package/base/Base/Menus.js
CHANGED
|
@@ -7,14 +7,28 @@ import { ReactComponent as SlackIcon } from "@webiny/icons/numbers.svg";
|
|
|
7
7
|
import { ReactComponent as DocsIcon } from "@webiny/icons/summarize.svg";
|
|
8
8
|
import { ReactComponent as GithubIcon } from "@webiny/icons/route.svg";
|
|
9
9
|
import { ReactComponent as MoreIcon } from "@webiny/icons/more_vert.svg";
|
|
10
|
+
import { ReactComponent as UpgradeIcon } from "@webiny/icons/electric_bolt.svg";
|
|
10
11
|
import { DropdownMenu } from "@webiny/admin-ui";
|
|
11
|
-
import { WebinyVersion } from "./Menus/WebinyVersion.js";
|
|
12
12
|
import { SupportMenuItems } from "./Menus/SupportMenuItems.js";
|
|
13
13
|
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
|
+
import { useWcp } from "../../index.js";
|
|
16
17
|
export const Menus = /*#__PURE__*/React.memo(() => {
|
|
17
|
-
|
|
18
|
+
const wcp = useWcp();
|
|
19
|
+
const hasWcpLicense = Boolean(wcp.getProject());
|
|
20
|
+
return /*#__PURE__*/React.createElement(AdminConfig, null, /*#__PURE__*/React.createElement(Menu, {
|
|
21
|
+
name: "home",
|
|
22
|
+
pin: "start",
|
|
23
|
+
element: /*#__PURE__*/React.createElement(Menu.Link, {
|
|
24
|
+
to: "/",
|
|
25
|
+
text: "Home",
|
|
26
|
+
icon: /*#__PURE__*/React.createElement(Menu.Link.Icon, {
|
|
27
|
+
label: "Home",
|
|
28
|
+
element: /*#__PURE__*/React.createElement(DashboardIcon, null)
|
|
29
|
+
})
|
|
30
|
+
})
|
|
31
|
+
}), /*#__PURE__*/React.createElement(HasPermission, {
|
|
18
32
|
name: "fm.file"
|
|
19
33
|
}, /*#__PURE__*/React.createElement(Menu, {
|
|
20
34
|
name: "fileManager",
|
|
@@ -28,17 +42,6 @@ export const Menus = /*#__PURE__*/React.memo(() => {
|
|
|
28
42
|
to: "/file-manager"
|
|
29
43
|
})
|
|
30
44
|
})), /*#__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
45
|
name: "settings",
|
|
43
46
|
hideIfEmpty: true,
|
|
44
47
|
pin: "end",
|
|
@@ -85,12 +88,19 @@ export const Menus = /*#__PURE__*/React.memo(() => {
|
|
|
85
88
|
rel: "noopener noreferrer",
|
|
86
89
|
target: "_blank"
|
|
87
90
|
})
|
|
88
|
-
}), /*#__PURE__*/React.createElement(Menu.Support, {
|
|
89
|
-
name: "webiny
|
|
91
|
+
}), !hasWcpLicense && /*#__PURE__*/React.createElement(Menu.Support, {
|
|
92
|
+
name: "upgrade-webiny",
|
|
90
93
|
pin: "end",
|
|
91
|
-
element: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DropdownMenu.Separator, null), /*#__PURE__*/React.createElement(
|
|
92
|
-
text:
|
|
93
|
-
|
|
94
|
+
element: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DropdownMenu.Separator, null), /*#__PURE__*/React.createElement(Menu.Support.Link, {
|
|
95
|
+
text: "Upgrade",
|
|
96
|
+
icon: /*#__PURE__*/React.createElement(Menu.Support.Link.Icon, {
|
|
97
|
+
label: "Upgrade",
|
|
98
|
+
element: /*#__PURE__*/React.createElement(UpgradeIcon, null)
|
|
99
|
+
}),
|
|
100
|
+
to: "https://www.webiny.com/pricing",
|
|
101
|
+
rel: "noopener noreferrer",
|
|
102
|
+
target: "_blank",
|
|
103
|
+
className: "[&_a]:text-accent-primary! [&_svg]:fill-accent-default! font-semibold"
|
|
94
104
|
}))
|
|
95
105
|
}), /*#__PURE__*/React.createElement(Menu.Footer, {
|
|
96
106
|
name: "support",
|
package/base/Base/Menus.js.map
CHANGED
|
@@ -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,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;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AAA,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","UpgradeIcon","DropdownMenu","SupportMenuItems","AdminConfig","HasPermission","Menu","useWcp","Menus","memo","wcp","hasWcpLicense","Boolean","getProject","createElement","name","pin","element","Link","to","text","icon","Icon","label","Item","hideIfEmpty","Support","rel","target","Fragment","Separator","className","Footer","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 { ReactComponent as UpgradeIcon } from \"@webiny/icons/electric_bolt.svg\";\nimport { DropdownMenu } from \"@webiny/admin-ui\";\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\";\nimport { useWcp } from \"~/index.js\";\n\nexport const Menus = React.memo(() => {\n const wcp = useWcp();\n const hasWcpLicense = Boolean(wcp.getProject());\n\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 {!hasWcpLicense && (\n <Menu.Support\n name={\"upgrade-webiny\"}\n pin={\"end\"}\n element={\n <>\n <DropdownMenu.Separator />\n <Menu.Support.Link\n text={\"Upgrade\"}\n icon={\n <Menu.Support.Link.Icon\n label=\"Upgrade\"\n element={<UpgradeIcon />}\n />\n }\n to={\"https://www.webiny.com/pricing\"}\n rel={\"noopener noreferrer\"}\n target={\"_blank\"}\n className={\n \"[&_a]:text-accent-primary! [&_svg]:fill-accent-default! font-semibold\"\n }\n />\n </>\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,SAASR,cAAc,IAAIS,WAAW,QAAQ,iCAAiC;AAC/E,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,gBAAgB;AACzB,SAASC,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,IAAI;AACb,SAASC,MAAM;AAEf,OAAO,MAAMC,KAAK,gBAAGjB,KAAK,CAACkB,IAAI,CAAC,MAAM;EAClC,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EACpB,MAAMI,aAAa,GAAGC,OAAO,CAACF,GAAG,CAACG,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R,IAAI,CAACkB,IAAI;QACNJ,IAAI,EAAE,SAAU;QAChBC,IAAI,eAAE9B,KAAA,CAAAuB,aAAA,CAACR,IAAI,CAACkB,IAAI,CAACF,IAAI;UAACC,KAAK,EAAC,SAAS;UAACN,OAAO,eAAE1B,KAAA,CAAAuB,aAAA,CAAClB,QAAQ,MAAE;QAAE,CAAE,CAAE;QAChEsC,MAAM,eAAE3C,KAAA,CAAAuB,aAAA,CAACR,IAAI,CAACkB,IAAI,CAACW,MAAM;UAAClB,OAAO,eAAE1B,KAAA,CAAAuB,aAAA,CAACd,QAAQ,MAAE;QAAE,CAAE;MAAE,CACvD;IACJ,gBAEDT,KAAA,CAAAuB,aAAA,CAACX,gBAAgB,MAAE,CACT;EACjB,CACJ,CACQ,CAAC;AAEtB,CAAC,CAAC;AAEFK,KAAK,CAAC4B,WAAW,GAAG,OAAO","ignoreList":[]}
|
package/base/Base.js
CHANGED
|
@@ -2,11 +2,10 @@ import React, { memo } from "react";
|
|
|
2
2
|
import { Menus } from "./Base/Menus.js";
|
|
3
3
|
import { RoutesConfig } from "./Base/RoutesConfig.js";
|
|
4
4
|
import { Tenant } from "./Base/Tenant.js";
|
|
5
|
-
import { AdminConfigProvider } from "../config/AdminConfig.js";
|
|
6
5
|
import { UserMenu } from "./Base/UserMenu.js";
|
|
7
6
|
import { LexicalPreset } from "./Base/LexicalPreset.js";
|
|
8
7
|
const BaseExtension = () => {
|
|
9
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
8
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tenant, null), /*#__PURE__*/React.createElement(Menus, null), /*#__PURE__*/React.createElement(UserMenu, null), /*#__PURE__*/React.createElement(RoutesConfig, null), /*#__PURE__*/React.createElement(LexicalPreset, null));
|
|
10
9
|
};
|
|
11
10
|
export const Base = /*#__PURE__*/memo(BaseExtension);
|
|
12
11
|
|
package/base/Base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","Menus","RoutesConfig","Tenant","
|
|
1
|
+
{"version":3,"names":["React","memo","Menus","RoutesConfig","Tenant","UserMenu","LexicalPreset","BaseExtension","createElement","Fragment","Base"],"sources":["Base.tsx"],"sourcesContent":["import React, { memo } from \"react\";\nimport { Menus } from \"./Base/Menus.js\";\nimport { RoutesConfig } from \"./Base/RoutesConfig.js\";\nimport { Tenant } from \"./Base/Tenant.js\";\nimport { UserMenu } from \"./Base/UserMenu.js\";\nimport { LexicalPreset } from \"./Base/LexicalPreset.js\";\n\nconst BaseExtension = () => {\n return (\n <>\n <Tenant />\n <Menus />\n <UserMenu />\n <RoutesConfig />\n <LexicalPreset />\n </>\n );\n};\n\nexport const Base = memo(BaseExtension);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,KAAK;AACd,SAASC,YAAY;AACrB,SAASC,MAAM;AACf,SAASC,QAAQ;AACjB,SAASC,aAAa;AAEtB,MAAMC,aAAa,GAAGA,CAAA,KAAM;EACxB,oBACIP,KAAA,CAAAQ,aAAA,CAAAR,KAAA,CAAAS,QAAA,qBACIT,KAAA,CAAAQ,aAAA,CAACJ,MAAM,MAAE,CAAC,eACVJ,KAAA,CAAAQ,aAAA,CAACN,KAAK,MAAE,CAAC,eACTF,KAAA,CAAAQ,aAAA,CAACH,QAAQ,MAAE,CAAC,eACZL,KAAA,CAAAQ,aAAA,CAACL,YAAY,MAAE,CAAC,eAChBH,KAAA,CAAAQ,aAAA,CAACF,aAAa,MAAE,CAClB,CAAC;AAEX,CAAC;AAED,OAAO,MAAMI,IAAI,gBAAGT,IAAI,CAACM,aAAa,CAAC","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 @@
|
|
|
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":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { FloatingLinkEditorPlugin } from "@webiny/lexical-editor";
|
|
3
|
+
type LexicalLinkForm = NonNullable<React.ComponentProps<typeof FloatingLinkEditorPlugin>["LinkForm"]>;
|
|
4
|
+
type LinkFormProps = React.ComponentProps<LexicalLinkForm>;
|
|
5
|
+
export declare const LexicalLinkForm: ({ linkData, onSave, removeLink }: LinkFormProps) => React.JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from "react";
|
|
2
|
+
import { Button, Grid, Icon, IconButton, Input, Switch } from "@webiny/admin-ui";
|
|
3
|
+
import { Form, useBind } from "@webiny/form";
|
|
4
|
+
import { validation } from "@webiny/validation";
|
|
5
|
+
import { ReactComponent as GlobeIcon } from "@webiny/icons/language.svg";
|
|
6
|
+
import { ReactComponent as OpenInNew } from "@webiny/icons/open_in_new.svg";
|
|
7
|
+
import { ReactComponent as RemoveLink } from "@webiny/icons/link_off.svg";
|
|
8
|
+
export const LexicalLinkForm = ({
|
|
9
|
+
linkData,
|
|
10
|
+
onSave,
|
|
11
|
+
removeLink
|
|
12
|
+
}) => {
|
|
13
|
+
const onSubmit = data => {
|
|
14
|
+
onSave(data);
|
|
15
|
+
};
|
|
16
|
+
return /*#__PURE__*/React.createElement(Form, {
|
|
17
|
+
data: linkData,
|
|
18
|
+
onSubmit: onSubmit,
|
|
19
|
+
validateOnFirstSubmit: true,
|
|
20
|
+
submitOnEnter: true
|
|
21
|
+
}, form => /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: "p-md"
|
|
23
|
+
}, /*#__PURE__*/React.createElement(Grid, {
|
|
24
|
+
gap: "small"
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Grid.Column, {
|
|
26
|
+
span: 12
|
|
27
|
+
}, /*#__PURE__*/React.createElement(UrlInput, null))), /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: "flex w-full items-center justify-between mt-sm gap-sm"
|
|
29
|
+
}, /*#__PURE__*/React.createElement(TargetSwitch, null), /*#__PURE__*/React.createElement(Button, {
|
|
30
|
+
variant: "ghost",
|
|
31
|
+
text: `Remove link`,
|
|
32
|
+
className: "text-destructive-primary! [&_svg]:fill-destructive",
|
|
33
|
+
onClick: removeLink,
|
|
34
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
35
|
+
label: "Remove link",
|
|
36
|
+
icon: /*#__PURE__*/React.createElement(RemoveLink, null)
|
|
37
|
+
})
|
|
38
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
39
|
+
variant: "primary",
|
|
40
|
+
text: `Save`,
|
|
41
|
+
onClick: form.submit
|
|
42
|
+
}))));
|
|
43
|
+
};
|
|
44
|
+
const UrlInput = () => {
|
|
45
|
+
const inputRef = useRef(null);
|
|
46
|
+
const urlBind = useBind({
|
|
47
|
+
name: "url",
|
|
48
|
+
validators: validation.create("required,url:allowRelative,allowHref")
|
|
49
|
+
});
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (inputRef.current) {
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
inputRef.current?.focus();
|
|
54
|
+
}, 10);
|
|
55
|
+
}
|
|
56
|
+
}, []);
|
|
57
|
+
const openInNewTab = () => {
|
|
58
|
+
if (urlBind.validation.isValid !== false && urlBind.value) {
|
|
59
|
+
window.open(urlBind.value, "_blank");
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
return /*#__PURE__*/React.createElement(Input, Object.assign({}, urlBind, {
|
|
63
|
+
inputRef: ref => inputRef.current = ref,
|
|
64
|
+
variant: "secondary",
|
|
65
|
+
placeholder: "Enter link",
|
|
66
|
+
autoFocus: true,
|
|
67
|
+
startIcon: /*#__PURE__*/React.createElement(Icon, {
|
|
68
|
+
label: "globe",
|
|
69
|
+
icon: /*#__PURE__*/React.createElement(GlobeIcon, null)
|
|
70
|
+
}),
|
|
71
|
+
endIcon: /*#__PURE__*/React.createElement(IconButton, {
|
|
72
|
+
variant: "ghost",
|
|
73
|
+
icon: /*#__PURE__*/React.createElement(OpenInNew, null),
|
|
74
|
+
onClick: openInNewTab
|
|
75
|
+
})
|
|
76
|
+
}));
|
|
77
|
+
};
|
|
78
|
+
const TargetSwitch = () => {
|
|
79
|
+
const targetBind = useBind({
|
|
80
|
+
name: "target",
|
|
81
|
+
defaultValue: "_self"
|
|
82
|
+
});
|
|
83
|
+
return /*#__PURE__*/React.createElement(Switch, {
|
|
84
|
+
checked: targetBind.value === "_blank",
|
|
85
|
+
label: "Open in new tab",
|
|
86
|
+
onChange: value => {
|
|
87
|
+
targetBind.onChange(value === true ? "_blank" : "_self");
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=LexicalLinkForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","Button","Grid","Icon","IconButton","Input","Switch","Form","useBind","validation","ReactComponent","GlobeIcon","OpenInNew","RemoveLink","LexicalLinkForm","linkData","onSave","removeLink","onSubmit","data","createElement","validateOnFirstSubmit","submitOnEnter","form","className","gap","Column","span","UrlInput","TargetSwitch","variant","text","onClick","icon","label","submit","inputRef","urlBind","name","validators","create","current","setTimeout","focus","openInNewTab","isValid","value","window","open","Object","assign","ref","placeholder","autoFocus","startIcon","endIcon","targetBind","defaultValue","checked","onChange"],"sources":["LexicalLinkForm.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\";\nimport type { FloatingLinkEditorPlugin } from \"@webiny/lexical-editor\";\nimport { Button, Grid, Icon, IconButton, Input, Switch } from \"@webiny/admin-ui\";\nimport { Form, useBind } from \"@webiny/form\";\nimport { validation } from \"@webiny/validation\";\nimport { ReactComponent as GlobeIcon } from \"@webiny/icons/language.svg\";\nimport { ReactComponent as OpenInNew } from \"@webiny/icons/open_in_new.svg\";\nimport { ReactComponent as RemoveLink } from \"@webiny/icons/link_off.svg\";\n\ntype LexicalLinkForm = NonNullable<\n React.ComponentProps<typeof FloatingLinkEditorPlugin>[\"LinkForm\"]\n>;\ntype LinkFormProps = React.ComponentProps<LexicalLinkForm>;\n\nexport const LexicalLinkForm = ({ linkData, onSave, removeLink }: LinkFormProps) => {\n const onSubmit = (data: LinkFormProps[\"linkData\"]) => {\n onSave(data);\n };\n\n return (\n <Form data={linkData} onSubmit={onSubmit} validateOnFirstSubmit submitOnEnter>\n {form => (\n <div className={\"p-md\"}>\n <Grid gap={\"small\"}>\n <Grid.Column span={12}>\n <UrlInput />\n </Grid.Column>\n </Grid>\n <div className={\"flex w-full items-center justify-between mt-sm gap-sm\"}>\n <TargetSwitch />\n <Button\n variant={\"ghost\"}\n text={`Remove link`}\n className={\"text-destructive-primary! [&_svg]:fill-destructive\"}\n onClick={removeLink}\n icon={<Icon label={\"Remove link\"} icon={<RemoveLink />} />}\n />\n <Button variant={\"primary\"} text={`Save`} onClick={form.submit} />\n </div>\n </div>\n )}\n </Form>\n );\n};\n\nconst UrlInput = () => {\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const urlBind = useBind({\n name: \"url\",\n validators: validation.create(\"required,url:allowRelative,allowHref\")\n });\n\n useEffect(() => {\n if (inputRef.current) {\n setTimeout(() => {\n inputRef.current?.focus();\n }, 10);\n }\n }, []);\n\n const openInNewTab = () => {\n if (urlBind.validation.isValid !== false && urlBind.value) {\n window.open(urlBind.value, \"_blank\");\n }\n };\n\n return (\n <Input\n {...urlBind}\n inputRef={ref => (inputRef.current = ref)}\n variant={\"secondary\"}\n placeholder={\"Enter link\"}\n autoFocus={true}\n startIcon={<Icon label=\"globe\" icon={<GlobeIcon />} />}\n endIcon={<IconButton variant=\"ghost\" icon={<OpenInNew />} onClick={openInNewTab} />}\n />\n );\n};\n\nconst TargetSwitch = () => {\n const targetBind = useBind({\n name: \"target\",\n defaultValue: \"_self\"\n });\n\n return (\n <Switch\n checked={targetBind.value === \"_blank\"}\n label={\"Open in new tab\"}\n onChange={value => {\n targetBind.onChange(value === true ? \"_blank\" : \"_self\");\n }}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEhD,SAASC,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,QAAQ,kBAAkB;AAChF,SAASC,IAAI,EAAEC,OAAO,QAAQ,cAAc;AAC5C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,cAAc,IAAIC,SAAS,QAAQ,4BAA4B;AACxE,SAASD,cAAc,IAAIE,SAAS,QAAQ,+BAA+B;AAC3E,SAASF,cAAc,IAAIG,UAAU,QAAQ,4BAA4B;AAOzE,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,MAAM;EAAEC;AAA0B,CAAC,KAAK;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ACdmB,YAAY,EAAE;EAClB,CAAC,CAAC;EAEF,oBACI3D,KAAA,CAAAsB,aAAA,CAACd,MAAM;IACHoD,OAAO,EAAEF,UAAU,CAACV,KAAK,KAAK,QAAS;IACvCZ,KAAK,EAAE,iBAAkB;IACzByB,QAAQ,EAAEb,KAAK,IAAI;MACfU,UAAU,CAACG,QAAQ,CAACb,KAAK,KAAK,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC5D;EAAE,CACL,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LexicalEditor","lexicalValueWithHtml"],"sources":["index.ts"],"sourcesContent":["export { LexicalEditor } from \"./LexicalEditor.js\";\nexport { lexicalValueWithHtml, type RichTextValueWithHtml } from \"./lexicalValueWithHtml.js\";\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SAASC,oBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["LexicalEditor","LexicalLinkForm","lexicalValueWithHtml"],"sources":["index.ts"],"sourcesContent":["export { LexicalEditor } from \"./LexicalEditor.js\";\nexport { LexicalLinkForm } from \"./LexicalLinkForm.js\";\nexport { lexicalValueWithHtml, type RichTextValueWithHtml } from \"./lexicalValueWithHtml.js\";\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SAASC,eAAe;AACxB,SAASC,oBAAoB","ignoreList":[]}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { BindComponentRenderProp } from "@webiny/form";
|
|
3
|
-
import type { PermissionRendererPlugin } from "../../plugins/PermissionRendererPlugin.js";
|
|
4
3
|
interface PermissionsProps extends BindComponentRenderProp {
|
|
5
4
|
id: string;
|
|
6
|
-
plugins?: PermissionRendererPlugin[];
|
|
7
5
|
}
|
|
8
|
-
export declare const Permissions: ({ id, value, onChange
|
|
6
|
+
export declare const Permissions: ({ id, value, onChange }: PermissionsProps) => React.JSX.Element;
|
|
9
7
|
export {};
|
|
@@ -1,42 +1,48 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import { Accordion } from "@webiny/ui
|
|
3
|
-
import {
|
|
2
|
+
import { Accordion } from "@webiny/admin-ui";
|
|
3
|
+
import { useAdminConfig } from "../../config/AdminConfig.js";
|
|
4
|
+
import { PermissionValueProvider } from "../../permissions/PermissionValueContext.js";
|
|
5
|
+
import { PermissionRenderer } from "../../permissions/PermissionRenderer.js";
|
|
6
|
+
const byTitle = (a, b) => {
|
|
7
|
+
return a.title.localeCompare(b.title);
|
|
8
|
+
};
|
|
4
9
|
export const Permissions = ({
|
|
5
10
|
id,
|
|
6
11
|
value,
|
|
7
|
-
onChange
|
|
8
|
-
...props
|
|
12
|
+
onChange
|
|
9
13
|
}) => {
|
|
10
14
|
const {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
return plugins.byType("admin-app-permissions-renderer").reduce((acc, plugin) => {
|
|
21
|
-
if (plugin.system === true) {
|
|
22
|
-
acc.systemPlugins.push(plugin);
|
|
15
|
+
permissionRenderers
|
|
16
|
+
} = useAdminConfig();
|
|
17
|
+
const renderers = useMemo(() => {
|
|
18
|
+
const systemRenderers = [];
|
|
19
|
+
const appRenderers = [];
|
|
20
|
+
for (const renderer of permissionRenderers) {
|
|
21
|
+
if (renderer.system) {
|
|
22
|
+
systemRenderers.push(renderer);
|
|
23
23
|
} else {
|
|
24
|
-
|
|
24
|
+
appRenderers.push(renderer);
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
}
|
|
27
|
+
return [...systemRenderers.sort(byTitle), ...appRenderers.sort(byTitle)];
|
|
28
|
+
}, [permissionRenderers]);
|
|
29
|
+
return /*#__PURE__*/React.createElement(Accordion, null, /*#__PURE__*/React.createElement(PermissionValueProvider, {
|
|
30
|
+
value: value,
|
|
31
|
+
onChange: onChange
|
|
32
|
+
}, renderers.map(renderer => {
|
|
33
|
+
return /*#__PURE__*/React.createElement(Accordion.Item, {
|
|
34
|
+
key: renderer.name + "." + id,
|
|
35
|
+
title: renderer.title,
|
|
36
|
+
description: renderer.description,
|
|
37
|
+
icon: renderer.icon ? /*#__PURE__*/React.createElement(Accordion.Item.Icon, {
|
|
38
|
+
icon: renderer.icon,
|
|
39
|
+
label: renderer.title
|
|
40
|
+
}) : undefined,
|
|
41
|
+
"data-testid": `permission.${renderer.name}`
|
|
42
|
+
}, renderer.schema ? /*#__PURE__*/React.createElement(PermissionRenderer, {
|
|
43
|
+
schema: renderer.schema
|
|
44
|
+
}) : renderer.element);
|
|
45
|
+
})));
|
|
40
46
|
};
|
|
41
47
|
|
|
42
48
|
//# sourceMappingURL=Permissions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","Accordion","
|
|
1
|
+
{"version":3,"names":["React","useMemo","Accordion","useAdminConfig","PermissionValueProvider","PermissionRenderer","byTitle","a","b","title","localeCompare","Permissions","id","value","onChange","permissionRenderers","renderers","systemRenderers","appRenderers","renderer","system","push","sort","createElement","map","Item","key","name","description","icon","Icon","label","undefined","schema","element"],"sources":["Permissions.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { Accordion } from \"@webiny/admin-ui\";\nimport type { BindComponentRenderProp } from \"@webiny/form\";\nimport { useAdminConfig } from \"~/config/AdminConfig.js\";\nimport type { PermissionRendererConfig } from \"~/permissions/types.js\";\nimport { PermissionValueProvider } from \"~/permissions/PermissionValueContext.js\";\nimport { PermissionRenderer } from \"~/permissions/PermissionRenderer.js\";\n\nconst byTitle = (a: PermissionRendererConfig, b: PermissionRendererConfig) => {\n return a.title.localeCompare(b.title);\n};\n\ninterface PermissionsProps extends BindComponentRenderProp {\n id: string;\n}\n\nexport const Permissions = ({ id, value, onChange }: PermissionsProps) => {\n const { permissionRenderers } = useAdminConfig();\n\n const renderers = useMemo<PermissionRendererConfig[]>(() => {\n const systemRenderers: PermissionRendererConfig[] = [];\n const appRenderers: PermissionRendererConfig[] = [];\n\n for (const renderer of permissionRenderers) {\n if (renderer.system) {\n systemRenderers.push(renderer);\n } else {\n appRenderers.push(renderer);\n }\n }\n\n return [...systemRenderers.sort(byTitle), ...appRenderers.sort(byTitle)];\n }, [permissionRenderers]);\n\n return (\n <Accordion>\n <PermissionValueProvider value={value} onChange={onChange}>\n {renderers.map(renderer => {\n return (\n <Accordion.Item\n key={renderer.name + \".\" + id}\n title={renderer.title}\n description={renderer.description}\n icon={\n renderer.icon ? (\n <Accordion.Item.Icon\n icon={renderer.icon}\n label={renderer.title}\n />\n ) : undefined\n }\n data-testid={`permission.${renderer.name}`}\n >\n {renderer.schema ? (\n <PermissionRenderer schema={renderer.schema} />\n ) : (\n renderer.element\n )}\n </Accordion.Item>\n );\n })}\n </PermissionValueProvider>\n </Accordion>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,SAAS,QAAQ,kBAAkB;AAE5C,SAASC,cAAc;AAEvB,SAASC,uBAAuB;AAChC,SAASC,kBAAkB;AAE3B,MAAMC,OAAO,GAAGA,CAACC,CAA2B,EAAEC,CAA2B,KAAK;EAC1E,OAAOD,CAAC,CAACE,KAAK,CAACC,aAAa,CAACF,CAAC,CAACC,KAAK,CAAC;AACzC,CAAC;AAMD,OAAO,MAAME,WAAW,GAAGA,CAAC;EAAEC,EAAE;EAAEC,KAAK;EAAEC;AAA2B,CAAC,KAAK;EACtE,MAAM;IAAEC;EAAoB,CAAC,GAAGZ,cAAc,CAAC,CAAC;EAEhD,MAAMa,SAAS,GAAGf,OAAO,CAA6B,MAAM;IACxD,MAAMgB,eAA2C,GAA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C,CACoB,CAClB,CAAC;AAEpB,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "@webiny/admin-ui";
|
|
3
3
|
declare const simpleFormInnerVariants: (props?: ({
|
|
4
|
-
size?: "
|
|
4
|
+
size?: "full" | "md" | "lg" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
6
|
interface SimpleFormProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof simpleFormInnerVariants> {
|
|
7
7
|
children: React.ReactNode;
|
package/components/Wcp.d.ts
CHANGED
|
@@ -6,10 +6,12 @@ declare function CanUseTeams({ children }: ChildrenProps): React.JSX.Element | n
|
|
|
6
6
|
declare function CanUsePrivateFiles({ children }: ChildrenProps): React.JSX.Element | null;
|
|
7
7
|
declare function CanUseFileManagerThreatDetection({ children }: ChildrenProps): React.JSX.Element | null;
|
|
8
8
|
declare function CanUseWorkflows({ children }: ChildrenProps): React.JSX.Element | null;
|
|
9
|
+
declare function CanUseHcmsFieldPermissions({ children }: ChildrenProps): React.JSX.Element | null;
|
|
9
10
|
export declare const Wcp: {
|
|
10
11
|
CanUseTeams: typeof CanUseTeams;
|
|
11
12
|
CanUsePrivateFiles: typeof CanUsePrivateFiles;
|
|
12
13
|
CanUseFileManagerThreatDetection: typeof CanUseFileManagerThreatDetection;
|
|
13
14
|
CanUseWorkflows: typeof CanUseWorkflows;
|
|
15
|
+
CanUseHcmsFieldPermissions: typeof CanUseHcmsFieldPermissions;
|
|
14
16
|
};
|
|
15
17
|
export {};
|