@webiny/app-admin-rmwc 0.0.0-unstable.78f581c1d2 → 0.0.0-unstable.97a151f74d

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.
@@ -19,6 +19,8 @@ var _useUi = require("@webiny/app/hooks/useUi");
19
19
 
20
20
  var _Dialog = require("@webiny/ui/Dialog");
21
21
 
22
+ var _Button = require("@webiny/ui/Button");
23
+
22
24
  var DialogContainer = function DialogContainer() {
23
25
  var ui = (0, _useUi.useUi)();
24
26
  var message = (0, _get3.default)(ui, "dialog.message");
@@ -49,8 +51,11 @@ var DialogContainer = function DialogContainer() {
49
51
  style: style
50
52
  }, title && /*#__PURE__*/_react.default.createElement(_Dialog.DialogTitle, null, title), /*#__PURE__*/_react.default.createElement(_Dialog.DialogContent, null, message), /*#__PURE__*/_react.default.createElement(_Dialog.DialogActions, null, actions.cancel && /*#__PURE__*/_react.default.createElement(_Dialog.DialogAccept, {
51
53
  onClick: actions.cancel.onClick
52
- }, actions.cancel.label), actions.accept && /*#__PURE__*/_react.default.createElement(_Dialog.DialogAccept, {
53
- onClick: actions.accept.onClick
54
+ }, actions.cancel.label), actions.accept && /*#__PURE__*/_react.default.createElement(_Button.ButtonPrimary, {
55
+ onClick: function onClick() {
56
+ actions.accept.onClick();
57
+ hideDialog();
58
+ }
54
59
  }, actions.accept.label)));
55
60
  };
56
61
 
@@ -1 +1 @@
1
- {"version":3,"names":["DialogContainer","ui","useUi","message","dataTestId","title","actions","cancel","accept","label","style","hideDialog","useCallback","setState","dialog","onClick"],"sources":["Dialog.tsx"],"sourcesContent":["import React, { useCallback } from \"react\";\nimport { get } from \"lodash\";\nimport { useUi } from \"@webiny/app/hooks/useUi\";\nimport { Dialog, DialogAccept, DialogTitle, DialogActions, DialogContent } from \"@webiny/ui/Dialog\";\n\nexport const DialogContainer: React.FC = () => {\n const ui = useUi();\n const message: React.ReactNode = get(ui, \"dialog.message\");\n const {\n dataTestId,\n title,\n actions = { cancel: null, accept: { label: \"OK\" } },\n style\n } = get(ui, \"dialog.options\", {});\n\n const hideDialog = useCallback(() => {\n ui.setState(ui => ({ ...ui, dialog: null }));\n }, [ui]);\n\n return (\n <Dialog open={!!message} onClose={hideDialog} data-testid={dataTestId} style={style}>\n {title && <DialogTitle>{title}</DialogTitle>}\n <DialogContent>{message}</DialogContent>\n <DialogActions>\n {actions.cancel && (\n <DialogAccept onClick={actions.cancel.onClick}>\n {actions.cancel.label}\n </DialogAccept>\n )}\n {actions.accept && (\n <DialogAccept onClick={actions.accept.onClick}>\n {actions.accept.label}\n </DialogAccept>\n )}\n </DialogActions>\n </Dialog>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AAEO,IAAMA,eAAyB,GAAG,SAA5BA,eAA4B,GAAM;EAC3C,IAAMC,EAAE,GAAG,IAAAC,YAAA,GAAX;EACA,IAAMC,OAAwB,GAAG,mBAAIF,EAAJ,EAAQ,gBAAR,CAAjC;;EACA,YAKI,mBAAIA,EAAJ,EAAQ,gBAAR,EAA0B,EAA1B,CALJ;EAAA,IACIG,UADJ,SACIA,UADJ;EAAA,IAEIC,KAFJ,SAEIA,KAFJ;EAAA,0BAGIC,OAHJ;EAAA,IAGIA,OAHJ,8BAGc;IAAEC,MAAM,EAAE,IAAV;IAAgBC,MAAM,EAAE;MAAEC,KAAK,EAAE;IAAT;EAAxB,CAHd;EAAA,IAIIC,KAJJ,SAIIA,KAJJ;;EAOA,IAAMC,UAAU,GAAG,IAAAC,kBAAA,EAAY,YAAM;IACjCX,EAAE,CAACY,QAAH,CAAY,UAAAZ,EAAE;MAAA,mEAAUA,EAAV;QAAca,MAAM,EAAE;MAAtB;IAAA,CAAd;EACH,CAFkB,EAEhB,CAACb,EAAD,CAFgB,CAAnB;EAIA,oBACI,6BAAC,cAAD;IAAQ,IAAI,EAAE,CAAC,CAACE,OAAhB;IAAyB,OAAO,EAAEQ,UAAlC;IAA8C,eAAaP,UAA3D;IAAuE,KAAK,EAAEM;EAA9E,GACKL,KAAK,iBAAI,6BAAC,mBAAD,QAAcA,KAAd,CADd,eAEI,6BAAC,qBAAD,QAAgBF,OAAhB,CAFJ,eAGI,6BAAC,qBAAD,QACKG,OAAO,CAACC,MAAR,iBACG,6BAAC,oBAAD;IAAc,OAAO,EAAED,OAAO,CAACC,MAAR,CAAeQ;EAAtC,GACKT,OAAO,CAACC,MAAR,CAAeE,KADpB,CAFR,EAMKH,OAAO,CAACE,MAAR,iBACG,6BAAC,oBAAD;IAAc,OAAO,EAAEF,OAAO,CAACE,MAAR,CAAeO;EAAtC,GACKT,OAAO,CAACE,MAAR,CAAeC,KADpB,CAPR,CAHJ,CADJ;AAkBH,CAhCM"}
1
+ {"version":3,"names":["DialogContainer","ui","useUi","message","dataTestId","title","actions","cancel","accept","label","style","hideDialog","useCallback","setState","dialog","onClick"],"sources":["Dialog.tsx"],"sourcesContent":["import React, { useCallback } from \"react\";\nimport { get } from \"lodash\";\nimport { useUi } from \"@webiny/app/hooks/useUi\";\nimport { Dialog, DialogAccept, DialogTitle, DialogActions, DialogContent } from \"@webiny/ui/Dialog\";\nimport { ButtonPrimary } from \"@webiny/ui/Button\";\n\nexport const DialogContainer: React.FC = () => {\n const ui = useUi();\n const message: React.ReactNode = get(ui, \"dialog.message\");\n const {\n dataTestId,\n title,\n actions = { cancel: null, accept: { label: \"OK\" } },\n style\n } = get(ui, \"dialog.options\", {});\n\n const hideDialog = useCallback(() => {\n ui.setState(ui => ({ ...ui, dialog: null }));\n }, [ui]);\n\n return (\n <Dialog open={!!message} onClose={hideDialog} data-testid={dataTestId} style={style}>\n {title && <DialogTitle>{title}</DialogTitle>}\n <DialogContent>{message}</DialogContent>\n <DialogActions>\n {actions.cancel && (\n <DialogAccept onClick={actions.cancel.onClick}>\n {actions.cancel.label}\n </DialogAccept>\n )}\n {actions.accept && (\n <ButtonPrimary\n onClick={() => {\n actions.accept.onClick();\n hideDialog();\n }}\n >\n {actions.accept.label}\n </Butt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E,MAAR,CAAeO,OAAf;MACAJ,UAAU;IACb;EAJL,GAMKL,OAAO,CAACE,MAAR,CAAeC,KANpB,CAPR,CAHJ,CADJ;AAuBH,CArCM"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-admin-rmwc",
3
- "version": "0.0.0-unstable.78f581c1d2",
3
+ "version": "0.0.0-unstable.97a151f74d",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,13 +13,13 @@
13
13
  "@emotion/styled": "10.3.0",
14
14
  "@rmwc/base": "7.0.3",
15
15
  "@types/react": "17.0.39",
16
- "@webiny/app": "0.0.0-unstable.78f581c1d2",
17
- "@webiny/app-admin": "0.0.0-unstable.78f581c1d2",
18
- "@webiny/app-plugin-admin-welcome-screen": "0.0.0-unstable.78f581c1d2",
19
- "@webiny/app-security": "0.0.0-unstable.78f581c1d2",
20
- "@webiny/plugins": "0.0.0-unstable.78f581c1d2",
21
- "@webiny/react-router": "0.0.0-unstable.78f581c1d2",
22
- "@webiny/ui": "0.0.0-unstable.78f581c1d2",
16
+ "@webiny/app": "0.0.0-unstable.97a151f74d",
17
+ "@webiny/app-admin": "0.0.0-unstable.97a151f74d",
18
+ "@webiny/app-plugin-admin-welcome-screen": "0.0.0-unstable.97a151f74d",
19
+ "@webiny/app-security": "0.0.0-unstable.97a151f74d",
20
+ "@webiny/plugins": "0.0.0-unstable.97a151f74d",
21
+ "@webiny/react-router": "0.0.0-unstable.97a151f74d",
22
+ "@webiny/ui": "0.0.0-unstable.97a151f74d",
23
23
  "classnames": "2.3.2",
24
24
  "emotion": "10.0.27",
25
25
  "lodash": "4.17.21",
@@ -36,8 +36,8 @@
36
36
  "@babel/preset-react": "^7.0.0",
37
37
  "@babel/preset-typescript": "^7.18.6",
38
38
  "@types/react-helmet": "^6.1.5",
39
- "@webiny/cli": "^0.0.0-unstable.78f581c1d2",
40
- "@webiny/project-utils": "^0.0.0-unstable.78f581c1d2",
39
+ "@webiny/cli": "^0.0.0-unstable.97a151f74d",
40
+ "@webiny/project-utils": "^0.0.0-unstable.97a151f74d",
41
41
  "babel-plugin-emotion": "^9.2.8",
42
42
  "babel-plugin-named-asset-import": "^1.0.0-next.3e165448",
43
43
  "rimraf": "^3.0.2",
@@ -57,5 +57,5 @@
57
57
  "removeViewBox": false
58
58
  }
59
59
  },
60
- "gitHead": "78f581c1d2e5e6936aa11b9452a66d2a3652a1b2"
60
+ "gitHead": "97a151f74d8c5679323989fcc8cc7036be0f150e"
61
61
  }