@snksergio/design-system 0.18.0 → 0.19.1

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.
@@ -16610,6 +16610,10 @@ function useDataTableColumns({
16610
16610
  return {
16611
16611
  effectiveColumns,
16612
16612
  columnWidths: widths,
16613
+ /** Larguras de resize MANUAL do usuário (sem autoFit). Persistir SÓ isto —
16614
+ * persistir `columnWidths` (efetivas, c/ autoFit) congela o layout e mata o
16615
+ * autoFit no reload (vira widthOverrides de precedência máxima). */
16616
+ widthOverrides,
16613
16617
  stickyOffsets: offsets,
16614
16618
  hiddenColumns,
16615
16619
  pinnedColumns,
@@ -17336,7 +17340,7 @@ function downloadCsv(csv, filename) {
17336
17340
  URL.revokeObjectURL(url);
17337
17341
  }
17338
17342
  const STORAGE_PREFIX$1 = "igreen-datatable:";
17339
- const SCHEMA_VERSION = 4;
17343
+ const SCHEMA_VERSION = 5;
17340
17344
  function storageKey$1(persistId) {
17341
17345
  return `${STORAGE_PREFIX$1}${persistId}`;
17342
17346
  }
@@ -17794,7 +17798,10 @@ function useDataTableController(props, ref2) {
17794
17798
  // só "captura" esses valores quando a Default está ativa. Aplicar uma view custom
17795
17799
  // não polui o Default (o save sempre usa defaultSnapshotRef, não persistedSnapshot).
17796
17800
  currentPage: pagination.paginationModel.page,
17797
- columnWidths: cols.columnWidths,
17801
+ // Persistir SÓ resize manual (widthOverrides) — NUNCA as larguras efetivas
17802
+ // (cols.columnWidths inclui autoFit). Persistir efetivas congelava o layout
17803
+ // e matava o autoFit no reload (vira override de precedência máxima).
17804
+ columnWidths: cols.widthOverrides,
17798
17805
  pinnedColumns: cols.pinnedColumns,
17799
17806
  hiddenColumns: Array.from(cols.hiddenColumns),
17800
17807
  columnOrder: cols.columnOrder,
@@ -17811,7 +17818,7 @@ function useDataTableController(props, ref2) {
17811
17818
  sort.sortModels,
17812
17819
  pagination.paginationModel.pageSize,
17813
17820
  pagination.paginationModel.page,
17814
- cols.columnWidths,
17821
+ cols.widthOverrides,
17815
17822
  cols.pinnedColumns,
17816
17823
  cols.hiddenColumns,
17817
17824
  cols.columnOrder,
@@ -17909,7 +17916,9 @@ function useDataTableController(props, ref2) {
17909
17916
  filterModel: filters.filterModel,
17910
17917
  sortModel: sort.sortModels,
17911
17918
  density: density.density,
17912
- columnWidths: cols.columnWidths,
17919
+ // Só resize manual (não as efetivas c/ autoFit) — senão a view congela
17920
+ // o layout e mata o autoFit ao ser aplicada.
17921
+ columnWidths: cols.widthOverrides,
17913
17922
  pinnedColumns: cols.pinnedColumns,
17914
17923
  hiddenColumns: Array.from(cols.hiddenColumns),
17915
17924
  columnOrder: cols.columnOrder,
@@ -17926,7 +17935,7 @@ function useDataTableController(props, ref2) {
17926
17935
  filters.filterModel,
17927
17936
  sort.sortModels,
17928
17937
  density.density,
17929
- cols.columnWidths,
17938
+ cols.widthOverrides,
17930
17939
  cols.pinnedColumns,
17931
17940
  cols.hiddenColumns,
17932
17941
  cols.columnOrder,
@@ -19853,8 +19862,9 @@ function DataTableInternal(props, ref2) {
19853
19862
  if (!isList || !cfg) return [];
19854
19863
  const getRowId = contextValue.getRowId;
19855
19864
  const rows = rowsAllPagesProcessed;
19856
- if (cfg.hierarchical && props.getTreeDataPath) {
19857
- const pathOf = props.getTreeDataPath;
19865
+ const pathFn = cfg.getPath ?? props.getTreeDataPath;
19866
+ if (cfg.hierarchical && pathFn) {
19867
+ const pathOf = pathFn;
19858
19868
  const shells = /* @__PURE__ */ new Map();
19859
19869
  for (const r of rows) {
19860
19870
  const id = String(getRowId(r));
@@ -21601,4 +21611,4 @@ export {
21601
21611
  FilterPanel as y,
21602
21612
  FloatingPanelField as z
21603
21613
  };
21604
- //# sourceMappingURL=panel-BF_942aO.mjs.map
21614
+ //# sourceMappingURL=panel-BCUixETK.mjs.map