ywana-core8 0.0.500 → 0.0.503

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.500",
3
+ "version": "0.0.503",
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) {
@@ -42,6 +42,7 @@
42
42
  font-size: 1rem;
43
43
  font-weight: 600;
44
44
  padding: 1rem;
45
+ display: flex;
45
46
  }
46
47
 
47
48
  .dialog-panel > main {
@@ -6,28 +6,29 @@ import './dialog.css'
6
6
  /**
7
7
  * Dialog
8
8
  *
9
- * <Dialog title={title} open={true} onAction={onAction} actions={actions}>
9
+ * <Dialog title={title} open={true} actions={actions}>
10
10
  */
11
11
  export const Dialog = (props) => {
12
12
 
13
13
  const site = useContext(SiteContext)
14
- const { icon, title = "Dialog", children, onAction, actions, className } = props
14
+ const { icon, title = "Dialog", toolbar, children, actions, className } = props
15
15
 
16
16
  function close() {
17
17
  if (className === "prompt") {
18
18
  site.closePromptDialog()
19
19
  } else {
20
- site.closeDialog()
20
+ site.closeDialog()
21
21
  }
22
22
  }
23
23
 
24
24
  return (
25
25
  <Fragment>
26
26
  <div className={`overlay ${className}`} onMouseDown={close} />
27
- <dialog className={`dialog-panel ${className}`}>
27
+ <dialog className={`dialog-panel ${className}`}>
28
28
  <header>
29
29
  {icon ? <MenuIcon icon={icon} /> : null}
30
30
  <Text>{title}</Text>
31
+ {toolbar}
31
32
  </header>
32
33
  <main>
33
34
  {children}