@webiny/app-admin-ui 0.0.0-unstable.eb196ccd2f → 0.0.0-unstable.eb81deee7e
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/Breadcrumbs/Breadcrumbs.d.ts +14 -0
- package/Breadcrumbs/Breadcrumbs.js +74 -0
- package/Breadcrumbs/Breadcrumbs.js.map +1 -0
- package/CommandPalette/CommandPalette.d.ts +6 -0
- package/CommandPalette/CommandPalette.js +202 -0
- package/CommandPalette/CommandPalette.js.map +1 -0
- package/CommandPalette/components/AiModeBadge.d.ts +3 -0
- package/CommandPalette/components/AiModeBadge.js +11 -0
- package/CommandPalette/components/AiModeBadge.js.map +1 -0
- package/CommandPalette/components/AiSuggestions.d.ts +9 -0
- package/CommandPalette/components/AiSuggestions.js +32 -0
- package/CommandPalette/components/AiSuggestions.js.map +1 -0
- package/CommandPalette/components/AiTurn.d.ts +11 -0
- package/CommandPalette/components/AiTurn.js +61 -0
- package/CommandPalette/components/AiTurn.js.map +1 -0
- package/CommandPalette/components/AnswerSkeleton.d.ts +6 -0
- package/CommandPalette/components/AnswerSkeleton.js +20 -0
- package/CommandPalette/components/AnswerSkeleton.js.map +1 -0
- package/CommandPalette/components/ApprovalPlan.d.ts +16 -0
- package/CommandPalette/components/ApprovalPlan.js +56 -0
- package/CommandPalette/components/ApprovalPlan.js.map +1 -0
- package/CommandPalette/components/CommandDetail.d.ts +13 -0
- package/CommandPalette/components/CommandDetail.js +39 -0
- package/CommandPalette/components/CommandDetail.js.map +1 -0
- package/CommandPalette/components/CommandItemRow.d.ts +5 -0
- package/CommandPalette/components/CommandItemRow.js +41 -0
- package/CommandPalette/components/CommandItemRow.js.map +1 -0
- package/CommandPalette/components/GroupHeading.d.ts +4 -0
- package/CommandPalette/components/GroupHeading.js +10 -0
- package/CommandPalette/components/GroupHeading.js.map +1 -0
- package/CommandPalette/components/HintIcon.d.ts +4 -0
- package/CommandPalette/components/HintIcon.js +11 -0
- package/CommandPalette/components/HintIcon.js.map +1 -0
- package/CommandPalette/components/Kbd.d.ts +4 -0
- package/CommandPalette/components/Kbd.js +14 -0
- package/CommandPalette/components/Kbd.js.map +1 -0
- package/CommandPalette/components/NoResults.d.ts +13 -0
- package/CommandPalette/components/NoResults.js +33 -0
- package/CommandPalette/components/NoResults.js.map +1 -0
- package/CommandPalette/components/PaletteFooter.d.ts +13 -0
- package/CommandPalette/components/PaletteFooter.js +18 -0
- package/CommandPalette/components/PaletteFooter.js.map +1 -0
- package/CommandPalette/components/ToolChip.d.ts +7 -0
- package/CommandPalette/components/ToolChip.js +32 -0
- package/CommandPalette/components/ToolChip.js.map +1 -0
- package/CommandPalette/components/index.d.ts +13 -0
- package/CommandPalette/components/index.js +13 -0
- package/CommandPalette/constants.d.ts +8 -0
- package/CommandPalette/constants.js +5 -0
- package/CommandPalette/constants.js.map +1 -0
- package/CommandPalette/deriveRows.d.ts +19 -0
- package/CommandPalette/deriveRows.js +100 -0
- package/CommandPalette/deriveRows.js.map +1 -0
- package/CommandPalette/modes/PaletteMode.d.ts +73 -0
- package/CommandPalette/modes/PaletteMode.js +0 -0
- package/CommandPalette/modes/createAiMode.d.ts +13 -0
- package/CommandPalette/modes/createAiMode.js +80 -0
- package/CommandPalette/modes/createAiMode.js.map +1 -0
- package/CommandPalette/modes/index.d.ts +2 -0
- package/CommandPalette/modes/index.js +1 -0
- package/CommandPalette/types.d.ts +15 -0
- package/CommandPalette/types.js +0 -0
- package/CommandPalette/usePaletteHotkeys.d.ts +16 -0
- package/CommandPalette/usePaletteHotkeys.js +38 -0
- package/CommandPalette/usePaletteHotkeys.js.map +1 -0
- package/Dashboard/Welcome.d.ts +1 -1
- package/Dashboard/Welcome.js +29 -44
- package/Dashboard/Welcome.js.map +1 -1
- package/Dashboard/components/AssistanceWidget.js +52 -57
- package/Dashboard/components/AssistanceWidget.js.map +1 -1
- package/Dashboard/components/CommunityWidget.js +56 -63
- package/Dashboard/components/CommunityWidget.js.map +1 -1
- package/Dashboard/components/MissingPermissionsWidget.js +13 -14
- package/Dashboard/components/MissingPermissionsWidget.js.map +1 -1
- package/Dashboard/components/assets/github.js +14 -0
- package/Dashboard/components/assets/github.js.map +1 -0
- package/Dashboard/components/assets/slack.js +27 -0
- package/Dashboard/components/assets/slack.js.map +1 -0
- package/Dashboard/components/assets/x-twitter.js +18 -0
- package/Dashboard/components/assets/x-twitter.js.map +1 -0
- package/Dashboard/components/assets/youtube.js +28 -0
- package/Dashboard/components/assets/youtube.js.map +1 -0
- package/Dashboard/components/index.d.ts +3 -4
- package/Dashboard/components/index.js +3 -6
- package/Dashboard.js +7 -8
- package/Dashboard.js.map +1 -1
- package/Dialog/DialogContainer.js +55 -67
- package/Dialog/DialogContainer.js.map +1 -1
- package/Dialog/DialogProvider.js +6 -9
- package/Dialog/DialogProvider.js.map +1 -1
- package/Dialog.js +6 -10
- package/Dialog.js.map +1 -1
- package/Layout.js +50 -29
- package/Layout.js.map +1 -1
- package/Logo.js +12 -13
- package/Logo.js.map +1 -1
- package/Navigation/Navigation.js +31 -33
- package/Navigation/Navigation.js.map +1 -1
- package/Navigation/SidebarMenuItems.d.ts +1 -1
- package/Navigation/SidebarMenuItems.js +32 -40
- package/Navigation/SidebarMenuItems.js.map +1 -1
- package/NotFound/notFound.js +297 -0
- package/NotFound/notFound.js.map +1 -0
- package/NotFound.js +17 -18
- package/NotFound.js.map +1 -1
- package/README.md +9 -5
- package/UserMenu/UserMenu.js +17 -25
- package/UserMenu/UserMenu.js.map +1 -1
- package/UserMenu/UserMenuHandle.js +33 -42
- package/UserMenu/UserMenuHandle.js.map +1 -1
- package/UserMenu/UserMenuItem.js +9 -12
- package/UserMenu/UserMenuItem.js.map +1 -1
- package/UserMenu/UserMenuLink.js +9 -12
- package/UserMenu/UserMenuLink.js.map +1 -1
- package/UserMenu/UserMenuSeparator.js +9 -9
- package/UserMenu/UserMenuSeparator.js.map +1 -1
- package/UserMenu.js +8 -9
- package/UserMenu.js.map +1 -1
- package/index.js +22 -11
- package/index.js.map +1 -1
- package/package.json +21 -25
- package/static/svg/github.08a73b00.svg +1 -0
- package/static/svg/notFound.e8b15981.svg +1 -0
- package/static/svg/slack.1b2ba162.svg +8 -0
- package/static/svg/x-twitter.46e7218c.svg +5 -0
- package/static/svg/youtube.3c232651.svg +11 -0
- package/styles.scss +1 -1
- package/Dashboard/components/ApplicationWidget.d.ts +0 -9
- package/Dashboard/components/ApplicationWidget.js +0 -31
- package/Dashboard/components/ApplicationWidget.js.map +0 -1
- package/Dashboard/components/index.js.map +0 -1
- package/Navigation/SidebarProvider.d.ts +0 -6
- package/Navigation/SidebarProvider.js +0 -9
- package/Navigation/SidebarProvider.js.map +0 -1
- package/Navigation.d.ts +0 -2
- package/Navigation.js +0 -11
- package/Navigation.js.map +0 -1
|
@@ -1,65 +1,58 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { ReactComponent as
|
|
6
|
-
import { ReactComponent as
|
|
7
|
-
import { ReactComponent as
|
|
8
|
-
import { ReactComponent as
|
|
9
|
-
const SocialLink = ({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
icon: /*#__PURE__*/React.createElement(YouTubeIcon, null)
|
|
58
|
-
}), /*#__PURE__*/React.createElement(SocialLink, {
|
|
59
|
-
link: "https://x.com/WebinyCMS",
|
|
60
|
-
label: "X.com",
|
|
61
|
-
icon: /*#__PURE__*/React.createElement(TwitterIcon, null)
|
|
62
|
-
})));
|
|
63
|
-
};
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { Icon, Text, Widget } from "@webiny/admin-ui";
|
|
3
|
+
import { SimpleLink } from "@webiny/app-admin";
|
|
4
|
+
import { ReactComponent } from "./assets/youtube.js";
|
|
5
|
+
import { ReactComponent as github_js_ReactComponent } from "./assets/github.js";
|
|
6
|
+
import { ReactComponent as slack_js_ReactComponent } from "./assets/slack.js";
|
|
7
|
+
import { ReactComponent as x_twitter_js_ReactComponent } from "./assets/x-twitter.js";
|
|
8
|
+
import { ReactComponent as people_alt_svg_ReactComponent } from "@webiny/icons/people_alt.svg";
|
|
9
|
+
const SocialLink = ({ link, label, icon })=>/*#__PURE__*/ react.createElement("div", {
|
|
10
|
+
className: "w-3xl bg-neutral-base rounded-md hover:opacity-80 transition-opacity"
|
|
11
|
+
}, /*#__PURE__*/ react.createElement(SimpleLink, {
|
|
12
|
+
to: link,
|
|
13
|
+
className: "no-underline!",
|
|
14
|
+
target: "_blank",
|
|
15
|
+
rel: "noopener noreferrer"
|
|
16
|
+
}, /*#__PURE__*/ react.createElement("div", {
|
|
17
|
+
className: "px-xs pt-sm-extra pb-sm text-center"
|
|
18
|
+
}, /*#__PURE__*/ react.createElement(Icon, {
|
|
19
|
+
label: `${label} icon`,
|
|
20
|
+
icon: icon,
|
|
21
|
+
size: "lg",
|
|
22
|
+
color: "inherit",
|
|
23
|
+
className: "mx-auto mb-sm"
|
|
24
|
+
}), /*#__PURE__*/ react.createElement(Text, {
|
|
25
|
+
size: "sm",
|
|
26
|
+
className: "text-neutral-strong"
|
|
27
|
+
}, label))));
|
|
28
|
+
const CommunityWidget = ()=>/*#__PURE__*/ react.createElement(Widget, {
|
|
29
|
+
icon: /*#__PURE__*/ react.createElement(Widget.Icon, {
|
|
30
|
+
icon: /*#__PURE__*/ react.createElement(people_alt_svg_ReactComponent, null),
|
|
31
|
+
label: "Join our community"
|
|
32
|
+
}),
|
|
33
|
+
variant: "light",
|
|
34
|
+
title: "Join our community",
|
|
35
|
+
description: "Get to know Webiny team members, discuss new ideas and get help:",
|
|
36
|
+
padding: "md"
|
|
37
|
+
}, /*#__PURE__*/ react.createElement("div", {
|
|
38
|
+
className: "flex justify-start items-stretch gap-md"
|
|
39
|
+
}, /*#__PURE__*/ react.createElement(SocialLink, {
|
|
40
|
+
link: "https://github.com/webiny/webiny-js",
|
|
41
|
+
label: "GitHub",
|
|
42
|
+
icon: /*#__PURE__*/ react.createElement(github_js_ReactComponent, null)
|
|
43
|
+
}), /*#__PURE__*/ react.createElement(SocialLink, {
|
|
44
|
+
link: "https://www.webiny.com/slack",
|
|
45
|
+
label: "Slack",
|
|
46
|
+
icon: /*#__PURE__*/ react.createElement(slack_js_ReactComponent, null)
|
|
47
|
+
}), /*#__PURE__*/ react.createElement(SocialLink, {
|
|
48
|
+
link: "https://youtube.com/webiny",
|
|
49
|
+
label: "YouTube",
|
|
50
|
+
icon: /*#__PURE__*/ react.createElement(ReactComponent, null)
|
|
51
|
+
}), /*#__PURE__*/ react.createElement(SocialLink, {
|
|
52
|
+
link: "https://x.com/WebinyCMS",
|
|
53
|
+
label: "X.com",
|
|
54
|
+
icon: /*#__PURE__*/ react.createElement(x_twitter_js_ReactComponent, null)
|
|
55
|
+
})));
|
|
56
|
+
export { CommunityWidget };
|
|
64
57
|
|
|
65
58
|
//# sourceMappingURL=CommunityWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Dashboard/components/CommunityWidget.js","sources":["../../../src/Dashboard/components/CommunityWidget.tsx"],"sourcesContent":["import React from \"react\";\nimport { Widget, Icon, Text } from \"@webiny/admin-ui\";\nimport { SimpleLink } from \"@webiny/app-admin\";\n// Icons\nimport { ReactComponent as YouTubeIcon } from \"./assets/youtube.svg\";\nimport { ReactComponent as GithubIcon } from \"./assets/github.svg\";\nimport { ReactComponent as SlackIcon } from \"./assets/slack.svg\";\nimport { ReactComponent as TwitterIcon } from \"./assets/x-twitter.svg\";\nimport { ReactComponent as PeopleAltIcon } from \"@webiny/icons/people_alt.svg\";\n\ninterface SocialLinkProps {\n link: string;\n label: string;\n icon: React.ReactElement;\n}\n\nconst SocialLink = ({ link, label, icon }: SocialLinkProps) => {\n return (\n <div className={\"w-3xl bg-neutral-base rounded-md hover:opacity-80 transition-opacity\"}>\n <SimpleLink\n to={link}\n className={\"no-underline!\"}\n target={\"_blank\"}\n rel={\"noopener noreferrer\"}\n >\n <div className={\"px-xs pt-sm-extra pb-sm text-center\"}>\n <Icon\n label={`${label} icon`}\n icon={icon}\n size={\"lg\"}\n color={\"inherit\"}\n className={\"mx-auto mb-sm\"}\n />\n <Text size={\"sm\"} className={\"text-neutral-strong\"}>\n {label}\n </Text>\n </div>\n </SimpleLink>\n </div>\n );\n};\n\nexport const CommunityWidget = () => {\n return (\n <Widget\n icon={<Widget.Icon icon={<PeopleAltIcon />} label={\"Join our community\"} />}\n variant=\"light\"\n title=\"Join our community\"\n description=\"Get to know Webiny team members, discuss new ideas and get help:\"\n padding=\"md\"\n >\n <div className={\"flex justify-start items-stretch gap-md\"}>\n <SocialLink\n link={\"https://github.com/webiny/webiny-js\"}\n label={\"GitHub\"}\n icon={<GithubIcon />}\n />\n <SocialLink\n link={\"https://www.webiny.com/slack\"}\n label={\"Slack\"}\n icon={<SlackIcon />}\n />\n <SocialLink\n link={\"https://youtube.com/webiny\"}\n label={\"YouTube\"}\n icon={<YouTubeIcon />}\n />\n <SocialLink\n link={\"https://x.com/WebinyCMS\"}\n label={\"X.com\"}\n icon={<TwitterIcon />}\n />\n </div>\n </Widget>\n );\n};\n"],"names":["SocialLink","link","label","icon","SimpleLink","Icon","Text","CommunityWidget","Widget","PeopleAltIcon","GithubIcon","SlackIcon","YouTubeIcon","TwitterIcon"],"mappings":";;;;;;;;AAgBA,MAAMA,aAAa,CAAC,EAAEC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAmB,GAC/C,WAAP,GACI,oBAAC;QAAI,WAAW;qBACZ,oBAACC,YAAUA;QACP,IAAIH;QACJ,WAAW;QACX,QAAQ;QACR,KAAK;qBAEL,oBAAC;QAAI,WAAW;qBACZ,oBAACI,MAAIA;QACD,OAAO,GAAGH,MAAM,KAAK,CAAC;QACtB,MAAMC;QACN,MAAM;QACN,OAAO;QACP,WAAW;sBAEf,oBAACG,MAAIA;QAAC,MAAM;QAAM,WAAW;OACxBJ;AAQlB,MAAMK,kBAAkB,IACpB,WAAP,GACI,oBAACC,QAAMA;QACH,oBAAM,oBAACA,OAAO,IAAI;YAAC,oBAAM,oBAACC,+BAAaA;YAAK,OAAO;;QACnD,SAAQ;QACR,OAAM;QACN,aAAY;QACZ,SAAQ;qBAER,oBAAC;QAAI,WAAW;qBACZ,oBAACT,YAAUA;QACP,MAAM;QACN,OAAO;QACP,oBAAM,oBAACU,0BAAUA;sBAErB,oBAACV,YAAUA;QACP,MAAM;QACN,OAAO;QACP,oBAAM,oBAACW,yBAASA;sBAEpB,oBAACX,YAAUA;QACP,MAAM;QACN,OAAO;QACP,oBAAM,oBAACY,gBAAWA;sBAEtB,oBAACZ,YAAUA;QACP,MAAM;QACN,OAAO;QACP,oBAAM,oBAACa,6BAAWA"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactComponent
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { ReactComponent } from "@webiny/icons/visibility_off.svg";
|
|
3
3
|
import { Heading, Icon, Text } from "@webiny/admin-ui";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
4
|
+
const MissingPermissionsWidget = ()=>/*#__PURE__*/ react.createElement("div", {
|
|
5
|
+
className: "w-full h-full flex flex-col items-center justify-center text-center bg-neutral-light rounded-xl px-xxl py-lg gap-sm"
|
|
6
|
+
}, /*#__PURE__*/ react.createElement("div", null, /*#__PURE__*/ react.createElement(Icon, {
|
|
7
|
+
icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
|
|
8
|
+
label: "Access permission required",
|
|
9
|
+
color: "accent",
|
|
10
|
+
size: "lg"
|
|
11
|
+
})), /*#__PURE__*/ react.createElement(Heading, {
|
|
12
|
+
level: 4
|
|
13
|
+
}, "Access permission required"), /*#__PURE__*/ react.createElement(Text, null, "It seems you do not have access to Webiny apps. Please contact the administrator to set up your Webiny account."));
|
|
14
|
+
export { MissingPermissionsWidget };
|
|
16
15
|
|
|
17
16
|
//# sourceMappingURL=MissingPermissionsWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Dashboard/components/MissingPermissionsWidget.js","sources":["../../../src/Dashboard/components/MissingPermissionsWidget.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as VisibilityOff } from \"@webiny/icons/visibility_off.svg\";\nimport { Heading, Icon, Text } from \"@webiny/admin-ui\";\n\nexport const MissingPermissionsWidget = () => {\n return (\n <div className=\"w-full h-full flex flex-col items-center justify-center text-center bg-neutral-light rounded-xl px-xxl py-lg gap-sm\">\n <div>\n <Icon\n icon={<VisibilityOff />}\n label={\"Access permission required\"}\n color={\"accent\"}\n size={\"lg\"}\n />\n </div>\n <Heading level={4}>{\"Access permission required\"}</Heading>\n <Text>\n {\n \"It seems you do not have access to Webiny apps. Please contact the administrator to set up your Webiny account.\"\n }\n </Text>\n </div>\n );\n};\n"],"names":["MissingPermissionsWidget","Icon","VisibilityOff","Heading","Text"],"mappings":";;;AAIO,MAAMA,2BAA2B,IAC7B,WAAP,GACI,oBAAC;QAAI,WAAU;qBACX,oBAAC,2BACG,oBAACC,MAAIA;QACD,oBAAM,oBAACC,gBAAaA;QACpB,OAAO;QACP,OAAO;QACP,MAAM;uBAGd,oBAACC,SAAOA;QAAC,OAAO;OAAI,6CACpB,oBAACC,MAAIA,MAEG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import __rslib_svgr_url__0__ from "../../../static/svg/github.08a73b00.svg";
|
|
2
|
+
import * as __rspack_external_react from "react";
|
|
3
|
+
const SvgGithub = (props)=>/*#__PURE__*/ __rspack_external_react.createElement("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
viewBox: "0 0 496 512",
|
|
6
|
+
...props
|
|
7
|
+
}, /*#__PURE__*/ __rspack_external_react.createElement("path", {
|
|
8
|
+
d: "M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8M97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"
|
|
9
|
+
}));
|
|
10
|
+
const github = __rslib_svgr_url__0__;
|
|
11
|
+
export default github;
|
|
12
|
+
export { SvgGithub as ReactComponent };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=github.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dashboard/components/assets/github.js","sources":["../../../../src/Dashboard/components/assets/github.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgGithub = props => <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 496 512\" {...props}><path d=\"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8M97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2\" /></svg>;\nexport { SvgGithub as ReactComponent };\nexport default \"__RSLIB_SVGR_AUTO_PUBLIC_PATH__static/svg/github.08a73b00.svg\";"],"names":["SvgGithub","props"],"mappings":";;AACA,MAAMA,YAAYC,CAAAA,QAAAA,WAAAA,GAAS,sCAAC;QAAI,OAAM;QAA6B,SAAQ;QAAe,GAAGA,KAAK;qBAAE,sCAAC;QAAK,GAAE;;AAE5G"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import __rslib_svgr_url__0__ from "../../../static/svg/slack.1b2ba162.svg";
|
|
2
|
+
import * as __rspack_external_react from "react";
|
|
3
|
+
const SvgSlack = (props)=>/*#__PURE__*/ __rspack_external_react.createElement("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: 20,
|
|
6
|
+
height: 20,
|
|
7
|
+
fill: "none",
|
|
8
|
+
viewBox: "0 0 20 20",
|
|
9
|
+
...props
|
|
10
|
+
}, /*#__PURE__*/ __rspack_external_react.createElement("path", {
|
|
11
|
+
fill: "#2EB67D",
|
|
12
|
+
d: "M17.875 9.25A1.875 1.875 0 1 0 16 7.375V9.25zm-5.25 0c1.036 0 1.875-.84 1.875-1.875v-5.25a1.875 1.875 0 0 0-3.75 0v5.25c0 1.035.84 1.875 1.875 1.875"
|
|
13
|
+
}), /*#__PURE__*/ __rspack_external_react.createElement("path", {
|
|
14
|
+
fill: "#E01E5A",
|
|
15
|
+
d: "M2.125 10.75A1.875 1.875 0 1 0 4 12.625V10.75zm5.25 0c-1.036 0-1.875.84-1.875 1.875v5.25a1.875 1.875 0 1 0 3.75 0v-5.25c0-1.035-.84-1.875-1.875-1.875"
|
|
16
|
+
}), /*#__PURE__*/ __rspack_external_react.createElement("path", {
|
|
17
|
+
fill: "#ECB22E",
|
|
18
|
+
d: "M10.75 17.875A1.875 1.875 0 1 0 12.625 16H10.75zm0-5.25c0 1.036.84 1.875 1.875 1.875h5.25a1.875 1.875 0 1 0 0-3.75h-5.25c-1.035 0-1.875.84-1.875 1.875"
|
|
19
|
+
}), /*#__PURE__*/ __rspack_external_react.createElement("path", {
|
|
20
|
+
fill: "#36C5F0",
|
|
21
|
+
d: "M9.25 2.125A1.875 1.875 0 1 0 7.375 4H9.25zm0 5.25c0-1.036-.84-1.875-1.875-1.875h-5.25a1.875 1.875 0 1 0 0 3.75h5.25c1.035 0 1.875-.84 1.875-1.875"
|
|
22
|
+
}));
|
|
23
|
+
const slack = __rslib_svgr_url__0__;
|
|
24
|
+
export default slack;
|
|
25
|
+
export { SvgSlack as ReactComponent };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=slack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dashboard/components/assets/slack.js","sources":["../../../../src/Dashboard/components/assets/slack.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgSlack = props => <svg xmlns=\"http://www.w3.org/2000/svg\" width={20} height={20} fill=\"none\" viewBox=\"0 0 20 20\" {...props}><path fill=\"#2EB67D\" d=\"M17.875 9.25A1.875 1.875 0 1 0 16 7.375V9.25zm-5.25 0c1.036 0 1.875-.84 1.875-1.875v-5.25a1.875 1.875 0 0 0-3.75 0v5.25c0 1.035.84 1.875 1.875 1.875\" /><path fill=\"#E01E5A\" d=\"M2.125 10.75A1.875 1.875 0 1 0 4 12.625V10.75zm5.25 0c-1.036 0-1.875.84-1.875 1.875v5.25a1.875 1.875 0 1 0 3.75 0v-5.25c0-1.035-.84-1.875-1.875-1.875\" /><path fill=\"#ECB22E\" d=\"M10.75 17.875A1.875 1.875 0 1 0 12.625 16H10.75zm0-5.25c0 1.036.84 1.875 1.875 1.875h5.25a1.875 1.875 0 1 0 0-3.75h-5.25c-1.035 0-1.875.84-1.875 1.875\" /><path fill=\"#36C5F0\" d=\"M9.25 2.125A1.875 1.875 0 1 0 7.375 4H9.25zm0 5.25c0-1.036-.84-1.875-1.875-1.875h-5.25a1.875 1.875 0 1 0 0 3.75h5.25c1.035 0 1.875-.84 1.875-1.875\" /></svg>;\nexport { SvgSlack as ReactComponent };\nexport default \"__RSLIB_SVGR_AUTO_PUBLIC_PATH__static/svg/slack.1b2ba162.svg\";"],"names":["SvgSlack","props"],"mappings":";;AACA,MAAMA,WAAWC,CAAAA,QAAAA,WAAAA,GAAS,sCAAC;QAAI,OAAM;QAA6B,OAAO;QAAI,QAAQ;QAAI,MAAK;QAAO,SAAQ;QAAa,GAAGA,KAAK;qBAAE,sCAAC;QAAK,MAAK;QAAU,GAAE;sBAAyJ,sCAAC;QAAK,MAAK;QAAU,GAAE;sBAA0J,sCAAC;QAAK,MAAK;QAAU,GAAE;sBAA2J,sCAAC;QAAK,MAAK;QAAU,GAAE;;AAE9qB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import __rslib_svgr_url__0__ from "../../../static/svg/x-twitter.46e7218c.svg";
|
|
2
|
+
import * as __rspack_external_react from "react";
|
|
3
|
+
const SvgXTwitter = (props)=>/*#__PURE__*/ __rspack_external_react.createElement("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: 24,
|
|
6
|
+
height: 24,
|
|
7
|
+
fill: "none",
|
|
8
|
+
viewBox: "0 0 24 24",
|
|
9
|
+
...props
|
|
10
|
+
}, /*#__PURE__*/ __rspack_external_react.createElement("path", {
|
|
11
|
+
fill: "#000",
|
|
12
|
+
d: "M18.326 1.904H21.7l-7.37 8.423L23 21.79h-6.789l-5.317-6.952L4.81 21.79H1.434l7.883-9.01L1 1.904h6.961l4.806 6.354zM17.142 19.77h1.87L6.945 3.817H4.94z"
|
|
13
|
+
}));
|
|
14
|
+
const x_twitter = __rslib_svgr_url__0__;
|
|
15
|
+
export default x_twitter;
|
|
16
|
+
export { SvgXTwitter as ReactComponent };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=x-twitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dashboard/components/assets/x-twitter.js","sources":["../../../../src/Dashboard/components/assets/x-twitter.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgXTwitter = props => <svg xmlns=\"http://www.w3.org/2000/svg\" width={24} height={24} fill=\"none\" viewBox=\"0 0 24 24\" {...props}><path fill=\"#000\" d=\"M18.326 1.904H21.7l-7.37 8.423L23 21.79h-6.789l-5.317-6.952L4.81 21.79H1.434l7.883-9.01L1 1.904h6.961l4.806 6.354zM17.142 19.77h1.87L6.945 3.817H4.94z\" /></svg>;\nexport { SvgXTwitter as ReactComponent };\nexport default \"__RSLIB_SVGR_AUTO_PUBLIC_PATH__static/svg/x-twitter.46e7218c.svg\";"],"names":["SvgXTwitter","props"],"mappings":";;AACA,MAAMA,cAAcC,CAAAA,QAAAA,WAAAA,GAAS,sCAAC;QAAI,OAAM;QAA6B,OAAO;QAAI,QAAQ;QAAI,MAAK;QAAO,SAAQ;QAAa,GAAGA,KAAK;qBAAE,sCAAC;QAAK,MAAK;QAAO,GAAE;;AAE3J"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import __rslib_svgr_url__0__ from "../../../static/svg/youtube.3c232651.svg";
|
|
2
|
+
import * as __rspack_external_react from "react";
|
|
3
|
+
const SvgYoutube = (props)=>/*#__PURE__*/ __rspack_external_react.createElement("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: 24,
|
|
6
|
+
height: 24,
|
|
7
|
+
fill: "none",
|
|
8
|
+
viewBox: "0 0 24 24",
|
|
9
|
+
...props
|
|
10
|
+
}, /*#__PURE__*/ __rspack_external_react.createElement("g", {
|
|
11
|
+
clipPath: "url(#youtube_svg__a)"
|
|
12
|
+
}, /*#__PURE__*/ __rspack_external_react.createElement("path", {
|
|
13
|
+
fill: "#FF0302",
|
|
14
|
+
d: "M23.522 6.185A3.02 3.02 0 0 0 21.4 4.05c-1.876-.505-9.376-.505-9.376-.505s-7.5 0-9.376.505A3.02 3.02 0 0 0 .526 6.185C.024 8.07.024 12 .024 12s0 3.93.502 5.815a3.02 3.02 0 0 0 2.122 2.135c1.876.505 9.376.505 9.376.505s7.5 0 9.376-.505a3.02 3.02 0 0 0 2.122-2.135c.502-1.885.502-5.815.502-5.815s0-3.93-.502-5.815"
|
|
15
|
+
}), /*#__PURE__*/ __rspack_external_react.createElement("path", {
|
|
16
|
+
fill: "#FEFEFE",
|
|
17
|
+
d: "M9.57 15.569V8.43L15.841 12z"
|
|
18
|
+
})), /*#__PURE__*/ __rspack_external_react.createElement("defs", null, /*#__PURE__*/ __rspack_external_react.createElement("clipPath", {
|
|
19
|
+
id: "youtube_svg__a"
|
|
20
|
+
}, /*#__PURE__*/ __rspack_external_react.createElement("path", {
|
|
21
|
+
fill: "#fff",
|
|
22
|
+
d: "M0 0h24v24H0z"
|
|
23
|
+
}))));
|
|
24
|
+
const youtube = __rslib_svgr_url__0__;
|
|
25
|
+
export default youtube;
|
|
26
|
+
export { SvgYoutube as ReactComponent };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=youtube.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dashboard/components/assets/youtube.js","sources":["../../../../src/Dashboard/components/assets/youtube.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgYoutube = props => <svg xmlns=\"http://www.w3.org/2000/svg\" width={24} height={24} fill=\"none\" viewBox=\"0 0 24 24\" {...props}><g clipPath=\"url(#youtube_svg__a)\"><path fill=\"#FF0302\" d=\"M23.522 6.185A3.02 3.02 0 0 0 21.4 4.05c-1.876-.505-9.376-.505-9.376-.505s-7.5 0-9.376.505A3.02 3.02 0 0 0 .526 6.185C.024 8.07.024 12 .024 12s0 3.93.502 5.815a3.02 3.02 0 0 0 2.122 2.135c1.876.505 9.376.505 9.376.505s7.5 0 9.376-.505a3.02 3.02 0 0 0 2.122-2.135c.502-1.885.502-5.815.502-5.815s0-3.93-.502-5.815\" /><path fill=\"#FEFEFE\" d=\"M9.57 15.569V8.43L15.841 12z\" /></g><defs><clipPath id=\"youtube_svg__a\"><path fill=\"#fff\" d=\"M0 0h24v24H0z\" /></clipPath></defs></svg>;\nexport { SvgYoutube as ReactComponent };\nexport default \"__RSLIB_SVGR_AUTO_PUBLIC_PATH__static/svg/youtube.3c232651.svg\";"],"names":["SvgYoutube","props"],"mappings":";;AACA,MAAMA,aAAaC,CAAAA,QAAAA,WAAAA,GAAS,sCAAC;QAAI,OAAM;QAA6B,OAAO;QAAI,QAAQ;QAAI,MAAK;QAAO,SAAQ;QAAa,GAAGA,KAAK;qBAAE,sCAAC;QAAE,UAAS;qBAAuB,sCAAC;QAAK,MAAK;QAAU,GAAE;sBAA4T,sCAAC;QAAK,MAAK;QAAU,GAAE;uBAAqC,sCAAC,4BAAK,sCAAC;QAAS,IAAG;qBAAiB,sCAAC;QAAK,MAAK;QAAO,GAAE;;AAEhnB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./MissingPermissionsWidget";
|
|
1
|
+
export * from "./AssistanceWidget.js";
|
|
2
|
+
export * from "./CommunityWidget.js";
|
|
3
|
+
export * from "./MissingPermissionsWidget.js";
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./MissingPermissionsWidget";
|
|
5
|
-
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from "./AssistanceWidget.js";
|
|
2
|
+
export * from "./CommunityWidget.js";
|
|
3
|
+
export * from "./MissingPermissionsWidget.js";
|
package/Dashboard.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
});
|
|
1
|
+
import { CenteredView, DashboardRenderer as app_admin_DashboardRenderer } from "@webiny/app-admin";
|
|
2
|
+
import Welcome from "./Dashboard/Welcome.js";
|
|
3
|
+
import * as __rspack_external_react from "react";
|
|
4
|
+
const Dashboard = app_admin_DashboardRenderer.createDecorator(()=>function() {
|
|
5
|
+
return /*#__PURE__*/ __rspack_external_react.createElement(CenteredView, null, /*#__PURE__*/ __rspack_external_react.createElement(Welcome, null));
|
|
6
|
+
});
|
|
7
|
+
export { Dashboard };
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=Dashboard.js.map
|
package/Dashboard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Dashboard.js","sources":["../src/Dashboard.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { CenteredView, DashboardRenderer } from \"@webiny/app-admin\";\nimport Welcome from \"./Dashboard/Welcome.js\";\n\nexport const Dashboard = DashboardRenderer.createDecorator(() => {\n return function DashboardRenderer() {\n return (\n <CenteredView>\n <Welcome />\n </CenteredView>\n );\n };\n});\n"],"names":["Dashboard","DashboardRenderer","CenteredView","Welcome"],"mappings":";;;AAIO,MAAMA,YAAYC,4BAAAA,eAAiC,CAAC,IAChD;QACH,OAAO,WAAP,GACI,sCAACC,cAAYA,MAAAA,WAAAA,GACT,sCAACC,SAAOA;IAGpB"}
|
|
@@ -1,71 +1,59 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useUi } from "@webiny/app/hooks/useUi";
|
|
1
|
+
import react, { useCallback, useEffect, useState } from "react";
|
|
2
|
+
import { useUi } from "@webiny/app/hooks/useUi.js";
|
|
3
3
|
import { Dialog } from "@webiny/admin-ui";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"data-testid": dataTestId,
|
|
57
|
-
style: style,
|
|
58
|
-
showCloseButton: showCloseButton,
|
|
59
|
-
title: title,
|
|
60
|
-
actions: !actions.cancel && !actions.accept ? null : /*#__PURE__*/React.createElement(React.Fragment, null, actions.cancel && /*#__PURE__*/React.createElement(Dialog.CancelButton, {
|
|
61
|
-
onClick: actions.cancel.onClick,
|
|
62
|
-
text: actions.cancel.label
|
|
63
|
-
}), actions.accept && /*#__PURE__*/React.createElement(Dialog.ConfirmButton, {
|
|
64
|
-
onClick: handleConfirm,
|
|
65
|
-
text: actions.accept.label,
|
|
66
|
-
"data-testid": "confirmationdialog-confirm-action"
|
|
67
|
-
}))
|
|
68
|
-
}, isLoading ? loading : null, message);
|
|
4
|
+
const DialogContainer = ()=>{
|
|
5
|
+
const ui = useUi();
|
|
6
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
7
|
+
const message = ui.dialog?.message;
|
|
8
|
+
const { dataTestId, title, loading, actions = {
|
|
9
|
+
cancel: null,
|
|
10
|
+
accept: {
|
|
11
|
+
label: "OK"
|
|
12
|
+
}
|
|
13
|
+
}, style, onClose, showCloseButton } = ui.dialog?.options || {};
|
|
14
|
+
const hideDialog = useCallback(()=>{
|
|
15
|
+
ui.setState((ui)=>({
|
|
16
|
+
...ui,
|
|
17
|
+
dialog: null
|
|
18
|
+
}));
|
|
19
|
+
if ("function" == typeof onClose) onClose();
|
|
20
|
+
}, [
|
|
21
|
+
ui
|
|
22
|
+
]);
|
|
23
|
+
useEffect(()=>{
|
|
24
|
+
setIsLoading(false);
|
|
25
|
+
}, [
|
|
26
|
+
ui.dialog?.message
|
|
27
|
+
]);
|
|
28
|
+
const handleConfirm = async ()=>{
|
|
29
|
+
if (!actions.accept.onClick) {
|
|
30
|
+
console.info("There is no actions.accept.onClick callback defined.");
|
|
31
|
+
hideDialog();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
setIsLoading(true);
|
|
35
|
+
await actions.accept.onClick();
|
|
36
|
+
setIsLoading(false);
|
|
37
|
+
hideDialog();
|
|
38
|
+
};
|
|
39
|
+
return /*#__PURE__*/ react.createElement(Dialog, {
|
|
40
|
+
open: !!message,
|
|
41
|
+
onClose: hideDialog,
|
|
42
|
+
"data-testid": dataTestId,
|
|
43
|
+
style: style,
|
|
44
|
+
showCloseButton: showCloseButton,
|
|
45
|
+
title: title,
|
|
46
|
+
loading: isLoading ? loading : false,
|
|
47
|
+
actions: actions.cancel || actions.accept ? /*#__PURE__*/ react.createElement(react.Fragment, null, actions.cancel && /*#__PURE__*/ react.createElement(Dialog.CancelAction, {
|
|
48
|
+
onClick: actions.cancel.onClick,
|
|
49
|
+
text: actions.cancel.label
|
|
50
|
+
}), actions.accept && /*#__PURE__*/ react.createElement(Dialog.ConfirmAction, {
|
|
51
|
+
onClick: handleConfirm,
|
|
52
|
+
text: actions.accept.label,
|
|
53
|
+
"data-testid": "confirmationdialog-confirm-action"
|
|
54
|
+
})) : null
|
|
55
|
+
}, message);
|
|
69
56
|
};
|
|
57
|
+
export { DialogContainer };
|
|
70
58
|
|
|
71
59
|
//# sourceMappingURL=DialogContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Dialog/DialogContainer.js","sources":["../../src/Dialog/DialogContainer.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from \"react\";\nimport { useUi } from \"@webiny/app/hooks/useUi.js\";\nimport { Dialog } from \"@webiny/admin-ui\";\n\nexport const DialogContainer = () => {\n const ui = useUi();\n const [isLoading, setIsLoading] = useState(false);\n const message: React.ReactNode = ui.dialog?.message;\n\n const {\n dataTestId,\n title,\n loading,\n actions = { cancel: null, accept: { label: \"OK\" } },\n style,\n onClose,\n showCloseButton\n } = ui.dialog?.options || {};\n\n const hideDialog = useCallback(() => {\n ui.setState(ui => ({ ...ui, dialog: null }));\n if (typeof onClose === \"function\") {\n onClose();\n }\n }, [ui]);\n\n /**\n * We need this part because message can change while the dialog is opened and in loading state.\n */\n useEffect(() => {\n setIsLoading(false);\n }, [ui.dialog?.message]);\n\n const handleConfirm = async () => {\n if (!actions.accept.onClick) {\n /**\n * Should not happen as users should define \"accept.onClick\" function, but just in case lets show the information.\n * Possible to happen in development process.\n */\n console.info(\"There is no actions.accept.onClick callback defined.\");\n hideDialog();\n return;\n }\n setIsLoading(true);\n await actions.accept.onClick();\n setIsLoading(false);\n hideDialog();\n };\n\n return (\n <Dialog\n open={!!message}\n onClose={hideDialog}\n data-testid={dataTestId}\n style={style}\n showCloseButton={showCloseButton}\n title={title}\n loading={isLoading ? loading : false}\n actions={\n !actions.cancel && !actions.accept ? null : (\n <>\n {actions.cancel && (\n <Dialog.CancelAction\n onClick={actions.cancel.onClick}\n text={actions.cancel.label}\n />\n )}\n {actions.accept && (\n <Dialog.ConfirmAction\n onClick={handleConfirm}\n text={actions.accept.label}\n data-testid={\"confirmationdialog-confirm-action\"}\n />\n )}\n </>\n )\n }\n >\n {message}\n </Dialog>\n );\n};\n"],"names":["DialogContainer","ui","useUi","isLoading","setIsLoading","useState","message","dataTestId","title","loading","actions","style","onClose","showCloseButton","hideDialog","useCallback","useEffect","handleConfirm","console","Dialog"],"mappings":";;;AAIO,MAAMA,kBAAkB;IAC3B,MAAMC,KAAKC;IACX,MAAM,CAACC,WAAWC,aAAa,GAAGC,SAAS;IAC3C,MAAMC,UAA2BL,GAAG,MAAM,EAAE;IAE5C,MAAM,EACFM,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,UAAU;QAAE,QAAQ;QAAM,QAAQ;YAAE,OAAO;QAAK;IAAE,CAAC,EACnDC,KAAK,EACLC,OAAO,EACPC,eAAe,EAClB,GAAGZ,GAAG,MAAM,EAAE,WAAW,CAAC;IAE3B,MAAMa,aAAaC,YAAY;QAC3Bd,GAAG,QAAQ,CAACA,CAAAA,KAAO;gBAAE,GAAGA,EAAE;gBAAE,QAAQ;YAAK;QACzC,IAAI,AAAmB,cAAnB,OAAOW,SACPA;IAER,GAAG;QAACX;KAAG;IAKPe,UAAU;QACNZ,aAAa;IACjB,GAAG;QAACH,GAAG,MAAM,EAAE;KAAQ;IAEvB,MAAMgB,gBAAgB;QAClB,IAAI,CAACP,QAAQ,MAAM,CAAC,OAAO,EAAE;YAKzBQ,QAAQ,IAAI,CAAC;YACbJ;YACA;QACJ;QACAV,aAAa;QACb,MAAMM,QAAQ,MAAM,CAAC,OAAO;QAC5BN,aAAa;QACbU;IACJ;IAEA,OAAO,WAAP,GACI,oBAACK,QAAMA;QACH,MAAM,CAAC,CAACb;QACR,SAASQ;QACT,eAAaP;QACb,OAAOI;QACP,iBAAiBE;QACjB,OAAOL;QACP,SAASL,YAAYM,UAAU;QAC/B,SACI,AAACC,QAAQ,MAAM,IAAKA,QAAQ,MAAM,GAAU,WAAP,GACjC,0CACKA,QAAQ,MAAM,IAAI,WAAJ,GACX,oBAACS,OAAO,YAAY;YAChB,SAAST,QAAQ,MAAM,CAAC,OAAO;YAC/B,MAAMA,QAAQ,MAAM,CAAC,KAAK;YAGjCA,QAAQ,MAAM,IAAI,WAAJ,GACX,oBAACS,OAAO,aAAa;YACjB,SAASF;YACT,MAAMP,QAAQ,MAAM,CAAC,KAAK;YAC1B,eAAa;cAZQ;OAmBxCJ;AAGb"}
|
package/Dialog/DialogProvider.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DialogContainer } from "./DialogContainer";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return /*#__PURE__*/React.createElement(Component, null, children, /*#__PURE__*/React.createElement(DialogContainer, null));
|
|
8
|
-
};
|
|
9
|
-
};
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { DialogContainer } from "./DialogContainer.js";
|
|
3
|
+
const DialogProvider = (Component)=>function({ children }) {
|
|
4
|
+
return /*#__PURE__*/ react.createElement(Component, null, children, /*#__PURE__*/ react.createElement(DialogContainer, null));
|
|
5
|
+
};
|
|
6
|
+
export { DialogProvider };
|
|
10
7
|
|
|
11
8
|
//# sourceMappingURL=DialogProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Dialog/DialogProvider.js","sources":["../../src/Dialog/DialogProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport { DialogContainer } from \"./DialogContainer.js\";\n\nexport interface DialogProviderProps {\n children?: React.ReactNode;\n}\n\nexport const DialogProvider = (Component: React.ComponentType<DialogProviderProps>) => {\n return function DialogProviderProps({ children }: DialogProviderProps) {\n return (\n <Component>\n {children}\n <DialogContainer />\n </Component>\n );\n };\n};\n"],"names":["DialogProvider","Component","children","DialogContainer"],"mappings":";;AAOO,MAAMA,iBAAiB,CAACC,YACpB,SAA6B,EAAEC,QAAQ,EAAuB;QACjE,OAAO,WAAP,GACI,oBAACD,WAAAA,MACIC,UAAAA,WAAAA,GACD,oBAACC,iBAAeA;IAG5B"}
|
package/Dialog.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import react from "react";
|
|
2
2
|
import { Provider } from "@webiny/app-admin";
|
|
3
|
-
import { DialogProvider } from "./Dialog/DialogProvider";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
return /*#__PURE__*/React.createElement(Provider, {
|
|
9
|
-
hoc: DialogProvider
|
|
10
|
-
});
|
|
11
|
-
};
|
|
3
|
+
import { DialogProvider } from "./Dialog/DialogProvider.js";
|
|
4
|
+
const Dialog = ()=>/*#__PURE__*/ react.createElement(Provider, {
|
|
5
|
+
hoc: DialogProvider
|
|
6
|
+
});
|
|
7
|
+
export { Dialog };
|
|
12
8
|
|
|
13
9
|
//# sourceMappingURL=Dialog.js.map
|
package/Dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Dialog.js","sources":["../src/Dialog.tsx"],"sourcesContent":["import React from \"react\";\nimport { Provider } from \"@webiny/app-admin\";\nimport { DialogProvider } from \"./Dialog/DialogProvider.js\";\n\n// This implements the global dialog, which is controlled via the\n// `useDialog` hook (`packages/app-admin/src/hooks/useDialog.ts`).\nexport const Dialog = () => {\n return <Provider hoc={DialogProvider} />;\n};\n"],"names":["Dialog","Provider","DialogProvider"],"mappings":";;;AAMO,MAAMA,SAAS,IACX,WAAP,GAAO,oBAACC,UAAQA;QAAC,KAAKC"}
|