@bsuite/page-builder 0.5.3 → 0.6.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.
- package/dist/PageGridLayout.d.ts.map +1 -1
- package/dist/PageGridLayout.js +57 -13
- package/dist/types.d.ts +11 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageGridLayout.d.ts","sourceRoot":"","sources":["../src/PageGridLayout.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAGlG,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AAKxC,OAAO,KAAK,EAAe,mBAAmB,EAAE,MAAM,YAAY,CAAC;AA0QnE,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,SAAS,EAMT,WAAkB,EAClB,aAAsC,EACtC,yBAAiE,EACjE,kBAAkB,EAClB,sBAAsB,GACvB,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"PageGridLayout.d.ts","sourceRoot":"","sources":["../src/PageGridLayout.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAGlG,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gCAAgC,CAAC;AAKxC,OAAO,KAAK,EAAe,mBAAmB,EAAE,MAAM,YAAY,CAAC;AA0QnE,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,SAAS,EAMT,WAAkB,EAClB,aAAsC,EACtC,yBAAiE,EACjE,kBAAkB,EAClB,sBAAsB,GACvB,EAAE,mBAAmB,qBAirBrB"}
|
package/dist/PageGridLayout.js
CHANGED
|
@@ -243,25 +243,69 @@ isResizable = true, resizeHandles = DEFAULT_RESIZE_HANDLES, addEntityWidgetEvent
|
|
|
243
243
|
for (const bp in currentLayouts) {
|
|
244
244
|
filtered[bp] = (currentLayouts[bp] ?? [])
|
|
245
245
|
.filter((item) => renderableWidgetKeys.has(item.i) && !hiddenLayerIds[item.i])
|
|
246
|
-
// autoHeight
|
|
247
|
-
// amendment A1) — force isResizable: false centrally here so every
|
|
248
|
-
// call site that sets autoHeight: true gets this for free, rather
|
|
249
|
-
// than needing to remember to also set isResizable itself.
|
|
246
|
+
// autoHeight is a FLOOR, not a lock.
|
|
250
247
|
//
|
|
251
|
-
//
|
|
252
|
-
//
|
|
253
|
-
//
|
|
254
|
-
//
|
|
255
|
-
//
|
|
256
|
-
//
|
|
248
|
+
// This block used to force `isResizable: false` on every autoHeight
|
|
249
|
+
// item and overwrite `h` with the measured height. Between them those
|
|
250
|
+
// two lines removed card resizing from every page whose cards use the
|
|
251
|
+
// default `autoHeight: true` — the force-disable killed the handles,
|
|
252
|
+
// and the unconditional `h` overwrite would have stomped any height a
|
|
253
|
+
// user did manage to set on the next measurement.
|
|
254
|
+
//
|
|
255
|
+
// Resizable cards are an operator-mandated platform capability
|
|
256
|
+
// (Braden, 2026-07-31: "no ruling has ever had my authority to
|
|
257
|
+
// suppress resizing"). The earlier internal note that traded resize
|
|
258
|
+
// away to stop a 192px clipping regression posed a false choice. Both
|
|
259
|
+
// properties hold at once:
|
|
260
|
+
//
|
|
261
|
+
// minH = measuredRows -> a card can never be dragged shorter than
|
|
262
|
+
// its content, so the clipping regression
|
|
263
|
+
// that motivated the original change stays
|
|
264
|
+
// fixed.
|
|
265
|
+
// h = max(saved, measured)
|
|
266
|
+
// -> content is never clipped, AND a height the
|
|
267
|
+
// user deliberately set is preserved instead
|
|
268
|
+
// of being reset on every re-measure.
|
|
269
|
+
// isResizable untouched -> inherits the grid default (true), so the
|
|
270
|
+
// handles are present.
|
|
271
|
+
//
|
|
272
|
+
// Measured rows still merge at the RENDER layer only, so the saved
|
|
273
|
+
// layout (and the preference adapter) never sees a measured height.
|
|
274
|
+
// Until the first measurement lands, `autoHeightRows` has no entry and
|
|
275
|
+
// the item's seed `h` renders as-is.
|
|
257
276
|
.map((item) => {
|
|
258
277
|
if (!item.autoHeight)
|
|
259
278
|
return item;
|
|
279
|
+
// HEAL a persisted `isResizable: false`.
|
|
280
|
+
//
|
|
281
|
+
// 0.5.2 set this at the render layer, and it leaked out through
|
|
282
|
+
// `onLayoutChange` into the SAVED layout. Removing the override in
|
|
283
|
+
// 0.6.0 was therefore not enough: react-grid-layout resolves
|
|
284
|
+
//
|
|
285
|
+
// typeof l.isResizable === 'boolean' ? l.isResizable
|
|
286
|
+
// : !l.static && gridResizable
|
|
287
|
+
//
|
|
288
|
+
// so an explicit persisted `false` beats the grid default forever.
|
|
289
|
+
// Every user who ever loaded an affected page has it stored.
|
|
290
|
+
//
|
|
291
|
+
// Confirmed in a real signed-in browser 2026-07-31: the saved
|
|
292
|
+
// preference for /financial/invoicing/:id held
|
|
293
|
+
// `"isResizable":false` on all 6 cards; clearing it by hand did not
|
|
294
|
+
// help, because it was re-persisted on the next load.
|
|
295
|
+
//
|
|
296
|
+
// A per-item `false` on an autoHeight item cannot be a user choice —
|
|
297
|
+
// nothing in the UI sets it, and page-level opt-out uses the
|
|
298
|
+
// `isResizable` PROP, not per-item layout. So it can only have come
|
|
299
|
+
// from the 0.5.2 bug, and dropping it is safe.
|
|
300
|
+
const { isResizable: persisted, ...rest } = item;
|
|
301
|
+
const healed = persisted === false ? rest : item;
|
|
260
302
|
const measuredRows = autoHeightRows[item.i];
|
|
303
|
+
if (measuredRows === undefined)
|
|
304
|
+
return healed;
|
|
261
305
|
return {
|
|
262
|
-
...
|
|
263
|
-
|
|
264
|
-
|
|
306
|
+
...healed,
|
|
307
|
+
h: Math.max(healed.h ?? 0, measuredRows),
|
|
308
|
+
minH: measuredRows,
|
|
265
309
|
};
|
|
266
310
|
});
|
|
267
311
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -2,13 +2,17 @@ import type React from 'react';
|
|
|
2
2
|
import type { Compactor, LayoutItem, ResizeHandleAxis } from 'react-grid-layout';
|
|
3
3
|
export interface GridLayoutItem extends LayoutItem {
|
|
4
4
|
/**
|
|
5
|
-
* When true, this item's height
|
|
6
|
-
* height
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `
|
|
10
|
-
* `
|
|
11
|
-
*
|
|
5
|
+
* When true, this item's measured content height acts as a FLOOR on its
|
|
6
|
+
* height — it is not a substitute for manual resize. `GridItem` mounts a
|
|
7
|
+
* `ResizeObserver` on an unconstrained content wrapper and reports the
|
|
8
|
+
* computed row count upward via `computeAutoHeightRows`; `PageGridLayout`
|
|
9
|
+
* then applies it as `minH` (never clip content) while keeping `h` at
|
|
10
|
+
* `max(saved, measured)` (never discard a height the user chose).
|
|
11
|
+
*
|
|
12
|
+
* `autoHeight` does NOT disable resizing. It previously force-set
|
|
13
|
+
* `isResizable: false`, which removed card resizing from every page using
|
|
14
|
+
* the default — corrected 2026-07-31; resizable cards are an
|
|
15
|
+
* operator-mandated capability. See the `activeLayouts` memo.
|
|
12
16
|
*/
|
|
13
17
|
autoHeight?: boolean;
|
|
14
18
|
}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEjF,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,E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