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/dist/index.cjs +13 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +13 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +13 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/table.js +5 -4
- package/src/html/textfield.js +1 -1
package/package.json
CHANGED
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
|
}
|
package/src/html/textfield.js
CHANGED
@@ -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()}
|