@idds/react 1.2.5 → 1.2.7

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.es.js CHANGED
@@ -4986,14 +4986,14 @@ function Table({
4986
4986
  }
4987
4987
  ) }),
4988
4988
  columns.map((col, index2) => {
4989
- const isEditable = editableColumns.some(
4989
+ const editableColumn = editableColumns.find(
4990
4990
  (ec) => ec.accessor === col.accessor
4991
4991
  );
4992
+ const isEditable = !!editableColumn;
4993
+ const isDisabled = isEditable && (editableColumn == null ? void 0 : editableColumn.disabled) ? typeof editableColumn.disabled === "function" ? editableColumn.disabled(row) : editableColumn.disabled : false;
4992
4994
  const isThisCellEditing = (editingCell == null ? void 0 : editingCell.rowKey) === key && editingCell.accessor === col.accessor;
4993
- if (isEditable) {
4994
- const { editor: Editor } = editableColumns.find(
4995
- (ec) => ec.accessor === col.accessor
4996
- );
4995
+ if (isEditable && !isDisabled) {
4996
+ const { editor: Editor } = editableColumn;
4997
4997
  const bufferRow = editBuffer[key] ?? row;
4998
4998
  return /* @__PURE__ */ jsx(
4999
4999
  "td",
@@ -9597,7 +9597,7 @@ function DatePicker({
9597
9597
  dayNames.map((day) => /* @__PURE__ */ jsx("div", { className: "ina-date-picker__day-header", children: day }, day)),
9598
9598
  currentDays.map((day) => {
9599
9599
  const styling = getDateStyling(day);
9600
- return /* @__PURE__ */ jsxs(
9600
+ return /* @__PURE__ */ jsx(
9601
9601
  "button",
9602
9602
  {
9603
9603
  type: "button",
@@ -9606,10 +9606,7 @@ function DatePicker({
9606
9606
  onMouseLeave: () => setHoveredDate(null),
9607
9607
  disabled: styling.isDisabled,
9608
9608
  className: styling.className + (!styling.isSelected && !styling.isInRange && !styling.isHovered && !styling.isHoveredEnd && !styling.isDisabled ? " ina-date-picker__day--hover" : ""),
9609
- children: [
9610
- day.date.getDate(),
9611
- day.isToday && /* @__PURE__ */ jsx("span", { className: "ina-date-picker__today-label", children: "Hari ini" })
9612
- ]
9609
+ children: day.date.getDate()
9613
9610
  },
9614
9611
  `${day.date.getFullYear()}-${day.date.getMonth()}-${day.date.getDate()}`
9615
9612
  );