@economic/taco 2.70.0 → 2.70.2-release-reverts.0

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/taco.cjs CHANGED
@@ -16980,7 +16980,8 @@ const Navbar = React__namespace.memo(({ onMonthChange, value = /* @__PURE__ */ n
16980
16980
  icon: "chevron-left",
16981
16981
  "aria-label": actions.previousMonth,
16982
16982
  onClick: onPreviousClick,
16983
- rounded: true
16983
+ rounded: true,
16984
+ "data-action": "prev-month"
16984
16985
  }
16985
16986
  )), /* @__PURE__ */ React__namespace.createElement(Tooltip$3, { title: actions.nextMonth }, /* @__PURE__ */ React__namespace.createElement(
16986
16987
  IconButton,
@@ -16989,7 +16990,8 @@ const Navbar = React__namespace.memo(({ onMonthChange, value = /* @__PURE__ */ n
16989
16990
  icon: "chevron-right",
16990
16991
  "aria-label": actions.nextMonth,
16991
16992
  onClick: onNextClick,
16992
- rounded: true
16993
+ rounded: true,
16994
+ "data-action": "next-month"
16993
16995
  }
16994
16996
  ))));
16995
16997
  });
@@ -17006,7 +17008,8 @@ const TodayButton = ({ handleChange }) => {
17006
17008
  Button$3,
17007
17009
  {
17008
17010
  className: "cursor-pointer border-none bg-transparent text-xs text-blue-500 hover:text-blue-300",
17009
- onClick: handleCalendarClickToday
17011
+ onClick: handleCalendarClickToday,
17012
+ "data-action": "today"
17010
17013
  },
17011
17014
  texts.calendar.actions.today
17012
17015
  );
@@ -55957,17 +55960,10 @@ function EditingControlCell(props) {
55957
55960
  const handleFocus = useEditingCellAutofocus(props);
55958
55961
  const value = cell.getValue();
55959
55962
  const rowChanges = tableMeta.editing.getRowValue(cell.row.id);
55960
- const shouldRunUpdate = React.useRef(false);
55961
55963
  const hasNonTextControl = React.useMemo(() => {
55962
55964
  var _a;
55963
55965
  return typeof type === "function" && !!((_a = cellRef.current) == null ? void 0 : _a.querySelector('[data-taco="Select2"],[data-taco="switch"],[data-taco="checkbox"]'));
55964
55966
  }, [cellRef.current]);
55965
- useLazyEffect(() => {
55966
- if (hasNonTextControl && shouldRunUpdate.current) {
55967
- tableMeta.editing.onCellChanged(cell, rowIndex, value, true, false);
55968
- shouldRunUpdate.current = false;
55969
- }
55970
- }, [value]);
55971
55967
  const handleChange = React.useCallback(
55972
55968
  (nextValue) => {
55973
55969
  let hasChanged = false;
@@ -55984,7 +55980,9 @@ function EditingControlCell(props) {
55984
55980
  }
55985
55981
  if (hasChanged) {
55986
55982
  tableMeta.editing.setCellValue(cell, rowIndex, nextValue);
55987
- shouldRunUpdate.current = hasNonTextControl;
55983
+ if (hasNonTextControl) {
55984
+ requestAnimationFrame(() => tableMeta.editing.onCellChanged(cell, rowIndex, nextValue, true, false));
55985
+ }
55988
55986
  }
55989
55987
  },
55990
55988
  [hasNonTextControl, cell.row.id, cell.column.id, cell.row.original, rowIndex, value, columnMeta.dataType]
@@ -56240,7 +56238,7 @@ function SaveStatus(props) {
56240
56238
  const className = clsx(
56241
56239
  "col-span-full sticky ml-auto right-0 top-0 -mb-[100%] z-10 h-8 bg-[inherit] flex items-center px-1.5 shadow-[-6px_0px_6px_var(--table-row-actions-shadow)]",
56242
56240
  {
56243
- "mt-0.5": tableMeta.rowHeight.height === "short",
56241
+ "mt-0": tableMeta.rowHeight.height === "short",
56244
56242
  "mt-1": tableMeta.rowHeight.height === "medium",
56245
56243
  "mt-1.5": tableMeta.rowHeight.height === "tall",
56246
56244
  "mt-2": tableMeta.rowHeight.height === "extra-tall"