ywana-core8 0.0.505 → 0.0.508
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 +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +5 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +5 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/table.js +1 -1
- package/src/html/table.test.js +2 -1
- package/src/widgets/planner/Planner.js +3 -3
package/package.json
CHANGED
package/src/html/table.js
CHANGED
@@ -230,7 +230,7 @@ const StringCellViewer = ({ id, value, format, options }) => {
|
|
230
230
|
case FORMATS.DATE:
|
231
231
|
let fecha = new Date(text)
|
232
232
|
fecha.setMinutes(fecha.getMinutes() + fecha.getTimezoneOffset() + 1)
|
233
|
-
text = fecha.toLocaleString( locale, {
|
233
|
+
text = fecha.toLocaleString( locale, { day: 'numeric', month: 'numeric', year: 'numeric'});
|
234
234
|
break;
|
235
235
|
case FORMATS.TIME:
|
236
236
|
text = new Date(text).toLocaleString( locale, { year: 'hour', month: 'minute', day: 'second' });
|
package/src/html/table.test.js
CHANGED
@@ -14,7 +14,7 @@ export const TableTest = (prop) => {
|
|
14
14
|
{ id: 6, checked: false, name: "John Smith" , color: "#CCFFFF" },
|
15
15
|
{ id: 7, checked: false, name: "Ann Martin" , color: "#CCFFFF" },
|
16
16
|
{ id: 8, checked: false, name: "Martin Freeman", color: "#CCFFFF" },
|
17
|
-
{ id: 9, checked: false, name: "Ann Martin" , color: "#CCFFFF" },
|
17
|
+
{ id: 9, checked: false, name: "Ann Martin" , color: "#CCFFFF", date: new Date().toString() },
|
18
18
|
]
|
19
19
|
)
|
20
20
|
|
@@ -44,6 +44,7 @@ export const TableTest = (prop) => {
|
|
44
44
|
{ id: "name", label: "Name", type: "String", sortable: true },
|
45
45
|
{ id: "thumb", label: "Thumb", type: "String", format: FORMATS.IMG },
|
46
46
|
{ id: "color", label: "Color", type: "String", format: FORMATS.COLOR },
|
47
|
+
{ id: "date", label: "Date", type: "String", format: FORMATS.DATE },
|
47
48
|
],
|
48
49
|
rows
|
49
50
|
}
|
@@ -129,7 +129,7 @@ export const Planner = ({ title, events = [], lanes = [], navigation = true, onS
|
|
129
129
|
})}
|
130
130
|
</div>
|
131
131
|
|
132
|
-
{lanes.map((lane) => <PlannerRow lane={lane} events={events} period={period} onSelectCell={selectCell} onChange={onChange}/>)}
|
132
|
+
{lanes.map((lane) => <PlannerRow key={lane.id} lane={lane} events={events} period={period} onSelectCell={selectCell} onChange={onChange}/>)}
|
133
133
|
|
134
134
|
</div>
|
135
135
|
</main>
|
@@ -161,7 +161,7 @@ const PlannerRow = (props) => {
|
|
161
161
|
return eventDate.getTime() === slotDate.getTime();
|
162
162
|
})
|
163
163
|
return (
|
164
|
-
<PlannerCell lane={lane} date={date} events={cellEvents} onSelect={onSelectCell} onDrop={change}/>
|
164
|
+
<PlannerCell key={`${lane.id}-${slotDate.toString()}`} lane={lane} date={date} events={cellEvents} onSelect={onSelectCell} onDrop={change}/>
|
165
165
|
);
|
166
166
|
})}
|
167
167
|
</div>
|
@@ -211,7 +211,7 @@ const PlannerCell = ({ lane, events, date, disabled = false, onAdd, onDelete, on
|
|
211
211
|
<div className={`cell ${weekend} ${dragOverStyle}`} onDragOver={onDragOver} onDragLeave={onDragLeave} onDrop={drop} onClick={select}>
|
212
212
|
{events.map(event => {
|
213
213
|
const { Renderer = EventCard } = event
|
214
|
-
return <Renderer event={event} />
|
214
|
+
return <Renderer key={event.id} event={event} />
|
215
215
|
})}
|
216
216
|
</div>
|
217
217
|
);
|