ywana-core8 0.0.349 → 0.0.350
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/dist/index.cjs +28 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +8 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +28 -8
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +28 -8
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/site/dialog.css +8 -0
- package/src/site/dialog.js +2 -1
- package/src/site/site.js +15 -0
- package/src/site/site.test.js +33 -1
package/dist/index.umd.js
CHANGED
@@ -2989,16 +2989,20 @@
|
|
2989
2989
|
setDialog = _useState8[1];
|
2990
2990
|
|
2991
2991
|
var _useState9 = React.useState(),
|
2992
|
-
|
2993
|
-
|
2992
|
+
promptDialog = _useState9[0],
|
2993
|
+
setPromptDialog = _useState9[1];
|
2994
2994
|
|
2995
2995
|
var _useState10 = React.useState(),
|
2996
|
-
|
2997
|
-
|
2996
|
+
preview = _useState10[0],
|
2997
|
+
setPreview = _useState10[1];
|
2998
2998
|
|
2999
2999
|
var _useState11 = React.useState(),
|
3000
|
-
|
3001
|
-
|
3000
|
+
breadcrumb = _useState11[0],
|
3001
|
+
setBreadcrumb = _useState11[1];
|
3002
|
+
|
3003
|
+
var _useState12 = React.useState(),
|
3004
|
+
focused = _useState12[0],
|
3005
|
+
setFocused = _useState12[1];
|
3002
3006
|
|
3003
3007
|
var value = {
|
3004
3008
|
lang: lang,
|
@@ -3051,6 +3055,13 @@
|
|
3051
3055
|
prompt: function prompt(message) {
|
3052
3056
|
return window.prompt(message);
|
3053
3057
|
},
|
3058
|
+
promptDialog: promptDialog,
|
3059
|
+
openPromptDialog: function openPromptDialog(dialog) {
|
3060
|
+
setPromptDialog(dialog);
|
3061
|
+
},
|
3062
|
+
closePromptDialog: function closePromptDialog() {
|
3063
|
+
setPromptDialog(null);
|
3064
|
+
},
|
3054
3065
|
notify: function notify(_ref2) {
|
3055
3066
|
var title = _ref2.title,
|
3056
3067
|
body = _ref2.body,
|
@@ -3105,7 +3116,7 @@
|
|
3105
3116
|
init: init
|
3106
3117
|
}, children, /*#__PURE__*/React__default["default"].createElement(Page, {
|
3107
3118
|
id: "EMPTY"
|
3108
|
-
}, "EMPTY")), /*#__PURE__*/React__default["default"].createElement(SiteAside, null), /*#__PURE__*/React__default["default"].createElement(SiteConsole, null), /*#__PURE__*/React__default["default"].createElement(SiteDialog, null), /*#__PURE__*/React__default["default"].createElement(SitePreview, null), /*#__PURE__*/React__default["default"].createElement(SiteNotifications, null)));
|
3119
|
+
}, "EMPTY")), /*#__PURE__*/React__default["default"].createElement(SiteAside, null), /*#__PURE__*/React__default["default"].createElement(SiteConsole, null), /*#__PURE__*/React__default["default"].createElement(SiteDialog, null), /*#__PURE__*/React__default["default"].createElement(SitePromptDialog, null), /*#__PURE__*/React__default["default"].createElement(SitePreview, null), /*#__PURE__*/React__default["default"].createElement(SiteNotifications, null)));
|
3109
3120
|
};
|
3110
3121
|
|
3111
3122
|
var SiteNotifications = function SiteNotifications() {
|
@@ -3257,6 +3268,15 @@
|
|
3257
3268
|
var context = React.useContext(SiteContext);
|
3258
3269
|
return context.dialog ? context.dialog : '';
|
3259
3270
|
};
|
3271
|
+
/**
|
3272
|
+
* Site Promtp Dialog
|
3273
|
+
*/
|
3274
|
+
|
3275
|
+
|
3276
|
+
var SitePromptDialog = function SitePromptDialog() {
|
3277
|
+
var context = React.useContext(SiteContext);
|
3278
|
+
return context.promptDialog ? context.promptDialog : '';
|
3279
|
+
};
|
3260
3280
|
/**
|
3261
3281
|
* Site Preview
|
3262
3282
|
*/
|
@@ -3311,7 +3331,7 @@
|
|
3311
3331
|
}
|
3312
3332
|
|
3313
3333
|
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
3314
|
-
className: "overlay"
|
3334
|
+
className: "overlay " + className
|
3315
3335
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
3316
3336
|
className: "dialog " + className,
|
3317
3337
|
onClick: close
|