ywana-core8 0.1.57 → 0.1.59

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.
@@ -3,7 +3,6 @@ import React, { useContext, useState, useEffect, useCallback, Fragment, useRef,
3
3
  import ResumableJS from 'resumablejs';
4
4
  import RSwitch from 'react-switch';
5
5
  import { Store, ReactNotifications } from 'react-notifications-component';
6
- import { AnimatePresence, motion } from 'framer-motion';
7
6
  import 'react-notifications-component/dist/theme.css';
8
7
  import moment$1 from 'moment';
9
8
  import { extendMoment } from 'moment-range';
@@ -3357,6 +3356,7 @@ function useHashPage(defaultPage) {
3357
3356
  history = _useState2[0],
3358
3357
  setHistory = _useState2[1];
3359
3358
  var _useState3 = useState("left"),
3359
+ direction = _useState3[0],
3360
3360
  setDirection = _useState3[1];
3361
3361
  var isFirstLoad = useRef(true);
3362
3362
  useEffect(function () {
@@ -3404,7 +3404,8 @@ function useHashPage(defaultPage) {
3404
3404
  page: page,
3405
3405
  "goto": _goto,
3406
3406
  goBack: goBack,
3407
- history: history
3407
+ history: history,
3408
+ direction: direction
3408
3409
  };
3409
3410
  }
3410
3411
 
@@ -3451,7 +3452,8 @@ var SiteProvider = function SiteProvider(_ref) {
3451
3452
  var _useHashPage = useHashPage(),
3452
3453
  page = _useHashPage.page,
3453
3454
  _goto = _useHashPage["goto"],
3454
- goBack = _useHashPage.goBack;
3455
+ goBack = _useHashPage.goBack,
3456
+ direction = _useHashPage.direction;
3455
3457
  var value = {
3456
3458
  lang: lang,
3457
3459
  setLang: setLang,
@@ -3489,6 +3491,7 @@ var SiteProvider = function SiteProvider(_ref) {
3489
3491
  page: page,
3490
3492
  "goto": _goto,
3491
3493
  goBack: goBack,
3494
+ direction: direction,
3492
3495
  dialog: dialog,
3493
3496
  openDialog: function openDialog(dialog) {
3494
3497
  setDialog(dialog);
@@ -3710,8 +3713,7 @@ var SitePage = function SitePage(_ref8) {
3710
3713
  var children = _ref8.children,
3711
3714
  init = _ref8.init;
3712
3715
  var context = useContext(SiteContext);
3713
- var page = context.page,
3714
- direction = context.direction;
3716
+ var page = context.page;
3715
3717
  useEffect(function () {
3716
3718
  if (init) {
3717
3719
  context["goto"](init);
@@ -3719,32 +3721,9 @@ var SitePage = function SitePage(_ref8) {
3719
3721
  context["goto"]("EMPTY");
3720
3722
  }
3721
3723
  }, []);
3722
- var currentPage = React.Children.toArray(children).filter(function (child) {
3724
+ return /*#__PURE__*/React.createElement("main", null, React.Children.toArray(children).filter(function (child) {
3723
3725
  return child.props ? child.props.id === page : false;
3724
- });
3725
- var xOffset = direction === "left" ? 40 : -40;
3726
- return /*#__PURE__*/React.createElement("main", {
3727
- className: "site-page-container"
3728
- }, /*#__PURE__*/React.createElement(AnimatePresence, {
3729
- exitBeforeEnter: true
3730
- }, currentPage && /*#__PURE__*/React.createElement(motion.div, {
3731
- key: page,
3732
- initial: {
3733
- opacity: 0,
3734
- x: xOffset
3735
- },
3736
- animate: {
3737
- opacity: 1,
3738
- x: 0
3739
- },
3740
- exit: {
3741
- opacity: 0,
3742
- x: -xOffset
3743
- },
3744
- transition: {
3745
- duration: 0.3
3746
- }
3747
- }, currentPage)));
3726
+ }));
3748
3727
  };
3749
3728
 
3750
3729
  /**
@@ -3930,10 +3909,10 @@ var PageLink = function PageLink(_ref) {
3930
3909
  _ref$style = _ref.style,
3931
3910
  style = _ref$style === void 0 ? {} : _ref$style;
3932
3911
  var _useContext = useContext(SiteContext),
3933
- _goto2 = _useContext["goto"];
3912
+ _goto = _useContext["goto"];
3934
3913
  var handleClick = function handleClick(e) {
3935
3914
  e.preventDefault();
3936
- _goto2(page);
3915
+ _goto(page);
3937
3916
  };
3938
3917
  return /*#__PURE__*/React.createElement("a", {
3939
3918
  href: "#" + page,
@@ -12841,5 +12820,5 @@ var isFunction = function isFunction(value) {
12841
12820
  return value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
12842
12821
  };
12843
12822
 
12844
- export { Accordion, ActionButton, Avatar, Button, Calendar, ChangeUserPasswordAction, ChangeUserPasswordDialog, 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, ForgetUserPasswordAction, Form, HTTPClient, Header, Icon, ImageViewer, Kanban, KanbanCard, KanbanColumn, KanbanHeader, KanbanSwimlane, LOGIN_API, LOGIN_CONTEXT, LOGIN_DICTIONARY, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, MonthCalendar, MultiSelector, Page, PageContext, PageLink, PageProvider, PasswordEditor, PasswordField, Planner, Planner2, 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, UnlockUserAction, UploadArea, UploadDialog, UploadFile$1 as UploadFile, UploadForm, UploadIcon, Uploader, View, Viewer, WaitScreen, Wizard, WizardContext, isEmpty, isFunction, validatePassword };
12823
+ export { Accordion, ActionButton, Avatar, Button, Calendar, ChangeUserPasswordAction, ChangeUserPasswordDialog, 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, ForgetUserPasswordAction, Form, HTTPClient, Header, Icon, ImageViewer, Kanban, KanbanCard, KanbanColumn, KanbanHeader, KanbanSwimlane, LOGIN_API, LOGIN_CONTEXT, LOGIN_DICTIONARY, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, MonthCalendar, MultiSelector, Page, PageContext, PageLink, PageProvider, PasswordEditor, PasswordField, Planner, Planner2, 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, UnlockUserAction, UploadArea, UploadDialog, UploadFile$1 as UploadFile, UploadForm, UploadIcon, Uploader, View, Viewer, WaitScreen, Wizard, WizardContext, isEmpty, isFunction, useHashPage, validatePassword };
12845
12824
  //# sourceMappingURL=index.modern.js.map