ywana-core8 0.0.888 → 0.0.889

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.
@@ -4297,6 +4297,53 @@ var UploadDialog = function UploadDialog(_ref) {
4297
4297
  }), children);
4298
4298
  };
4299
4299
 
4300
+ /**
4301
+ * File Explorer
4302
+ */
4303
+ var FileExplorer = function FileExplorer(props) {
4304
+ var _useState = useState("10002"),
4305
+ selectedFolder = _useState[0],
4306
+ setSelectedFolder = _useState[1];
4307
+ var _useState2 = useState(),
4308
+ selectedFile = _useState2[0],
4309
+ setSelectedFile = _useState2[1];
4310
+ var _useState3 = useState(),
4311
+ search = _useState3[0],
4312
+ setSearch = _useState3[1];
4313
+ function selectFolder(id) {
4314
+ setSelectedFolder(id);
4315
+ }
4316
+ function selectFile(id) {
4317
+ setSelectedFile(id);
4318
+ }
4319
+ function searchChanged(value) {
4320
+ setSearch(value);
4321
+ }
4322
+ var filteredFiles = search ? files.filter(function (file) {
4323
+ return file.title.toLowerCase().includes(search.toLowerCase());
4324
+ }) : files;
4325
+ var selectedFiles = filteredFiles.filter(function (file) {
4326
+ return file.folder === selectedFolder;
4327
+ });
4328
+ return /*#__PURE__*/React.createElement("div", {
4329
+ style: {
4330
+ padding: "1rem",
4331
+ flex: "1",
4332
+ height: "100%"
4333
+ }
4334
+ }, /*#__PURE__*/React.createElement(FileExplorerView, {
4335
+ title: "File Explorer Test",
4336
+ folders: folders,
4337
+ selectedFolder: selectedFolder,
4338
+ onSelectFolder: selectFolder,
4339
+ files: selectedFiles,
4340
+ selectedFile: selectedFile,
4341
+ onSelectFile: selectFile,
4342
+ search: search,
4343
+ onSearch: searchChanged
4344
+ }));
4345
+ };
4346
+
4300
4347
  /**
4301
4348
  * File Explorer View
4302
4349
  */
@@ -11042,5 +11089,5 @@ var isFunction = function isFunction(value) {
11042
11089
  return value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
11043
11090
  };
11044
11091
 
11045
- export { Accordion, Avatar, Button, Calendar, CheckBox, Chip, Chips, CircularProgress, CollectionAPI$1 as CollectionAPI, CollectionAPI as CollectionAPI2, CollectionContext$1 as CollectionContext, CollectionContext as CollectionContext2, CollectionEditor$2 as CollectionEditor, CollectionFilters$1 as CollectionFilters, CollectionPage$1 as CollectionPage, CollectionPage as CollectionPage2, CollectionTree, ColorField, Content, ContentEditor, ContentForm, ContentViewer, CreateContentDialog, DataTable, DateRange, Dialog, DropDown, DynamicForm, EditContentDialog, EmptyMessage, FORMATS$1 as FORMATS, FieldEditor, FileExplorerView, FilesGridView, FilesSearchBox, FoldersTreeView, Form, HTTPClient, Header, Icon, ImageViewer, Kanban, KanbanCard, KanbanColumn, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, MultiSelector, Page, PageContext, PageProvider, PasswordEditor, PasswordField, Planner, Property, RadioButton, ResetPasswordBox, Section, Session, Site, SiteContext, SiteProvider, Stack, Switch, Switch2, TASK_STATES, TEXTFORMATS, TYPES$1 as TYPES, Tab, TabbedContentEditor, TabbedTablePage, TabbedView, TableEditor$2 as TableEditor, TablePage, TablePage2, Tabs, TaskContext, TaskContextProvider, TaskMonitor, TaskProgress, Text, TextArea, TextField, Thumbnail, ToggleButton, TokenField, Tooltip, Tree, TreeItem, TreeNode, TreededContentEditor, UploadArea, UploadDialog, UploadFile$1 as UploadFile, UploadForm, UploadIcon, Uploader, View, Viewer, WaitScreen, Wizard, WizardContext, isEmpty, isFunction };
11092
+ export { Accordion, Avatar, Button, Calendar, CheckBox, Chip, Chips, CircularProgress, CollectionAPI$1 as CollectionAPI, CollectionAPI as CollectionAPI2, CollectionContext$1 as CollectionContext, CollectionContext as CollectionContext2, CollectionEditor$2 as CollectionEditor, CollectionFilters$1 as CollectionFilters, CollectionPage$1 as CollectionPage, CollectionPage as CollectionPage2, CollectionTree, ColorField, Content, ContentEditor, ContentForm, ContentViewer, CreateContentDialog, DataTable, DateRange, Dialog, DropDown, DynamicForm, EditContentDialog, EmptyMessage, FORMATS$1 as FORMATS, FieldEditor, FileExplorer, FileExplorerView, FileGridItem, FilesGridView, FilesSearchBox, FilesTableView, FoldersTreeView, Form, HTTPClient, Header, Icon, ImageViewer, Kanban, KanbanCard, KanbanColumn, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, MultiSelector, Page, PageContext, PageProvider, PasswordEditor, PasswordField, Planner, Property, RadioButton, ResetPasswordBox, Section, Session, Site, SiteContext, SiteProvider, Stack, Switch, Switch2, TASK_STATES, TEXTFORMATS, TYPES$1 as TYPES, Tab, TabbedContentEditor, TabbedTablePage, TabbedView, TableEditor$2 as TableEditor, TablePage, TablePage2, Tabs, TaskContext, TaskContextProvider, TaskMonitor, TaskProgress, Text, TextArea, TextField, Thumbnail, ToggleButton, TokenField, Tooltip, Tree, TreeItem, TreeNode, TreededContentEditor, UploadArea, UploadDialog, UploadFile$1 as UploadFile, UploadForm, UploadIcon, Uploader, View, Viewer, WaitScreen, Wizard, WizardContext, isEmpty, isFunction };
11046
11093
  //# sourceMappingURL=index.modern.js.map