@mlw-packages/react-components 1.10.24 → 1.10.25

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.js CHANGED
@@ -10338,7 +10338,8 @@ function EventAgenda({
10338
10338
  let availableViews;
10339
10339
  if (optionsViewEvents?.length == 0 || !optionsViewEvents)
10340
10340
  availableViews = showYearView ? ["year", "month", "week", "day", "agenda"] : ["month", "week", "day", "agenda"];
10341
- else availableViews = [...new Set(optionsViewEvents.map((options) => options))];
10341
+ else
10342
+ availableViews = [...new Set(optionsViewEvents.map((options) => options))];
10342
10343
  const selectItems = availableViews.map(
10343
10344
  (v) => ({
10344
10345
  label: viewLabel(v),
@@ -10437,7 +10438,12 @@ function EventAgenda({
10437
10438
  events,
10438
10439
  onEventSelect: handleEventSelect,
10439
10440
  noTime,
10440
- onEventCreate: allowCellClick ? (d) => console.log(d) : void 0
10441
+ onEventCreate: allowCellClick ? (d) => onEventUpdate?.({
10442
+ start: d,
10443
+ end: d,
10444
+ title: "Novo Evento",
10445
+ id: crypto.randomUUID()
10446
+ }) : void 0
10441
10447
  }
10442
10448
  ),
10443
10449
  activeView === "agenda" && /* @__PURE__ */ jsxRuntime.jsx(
package/dist/index.mjs CHANGED
@@ -10296,7 +10296,8 @@ function EventAgenda({
10296
10296
  let availableViews;
10297
10297
  if (optionsViewEvents?.length == 0 || !optionsViewEvents)
10298
10298
  availableViews = showYearView ? ["year", "month", "week", "day", "agenda"] : ["month", "week", "day", "agenda"];
10299
- else availableViews = [...new Set(optionsViewEvents.map((options) => options))];
10299
+ else
10300
+ availableViews = [...new Set(optionsViewEvents.map((options) => options))];
10300
10301
  const selectItems = availableViews.map(
10301
10302
  (v) => ({
10302
10303
  label: viewLabel(v),
@@ -10395,7 +10396,12 @@ function EventAgenda({
10395
10396
  events,
10396
10397
  onEventSelect: handleEventSelect,
10397
10398
  noTime,
10398
- onEventCreate: allowCellClick ? (d) => console.log(d) : void 0
10399
+ onEventCreate: allowCellClick ? (d) => onEventUpdate?.({
10400
+ start: d,
10401
+ end: d,
10402
+ title: "Novo Evento",
10403
+ id: crypto.randomUUID()
10404
+ }) : void 0
10399
10405
  }
10400
10406
  ),
10401
10407
  activeView === "agenda" && /* @__PURE__ */ jsx(
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "access": "public",
6
6
  "type": "module"
7
7
  },
8
- "version": "1.10.24",
8
+ "version": "1.10.25",
9
9
  "homepage": "https://main--68e80310a069c2f10b546ef3.chromatic.com/",
10
10
  "repository": {
11
11
  "type": "git",