ywana-core8 0.0.504 → 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.504",
3
+ "version": "0.0.505",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -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])