ywana-core8 0.0.502 → 0.0.505

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.502",
3
+ "version": "0.0.505",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
package/src/html/table.js CHANGED
@@ -1,4 +1,4 @@
1
- import React, { Fragment, useState, useEffect } from 'react'
1
+ import React, { Fragment, useState } from 'react'
2
2
  import { FORMATS, TYPES } from '../domain/ContentType'
3
3
  import { DropDown, TextField } from './textfield'
4
4
  import { CheckBox } from './checkbox'
@@ -17,10 +17,6 @@ export const DataTable = (props) => {
17
17
  const [sortDir, setSortDir] = useState({})
18
18
  const [allChecked, setAllChecked] = useState(false)
19
19
 
20
- useEffect(() => {
21
- console.log(sortDir)
22
- }, [sortDir])
23
-
24
20
  function changeSort(id) {
25
21
  const nextDir = sortDir[id] ? sortDir[id] * -1 : 1
26
22
  const next = Object.assign({}, sortDir, { [id]: nextDir })
@@ -28,8 +24,6 @@ export const DataTable = (props) => {
28
24
  }
29
25
 
30
26
  function multiSort(array, sortObject = {}) {
31
-
32
- console.log('multisort', sortObject)
33
27
  const sortKeys = Object.keys(sortObject);
34
28
 
35
29
  if (!sortKeys.length) {
package/src/site/site.js CHANGED
@@ -21,7 +21,7 @@ export const SiteProvider = ({ children, siteLang, siteDictionary }) => {
21
21
  const [sideNav, setSideNav] = useState('max')
22
22
  const [showNav, setShowNav] = useState(false)
23
23
  const [info, setInfo] = useState(null)
24
- const [showConsole, setShowConsole] = useState(true)
24
+ const [showConsole, setShowConsole] = useState(false)
25
25
  const [consoleLines, setConsoleLines] = useState([])
26
26
  const [page, setPage] = useState()
27
27
  const [dialog, setDialog] = useState()
@@ -15,17 +15,17 @@ const DATE_RANGE = [
15
15
  /**
16
16
  * Planner
17
17
  */
18
- export const Planner = ({ title, events = [], lanes = [], navigation = true, onSelectCell, focusEvent, onChange }) => {
18
+ export const Planner = ({ title, events = [], lanes = [], navigation = true, onSelectCell, focusEvent, config = { range: "year", from: "2022-01-01", to: "2022-12-30"}, onChange }) => {
19
19
 
20
- const [dateRange, setDateRange] = useState("year");
21
- const [from, setFrom] = useState("2022-01-01");
22
- const [to, setTo] = useState("2022-12-30");
20
+ const [dateRange, setDateRange] = useState(config.range);
21
+ const [from, setFrom] = useState(config.from);
22
+ const [to, setTo] = useState(config.to);
23
23
 
24
24
  useEffect(() => {
25
25
  const element = document.getElementById(focusEvent)
26
26
  if (element) element.scrollIntoView({
27
27
  behavior: 'smooth',
28
- block: 'start',
28
+ block: 'center',
29
29
  inline: 'center'
30
30
  })
31
31
  }, [focusEvent])