@webiny/app-admin 5.39.2 → 5.39.3-beta.0
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/hooks/useDialog.d.ts +20 -1
- package/hooks/useDialog.js +0 -2
- package/hooks/useDialog.js.map +1 -1
- package/package.json +18 -18
package/hooks/useDialog.d.ts
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
interface
|
|
2
|
+
interface AcceptAction {
|
|
3
|
+
label: string;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface CancelAction {
|
|
7
|
+
label: string;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface UseDialogResponseShowDialogOptions {
|
|
11
|
+
dataTestId?: string;
|
|
12
|
+
title: string;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
actions?: {
|
|
15
|
+
accept?: AcceptAction;
|
|
16
|
+
cancel?: CancelAction;
|
|
17
|
+
};
|
|
18
|
+
style?: {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
};
|
|
21
|
+
onClose?: () => void;
|
|
3
22
|
[key: string]: any;
|
|
4
23
|
}
|
|
5
24
|
interface UseDialogResponse {
|
package/hooks/useDialog.js
CHANGED
|
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.useDialog = void 0;
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
9
|
var _useUi = require("@webiny/app/hooks/useUi");
|
|
10
|
-
// TODO @ts-refactor
|
|
11
|
-
|
|
12
10
|
var useDialog = function useDialog() {
|
|
13
11
|
var ui = (0, _useUi.useUi)();
|
|
14
12
|
return {
|
package/hooks/useDialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_useUi","require","useDialog","ui","useUi","showDialog","message","options","setState","_objectSpread2","default","dialog","hideDialog","exports"],"sources":["useDialog.ts"],"sourcesContent":["import React from \"react\";\nimport { useUi } from \"@webiny/app/hooks/useUi\";\n\n
|
|
1
|
+
{"version":3,"names":["_useUi","require","useDialog","ui","useUi","showDialog","message","options","setState","_objectSpread2","default","dialog","hideDialog","exports"],"sources":["useDialog.ts"],"sourcesContent":["import React from \"react\";\nimport { useUi } from \"@webiny/app/hooks/useUi\";\n\ninterface AcceptAction {\n label: string;\n onClick?: () => void;\n}\ninterface CancelAction {\n label: string;\n onClick?: () => void;\n}\n\nexport interface UseDialogResponseShowDialogOptions {\n dataTestId?: string;\n title: string;\n loading?: boolean;\n actions?: {\n accept?: AcceptAction;\n cancel?: CancelAction;\n };\n style?: {\n [key: string]: any;\n };\n onClose?: () => void;\n [key: string]: any;\n}\ninterface UseDialogResponse {\n showDialog: (message: React.ReactNode, options?: UseDialogResponseShowDialogOptions) => void;\n hideDialog: () => void;\n}\nconst useDialog = (): UseDialogResponse => {\n const ui = useUi();\n return {\n showDialog: (message, options) => {\n ui.setState(ui => {\n return { ...ui, dialog: { message, options } };\n });\n },\n hideDialog: () => {\n ui.setState(ui => {\n return { ...ui, dialog: null };\n });\n }\n };\n};\n\nexport { useDialog };\n"],"mappings":";;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AA6BA,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAA,EAA4B;EACvC,IAAMC,EAAE,GAAG,IAAAC,YAAK,EAAC,CAAC;EAClB,OAAO;IACHC,UAAU,EAAE,SAAAA,WAACC,OAAO,EAAEC,OAAO,EAAK;MAC9BJ,EAAE,CAACK,QAAQ,CAAC,UAAAL,EAAE,EAAI;QACd,WAAAM,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MAAYP,EAAE;UAAEQ,MAAM,EAAE;YAAEL,OAAO,EAAPA,OAAO;YAAEC,OAAO,EAAPA;UAAQ;QAAC;MAChD,CAAC,CAAC;IACN,CAAC;IACDK,UAAU,EAAE,SAAAA,WAAA,EAAM;MACdT,EAAE,CAACK,QAAQ,CAAC,UAAAL,EAAE,EAAI;QACd,WAAAM,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MAAYP,EAAE;UAAEQ,MAAM,EAAE;QAAI;MAChC,CAAC,CAAC;IACN;EACJ,CAAC;AACL,CAAC;AAACE,OAAA,CAAAX,SAAA,GAAAA,SAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-admin",
|
|
3
|
-
"version": "5.39.
|
|
3
|
+
"version": "5.39.3-beta.0",
|
|
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,20 +20,20 @@
|
|
|
20
20
|
"@svgr/webpack": "6.5.1",
|
|
21
21
|
"@types/mime": "2.0.3",
|
|
22
22
|
"@types/react": "17.0.39",
|
|
23
|
-
"@webiny/app": "5.39.
|
|
24
|
-
"@webiny/app-security": "5.39.
|
|
25
|
-
"@webiny/app-theme": "5.39.
|
|
26
|
-
"@webiny/app-wcp": "5.39.
|
|
27
|
-
"@webiny/form": "5.39.
|
|
28
|
-
"@webiny/lexical-editor": "5.39.
|
|
29
|
-
"@webiny/plugins": "5.39.
|
|
30
|
-
"@webiny/react-composition": "5.39.
|
|
31
|
-
"@webiny/react-router": "5.39.
|
|
32
|
-
"@webiny/telemetry": "5.39.
|
|
33
|
-
"@webiny/ui": "5.39.
|
|
34
|
-
"@webiny/ui-composer": "5.39.
|
|
35
|
-
"@webiny/utils": "5.39.
|
|
36
|
-
"@webiny/validation": "5.39.
|
|
23
|
+
"@webiny/app": "5.39.3-beta.0",
|
|
24
|
+
"@webiny/app-security": "5.39.3-beta.0",
|
|
25
|
+
"@webiny/app-theme": "5.39.3-beta.0",
|
|
26
|
+
"@webiny/app-wcp": "5.39.3-beta.0",
|
|
27
|
+
"@webiny/form": "5.39.3-beta.0",
|
|
28
|
+
"@webiny/lexical-editor": "5.39.3-beta.0",
|
|
29
|
+
"@webiny/plugins": "5.39.3-beta.0",
|
|
30
|
+
"@webiny/react-composition": "5.39.3-beta.0",
|
|
31
|
+
"@webiny/react-router": "5.39.3-beta.0",
|
|
32
|
+
"@webiny/telemetry": "5.39.3-beta.0",
|
|
33
|
+
"@webiny/ui": "5.39.3-beta.0",
|
|
34
|
+
"@webiny/ui-composer": "5.39.3-beta.0",
|
|
35
|
+
"@webiny/utils": "5.39.3-beta.0",
|
|
36
|
+
"@webiny/validation": "5.39.3-beta.0",
|
|
37
37
|
"apollo-cache": "1.3.5",
|
|
38
38
|
"apollo-client": "2.6.10",
|
|
39
39
|
"apollo-link": "1.2.14",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@types/graphlib": "2.1.8",
|
|
66
66
|
"@types/is-hotkey": "0.1.7",
|
|
67
67
|
"@types/store": "2.0.2",
|
|
68
|
-
"@webiny/cli": "5.39.
|
|
69
|
-
"@webiny/project-utils": "5.39.
|
|
68
|
+
"@webiny/cli": "5.39.3-beta.0",
|
|
69
|
+
"@webiny/project-utils": "5.39.3-beta.0",
|
|
70
70
|
"babel-plugin-emotion": "9.2.11",
|
|
71
71
|
"rimraf": "3.0.2",
|
|
72
72
|
"ttypescript": "1.5.15",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
]
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "bb0a2c8b43b2caa88f7a2d745a88039a520d124c"
|
|
96
96
|
}
|