ywana-core8 0.1.73 → 0.1.75

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.1.73",
3
+ "version": "0.1.75",
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
@@ -46,10 +46,6 @@ export const DataTable = (props) => {
46
46
  b = Number(b);
47
47
  }
48
48
 
49
- if (a === b) { // If the values are the same, do not switch positions.
50
- return 0;
51
- }
52
-
53
49
  // If b > a, multiply by -1 to get the reverse direction.
54
50
  return a > b ? direction : -1 * direction;
55
51
  };
@@ -244,6 +240,11 @@ const DataTableCell = ({ index, row, column, cell, editable }) => {
244
240
  case "String": return <StringCellViewer id={id} value={cell} format={format} options={options} action={action} />
245
241
  case "Number": return <NumberCellViewer id={id} value={cell} format={format} maxDecimals={maxDecimals} />
246
242
  case "Image": return <img src={cell} />
243
+ case "DATETIME":
244
+ const locale = window.navigator.userLanguage || window.navigator.language;
245
+ let date = new Date(cell)
246
+ date.setMinutes(date.getMinutes() + date.getTimezoneOffset() + 1)
247
+ return <span>{date.toLocaleString(locale, { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' })}</span>
247
248
  default: return cell
248
249
  }
249
250
  }
@@ -209,7 +209,7 @@ export const DropDown = (props) => {
209
209
 
210
210
  const title = editable ? <div className='row'>{props.label}<Icon className="decorator" icon="edit" size="small" /></div> : props.label
211
211
  return (
212
- <div className={`dropdown ${className}`}>
212
+ <div className={`dropdown ${className} ${id}`}>
213
213
  <TextField {...props} label={title} onClick={onFocus} value={label} onChange={change} onBlur={blur} readOnly={!predictive && !editable} />
214
214
  {!readOnly ? <Icon icon="expand_more" clickable size="small" action={toggle} /> : null}
215
215
  {renderOptions()}