twico-ui 1.24.0 → 1.25.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/index.d.cts CHANGED
@@ -1825,8 +1825,9 @@ interface DatatableProps<T = any> extends Omit<React.HTMLAttributes<HTMLDivEleme
1825
1825
  resizableFilters?: boolean;
1826
1826
  /** #304: extend the drag-resize grip to the other toolbar popovers too — Columns, Aggregation, Pivot,
1827
1827
  * and Batch-edit — each with a corner grip + keyboard resize (Arrows, Home/End, Enter/double-click to
1828
- * reset). Implies `resizableFilters`. Each popover's size persists independently via `stateKey`
1829
- * (`popoverSizes`). Great for a wide grid whose Columns list is otherwise capped. @default false */
1828
+ * reset). Independent of `resizableFilters` (which controls the Filters panel): each defaults `true` and
1829
+ * can be turned off on its own. Each popover's size persists independently via `stateKey` (`popoverSizes`).
1830
+ * Great for a wide grid whose Columns list is otherwise capped. Set `false` to opt a grid out. @default true */
1830
1831
  resizablePopovers?: boolean;
1831
1832
  /** Raise the drag cap for the filter panel's column/operator fields, in px (default col 360 / op 260) —
1832
1833
  * the #289-deferred "optional prop to raise the cap". Only affects `resizableFilters`. */
package/dist/index.d.ts CHANGED
@@ -1825,8 +1825,9 @@ interface DatatableProps<T = any> extends Omit<React.HTMLAttributes<HTMLDivEleme
1825
1825
  resizableFilters?: boolean;
1826
1826
  /** #304: extend the drag-resize grip to the other toolbar popovers too — Columns, Aggregation, Pivot,
1827
1827
  * and Batch-edit — each with a corner grip + keyboard resize (Arrows, Home/End, Enter/double-click to
1828
- * reset). Implies `resizableFilters`. Each popover's size persists independently via `stateKey`
1829
- * (`popoverSizes`). Great for a wide grid whose Columns list is otherwise capped. @default false */
1828
+ * reset). Independent of `resizableFilters` (which controls the Filters panel): each defaults `true` and
1829
+ * can be turned off on its own. Each popover's size persists independently via `stateKey` (`popoverSizes`).
1830
+ * Great for a wide grid whose Columns list is otherwise capped. Set `false` to opt a grid out. @default true */
1830
1831
  resizablePopovers?: boolean;
1831
1832
  /** Raise the drag cap for the filter panel's column/operator fields, in px (default col 360 / op 260) —
1832
1833
  * the #289-deferred "optional prop to raise the cap". Only affects `resizableFilters`. */
package/dist/index.mjs CHANGED
@@ -9159,7 +9159,8 @@ function Datatable({
9159
9159
  onQuickFilterChange,
9160
9160
  toolbarActions,
9161
9161
  resizableFilters = true,
9162
- resizablePopovers = false,
9162
+ resizablePopovers = true,
9163
+ // #314: default-on (matches resizableFilters) — set false to opt a grid out
9163
9164
  filterFieldMaxWidth,
9164
9165
  rowPinning = false,
9165
9166
  rowReorder = false,
@@ -10422,7 +10423,9 @@ function Datatable({
10422
10423
  if (!editing) return;
10423
10424
  const onDown = (e) => {
10424
10425
  if (e.target.closest(".twc-dt__editor-wrap") || e.target.closest(".twc-pop")) return;
10425
- setEditing(null);
10426
+ const col = colByField[editing.field];
10427
+ if (col && col.renderEditCell) setEditing(null);
10428
+ else commitEdit();
10426
10429
  };
10427
10430
  document.addEventListener("mousedown", onDown, true);
10428
10431
  return () => document.removeEventListener("mousedown", onDown, true);
@@ -10756,7 +10759,7 @@ function Datatable({
10756
10759
  }
10757
10760
  }
10758
10761
  ) : null;
10759
- const fieldHandle = (field, rowIdx) => (resizableFilters || resizablePopovers) && rowIdx === 0 ? /* @__PURE__ */ jsx(
10762
+ const fieldHandle = (field, rowIdx) => resizableFilters && rowIdx === 0 ? /* @__PURE__ */ jsx(
10760
10763
  "span",
10761
10764
  {
10762
10765
  className: "twc-dt__f-rz",
@@ -12170,7 +12173,7 @@ function Datatable({
12170
12173
  /* @__PURE__ */ jsx("button", { type: "button", className: "twc-dt__flogic-btn", "data-active": filterLogic === "and" || void 0, "aria-pressed": filterLogic === "and", onClick: () => setFilterLogic("and"), children: "AND" }),
12171
12174
  /* @__PURE__ */ jsx("button", { type: "button", className: "twc-dt__flogic-btn", "data-active": filterLogic === "or" || void 0, "aria-pressed": filterLogic === "or", onClick: () => setFilterLogic("or"), children: "OR" })
12172
12175
  ] }) : null,
12173
- (resizableFilters || resizablePopovers) && hasFilterSizeOverride ? /* @__PURE__ */ jsx("button", { type: "button", className: "twc-dt__link", onClick: resetFilterSizes, children: "Reset sizes" }) : null,
12176
+ resizableFilters && hasFilterSizeOverride ? /* @__PURE__ */ jsx("button", { type: "button", className: "twc-dt__link", onClick: resetFilterSizes, children: "Reset sizes" }) : null,
12174
12177
  filters.length ? /* @__PURE__ */ jsx("button", { type: "button", className: "twc-dt__link", onClick: () => setFilters([]), children: "Clear all" }) : null
12175
12178
  ] })
12176
12179
  ] }),
@@ -12250,7 +12253,7 @@ function Datatable({
12250
12253
  /* @__PURE__ */ jsx(Svg, { d: I.plus, style: { color: "var(--color-primary)" } }),
12251
12254
  " Add filter"
12252
12255
  ] }) }),
12253
- resizableFilters || resizablePopovers ? /* @__PURE__ */ jsx(
12256
+ resizableFilters ? /* @__PURE__ */ jsx(
12254
12257
  "span",
12255
12258
  {
12256
12259
  className: "twc-dt__pop-grip",