@helpwave/hightide 0.6.9 → 0.6.11

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.mjs CHANGED
@@ -7189,7 +7189,7 @@ var FormStore = class {
7189
7189
  return this.values[key];
7190
7190
  }
7191
7191
  getAllValues() {
7192
- return { ...this.values };
7192
+ return this.values;
7193
7193
  }
7194
7194
  setValue(key, value, triggerUpdate = false) {
7195
7195
  if (this.values[key] !== value) {
@@ -7216,7 +7216,7 @@ var FormStore = class {
7216
7216
  type: "onUpdate",
7217
7217
  key: "ALL",
7218
7218
  updatedKeys: Object.keys(values),
7219
- update: { ...values },
7219
+ update: values,
7220
7220
  values: this.values,
7221
7221
  hasErrors: this.getHasError(),
7222
7222
  errors: this.getErrors()
@@ -7228,19 +7228,19 @@ var FormStore = class {
7228
7228
  return !!this.touched[key];
7229
7229
  }
7230
7230
  getAllTouched() {
7231
- return { ...this.touched };
7231
+ return this.touched;
7232
7232
  }
7233
7233
  setTouched(key, isTouched = true) {
7234
7234
  if (this.touched[key] === isTouched) return;
7235
7235
  this.touched[key] = isTouched;
7236
- this.notify({ type: "onTouched", key, value: this.values[key], values: { ...this.values } });
7236
+ this.notify({ type: "onTouched", key, value: this.values[key], values: this.values });
7237
7237
  }
7238
7238
  // Error and Validation
7239
7239
  getHasError() {
7240
7240
  return Object.values(this.errors).some((value) => value !== void 0 && value !== null);
7241
7241
  }
7242
7242
  getErrors() {
7243
- return { ...this.errors };
7243
+ return this.errors;
7244
7244
  }
7245
7245
  getError(key) {
7246
7246
  return this.errors[key];
@@ -7252,7 +7252,7 @@ var FormStore = class {
7252
7252
  } else {
7253
7253
  this.errors[key] = error;
7254
7254
  }
7255
- this.notify({ type: "onError", key, value: this.values[key], error, values: { ...this.values } });
7255
+ this.notify({ type: "onError", key, value: this.values[key], error, values: this.values });
7256
7256
  }
7257
7257
  getHasTriedSubmitting() {
7258
7258
  return this.hasTriedSubmitting;
@@ -7308,8 +7308,8 @@ var FormStore = class {
7308
7308
  type: "onSubmit",
7309
7309
  key: "ALL",
7310
7310
  hasErrors,
7311
- errors: { ...this.errors },
7312
- values: { ...this.values }
7311
+ errors: this.errors,
7312
+ values: this.values
7313
7313
  });
7314
7314
  }
7315
7315
  reset() {
@@ -7317,10 +7317,10 @@ var FormStore = class {
7317
7317
  this.hasTriedSubmitting = false;
7318
7318
  this.touched = {};
7319
7319
  Object.keys(this.initialValues).forEach((key) => {
7320
- this.notify({ type: "onChange", key, value: this.values[key], values: { ...this.values } });
7320
+ this.notify({ type: "onChange", key, value: this.values[key], values: this.values });
7321
7321
  });
7322
7322
  this.validateAll();
7323
- this.notify({ type: "reset", key: "ALL", values: { ...this.values }, errors: { ...this.errors } });
7323
+ this.notify({ type: "reset", key: "ALL", values: this.values, errors: this.errors });
7324
7324
  }
7325
7325
  };
7326
7326
 
@@ -13355,17 +13355,20 @@ import clsx27 from "clsx";
13355
13355
  import { jsx as jsx56, jsxs as jsxs27 } from "react/jsx-runtime";
13356
13356
  var TableBody = React5.memo(function TableBodyVisual() {
13357
13357
  const { table, onRowClick, onFillerRowClick, isUsingFillerRows, fillerRowCell, pagination, rows } = useTableDataContext();
13358
- const pinnedColumnsLeft = table.getState().columnPinning?.left ?? [];
13359
- const pinnedColumnsRight = table.getState().columnPinning?.right ?? [];
13360
- let columnOrder = table.getState().columnOrder;
13361
- columnOrder = [...pinnedColumnsLeft, ...columnOrder.filter((id) => !pinnedColumnsLeft.includes(id) && !pinnedColumnsRight.includes(id)), ...pinnedColumnsRight];
13362
- const columnVisibility = table.getState().columnVisibility;
13363
- const columns = columnOrder.map((id) => {
13364
- const column = table.getColumn(id);
13365
- if (!column) return null;
13366
- if (columnVisibility[id] === false) return null;
13367
- return column;
13368
- }).filter(Boolean);
13358
+ const state = table.getState();
13359
+ const baseOrder = state.columnOrder?.length ? state.columnOrder : table.getVisibleLeafColumns().map((col) => col.id);
13360
+ const pinnedLeft = state.columnPinning?.left ?? [];
13361
+ const pinnedRight = state.columnPinning?.right ?? [];
13362
+ const columnOrder = [
13363
+ ...pinnedLeft,
13364
+ ...baseOrder.filter(
13365
+ (id) => !pinnedLeft.includes(id) && !pinnedRight.includes(id)
13366
+ ),
13367
+ ...pinnedRight
13368
+ ];
13369
+ const columns = columnOrder.map((id) => table.getColumn(id)).filter(
13370
+ (col) => !!col && state.columnVisibility?.[col.id] !== false
13371
+ );
13369
13372
  return /* @__PURE__ */ jsxs27("tbody", { children: [
13370
13373
  rows.map((row) => {
13371
13374
  return /* @__PURE__ */ jsx56(