@webiny/app-admin 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.
@@ -2,10 +2,12 @@ import React from "react";
2
2
  interface Params {
3
3
  title?: React.ReactNode;
4
4
  message?: React.ReactNode;
5
+ acceptLabel?: React.ReactNode;
6
+ cancelLabel?: React.ReactNode;
5
7
  [key: string]: any;
6
8
  }
7
9
  interface UseConfirmationDialogResponse {
8
10
  showConfirmation: (onAccept: () => void, onCancel?: () => void) => void;
9
11
  }
10
- declare const useConfirmationDialog: ({ title, message, ...options }?: Params) => UseConfirmationDialogResponse;
12
+ declare const useConfirmationDialog: ({ title, message, acceptLabel, cancelLabel, ...options }?: Params) => UseConfirmationDialogResponse;
11
13
  export { useConfirmationDialog };
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.useConfirmationDialog = void 0;
9
9
 
10
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
-
12
10
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
13
11
 
12
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
+
14
14
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
15
 
16
16
  var _useUi = require("@webiny/app/hooks/useUi");
@@ -19,7 +19,7 @@ var _i18n = require("@webiny/app/i18n");
19
19
 
20
20
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
21
21
 
22
- var _excluded = ["title", "message"];
22
+ var _excluded = ["title", "message", "acceptLabel", "cancelLabel"];
23
23
 
24
24
  var t = _i18n.i18n.ns("app-admin/hooks/use-confirmation-dialog");
25
25
 
@@ -28,6 +28,10 @@ var useConfirmationDialog = function useConfirmationDialog() {
28
28
 
29
29
  var title = _ref.title,
30
30
  message = _ref.message,
31
+ _ref$acceptLabel = _ref.acceptLabel,
32
+ acceptLabel = _ref$acceptLabel === void 0 ? t(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["Confirm"]))) : _ref$acceptLabel,
33
+ _ref$cancelLabel = _ref.cancelLabel,
34
+ cancelLabel = _ref$cancelLabel === void 0 ? t(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["Cancel"]))) : _ref$cancelLabel,
31
35
  options = (0, _objectWithoutProperties2.default)(_ref, _excluded);
32
36
  var ui = (0, _useUi.useUi)();
33
37
  return {
@@ -35,16 +39,16 @@ var useConfirmationDialog = function useConfirmationDialog() {
35
39
  ui.setState(function (ui) {
36
40
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, ui), {}, {
37
41
  dialog: {
38
- message: message || t(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["Are you sure you want to continue?"]))),
42
+ message: message || t(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["Are you sure you want to continue?"]))),
39
43
  options: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, options), {}, {
40
- title: title || t(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["Confirmation"]))),
44
+ title: title || t(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["Confirmation"]))),
41
45
  actions: {
42
46
  accept: {
43
- label: t(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["Confirm"]))),
47
+ label: acceptLabel,
44
48
  onClick: onAccept
45
49
  },
46
50
  cancel: {
47
- label: t(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["Cancel"]))),
51
+ label: cancelLabel,
48
52
  onClick: onCancel
49
53
  }
50
54
  }
@@ -1 +1 @@
1
- {"version":3,"names":["t","i18n","ns","useConfirmationDialog","title","message","options","ui","useUi","showConfirmation","onAccept","onCancel","setState","dialog","actions","accept","label","onClick","cancel"],"sources":["useConfirmationDialog.ts"],"sourcesContent":["import React from \"react\";\nimport { useUi } from \"@webiny/app/hooks/useUi\";\nimport { i18n } from \"@webiny/app/i18n\";\nconst t = i18n.ns(\"app-admin/hooks/use-confirmation-dialog\");\n\ninterface Params {\n title?: React.ReactNode;\n message?: React.ReactNode;\n [key: string]: any;\n}\n\ninterface UseConfirmationDialogResponse {\n showConfirmation: (onAccept: () => void, onCancel?: () => void) => void;\n}\n\nconst useConfirmationDialog = ({\n title,\n message,\n ...options\n}: Params = {}): UseConfirmationDialogResponse => {\n const ui = useUi();\n\n return {\n showConfirmation: (onAccept, onCancel) => {\n ui.setState(ui => {\n return {\n ...ui,\n dialog: {\n message: message || t`Are you sure you want to continue?`,\n options: {\n ...options,\n title: title || t`Confirmation`,\n actions: {\n accept: {\n label: t`Confirm`,\n onClick: onAccept\n },\n cancel: {\n label: t`Cancel`,\n onClick: onCancel\n }\n }\n }\n }\n };\n });\n }\n };\n};\n\nexport { useConfirmationDialog };\n"],"mappings":";;;;;;;;;;;;;;;AACA;;AACA;;;;;;AACA,IAAMA,CAAC,GAAGC,UAAA,CAAKC,EAAL,CAAQ,yCAAR,CAAV;;AAYA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAwB,GAIoB;EAAA,+EAAtC,EAAsC;;EAAA,IAH9CC,KAG8C,QAH9CA,KAG8C;EAAA,IAF9CC,OAE8C,QAF9CA,OAE8C;EAAA,IAD3CC,OAC2C;EAC9C,IAAMC,EAAE,GAAG,IAAAC,YAAA,GAAX;EAEA,OAAO;IACHC,gBAAgB,EAAE,0BAACC,QAAD,EAAWC,QAAX,EAAwB;MACtCJ,EAAE,CAACK,QAAH,CAAY,UAAAL,EAAE,EAAI;QACd,mEACOA,EADP;UAEIM,MAAM,EAAE;YACJR,OAAO,EAAEA,OAAO,IAAIL,CAAJ,qHADZ;YAEJM,OAAO,8DACAA,OADA;cAEHF,KAAK,EAAEA,KAAK,IAAIJ,CAAJ,iGAFT;cAGHc,OAAO,EAAE;gBACLC,MAAM,EAAE;kBACJC,KAAK,EAAEhB,CAAF,4FADD;kBAEJiB,OAAO,EAAEP;gBAFL,CADH;gBAKLQ,MAAM,EAAE;kBACJF,KAAK,EAAEhB,CAAF,2FADD;kBAEJiB,OAAO,EAAEN;gBAFL;cALH;YAHN;UAFH;QAFZ;MAoBH,CArBD;IAsBH;EAxBE,CAAP;AA0BH,CAjCD"}
1
+ {"version":3,"names":["t","i18n","ns","useConfirmationDialog","title","message","acceptLabel","cancelLabel","options","ui","useUi","showConfirmation","onAccept","onCancel","setState","dialog","actions","accept","label","onClick","cancel"],"sources":["useConfirmationDialog.ts"],"sourcesContent":["import React from \"react\";\nimport { useUi } from \"@webiny/app/hooks/useUi\";\nimport { i18n } from \"@webiny/app/i18n\";\nconst t = i18n.ns(\"app-admin/hooks/use-confirmation-dialog\");\n\ninterface Params {\n title?: React.ReactNode;\n message?: React.ReactNode;\n acceptLabel?: React.ReactNode;\n cancelLabel?: React.ReactNode;\n [key: string]: any;\n}\n\ninterface UseConfirmationDialogResponse {\n showConfirmation: (onAccept: () => void, onCancel?: () => void) => void;\n}\n\nconst useConfirmationDialog = ({\n title,\n message,\n acceptLabel = t`Confirm`,\n cancelLabel = t`Cancel`,\n ...options\n}: Params = {}): UseConfirmationDialogResponse => {\n const ui = useUi();\n\n return {\n showConfirmation: (onAccept, onCancel) => {\n ui.setState(ui => {\n return {\n ...ui,\n dialog: {\n message: message || t`Are you sure you want to continue?`,\n options: {\n ...options,\n title: title || t`Confirmation`,\n actions: {\n accept: {\n label: acceptLabel,\n onClick: onAccept\n },\n cancel: {\n label: cancelLabel,\n onClick: onCancel\n }\n }\n }\n }\n };\n });\n }\n };\n};\n\nexport { useConfirmationDialog };\n"],"mappings":";;;;;;;;;;;;;;;AACA;;AACA;;;;;;AACA,IAAMA,CAAC,GAAGC,UAAA,CAAKC,EAAL,CAAQ,yCAAR,CAAV;;AAcA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAwB,GAMoB;EAAA,+EAAtC,EAAsC;;EAAA,IAL9CC,KAK8C,QAL9CA,KAK8C;EAAA,IAJ9CC,OAI8C,QAJ9CA,OAI8C;EAAA,4BAH9CC,WAG8C;EAAA,IAH9CA,WAG8C,iCAHhCN,CAGgC;EAAA,4BAF9CO,WAE8C;EAAA,IAF9CA,WAE8C,iCAFhCP,CAEgC;EAAA,IAD3CQ,OAC2C;EAC9C,IAAMC,EAAE,GAAG,IAAAC,YAAA,GAAX;EAEA,OAAO;IACHC,gBAAgB,EAAE,0BAACC,QAAD,EAAWC,QAAX,EAAwB;MACtCJ,EAAE,CAACK,QAAH,CAAY,UAAAL,EAAE,EAAI;QACd,mEACOA,EADP;UAEIM,MAAM,EAAE;YACJV,OAAO,EAAEA,OAAO,IAAIL,CAAJ,uHADZ;YAEJQ,OAAO,8DACAA,OADA;cAEHJ,KAAK,EAAEA,KAAK,IAAIJ,CAAJ,iGAFT;cAGHgB,OAAO,EAAE;gBACLC,MAAM,EAAE;kBACJC,KAAK,EAAEZ,WADH;kBAEJa,OAAO,EAAEP;gBAFL,CADH;gBAKLQ,MAAM,EAAE;kBACJF,KAAK,EAAEX,WADH;kBAEJY,OAAO,EAAEN;gBAFL;cALH;YAHN;UAFH;QAFZ;MAoBH,CArBD;IAsBH;EAxBE,CAAP;AA0BH,CAnCD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-admin",
3
- "version": "0.0.0-unstable.78f581c1d2",
3
+ "version": "0.0.0-unstable.97a151f74d",
4
4
  "main": "index.js",
5
5
  "description": "A collection of plugins that together form a complete admin interface, customizable and extensible with Webiny apps and plugins.",
6
6
  "repository": {
@@ -20,18 +20,18 @@
20
20
  "@svgr/webpack": "6.4.0",
21
21
  "@types/mime": "2.0.3",
22
22
  "@types/react": "17.0.39",
23
- "@webiny/app": "0.0.0-unstable.78f581c1d2",
24
- "@webiny/app-admin-core": "0.0.0-unstable.78f581c1d2",
25
- "@webiny/app-security": "0.0.0-unstable.78f581c1d2",
26
- "@webiny/app-wcp": "0.0.0-unstable.78f581c1d2",
27
- "@webiny/form": "0.0.0-unstable.78f581c1d2",
28
- "@webiny/plugins": "0.0.0-unstable.78f581c1d2",
29
- "@webiny/react-composition": "0.0.0-unstable.78f581c1d2",
30
- "@webiny/react-router": "0.0.0-unstable.78f581c1d2",
31
- "@webiny/telemetry": "0.0.0-unstable.78f581c1d2",
32
- "@webiny/ui": "0.0.0-unstable.78f581c1d2",
33
- "@webiny/ui-composer": "0.0.0-unstable.78f581c1d2",
34
- "@webiny/validation": "0.0.0-unstable.78f581c1d2",
23
+ "@webiny/app": "0.0.0-unstable.97a151f74d",
24
+ "@webiny/app-admin-core": "0.0.0-unstable.97a151f74d",
25
+ "@webiny/app-security": "0.0.0-unstable.97a151f74d",
26
+ "@webiny/app-wcp": "0.0.0-unstable.97a151f74d",
27
+ "@webiny/form": "0.0.0-unstable.97a151f74d",
28
+ "@webiny/plugins": "0.0.0-unstable.97a151f74d",
29
+ "@webiny/react-composition": "0.0.0-unstable.97a151f74d",
30
+ "@webiny/react-router": "0.0.0-unstable.97a151f74d",
31
+ "@webiny/telemetry": "0.0.0-unstable.97a151f74d",
32
+ "@webiny/ui": "0.0.0-unstable.97a151f74d",
33
+ "@webiny/ui-composer": "0.0.0-unstable.97a151f74d",
34
+ "@webiny/validation": "0.0.0-unstable.97a151f74d",
35
35
  "apollo-cache": "1.3.5",
36
36
  "apollo-client": "2.6.10",
37
37
  "apollo-link": "1.2.14",
@@ -49,7 +49,7 @@
49
49
  "invariant": "2.2.4",
50
50
  "lodash": "4.17.21",
51
51
  "mime": "2.6.0",
52
- "minimatch": "3.1.2",
52
+ "minimatch": "5.1.0",
53
53
  "nanoid": "3.3.4",
54
54
  "prop-types": "15.8.1",
55
55
  "react": "17.0.2",
@@ -71,8 +71,8 @@
71
71
  "@types/bytes": "^3.1.1",
72
72
  "@types/graphlib": "^2.1.8",
73
73
  "@types/store": "^2.0.2",
74
- "@webiny/cli": "^0.0.0-unstable.78f581c1d2",
75
- "@webiny/project-utils": "^0.0.0-unstable.78f581c1d2",
74
+ "@webiny/cli": "^0.0.0-unstable.97a151f74d",
75
+ "@webiny/project-utils": "^0.0.0-unstable.97a151f74d",
76
76
  "babel-plugin-emotion": "^9.2.8",
77
77
  "babel-plugin-lodash": "^3.3.4",
78
78
  "rimraf": "^3.0.2",
@@ -99,5 +99,5 @@
99
99
  ]
100
100
  }
101
101
  },
102
- "gitHead": "78f581c1d2e5e6936aa11b9452a66d2a3652a1b2"
102
+ "gitHead": "97a151f74d8c5679323989fcc8cc7036be0f150e"
103
103
  }
@@ -222,6 +222,7 @@ Fix the width of input components when inside grids
222
222
  overflow: auto;
223
223
  margin-top: 0;
224
224
  padding-top: 24px;
225
+ padding-bottom: 24px;
225
226
  background-color: $mdc-theme-surface;
226
227
 
227
228
  // add options for when tabs are inside the body
@@ -251,6 +252,9 @@ Fix the width of input components when inside grids
251
252
  padding-bottom: 25px;
252
253
  }
253
254
  }
255
+ > .mdc-layout-grid {
256
+ margin: -24px;
257
+ }
254
258
  }
255
259
  .mdc-dialog__actions {
256
260
  border-top: 1px solid $mdc-theme-on-background;