ywana-core8 0.0.352 → 0.0.355
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 +118 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +127 -2
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +117 -15
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +118 -14
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -1
- package/src/html/menu.css +4 -2
- package/src/html/menu.js +2 -2
- package/src/html/text.test.js +2 -0
- package/src/http/token.test.js +39 -0
- package/src/site/site.css +4 -0
- package/src/site/site.js +16 -1
- package/src/site/site.test.js +4 -1
- package/src/widgets/explorer/Explorer.css +118 -0
- package/src/widgets/explorer/Explorer.js +77 -0
- package/src/widgets/explorer/Explorer.test.js +35 -0
- package/src/widgets/index.js +2 -1
package/dist/index.modern.js
CHANGED
@@ -631,7 +631,9 @@ var MenuIcon = function MenuIcon(props) {
|
|
631
631
|
var _props$icon = props.icon,
|
632
632
|
icon = _props$icon === void 0 ? "more_vert" : _props$icon,
|
633
633
|
children = props.children,
|
634
|
-
align = props.align
|
634
|
+
align = props.align,
|
635
|
+
_props$size = props.size,
|
636
|
+
size = _props$size === void 0 ? "normal" : _props$size;
|
635
637
|
|
636
638
|
var _useState = useState(false),
|
637
639
|
open = _useState[0],
|
@@ -647,6 +649,7 @@ var MenuIcon = function MenuIcon(props) {
|
|
647
649
|
className: "menu-icon"
|
648
650
|
}, /*#__PURE__*/React.createElement(Icon, {
|
649
651
|
icon: icon,
|
652
|
+
size: size,
|
650
653
|
clickable: true,
|
651
654
|
action: toggle
|
652
655
|
}), open ? /*#__PURE__*/React.createElement("menu", {
|
@@ -3097,6 +3100,7 @@ var Site = function Site(_ref3) {
|
|
3097
3100
|
logo = _ref3.logo,
|
3098
3101
|
title = _ref3.title,
|
3099
3102
|
toolbar = _ref3.toolbar,
|
3103
|
+
footer = _ref3.footer,
|
3100
3104
|
children = _ref3.children,
|
3101
3105
|
init = _ref3.init,
|
3102
3106
|
min = _ref3.min,
|
@@ -3118,7 +3122,7 @@ var Site = function Site(_ref3) {
|
|
3118
3122
|
init: init
|
3119
3123
|
}, children, /*#__PURE__*/React.createElement(Page, {
|
3120
3124
|
id: "EMPTY"
|
3121
|
-
}, "EMPTY")), /*#__PURE__*/React.createElement(SiteAside, null), /*#__PURE__*/React.createElement(SiteConsole, null), /*#__PURE__*/React.createElement(SiteDialog, null), /*#__PURE__*/React.createElement(SitePromptDialog, null), /*#__PURE__*/React.createElement(SitePreview, null), /*#__PURE__*/React.createElement(SiteNotifications, null)));
|
3125
|
+
}, "EMPTY")), /*#__PURE__*/React.createElement(SiteAside, null), /*#__PURE__*/React.createElement(SiteConsole, null), /*#__PURE__*/React.createElement(SiteDialog, null), /*#__PURE__*/React.createElement(SitePromptDialog, null), /*#__PURE__*/React.createElement(SitePreview, null), /*#__PURE__*/React.createElement(SiteNotifications, null), /*#__PURE__*/React.createElement(SiteFooter, null, footer)));
|
3122
3126
|
};
|
3123
3127
|
|
3124
3128
|
var SiteNotifications = function SiteNotifications() {
|
@@ -3148,6 +3152,16 @@ var SiteToolBar = function SiteToolBar(_ref4) {
|
|
3148
3152
|
useContext(SiteContext);
|
3149
3153
|
return /*#__PURE__*/React.createElement("nav", null, children);
|
3150
3154
|
};
|
3155
|
+
/**
|
3156
|
+
* Site Footer
|
3157
|
+
*/
|
3158
|
+
|
3159
|
+
|
3160
|
+
var SiteFooter = function SiteFooter(_ref5) {
|
3161
|
+
var children = _ref5.children;
|
3162
|
+
useContext(SiteContext);
|
3163
|
+
return /*#__PURE__*/React.createElement("footer", null, children);
|
3164
|
+
};
|
3151
3165
|
/**
|
3152
3166
|
* Site Aside
|
3153
3167
|
*/
|
@@ -3162,10 +3176,10 @@ var SiteAside = function SiteAside() {
|
|
3162
3176
|
*/
|
3163
3177
|
|
3164
3178
|
|
3165
|
-
var SiteMenu = function SiteMenu(
|
3166
|
-
var title =
|
3167
|
-
children =
|
3168
|
-
min =
|
3179
|
+
var SiteMenu = function SiteMenu(_ref6) {
|
3180
|
+
var title = _ref6.title,
|
3181
|
+
children = _ref6.children,
|
3182
|
+
min = _ref6.min;
|
3169
3183
|
var context = useContext(SiteContext);
|
3170
3184
|
var page = context.page,
|
3171
3185
|
sideNav = context.sideNav,
|
@@ -3211,11 +3225,11 @@ var SiteMenu = function SiteMenu(_ref5) {
|
|
3211
3225
|
key: title
|
3212
3226
|
}, /*#__PURE__*/React.createElement("div", {
|
3213
3227
|
className: "section-title " + style
|
3214
|
-
}, sideNav === "max" ? title : ''), sections[title].map(function (
|
3215
|
-
var id =
|
3216
|
-
|
3217
|
-
icon =
|
3218
|
-
title =
|
3228
|
+
}, sideNav === "max" ? title : ''), sections[title].map(function (_ref7) {
|
3229
|
+
var id = _ref7.id,
|
3230
|
+
_ref7$icon = _ref7.icon,
|
3231
|
+
icon = _ref7$icon === void 0 ? 'info' : _ref7$icon,
|
3232
|
+
title = _ref7.title;
|
3219
3233
|
var styleItem = id === page ? 'selected' : '';
|
3220
3234
|
return /*#__PURE__*/React.createElement("div", {
|
3221
3235
|
className: "site-menu-item " + styleItem,
|
@@ -3245,9 +3259,9 @@ var SiteMenu = function SiteMenu(_ref5) {
|
|
3245
3259
|
*/
|
3246
3260
|
|
3247
3261
|
|
3248
|
-
var SitePage = function SitePage(
|
3249
|
-
var children =
|
3250
|
-
init =
|
3262
|
+
var SitePage = function SitePage(_ref8) {
|
3263
|
+
var children = _ref8.children,
|
3264
|
+
init = _ref8.init;
|
3251
3265
|
var context = useContext(SiteContext);
|
3252
3266
|
var page = context.page;
|
3253
3267
|
useEffect(function () {
|
@@ -3445,6 +3459,94 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
3445
3459
|
}));
|
3446
3460
|
};
|
3447
3461
|
|
3462
|
+
/**
|
3463
|
+
* File Explorer
|
3464
|
+
*/
|
3465
|
+
|
3466
|
+
var FileExplorer = function FileExplorer(props) {
|
3467
|
+
var _props$files = props.files,
|
3468
|
+
files = _props$files === void 0 ? [] : _props$files;
|
3469
|
+
return /*#__PURE__*/React.createElement("div", {
|
3470
|
+
className: "file-explorer"
|
3471
|
+
}, /*#__PURE__*/React.createElement("header", null, "header"), /*#__PURE__*/React.createElement("nav", null, "nav"), /*#__PURE__*/React.createElement("menu", null, "menu"), /*#__PURE__*/React.createElement("main", null, /*#__PURE__*/React.createElement(FileIconsView, {
|
3472
|
+
files: files
|
3473
|
+
})), /*#__PURE__*/React.createElement("aside", null), /*#__PURE__*/React.createElement("footer", null, "footer"));
|
3474
|
+
};
|
3475
|
+
/**
|
3476
|
+
* File Icons View
|
3477
|
+
*/
|
3478
|
+
|
3479
|
+
var FileIconsView = function FileIconsView(props) {
|
3480
|
+
var _props$files2 = props.files,
|
3481
|
+
files = _props$files2 === void 0 ? [] : _props$files2,
|
3482
|
+
onSelect = props.onSelect;
|
3483
|
+
|
3484
|
+
var _useState = useState(),
|
3485
|
+
selected = _useState[0],
|
3486
|
+
setSelected = _useState[1];
|
3487
|
+
|
3488
|
+
function select(id) {
|
3489
|
+
setSelected(id);
|
3490
|
+
if (onSelect) onSelect(id);
|
3491
|
+
}
|
3492
|
+
|
3493
|
+
function isSelected(id) {
|
3494
|
+
return selected === id;
|
3495
|
+
}
|
3496
|
+
|
3497
|
+
return /*#__PURE__*/React.createElement("div", {
|
3498
|
+
className: "file-view file-view--icons"
|
3499
|
+
}, files.map(function (file) {
|
3500
|
+
return /*#__PURE__*/React.createElement(FileIcon, {
|
3501
|
+
file: file,
|
3502
|
+
onSelect: select,
|
3503
|
+
selected: isSelected(file.id)
|
3504
|
+
});
|
3505
|
+
}));
|
3506
|
+
};
|
3507
|
+
/**
|
3508
|
+
* File Icon
|
3509
|
+
*/
|
3510
|
+
|
3511
|
+
var FileIcon = function FileIcon(props) {
|
3512
|
+
var _props$file = props.file,
|
3513
|
+
file = _props$file === void 0 ? {} : _props$file,
|
3514
|
+
_props$selected = props.selected,
|
3515
|
+
selected = _props$selected === void 0 ? false : _props$selected,
|
3516
|
+
onSelect = props.onSelect;
|
3517
|
+
var id = file.id,
|
3518
|
+
icon = file.icon,
|
3519
|
+
label = file.label,
|
3520
|
+
_file$actions = file.actions,
|
3521
|
+
actions = _file$actions === void 0 ? [] : _file$actions,
|
3522
|
+
_file$src = file.src,
|
3523
|
+
src = _file$src === void 0 ? "https://findicons.com/files/icons/2813/flat_jewels/256/file.png" : _file$src,
|
3524
|
+
footer = file.footer;
|
3525
|
+
|
3526
|
+
function select() {
|
3527
|
+
if (onSelect && !selected) onSelect(id);
|
3528
|
+
}
|
3529
|
+
|
3530
|
+
var style = selected ? 'file-icon--selected' : '';
|
3531
|
+
return /*#__PURE__*/React.createElement("div", {
|
3532
|
+
className: "file-icon " + style,
|
3533
|
+
onClick: select
|
3534
|
+
}, /*#__PURE__*/React.createElement("header", null, icon ? /*#__PURE__*/React.createElement(Icon, {
|
3535
|
+
size: "small",
|
3536
|
+
icon: icon
|
3537
|
+
}) : null, /*#__PURE__*/React.createElement(MenuIcon, {
|
3538
|
+
size: "small"
|
3539
|
+
}, actions.map(function (action) {
|
3540
|
+
return /*#__PURE__*/React.createElement(MenuItem, {
|
3541
|
+
icon: action.icon,
|
3542
|
+
label: action.label,
|
3543
|
+
onSelect: action.execute
|
3544
|
+
});
|
3545
|
+
}))), /*#__PURE__*/React.createElement("picture", null, /*#__PURE__*/React.createElement("img", {
|
3546
|
+
src: src
|
3547
|
+
})), /*#__PURE__*/React.createElement("main", null, /*#__PURE__*/React.createElement("label", null, label)), footer ? /*#__PURE__*/React.createElement("footer", null, footer) : null);
|
3548
|
+
};
|
3549
|
+
|
3448
3550
|
/**
|
3449
3551
|
* Content Form
|
3450
3552
|
*/
|
@@ -6057,5 +6159,5 @@ var isFunction = function isFunction(value) {
|
|
6057
6159
|
return value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
|
6058
6160
|
};
|
6059
6161
|
|
6060
|
-
export { Avatar, Button, CheckBox, Chip, Chips, CircularProgress, CollectionContext, CollectionEditor$1 as CollectionEditor, CollectionPage, CollectionTree, Content, ContentEditor, ContentForm, CreateContentDialog, DataTable, Dialog, DropDown, EditContentDialog, FORMATS, FieldEditor, Form, HTTPClient, Header, Icon, Kanban, KanbanCard, KanbanColumn, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, Page, PageContext, PageProvider, Planner, Property, RadioButton, ResetPasswordBox, Section, Session, Site, SiteContext, SiteProvider, Stack, Switch, TEXTFORMATS, TYPES, Tab, TabbedContentEditor, TableEditor, TablePage, Tabs, Text, TextArea, TextField, Thumbnail, TokenField, Tooltip, Tree, TreeItem, TreeNode, TreededContentEditor, UploadArea, UploadDialog, UploadFile, UploadIcon, Uploader, View, Viewer, WaitScreen, isFunction };
|
6162
|
+
export { Avatar, Button, CheckBox, Chip, Chips, CircularProgress, CollectionContext, CollectionEditor$1 as CollectionEditor, CollectionPage, CollectionTree, Content, ContentEditor, ContentForm, CreateContentDialog, DataTable, Dialog, DropDown, EditContentDialog, FORMATS, FieldEditor, FileExplorer, FileIconsView, Form, HTTPClient, Header, Icon, Kanban, KanbanCard, KanbanColumn, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, Page, PageContext, PageProvider, Planner, Property, RadioButton, ResetPasswordBox, Section, Session, Site, SiteContext, SiteProvider, Stack, Switch, TEXTFORMATS, TYPES, Tab, TabbedContentEditor, TableEditor, TablePage, Tabs, Text, TextArea, TextField, Thumbnail, TokenField, Tooltip, Tree, TreeItem, TreeNode, TreededContentEditor, UploadArea, UploadDialog, UploadFile, UploadIcon, Uploader, View, Viewer, WaitScreen, isFunction };
|
6061
6163
|
//# sourceMappingURL=index.modern.js.map
|