@acorex/components 22.0.0-next.28 → 22.0.0-next.30

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.
@@ -3,20 +3,22 @@ import * as i0 from '@angular/core';
3
3
  import { inject, ElementRef, input, effect, untracked, ViewEncapsulation, Component, output, model, NgZone, afterNextRender, ContentChildren, NgModule } from '@angular/core';
4
4
  import { AXComponent, NXComponent } from '@acorex/cdk/common';
5
5
 
6
+ const AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR = 'data-ax-allowed-sizes';
6
7
  // Convert AXGridLayoutWidget to GridStackWidget
7
8
  function convertAXGridLayoutWidgetToGridStackWidget(widget) {
9
+ const normalized = normalizeLayoutNodeWithAllowedSizes(widget);
8
10
  return {
9
- id: widget.id,
10
- x: widget.x,
11
- y: widget.y,
12
- w: widget.width,
13
- h: widget.height,
14
- maxW: widget.maxWidth,
15
- maxH: widget.maxHeight,
16
- minW: widget.minWidth,
17
- minH: widget.minHeight,
18
- noResize: widget.disableResize,
19
- noMove: widget.disableDrag,
11
+ id: normalized.id,
12
+ x: normalized.x,
13
+ y: normalized.y,
14
+ w: normalized.width,
15
+ h: normalized.height,
16
+ maxW: normalized.maxWidth,
17
+ maxH: normalized.maxHeight,
18
+ minW: normalized.minWidth,
19
+ minH: normalized.minHeight,
20
+ noResize: normalized.disableResize,
21
+ noMove: normalized.disableDrag,
20
22
  };
21
23
  }
22
24
  // Convert GridStackWidget to AXGridLayoutWidget
@@ -37,23 +39,26 @@ function convertGridStackWidgetToAXGridLayoutWidget(widget) {
37
39
  }
38
40
  // Convert AXGridLayoutNode to GridStackNode
39
41
  function convertAXGridLayoutNodeToGridStackNode(node) {
42
+ const normalized = normalizeLayoutNodeWithAllowedSizes(node);
40
43
  return {
41
- id: node.id,
42
- x: node.x,
43
- y: node.y,
44
- w: node.width,
45
- h: node.height,
46
- maxW: node.maxWidth,
47
- maxH: node.maxHeight,
48
- minW: node.minWidth,
49
- minH: node.minHeight,
50
- noResize: node.disableResize,
51
- noMove: node.disableDrag,
52
- el: node.element,
44
+ id: normalized.id,
45
+ x: normalized.x,
46
+ y: normalized.y,
47
+ w: normalized.width,
48
+ h: normalized.height,
49
+ maxW: normalized.maxWidth,
50
+ maxH: normalized.maxHeight,
51
+ minW: normalized.minWidth,
52
+ minH: normalized.minHeight,
53
+ noResize: normalized.disableResize,
54
+ noMove: normalized.disableDrag,
55
+ el: normalized.element,
53
56
  };
54
57
  }
55
58
  // Convert GridStackNode to AXGridLayoutNode
56
59
  function convertGridStackNodeToAXGridLayoutNode(node) {
60
+ const element = node.el;
61
+ const allowedSizes = element ? readAllowedSizesFromElement(element) : undefined;
57
62
  return {
58
63
  id: node.id,
59
64
  x: node.x,
@@ -66,7 +71,8 @@ function convertGridStackNodeToAXGridLayoutNode(node) {
66
71
  minHeight: node.minH,
67
72
  disableResize: node.noResize,
68
73
  disableDrag: node.noMove,
69
- element: node.el,
74
+ allowedSizes,
75
+ element,
70
76
  };
71
77
  }
72
78
  // Convert AXGridLayoutOptions to GridStackOptions
@@ -118,6 +124,87 @@ function removeUndefinedKeys(obj) {
118
124
  }
119
125
  return newObj;
120
126
  }
127
+ function writeAllowedSizesToElement(element, allowedSizes) {
128
+ if (!element) {
129
+ return;
130
+ }
131
+ if (!allowedSizes?.length) {
132
+ element.removeAttribute(AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR);
133
+ return;
134
+ }
135
+ element.setAttribute(AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR, JSON.stringify(allowedSizes));
136
+ }
137
+ function readAllowedSizesFromElement(element) {
138
+ const raw = element.getAttribute(AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR);
139
+ if (!raw) {
140
+ return undefined;
141
+ }
142
+ try {
143
+ const parsed = JSON.parse(raw);
144
+ if (!Array.isArray(parsed) || parsed.length === 0) {
145
+ return undefined;
146
+ }
147
+ const sizes = parsed
148
+ .filter((entry) => Array.isArray(entry) && entry.length === 2)
149
+ .map(([width, height]) => [Number(width), Number(height)])
150
+ .filter(([width, height]) => Number.isFinite(width) && Number.isFinite(height) && width > 0 && height > 0);
151
+ return sizes.length > 0 ? sizes : undefined;
152
+ }
153
+ catch {
154
+ return undefined;
155
+ }
156
+ }
157
+ function snapToAllowedSize(width, height, allowedSizes) {
158
+ const safeWidth = Number.isFinite(width) && width > 0 ? width : 1;
159
+ const safeHeight = Number.isFinite(height) && height > 0 ? height : 1;
160
+ return allowedSizes.reduce((best, size) => {
161
+ const bestDistance = (best[0] - safeWidth) ** 2 + (best[1] - safeHeight) ** 2;
162
+ const nextDistance = (size[0] - safeWidth) ** 2 + (size[1] - safeHeight) ** 2;
163
+ return nextDistance < bestDistance ? size : best;
164
+ }, allowedSizes[0]);
165
+ }
166
+ function deriveMinMaxFromAllowedSizes(allowedSizes) {
167
+ const widths = allowedSizes.map(([width]) => width);
168
+ const heights = allowedSizes.map(([, height]) => height);
169
+ return {
170
+ minWidth: Math.min(...widths),
171
+ maxWidth: Math.max(...widths),
172
+ minHeight: Math.min(...heights),
173
+ maxHeight: Math.max(...heights),
174
+ };
175
+ }
176
+ function normalizeLayoutNodeWithAllowedSizes(node) {
177
+ if (!node.allowedSizes?.length) {
178
+ return node;
179
+ }
180
+ const [width, height] = snapToAllowedSize(node.width ?? 1, node.height ?? 1, node.allowedSizes);
181
+ const bounds = deriveMinMaxFromAllowedSizes(node.allowedSizes);
182
+ return {
183
+ ...node,
184
+ width,
185
+ height,
186
+ minWidth: bounds.minWidth,
187
+ maxWidth: bounds.maxWidth,
188
+ minHeight: bounds.minHeight,
189
+ maxHeight: bounds.maxHeight,
190
+ };
191
+ }
192
+ function snapElementToAllowedSize(grid, element) {
193
+ const allowedSizes = readAllowedSizesFromElement(element);
194
+ if (!allowedSizes?.length) {
195
+ return false;
196
+ }
197
+ const node = element.gridstackNode;
198
+ if (!node) {
199
+ return false;
200
+ }
201
+ const [width, height] = snapToAllowedSize(node.w ?? 1, node.h ?? 1, allowedSizes);
202
+ if (node.w === width && node.h === height) {
203
+ return false;
204
+ }
205
+ grid.update(element, { w: width, h: height });
206
+ return true;
207
+ }
121
208
 
122
209
  class AXGridLayoutWidgetComponent {
123
210
  constructor() {
@@ -127,9 +214,12 @@ class AXGridLayoutWidgetComponent {
127
214
  this.#eff = effect(() => {
128
215
  const options = this.options();
129
216
  untracked(() => {
130
- const gridstackNode = this.elementRef.nativeElement.gridstackNode;
131
- if (gridstackNode?.grid) {
132
- gridstackNode.grid.update(this.elementRef.nativeElement, removeUndefinedKeys(convertAXGridLayoutWidgetToGridStackWidget(options)));
217
+ const element = this.elementRef.nativeElement;
218
+ const normalized = options ? normalizeLayoutNodeWithAllowedSizes(options) : undefined;
219
+ writeAllowedSizesToElement(element, normalized?.allowedSizes);
220
+ const gridstackNode = element.gridstackNode;
221
+ if (gridstackNode?.grid && normalized) {
222
+ gridstackNode.grid.update(element, removeUndefinedKeys(convertAXGridLayoutWidgetToGridStackWidget(normalized)));
133
223
  }
134
224
  });
135
225
  }, /* @ts-ignore */
@@ -183,7 +273,10 @@ class AXGridLayoutWidgetComponent {
183
273
  */
184
274
  getInputOptions() {
185
275
  const opts = this.options();
186
- return opts ? { ...opts, element: this.elementRef.nativeElement } : { element: this.elementRef.nativeElement };
276
+ const normalized = opts ? normalizeLayoutNodeWithAllowedSizes(opts) : undefined;
277
+ return normalized
278
+ ? { ...normalized, element: this.elementRef.nativeElement }
279
+ : { element: this.elementRef.nativeElement };
187
280
  }
188
281
  /**
189
282
  * Returns the native DOM element of the widget.
@@ -258,12 +351,13 @@ class AXGridLayoutContainerComponent extends NXComponent {
258
351
  untracked(() => {
259
352
  this.ngZone.runOutsideAngular(() => {
260
353
  const gridStackOptions = removeUndefinedKeys(convertAXGridLayoutOptionsToGridStackOptions(newOptions));
354
+ const column = gridStackOptions.column;
261
355
  // Detect whether the column count is changing — requires loading from stored input positions
262
- const isColumnChange = gridStackOptions.column !== undefined && gridStackOptions.column !== this.grid?.opts?.column;
356
+ const isColumnChange = typeof column === 'number' && column !== this.grid?.opts?.column;
263
357
  // Use 'none' layout mode to prevent GridStack from auto-reflowing widget positions.
264
358
  // The correct per-breakpoint positions will be loaded explicitly via updateAll(true).
265
- if (gridStackOptions.column !== undefined) {
266
- this.grid?.column(gridStackOptions.column, 'none');
359
+ if (typeof column === 'number') {
360
+ this.grid?.column(column, 'none');
267
361
  }
268
362
  if (gridStackOptions.cellHeight !== undefined) {
269
363
  this.grid?.cellHeight(gridStackOptions.cellHeight);
@@ -325,7 +419,9 @@ class AXGridLayoutContainerComponent extends NXComponent {
325
419
  arrays.forEach((item) => {
326
420
  const widgetOptions = useInputValues ? item.getInputOptions() : item.getOptions();
327
421
  if (widgetOptions) {
328
- layout.push(removeUndefinedKeys(convertAXGridLayoutNodeToGridStackNode(widgetOptions)));
422
+ const normalized = normalizeLayoutNodeWithAllowedSizes(widgetOptions);
423
+ writeAllowedSizesToElement(normalized.element ?? item.element, normalized.allowedSizes);
424
+ layout.push(removeUndefinedKeys(convertAXGridLayoutNodeToGridStackNode(normalized)));
329
425
  }
330
426
  });
331
427
  this.grid.load(layout);
@@ -358,6 +454,15 @@ class AXGridLayoutContainerComponent extends NXComponent {
358
454
  const mappedNodes = nodes.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));
359
455
  this.onWidgetChange.emit({ sender: this, nodes: mappedNodes });
360
456
  this._dispatchChangeEvent();
457
+ })
458
+ .on('resizestop', (_event, element) => {
459
+ if (!this.grid) {
460
+ return;
461
+ }
462
+ const didSnap = snapElementToAllowedSize(this.grid, element);
463
+ if (didSnap) {
464
+ this._dispatchChangeEvent();
465
+ }
361
466
  });
362
467
  }
363
468
  }
@@ -545,7 +650,7 @@ class AXGridLayoutContainerComponent extends NXComponent {
545
650
  * @returns { x: number; y: number } - Object containing x and y coordinates of empty space.
546
651
  */
547
652
  findEmptySpace(input) {
548
- const value = { h: input.height, w: input.height };
653
+ const value = { h: input.height, w: input.width };
549
654
  this.grid?.engine.findEmptyPosition(value);
550
655
  return { x: value.x, y: value.y };
551
656
  }
@@ -577,5 +682,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
577
682
  * Generated bundle index. Do not edit.
578
683
  */
579
684
 
580
- export { AXGridLayoutBuilderModule, AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent };
685
+ export { AXGridLayoutBuilderModule, AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent, AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR, convertAXGridLayoutNodeToGridStackNode, convertAXGridLayoutOptionsToGridStackOptions, convertAXGridLayoutWidgetToGridStackWidget, convertGridStackNodeToAXGridLayoutNode, convertGridStackOptionsToAXGridLayoutOptions, convertGridStackWidgetToAXGridLayoutWidget, deriveMinMaxFromAllowedSizes, normalizeLayoutNodeWithAllowedSizes, readAllowedSizesFromElement, removeUndefinedKeys, snapElementToAllowedSize, snapToAllowedSize, writeAllowedSizesToElement };
581
686
  //# sourceMappingURL=acorex-components-grid-layout-builder.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-grid-layout-builder.mjs","sources":["../../../../packages/components/grid-layout-builder/src/lib/utility.ts","../../../../packages/components/grid-layout-builder/src/lib/grid-layout-widget.component.ts","../../../../packages/components/grid-layout-builder/src/lib/grid-layout-container.component.ts","../../../../packages/components/grid-layout-builder/src/lib/grid-layout-builder.module.ts","../../../../packages/components/grid-layout-builder/src/acorex-components-grid-layout-builder.ts"],"sourcesContent":["import { AXGridLayoutNode, AXGridLayoutOptions, AXGridLayoutWidget } from './types';\n\n// Convert AXGridLayoutWidget to GridStackWidget\nexport function convertAXGridLayoutWidgetToGridStackWidget(\n widget: AXGridLayoutWidget,\n): import('gridstack').GridStackWidget {\n return {\n id: widget.id,\n x: widget.x,\n y: widget.y,\n w: widget.width,\n h: widget.height,\n maxW: widget.maxWidth,\n maxH: widget.maxHeight,\n minW: widget.minWidth,\n minH: widget.minHeight,\n noResize: widget.disableResize,\n noMove: widget.disableDrag,\n };\n}\n\n// Convert GridStackWidget to AXGridLayoutWidget\nexport function convertGridStackWidgetToAXGridLayoutWidget(\n widget: import('gridstack').GridStackWidget,\n): AXGridLayoutWidget {\n return {\n id: widget.id,\n x: widget.x,\n y: widget.y,\n width: widget.w,\n height: widget.h,\n maxWidth: widget.maxW,\n maxHeight: widget.maxH,\n minWidth: widget.minW,\n minHeight: widget.minH,\n disableResize: widget.noResize,\n disableDrag: widget.noMove,\n };\n}\n\n// Convert AXGridLayoutNode to GridStackNode\nexport function convertAXGridLayoutNodeToGridStackNode(node: AXGridLayoutNode): import('gridstack').GridStackNode {\n return {\n id: node.id,\n x: node.x,\n y: node.y,\n w: node.width,\n h: node.height,\n maxW: node.maxWidth,\n maxH: node.maxHeight,\n minW: node.minWidth,\n minH: node.minHeight,\n noResize: node.disableResize,\n noMove: node.disableDrag,\n el: node.element,\n };\n}\n\n// Convert GridStackNode to AXGridLayoutNode\nexport function convertGridStackNodeToAXGridLayoutNode(node: import('gridstack').GridStackNode): AXGridLayoutNode {\n return {\n id: node.id,\n x: node.x,\n y: node.y,\n width: node.w,\n height: node.h,\n maxWidth: node.maxW,\n maxHeight: node.maxH,\n minWidth: node.minW,\n minHeight: node.minH,\n disableResize: node.noResize,\n disableDrag: node.noMove,\n element: node.el,\n };\n}\n\n// Convert AXGridLayoutOptions to GridStackOptions\nexport function convertAXGridLayoutOptionsToGridStackOptions(\n options: AXGridLayoutOptions,\n): import('gridstack').GridStackOptions {\n return {\n column: options.column,\n disableDrag: options.disableDrag,\n disableResize: options.disableResize,\n margin: options.gap,\n cellHeight: options.cellHeight,\n rtl: options.rtl,\n maxRow: options.maxRow,\n minRow: options.minRow,\n row: options.row,\n removable: options.removableSelector || options.removable,\n acceptWidgets: options.acceptWidgets,\n float: options.float,\n handle: options.dragHandlerSelector,\n columnOpts: { breakpoints: options?.responsiveLayout?.map((i) => ({ c: i.column, w: i.width })) },\n };\n}\n\n// Convert GridStackOptions to AXGridLayoutOptions\nexport function convertGridStackOptionsToAXGridLayoutOptions(\n options: import('gridstack').GridStackOptions,\n): AXGridLayoutOptions {\n return {\n column: options.column,\n disableDrag: options.disableDrag,\n disableResize: options.disableResize,\n gap: options.margin,\n cellHeight: options.cellHeight,\n rtl: options.rtl,\n maxRow: options.maxRow,\n minRow: options.minRow,\n row: options.row,\n removableSelector: typeof options.removable === 'string' ? options.removable : undefined,\n removable: typeof options.removable === 'boolean' ? options.removable : undefined,\n acceptWidgets: options.acceptWidgets as boolean,\n float: options.float,\n dragHandlerSelector: options.handle,\n responsiveLayout: options?.columnOpts?.breakpoints?.map((i) => ({ width: i.w, column: i.c })),\n };\n}\n\n/** remove keys which are undefined */\nexport function removeUndefinedKeys(obj) {\n const newObj = { ...obj };\n for (const key in newObj) {\n if (newObj[key] === undefined) {\n delete newObj[key];\n }\n }\n return newObj;\n}\n","import { AXComponent } from '@acorex/cdk/common';\nimport { Component, effect, ElementRef, inject, input, untracked, ViewEncapsulation } from '@angular/core';\nimport { AXGridLayoutNode, AXGridLayoutWidget, AXGridLayoutWidgetElement } from './types';\nimport {\n convertAXGridLayoutWidgetToGridStackWidget,\n convertGridStackNodeToAXGridLayoutNode,\n removeUndefinedKeys,\n} from './utility';\n\n@Component({\n selector: 'ax-grid-layout-widget',\n template: `<div class=\"grid-stack-item-content\"><ng-content></ng-content></div>`,\n\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXComponent, useExisting: AXGridLayoutWidgetComponent }],\n})\nexport class AXGridLayoutWidgetComponent {\n private readonly elementRef: ElementRef<AXGridLayoutWidgetElement> = inject(ElementRef);\n\n public options = input<AXGridLayoutNode>();\n\n #eff = effect(() => {\n const options = this.options();\n\n untracked(() => {\n const gridstackNode = this.elementRef.nativeElement.gridstackNode as import('gridstack').GridStackNode;\n if (gridstackNode?.grid) {\n gridstackNode.grid.update(\n this.elementRef.nativeElement,\n removeUndefinedKeys(convertAXGridLayoutWidgetToGridStackWidget(options)),\n );\n }\n });\n });\n\n /**\n * Locks or unlocks the widget (prevents dragging and resizing).\n *\n * @param state - If true, the widget will be locked.\n * @returns void - No return value. The widget lock state is updated.\n */\n public setLockable(state: boolean): void {\n this.updateWidgetOptions({ disableResize: state, disableDrag: state });\n }\n\n /**\n * Enables or disables resizing of the widget.\n *\n * @param state - If true, resizing will be enabled.\n * @returns void - No return value. The widget resize state is updated.\n */\n public setResizable(state: boolean): void {\n this.updateWidgetOptions({ disableResize: !state });\n }\n\n /**\n * Updates the widget options.\n *\n * @param options - The new options for the widget.\n * @returns void - No return value. The widget options are updated.\n */\n public setOptions(options: AXGridLayoutWidget): void {\n this.updateWidgetOptions(options);\n }\n\n /**\n * Returns the current options of the widget.\n *\n * @returns AXGridLayoutNode - The current widget options.\n */\n public getOptions(): AXGridLayoutNode {\n const gridstackNode = this.elementRef.nativeElement.gridstackNode;\n return gridstackNode\n ? removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(gridstackNode))\n : { ...this.options(), element: this.elementRef.nativeElement };\n }\n\n /**\n * Returns the widget options from the Angular input binding (stored/desired positions),\n * bypassing the live gridstackNode which may have been auto-reflowed.\n * Used by the container to load correct per-breakpoint layouts after column changes.\n *\n * @returns AXGridLayoutNode - The widget options from the input signal.\n */\n public getInputOptions(): AXGridLayoutNode {\n const opts = this.options();\n return opts ? { ...opts, element: this.elementRef.nativeElement } : { element: this.elementRef.nativeElement };\n }\n\n /**\n * Returns the native DOM element of the widget.\n *\n * @returns AXGridLayoutWidgetElement - The native element.\n */\n public get element(): AXGridLayoutWidgetElement {\n return this.elementRef.nativeElement;\n }\n\n /**\n * Updates the widget options and triggers a grid update.\n * @param options - The partial options to update.\n */\n private updateWidgetOptions(options: Partial<AXGridLayoutWidget>): void {\n const gridstackNode = this.elementRef.nativeElement.gridstackNode as import('gridstack').GridStackNode;\n if (gridstackNode?.grid) {\n gridstackNode.grid.update(\n this.elementRef.nativeElement,\n removeUndefinedKeys(convertAXGridLayoutWidgetToGridStackWidget(options)),\n );\n }\n }\n}\n","import { AXComponent, NXComponent } from '@acorex/cdk/common';\nimport {\n Component,\n ContentChildren,\n ElementRef,\n NgZone,\n OnDestroy,\n QueryList,\n ViewEncapsulation,\n afterNextRender,\n effect,\n inject,\n input,\n model,\n output,\n untracked,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXGridLayoutWidgetComponent } from './grid-layout-widget.component';\nimport {\n AXGridLayout,\n AXGridLayoutContainerElement,\n AXGridLayoutEvent,\n AXGridLayoutNode,\n AXGridLayoutOptions,\n AXGridLayoutPosition,\n AXGridLayoutWidget,\n AXGridLayoutWidgetElement,\n} from './types';\nimport {\n convertAXGridLayoutNodeToGridStackNode,\n convertAXGridLayoutOptionsToGridStackOptions,\n convertAXGridLayoutWidgetToGridStackWidget,\n convertGridStackNodeToAXGridLayoutNode,\n convertGridStackOptionsToAXGridLayoutOptions,\n removeUndefinedKeys,\n} from './utility';\n\n@Component({\n selector: 'ax-grid-layout-container',\n template: `<ng-content></ng-content> `,\n styleUrl: './grid-layout-container.css',\n\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXComponent, useExisting: AXGridLayoutContainerComponent }],\n})\nexport class AXGridLayoutContainerComponent extends NXComponent implements OnDestroy {\n //#region Inputs and Outputs\n public options = input<AXGridLayoutOptions>();\n\n protected onAdded = output<AXGridLayoutEvent>();\n protected onRemoved = output<AXGridLayoutEvent>();\n protected onWidgetChange = output<AXGridLayoutEvent>();\n protected onChange = output<AXGridLayoutEvent>();\n protected onRender = output<void>();\n\n protected isEmpty = model(false);\n //#endregion\n\n //#region Private Properties\n private readonly elementRef: ElementRef<AXGridLayoutContainerElement> = inject(ElementRef);\n private readonly ngZone = inject(NgZone);\n\n @ContentChildren(AXGridLayoutWidgetComponent) public gridstackItems?: QueryList<AXGridLayoutWidgetComponent>;\n\n private el = this.elementRef.nativeElement;\n private grid?: AXGridLayout;\n protected _sub: Subscription | undefined;\n private isInitialized = false;\n //#endregion\n\n //#region Initialization\n #init = afterNextRender(() => {\n this.ngZone.runOutsideAngular(async () => {\n const { GridStack } = await import('gridstack');\n const gridStackOptions = removeUndefinedKeys(convertAXGridLayoutOptionsToGridStackOptions(this.options() ?? {}));\n this.grid = GridStack.init(gridStackOptions, this.el);\n this.updateAll();\n this.hookEvents(this.grid);\n this.onRender.emit();\n this.isInitialized = true;\n });\n this._sub = this.gridstackItems?.changes.subscribe(() => {\n this.updateAll();\n });\n });\n\n // Watch for options changes\n #optionsEffect = effect(() => {\n const newOptions = this.options();\n if (this.isInitialized && this.grid && newOptions) {\n untracked(() => {\n this.ngZone.runOutsideAngular(() => {\n const gridStackOptions = removeUndefinedKeys(convertAXGridLayoutOptionsToGridStackOptions(newOptions));\n\n // Detect whether the column count is changing — requires loading from stored input positions\n const isColumnChange =\n gridStackOptions.column !== undefined && gridStackOptions.column !== this.grid?.opts?.column;\n\n // Use 'none' layout mode to prevent GridStack from auto-reflowing widget positions.\n // The correct per-breakpoint positions will be loaded explicitly via updateAll(true).\n if (gridStackOptions.column !== undefined) {\n this.grid?.column(gridStackOptions.column, 'none');\n }\n\n if (gridStackOptions.cellHeight !== undefined) {\n this.grid?.cellHeight(gridStackOptions.cellHeight);\n }\n\n if (gridStackOptions.margin !== undefined) {\n this.grid?.margin(gridStackOptions.margin);\n }\n\n if (gridStackOptions.disableResize !== undefined) {\n this.grid?.enableResize(!gridStackOptions.disableResize);\n }\n\n if (gridStackOptions.disableDrag !== undefined) {\n this.grid?.enableMove(!gridStackOptions.disableDrag);\n }\n\n if (gridStackOptions.float !== undefined) {\n this.grid?.float(gridStackOptions.float);\n }\n\n if (gridStackOptions.animate !== undefined) {\n this.grid?.setAnimation(gridStackOptions.animate);\n }\n\n // When column count changes, read from Angular inputs (stored per-breakpoint positions)\n // to avoid using stale gridstackNode positions from the old column layout.\n // For non-column changes, read from gridstackNode to preserve live drag/resize state.\n this.updateAll(isColumnChange);\n });\n });\n }\n });\n\n public ngOnDestroy(): void {\n this.unhookEvents(this.grid);\n this._sub?.unsubscribe();\n this.destroy();\n }\n //#endregion\n\n //#region Internal Methods\n\n /**\n * Synchronizes the grid layout with the current widget list.\n *\n * @param useInputValues - When true, reads positions from Angular input bindings\n * (stored per-breakpoint positions). When false, reads from live gridstackNode\n * (preserving user drag/resize state). Use true after column/breakpoint changes.\n */\n private updateAll(useInputValues = false) {\n if (!this.grid) return;\n\n const arrays = this.gridstackItems?.toArray() ?? [];\n\n if (arrays.length === 0) {\n this.grid.removeAll(true);\n this.checkEmpty();\n return;\n }\n\n const layout: AXGridLayoutNode[] = [];\n arrays.forEach((item) => {\n const widgetOptions = useInputValues ? item.getInputOptions() : item.getOptions();\n if (widgetOptions) {\n layout.push(removeUndefinedKeys(convertAXGridLayoutNodeToGridStackNode(widgetOptions)));\n }\n });\n\n this.grid.load(layout);\n this.checkEmpty();\n }\n\n private checkEmpty() {\n if (this.grid) {\n const isEmpty = !this.getChildren().length;\n if (isEmpty === this.isEmpty()) return;\n this.isEmpty.set(isEmpty);\n }\n }\n\n private hookEvents(grid?: AXGridLayout): void {\n if (grid) {\n grid\n .on('added', (event: Event, nodes: import('gridstack').GridStackNode[]) => {\n const mappedNodes = nodes.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));\n this.checkEmpty();\n this.onAdded.emit({ sender: this, nodes: mappedNodes });\n this._dispatchChangeEvent();\n })\n .on('removed', (event: Event, nodes: import('gridstack').GridStackNode[]) => {\n const mappedNodes = nodes.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));\n this.checkEmpty();\n this.onRemoved.emit({ sender: this, nodes: mappedNodes });\n this._dispatchChangeEvent();\n })\n .on('change', (event: Event, nodes: import('gridstack').GridStackNode[]) => {\n const mappedNodes = nodes.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));\n this.onWidgetChange.emit({ sender: this, nodes: mappedNodes });\n this._dispatchChangeEvent();\n });\n }\n }\n\n private unhookEvents(grid?: AXGridLayout) {\n if (grid) grid.offAll();\n }\n\n private _dispatchChangeEvent() {\n if (this.getChildren().length) {\n this.onChange.emit({\n sender: this,\n nodes: this.getChildren(),\n });\n }\n }\n //#endregion\n\n /**\n * Adds a widget to the grid layout.\n *\n * @param w - Widget configuration object.\n * @param withAutoArrange - Whether to compact the grid before adding the widget.\n * @returns AXGridLayoutWidgetElement | undefined - The created widget element or undefined if failed.\n */\n public addWidget(w: AXGridLayoutWidget, withAutoArrange = false): AXGridLayoutWidgetElement | undefined {\n if (withAutoArrange) this.compact();\n\n const gridStackWidget = removeUndefinedKeys(convertAXGridLayoutWidgetToGridStackWidget(w));\n const node = this.grid?.addWidget(gridStackWidget)?.gridstackNode;\n if (!node) return undefined;\n\n const widgetElement: AXGridLayoutWidgetElement = node.el as AXGridLayoutWidgetElement;\n widgetElement.gridstackNode = removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node));\n\n return widgetElement;\n }\n\n /**\n * Compacts the grid layout.\n *\n * @param layout - Layout type for compacting ('list' or 'compact').\n * @param doSort - Whether to sort items while compacting.\n * @returns void - No return value. The grid layout is compacted.\n */\n public compact(layout: 'list' | 'compact' = 'compact', doSort = true): void {\n this.grid?.compact(layout, doSort);\n }\n\n /**\n * Sets the cell height of the grid.\n *\n * @param val - New cell height value.\n * @returns void - No return value. The cell height is updated.\n */\n public setCellHeight(val: number): void {\n this.grid?.cellHeight(val);\n }\n\n /**\n * Sets the number of columns in the grid.\n *\n * @param column - Number of columns.\n * @param layout - Layout type for the change ('list', 'compact', 'moveScale', 'move', 'scale', or 'none').\n * @returns void - No return value. The column count is updated.\n */\n public setColumn(\n column: number,\n layout: 'list' | 'compact' | 'moveScale' | 'move' | 'scale' | 'none' = 'moveScale',\n ): void {\n this.grid?.column(column, layout);\n }\n\n /**\n * Destroys the grid instance.\n *\n * @param removeDOM - Whether to remove DOM elements.\n * @returns void - No return value. The grid instance is destroyed.\n */\n public destroy(removeDOM = true): void {\n this.grid?.destroy(removeDOM);\n }\n\n /**\n * Enables or disables moving of widgets.\n *\n * @param state - Whether to enable moving.\n * @param recurse - Whether to apply to all child widgets.\n * @returns void - No return value. The move state is updated.\n */\n public setMovable(state: boolean, recurse?: boolean) {\n this.grid?.enableMove(state, recurse);\n }\n\n /**\n * Enables or disables resizing of widgets.\n *\n * @param state - Whether to enable resizing.\n * @param recurse - Whether to apply to all child widgets.\n * @returns void - No return value. The resize state is updated.\n */\n public setResizable(state: boolean, recurse?: boolean) {\n this.grid?.enableResize(state, recurse);\n }\n\n /**\n * Sets the float property of the grid.\n *\n * @param val - Whether to enable floating widgets.\n * @returns void - No return value. The float state is updated.\n */\n public setFloat(val: boolean): void {\n this.grid?.float(val);\n }\n\n /**\n * Sets the margin between grid items.\n *\n * @param value - Margin value (number in pixels or string with units).\n * @returns void - No return value. The margin is updated.\n */\n public setMargin(value: number | string): void {\n this.grid?.margin(value);\n }\n\n /**\n * Removes a specific widget from the grid.\n *\n * @param el - The widget element to remove.\n * @param removeDOM - Whether to remove the DOM element.\n * @param triggerEvent - Whether to trigger removal events.\n * @returns void - No return value. The widget is removed.\n */\n public removeWidget(el: AXGridLayoutWidgetElement, removeDOM = true, triggerEvent = true): void {\n this.grid?.removeWidget(el, removeDOM, triggerEvent);\n }\n\n /**\n * Removes all widgets from the grid.\n *\n * @param removeDOM - Whether to remove DOM elements.\n * @returns void - No return value. All widgets are removed.\n */\n public removeAll(removeDOM = true): void {\n this.grid?.removeAll(removeDOM);\n }\n\n /**\n * Sets the animation state for the grid.\n *\n * @param doAnimate - Whether to enable animations.\n * @returns void - No return value. The animation state is updated.\n */\n public setAnimation(doAnimate: boolean): void {\n this.grid?.setAnimation(doAnimate);\n }\n\n /**\n * Sets up draggable functionality for external elements.\n *\n * @param dragIn - CSS selector string or array of HTML elements to make draggable.\n * @param widgets - Optional widget configuration for dragged items.\n * @returns Promise<void> - Promise that resolves when drag setup is complete.\n */\n public async setupDraggable(dragIn?: string | HTMLElement[], widgets?: AXGridLayoutWidget) {\n if (typeof dragIn === 'string') {\n document.querySelectorAll(dragIn).forEach((item) => {\n if (!item.classList.contains('grid-stack-item')) {\n item.classList.add('grid-stack-item');\n }\n });\n }\n const { GridStack } = await import('gridstack');\n const gridStackWidgets = widgets\n ? [removeUndefinedKeys(convertAXGridLayoutWidgetToGridStackWidget(widgets))]\n : undefined;\n GridStack.setupDragIn(dragIn, undefined, gridStackWidgets);\n }\n\n /**\n * Gets the current grid options.\n *\n * @returns AXGridLayoutOptions - Current grid configuration options.\n */\n public getOptions(): AXGridLayoutOptions {\n const opts = this.grid?.opts;\n if (!opts) return {};\n\n return removeUndefinedKeys(convertGridStackOptionsToAXGridLayoutOptions(opts));\n }\n\n /**\n * Gets all child widgets in the grid.\n *\n * @returns AXGridLayoutNode[] - Array of all child widget nodes.\n */\n public getChildren(): AXGridLayoutNode[] {\n const children = this.grid?.engine.nodes ?? [];\n return children.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));\n }\n\n /**\n * Finds an empty space in the grid for a widget.\n *\n * @param input - Dimensions of the widget with height and width.\n * @returns { x: number; y: number } - Object containing x and y coordinates of empty space.\n */\n public findEmptySpace(\n input: Required<Pick<AXGridLayoutPosition, 'height' | 'width'>>,\n ): Pick<AXGridLayoutPosition, 'x' | 'y'> {\n const value = { h: input.height, w: input.height } as any;\n this.grid?.engine.findEmptyPosition(value);\n return { x: value.x, y: value.y };\n }\n //#endregion\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { AXGridLayoutContainerComponent } from './grid-layout-container.component';\nimport { AXGridLayoutWidgetComponent } from './grid-layout-widget.component';\n\n@NgModule({\n imports: [CommonModule, AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent],\n exports: [AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent],\n})\nexport class AXGridLayoutBuilderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEA;AACM,SAAU,0CAA0C,CACxD,MAA0B,EAA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,EAAA,SAAA,EAC1B,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAA,8BAAgC,EAAE,CAAC,EAAA,MAAA,EAAA,CAAA,gxSAAA,CAAA,EAAA;;sBAmBjF,eAAe;uBAAC,2BAA2B;;;MCrDjC,yBAAyB,CAAA;8GAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAzB,yBAAyB,EAAA,OAAA,EAAA,CAH1B,YAAY,EAAE,8BAA8B,EAAE,2BAA2B,CAAA,EAAA,OAAA,EAAA,CACzE,8BAA8B,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA;AAE1D,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,YAH1B,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGX,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAJrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,8BAA8B,EAAE,2BAA2B,CAAC;AACpF,oBAAA,OAAO,EAAE,CAAC,8BAA8B,EAAE,2BAA2B,CAAC;AACvE,iBAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-grid-layout-builder.mjs","sources":["../../../../packages/components/grid-layout-builder/src/lib/utility.ts","../../../../packages/components/grid-layout-builder/src/lib/grid-layout-widget.component.ts","../../../../packages/components/grid-layout-builder/src/lib/grid-layout-container.component.ts","../../../../packages/components/grid-layout-builder/src/lib/grid-layout-builder.module.ts","../../../../packages/components/grid-layout-builder/src/acorex-components-grid-layout-builder.ts"],"sourcesContent":["import { AXGridLayoutNode, AXGridLayoutOptions, AXGridLayoutSize, AXGridLayoutWidget } from './types';\n\nexport const AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR = 'data-ax-allowed-sizes';\n\n// Convert AXGridLayoutWidget to GridStackWidget\nexport function convertAXGridLayoutWidgetToGridStackWidget(\n widget: AXGridLayoutWidget,\n): import('gridstack').GridStackWidget {\n const normalized = normalizeLayoutNodeWithAllowedSizes(widget);\n\n return {\n id: normalized.id,\n x: normalized.x,\n y: normalized.y,\n w: normalized.width,\n h: normalized.height,\n maxW: normalized.maxWidth,\n maxH: normalized.maxHeight,\n minW: normalized.minWidth,\n minH: normalized.minHeight,\n noResize: normalized.disableResize,\n noMove: normalized.disableDrag,\n };\n}\n\n// Convert GridStackWidget to AXGridLayoutWidget\nexport function convertGridStackWidgetToAXGridLayoutWidget(\n widget: import('gridstack').GridStackWidget,\n): AXGridLayoutWidget {\n return {\n id: widget.id,\n x: widget.x,\n y: widget.y,\n width: widget.w,\n height: widget.h,\n maxWidth: widget.maxW,\n maxHeight: widget.maxH,\n minWidth: widget.minW,\n minHeight: widget.minH,\n disableResize: widget.noResize,\n disableDrag: widget.noMove,\n };\n}\n\n// Convert AXGridLayoutNode to GridStackNode\nexport function convertAXGridLayoutNodeToGridStackNode(node: AXGridLayoutNode): import('gridstack').GridStackNode {\n const normalized = normalizeLayoutNodeWithAllowedSizes(node);\n\n return {\n id: normalized.id,\n x: normalized.x,\n y: normalized.y,\n w: normalized.width,\n h: normalized.height,\n maxW: normalized.maxWidth,\n maxH: normalized.maxHeight,\n minW: normalized.minWidth,\n minH: normalized.minHeight,\n noResize: normalized.disableResize,\n noMove: normalized.disableDrag,\n el: normalized.element,\n };\n}\n\n// Convert GridStackNode to AXGridLayoutNode\nexport function convertGridStackNodeToAXGridLayoutNode(node: import('gridstack').GridStackNode): AXGridLayoutNode {\n const element = node.el;\n const allowedSizes = element ? readAllowedSizesFromElement(element) : undefined;\n\n return {\n id: node.id,\n x: node.x,\n y: node.y,\n width: node.w,\n height: node.h,\n maxWidth: node.maxW,\n maxHeight: node.maxH,\n minWidth: node.minW,\n minHeight: node.minH,\n disableResize: node.noResize,\n disableDrag: node.noMove,\n allowedSizes,\n element,\n };\n}\n\n// Convert AXGridLayoutOptions to GridStackOptions\nexport function convertAXGridLayoutOptionsToGridStackOptions(\n options: AXGridLayoutOptions,\n): import('gridstack').GridStackOptions {\n return {\n column: options.column,\n disableDrag: options.disableDrag,\n disableResize: options.disableResize,\n margin: options.gap,\n cellHeight: options.cellHeight,\n rtl: options.rtl,\n maxRow: options.maxRow,\n minRow: options.minRow,\n row: options.row,\n removable: options.removableSelector || options.removable,\n acceptWidgets: options.acceptWidgets,\n float: options.float,\n handle: options.dragHandlerSelector,\n columnOpts: { breakpoints: options?.responsiveLayout?.map((i) => ({ c: i.column, w: i.width })) },\n };\n}\n\n// Convert GridStackOptions to AXGridLayoutOptions\nexport function convertGridStackOptionsToAXGridLayoutOptions(\n options: import('gridstack').GridStackOptions,\n): AXGridLayoutOptions {\n return {\n column: options.column,\n disableDrag: options.disableDrag,\n disableResize: options.disableResize,\n gap: options.margin,\n cellHeight: options.cellHeight,\n rtl: options.rtl,\n maxRow: options.maxRow,\n minRow: options.minRow,\n row: options.row,\n removableSelector: typeof options.removable === 'string' ? options.removable : undefined,\n removable: typeof options.removable === 'boolean' ? options.removable : undefined,\n acceptWidgets: options.acceptWidgets as boolean,\n float: options.float,\n dragHandlerSelector: options.handle,\n responsiveLayout: options?.columnOpts?.breakpoints?.map((i) => ({ width: i.w, column: i.c })),\n };\n}\n\n/** remove keys which are undefined */\nexport function removeUndefinedKeys<T extends object>(obj: T): T {\n const newObj = { ...obj } as Record<string, unknown>;\n for (const key in newObj) {\n if (newObj[key] === undefined) {\n delete newObj[key];\n }\n }\n return newObj as T;\n}\n\nexport function writeAllowedSizesToElement(\n element: HTMLElement | undefined,\n allowedSizes: readonly AXGridLayoutSize[] | undefined,\n): void {\n if (!element) {\n return;\n }\n\n if (!allowedSizes?.length) {\n element.removeAttribute(AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR);\n return;\n }\n\n element.setAttribute(AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR, JSON.stringify(allowedSizes));\n}\n\nexport function readAllowedSizesFromElement(element: HTMLElement): readonly AXGridLayoutSize[] | undefined {\n const raw = element.getAttribute(AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR);\n if (!raw) {\n return undefined;\n }\n\n try {\n const parsed = JSON.parse(raw) as unknown;\n if (!Array.isArray(parsed) || parsed.length === 0) {\n return undefined;\n }\n\n const sizes = parsed\n .filter((entry): entry is [number, number] => Array.isArray(entry) && entry.length === 2)\n .map(([width, height]) => [Number(width), Number(height)] as const)\n .filter(([width, height]) => Number.isFinite(width) && Number.isFinite(height) && width > 0 && height > 0);\n\n return sizes.length > 0 ? sizes : undefined;\n } catch {\n return undefined;\n }\n}\n\nexport function snapToAllowedSize(\n width: number,\n height: number,\n allowedSizes: readonly AXGridLayoutSize[],\n): AXGridLayoutSize {\n const safeWidth = Number.isFinite(width) && width > 0 ? width : 1;\n const safeHeight = Number.isFinite(height) && height > 0 ? height : 1;\n\n return allowedSizes.reduce<AXGridLayoutSize>((best, size) => {\n const bestDistance = (best[0] - safeWidth) ** 2 + (best[1] - safeHeight) ** 2;\n const nextDistance = (size[0] - safeWidth) ** 2 + (size[1] - safeHeight) ** 2;\n return nextDistance < bestDistance ? size : best;\n }, allowedSizes[0]);\n}\n\nexport function deriveMinMaxFromAllowedSizes(allowedSizes: readonly AXGridLayoutSize[]): Pick<\n AXGridLayoutWidget,\n 'minWidth' | 'maxWidth' | 'minHeight' | 'maxHeight'\n> {\n const widths = allowedSizes.map(([width]) => width);\n const heights = allowedSizes.map(([, height]) => height);\n\n return {\n minWidth: Math.min(...widths),\n maxWidth: Math.max(...widths),\n minHeight: Math.min(...heights),\n maxHeight: Math.max(...heights),\n };\n}\n\nexport function normalizeLayoutNodeWithAllowedSizes<T extends AXGridLayoutWidget>(node: T): T {\n if (!node.allowedSizes?.length) {\n return node;\n }\n\n const [width, height] = snapToAllowedSize(node.width ?? 1, node.height ?? 1, node.allowedSizes);\n const bounds = deriveMinMaxFromAllowedSizes(node.allowedSizes);\n\n return {\n ...node,\n width,\n height,\n minWidth: bounds.minWidth,\n maxWidth: bounds.maxWidth,\n minHeight: bounds.minHeight,\n maxHeight: bounds.maxHeight,\n };\n}\n\nexport function snapElementToAllowedSize(\n grid: import('gridstack').GridStack,\n element: import('gridstack').GridItemHTMLElement,\n): boolean {\n const allowedSizes = readAllowedSizesFromElement(element);\n if (!allowedSizes?.length) {\n return false;\n }\n\n const node = element.gridstackNode;\n if (!node) {\n return false;\n }\n\n const [width, height] = snapToAllowedSize(node.w ?? 1, node.h ?? 1, allowedSizes);\n if (node.w === width && node.h === height) {\n return false;\n }\n\n grid.update(element, { w: width, h: height });\n return true;\n}\n","import { AXComponent } from '@acorex/cdk/common';\nimport { Component, effect, ElementRef, inject, input, untracked, ViewEncapsulation } from '@angular/core';\nimport { AXGridLayoutNode, AXGridLayoutWidget, AXGridLayoutWidgetElement } from './types';\nimport {\n convertAXGridLayoutWidgetToGridStackWidget,\n convertGridStackNodeToAXGridLayoutNode,\n normalizeLayoutNodeWithAllowedSizes,\n removeUndefinedKeys,\n writeAllowedSizesToElement,\n} from './utility';\n\n@Component({\n selector: 'ax-grid-layout-widget',\n template: `<div class=\"grid-stack-item-content\"><ng-content></ng-content></div>`,\n\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXComponent, useExisting: AXGridLayoutWidgetComponent }],\n})\nexport class AXGridLayoutWidgetComponent {\n private readonly elementRef: ElementRef<AXGridLayoutWidgetElement> = inject(ElementRef);\n\n public options = input<AXGridLayoutNode>();\n\n #eff = effect(() => {\n const options = this.options();\n\n untracked(() => {\n const element = this.elementRef.nativeElement;\n const normalized = options ? normalizeLayoutNodeWithAllowedSizes(options) : undefined;\n writeAllowedSizesToElement(element, normalized?.allowedSizes);\n\n const gridstackNode = element.gridstackNode as import('gridstack').GridStackNode;\n if (gridstackNode?.grid && normalized) {\n gridstackNode.grid.update(\n element,\n removeUndefinedKeys(convertAXGridLayoutWidgetToGridStackWidget(normalized)),\n );\n }\n });\n });\n\n /**\n * Locks or unlocks the widget (prevents dragging and resizing).\n *\n * @param state - If true, the widget will be locked.\n * @returns void - No return value. The widget lock state is updated.\n */\n public setLockable(state: boolean): void {\n this.updateWidgetOptions({ disableResize: state, disableDrag: state });\n }\n\n /**\n * Enables or disables resizing of the widget.\n *\n * @param state - If true, resizing will be enabled.\n * @returns void - No return value. The widget resize state is updated.\n */\n public setResizable(state: boolean): void {\n this.updateWidgetOptions({ disableResize: !state });\n }\n\n /**\n * Updates the widget options.\n *\n * @param options - The new options for the widget.\n * @returns void - No return value. The widget options are updated.\n */\n public setOptions(options: AXGridLayoutWidget): void {\n this.updateWidgetOptions(options);\n }\n\n /**\n * Returns the current options of the widget.\n *\n * @returns AXGridLayoutNode - The current widget options.\n */\n public getOptions(): AXGridLayoutNode {\n const gridstackNode = this.elementRef.nativeElement.gridstackNode;\n return gridstackNode\n ? removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(gridstackNode))\n : { ...this.options(), element: this.elementRef.nativeElement };\n }\n\n /**\n * Returns the widget options from the Angular input binding (stored/desired positions),\n * bypassing the live gridstackNode which may have been auto-reflowed.\n * Used by the container to load correct per-breakpoint layouts after column changes.\n *\n * @returns AXGridLayoutNode - The widget options from the input signal.\n */\n public getInputOptions(): AXGridLayoutNode {\n const opts = this.options();\n const normalized = opts ? normalizeLayoutNodeWithAllowedSizes(opts) : undefined;\n return normalized\n ? { ...normalized, element: this.elementRef.nativeElement }\n : { element: this.elementRef.nativeElement };\n }\n\n /**\n * Returns the native DOM element of the widget.\n *\n * @returns AXGridLayoutWidgetElement - The native element.\n */\n public get element(): AXGridLayoutWidgetElement {\n return this.elementRef.nativeElement;\n }\n\n /**\n * Updates the widget options and triggers a grid update.\n * @param options - The partial options to update.\n */\n private updateWidgetOptions(options: Partial<AXGridLayoutWidget>): void {\n const gridstackNode = this.elementRef.nativeElement.gridstackNode as import('gridstack').GridStackNode;\n if (gridstackNode?.grid) {\n gridstackNode.grid.update(\n this.elementRef.nativeElement,\n removeUndefinedKeys(convertAXGridLayoutWidgetToGridStackWidget(options)),\n );\n }\n }\n}\n","import { AXComponent, NXComponent } from '@acorex/cdk/common';\nimport {\n Component,\n ContentChildren,\n ElementRef,\n NgZone,\n OnDestroy,\n QueryList,\n ViewEncapsulation,\n afterNextRender,\n effect,\n inject,\n input,\n model,\n output,\n untracked,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXGridLayoutWidgetComponent } from './grid-layout-widget.component';\nimport {\n AXGridLayout,\n AXGridLayoutContainerElement,\n AXGridLayoutEvent,\n AXGridLayoutNode,\n AXGridLayoutOptions,\n AXGridLayoutPosition,\n AXGridLayoutWidget,\n AXGridLayoutWidgetElement,\n} from './types';\nimport {\n convertAXGridLayoutNodeToGridStackNode,\n convertAXGridLayoutOptionsToGridStackOptions,\n convertAXGridLayoutWidgetToGridStackWidget,\n convertGridStackNodeToAXGridLayoutNode,\n convertGridStackOptionsToAXGridLayoutOptions,\n normalizeLayoutNodeWithAllowedSizes,\n removeUndefinedKeys,\n snapElementToAllowedSize,\n writeAllowedSizesToElement,\n} from './utility';\n\n@Component({\n selector: 'ax-grid-layout-container',\n template: `<ng-content></ng-content> `,\n styleUrl: './grid-layout-container.css',\n\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXComponent, useExisting: AXGridLayoutContainerComponent }],\n})\nexport class AXGridLayoutContainerComponent extends NXComponent implements OnDestroy {\n //#region Inputs and Outputs\n public options = input<AXGridLayoutOptions>();\n\n protected onAdded = output<AXGridLayoutEvent>();\n protected onRemoved = output<AXGridLayoutEvent>();\n protected onWidgetChange = output<AXGridLayoutEvent>();\n protected onChange = output<AXGridLayoutEvent>();\n protected onRender = output<void>();\n\n protected isEmpty = model(false);\n //#endregion\n\n //#region Private Properties\n private readonly elementRef: ElementRef<AXGridLayoutContainerElement> = inject(ElementRef);\n private readonly ngZone = inject(NgZone);\n\n @ContentChildren(AXGridLayoutWidgetComponent) public gridstackItems?: QueryList<AXGridLayoutWidgetComponent>;\n\n private el = this.elementRef.nativeElement;\n private grid?: AXGridLayout;\n protected _sub: Subscription | undefined;\n private isInitialized = false;\n //#endregion\n\n //#region Initialization\n #init = afterNextRender(() => {\n this.ngZone.runOutsideAngular(async () => {\n const { GridStack } = await import('gridstack');\n const gridStackOptions = removeUndefinedKeys(convertAXGridLayoutOptionsToGridStackOptions(this.options() ?? {}));\n this.grid = GridStack.init(gridStackOptions, this.el);\n this.updateAll();\n this.hookEvents(this.grid);\n this.onRender.emit();\n this.isInitialized = true;\n });\n this._sub = this.gridstackItems?.changes.subscribe(() => {\n this.updateAll();\n });\n });\n\n // Watch for options changes\n #optionsEffect = effect(() => {\n const newOptions = this.options();\n if (this.isInitialized && this.grid && newOptions) {\n untracked(() => {\n this.ngZone.runOutsideAngular(() => {\n const gridStackOptions = removeUndefinedKeys(convertAXGridLayoutOptionsToGridStackOptions(newOptions));\n\n const column = gridStackOptions.column;\n\n // Detect whether the column count is changing — requires loading from stored input positions\n const isColumnChange = typeof column === 'number' && column !== this.grid?.opts?.column;\n\n // Use 'none' layout mode to prevent GridStack from auto-reflowing widget positions.\n // The correct per-breakpoint positions will be loaded explicitly via updateAll(true).\n if (typeof column === 'number') {\n this.grid?.column(column, 'none');\n }\n\n if (gridStackOptions.cellHeight !== undefined) {\n this.grid?.cellHeight(gridStackOptions.cellHeight);\n }\n\n if (gridStackOptions.margin !== undefined) {\n this.grid?.margin(gridStackOptions.margin);\n }\n\n if (gridStackOptions.disableResize !== undefined) {\n this.grid?.enableResize(!gridStackOptions.disableResize);\n }\n\n if (gridStackOptions.disableDrag !== undefined) {\n this.grid?.enableMove(!gridStackOptions.disableDrag);\n }\n\n if (gridStackOptions.float !== undefined) {\n this.grid?.float(gridStackOptions.float);\n }\n\n if (gridStackOptions.animate !== undefined) {\n this.grid?.setAnimation(gridStackOptions.animate);\n }\n\n // When column count changes, read from Angular inputs (stored per-breakpoint positions)\n // to avoid using stale gridstackNode positions from the old column layout.\n // For non-column changes, read from gridstackNode to preserve live drag/resize state.\n this.updateAll(isColumnChange);\n });\n });\n }\n });\n\n public ngOnDestroy(): void {\n this.unhookEvents(this.grid);\n this._sub?.unsubscribe();\n this.destroy();\n }\n //#endregion\n\n //#region Internal Methods\n\n /**\n * Synchronizes the grid layout with the current widget list.\n *\n * @param useInputValues - When true, reads positions from Angular input bindings\n * (stored per-breakpoint positions). When false, reads from live gridstackNode\n * (preserving user drag/resize state). Use true after column/breakpoint changes.\n */\n private updateAll(useInputValues = false) {\n if (!this.grid) return;\n\n const arrays = this.gridstackItems?.toArray() ?? [];\n\n if (arrays.length === 0) {\n this.grid.removeAll(true);\n this.checkEmpty();\n return;\n }\n\n const layout: AXGridLayoutNode[] = [];\n arrays.forEach((item) => {\n const widgetOptions = useInputValues ? item.getInputOptions() : item.getOptions();\n if (widgetOptions) {\n const normalized = normalizeLayoutNodeWithAllowedSizes(widgetOptions);\n writeAllowedSizesToElement(normalized.element ?? item.element, normalized.allowedSizes);\n layout.push(removeUndefinedKeys(convertAXGridLayoutNodeToGridStackNode(normalized)));\n }\n });\n\n this.grid.load(layout);\n this.checkEmpty();\n }\n\n private checkEmpty() {\n if (this.grid) {\n const isEmpty = !this.getChildren().length;\n if (isEmpty === this.isEmpty()) return;\n this.isEmpty.set(isEmpty);\n }\n }\n\n private hookEvents(grid?: AXGridLayout): void {\n if (grid) {\n grid\n .on('added', (event: Event, nodes: import('gridstack').GridStackNode[]) => {\n const mappedNodes = nodes.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));\n this.checkEmpty();\n this.onAdded.emit({ sender: this, nodes: mappedNodes });\n this._dispatchChangeEvent();\n })\n .on('removed', (event: Event, nodes: import('gridstack').GridStackNode[]) => {\n const mappedNodes = nodes.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));\n this.checkEmpty();\n this.onRemoved.emit({ sender: this, nodes: mappedNodes });\n this._dispatchChangeEvent();\n })\n .on('change', (event: Event, nodes: import('gridstack').GridStackNode[]) => {\n const mappedNodes = nodes.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));\n this.onWidgetChange.emit({ sender: this, nodes: mappedNodes });\n this._dispatchChangeEvent();\n })\n .on('resizestop', (_event: Event, element: import('gridstack').GridItemHTMLElement) => {\n if (!this.grid) {\n return;\n }\n\n const didSnap = snapElementToAllowedSize(this.grid, element);\n if (didSnap) {\n this._dispatchChangeEvent();\n }\n });\n }\n }\n\n private unhookEvents(grid?: AXGridLayout) {\n if (grid) grid.offAll();\n }\n\n private _dispatchChangeEvent() {\n if (this.getChildren().length) {\n this.onChange.emit({\n sender: this,\n nodes: this.getChildren(),\n });\n }\n }\n //#endregion\n\n /**\n * Adds a widget to the grid layout.\n *\n * @param w - Widget configuration object.\n * @param withAutoArrange - Whether to compact the grid before adding the widget.\n * @returns AXGridLayoutWidgetElement | undefined - The created widget element or undefined if failed.\n */\n public addWidget(w: AXGridLayoutWidget, withAutoArrange = false): AXGridLayoutWidgetElement | undefined {\n if (withAutoArrange) this.compact();\n\n const gridStackWidget = removeUndefinedKeys(convertAXGridLayoutWidgetToGridStackWidget(w));\n const node = this.grid?.addWidget(gridStackWidget)?.gridstackNode;\n if (!node) return undefined;\n\n const widgetElement: AXGridLayoutWidgetElement = node.el as AXGridLayoutWidgetElement;\n widgetElement.gridstackNode = removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node));\n\n return widgetElement;\n }\n\n /**\n * Compacts the grid layout.\n *\n * @param layout - Layout type for compacting ('list' or 'compact').\n * @param doSort - Whether to sort items while compacting.\n * @returns void - No return value. The grid layout is compacted.\n */\n public compact(layout: 'list' | 'compact' = 'compact', doSort = true): void {\n this.grid?.compact(layout, doSort);\n }\n\n /**\n * Sets the cell height of the grid.\n *\n * @param val - New cell height value.\n * @returns void - No return value. The cell height is updated.\n */\n public setCellHeight(val: number): void {\n this.grid?.cellHeight(val);\n }\n\n /**\n * Sets the number of columns in the grid.\n *\n * @param column - Number of columns.\n * @param layout - Layout type for the change ('list', 'compact', 'moveScale', 'move', 'scale', or 'none').\n * @returns void - No return value. The column count is updated.\n */\n public setColumn(\n column: number,\n layout: 'list' | 'compact' | 'moveScale' | 'move' | 'scale' | 'none' = 'moveScale',\n ): void {\n this.grid?.column(column, layout);\n }\n\n /**\n * Destroys the grid instance.\n *\n * @param removeDOM - Whether to remove DOM elements.\n * @returns void - No return value. The grid instance is destroyed.\n */\n public destroy(removeDOM = true): void {\n this.grid?.destroy(removeDOM);\n }\n\n /**\n * Enables or disables moving of widgets.\n *\n * @param state - Whether to enable moving.\n * @param recurse - Whether to apply to all child widgets.\n * @returns void - No return value. The move state is updated.\n */\n public setMovable(state: boolean, recurse?: boolean) {\n this.grid?.enableMove(state, recurse);\n }\n\n /**\n * Enables or disables resizing of widgets.\n *\n * @param state - Whether to enable resizing.\n * @param recurse - Whether to apply to all child widgets.\n * @returns void - No return value. The resize state is updated.\n */\n public setResizable(state: boolean, recurse?: boolean) {\n this.grid?.enableResize(state, recurse);\n }\n\n /**\n * Sets the float property of the grid.\n *\n * @param val - Whether to enable floating widgets.\n * @returns void - No return value. The float state is updated.\n */\n public setFloat(val: boolean): void {\n this.grid?.float(val);\n }\n\n /**\n * Sets the margin between grid items.\n *\n * @param value - Margin value (number in pixels or string with units).\n * @returns void - No return value. The margin is updated.\n */\n public setMargin(value: number | string): void {\n this.grid?.margin(value);\n }\n\n /**\n * Removes a specific widget from the grid.\n *\n * @param el - The widget element to remove.\n * @param removeDOM - Whether to remove the DOM element.\n * @param triggerEvent - Whether to trigger removal events.\n * @returns void - No return value. The widget is removed.\n */\n public removeWidget(el: AXGridLayoutWidgetElement, removeDOM = true, triggerEvent = true): void {\n this.grid?.removeWidget(el, removeDOM, triggerEvent);\n }\n\n /**\n * Removes all widgets from the grid.\n *\n * @param removeDOM - Whether to remove DOM elements.\n * @returns void - No return value. All widgets are removed.\n */\n public removeAll(removeDOM = true): void {\n this.grid?.removeAll(removeDOM);\n }\n\n /**\n * Sets the animation state for the grid.\n *\n * @param doAnimate - Whether to enable animations.\n * @returns void - No return value. The animation state is updated.\n */\n public setAnimation(doAnimate: boolean): void {\n this.grid?.setAnimation(doAnimate);\n }\n\n /**\n * Sets up draggable functionality for external elements.\n *\n * @param dragIn - CSS selector string or array of HTML elements to make draggable.\n * @param widgets - Optional widget configuration for dragged items.\n * @returns Promise<void> - Promise that resolves when drag setup is complete.\n */\n public async setupDraggable(dragIn?: string | HTMLElement[], widgets?: AXGridLayoutWidget) {\n if (typeof dragIn === 'string') {\n document.querySelectorAll(dragIn).forEach((item) => {\n if (!item.classList.contains('grid-stack-item')) {\n item.classList.add('grid-stack-item');\n }\n });\n }\n const { GridStack } = await import('gridstack');\n const gridStackWidgets = widgets\n ? [removeUndefinedKeys(convertAXGridLayoutWidgetToGridStackWidget(widgets))]\n : undefined;\n GridStack.setupDragIn(dragIn, undefined, gridStackWidgets);\n }\n\n /**\n * Gets the current grid options.\n *\n * @returns AXGridLayoutOptions - Current grid configuration options.\n */\n public getOptions(): AXGridLayoutOptions {\n const opts = this.grid?.opts;\n if (!opts) return {};\n\n return removeUndefinedKeys(convertGridStackOptionsToAXGridLayoutOptions(opts));\n }\n\n /**\n * Gets all child widgets in the grid.\n *\n * @returns AXGridLayoutNode[] - Array of all child widget nodes.\n */\n public getChildren(): AXGridLayoutNode[] {\n const children = this.grid?.engine.nodes ?? [];\n return children.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));\n }\n\n /**\n * Finds an empty space in the grid for a widget.\n *\n * @param input - Dimensions of the widget with height and width.\n * @returns { x: number; y: number } - Object containing x and y coordinates of empty space.\n */\n public findEmptySpace(\n input: Required<Pick<AXGridLayoutPosition, 'height' | 'width'>>,\n ): Pick<AXGridLayoutPosition, 'x' | 'y'> {\n const value = { h: input.height, w: input.width } as import('gridstack').GridStackNode;\n this.grid?.engine.findEmptyPosition(value);\n return { x: value.x, y: value.y };\n }\n //#endregion\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { AXGridLayoutContainerComponent } from './grid-layout-container.component';\nimport { AXGridLayoutWidgetComponent } from './grid-layout-widget.component';\n\n@NgModule({\n imports: [CommonModule, AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent],\n exports: [AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent],\n})\nexport class AXGridLayoutBuilderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEO,MAAM,iCAAiC,GAAG;AAEjD;AACM,SAAU,0CAA0C,CACxD,MAA0B,EAAA;AAE1B,IAAA,MAAM,UAAU,GAAG,mCAAmC,CAAC,MAAM,CAAC;IAE9D,OAAO;QACL,EAAE,EAAE,UAAU,CAAC,EAAE;QACjB,CAAC,EAAE,UAAU,CAAC,CAAC;QACf,CAAC,EAAE,UAAU,CAAC,CAAC;QACf,CAAC,EAAE,UAAU,CAAC,KAAK;QACnB,CAAC,EAAE,UAAU,CAAC,MAAM;QACpB,IAAI,EAAE,UAAU,CAAC,QAAQ;QACzB,IAAI,EAAE,UAAU,CAAC,SAAS;QAC1B,IAAI,EAAE,UAAU,CAAC,QAAQ;QACzB,IAAI,EAAE,UAAU,CAAC,SAAS;QAC1B,QAAQ,EAAE,UAAU,CAAC,aAAa;QAClC,MAAM,EAAE,UAAU,CAAC,WAAW;KAC/B;AACH;AAEA;AACM,SAAU,0CAA0C,CACxD,MAA2C,EAAA;IAE3C,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,EAAE;QACb,CAAC,EAAE,MAAM,CAAC,CAAC;QACX,CAAC,EAAE,MAAM,CAAC,CAAC;QACX,KAAK,EAAE,MAAM,CAAC,CAAC;QACf,MAAM,EAAE,MAAM,CAAC,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC,IAAI;QACrB,SAAS,EAAE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 @@
1
1
  {
2
2
  "name": "@acorex/components",
3
- "version": "22.0.0-next.28",
3
+ "version": "22.0.0-next.30",
4
4
  "peerDependencies": {
5
- "@acorex/core": "22.0.0-next.28",
6
- "@acorex/cdk": "22.0.0-next.28",
5
+ "@acorex/core": "22.0.0-next.30",
6
+ "@acorex/cdk": "22.0.0-next.30",
7
7
  "polytype": ">=0.17.0",
8
8
  "angular-imask": ">=7.6.1",
9
9
  "imask": ">=7.6.1",
@@ -5,6 +5,8 @@ import { NXEvent, NXComponent } from '@acorex/cdk/common';
5
5
  import { Subscription } from 'rxjs';
6
6
  import * as gridstack from 'gridstack';
7
7
 
8
+ /** Grid size preset as `[width, height]` in column/row units. */
9
+ type AXGridLayoutSize = readonly [width: number, height: number];
8
10
  interface AXGridLayoutPosition {
9
11
  /** widget position x (default?: 0) */
10
12
  x?: number;
@@ -22,6 +24,11 @@ interface AXGridLayoutPosition {
22
24
  minWidth?: number;
23
25
  /** minimum height of widget in rows (default?: undefined = un-constrained) */
24
26
  minHeight?: number;
27
+ /**
28
+ * When set, resize snaps to one of these `[width, height]` presets.
29
+ * Min/max bounds are derived from this list during grid conversion.
30
+ */
31
+ allowedSizes?: readonly AXGridLayoutSize[];
25
32
  }
26
33
  interface AXGridLayoutWidget extends AXGridLayoutPosition {
27
34
  id?: string;
@@ -318,5 +325,21 @@ declare class AXGridLayoutBuilderModule {
318
325
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXGridLayoutBuilderModule>;
319
326
  }
320
327
 
321
- export { AXGridLayoutBuilderModule, AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent };
322
- export type { AXGridLayout, AXGridLayoutContainerElement, AXGridLayoutEvent, AXGridLayoutNode, AXGridLayoutOptions, AXGridLayoutPosition, AXGridLayoutWidget, AXGridLayoutWidgetElement };
328
+ declare const AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR = "data-ax-allowed-sizes";
329
+ declare function convertAXGridLayoutWidgetToGridStackWidget(widget: AXGridLayoutWidget): gridstack.GridStackWidget;
330
+ declare function convertGridStackWidgetToAXGridLayoutWidget(widget: gridstack.GridStackWidget): AXGridLayoutWidget;
331
+ declare function convertAXGridLayoutNodeToGridStackNode(node: AXGridLayoutNode): gridstack.GridStackNode;
332
+ declare function convertGridStackNodeToAXGridLayoutNode(node: gridstack.GridStackNode): AXGridLayoutNode;
333
+ declare function convertAXGridLayoutOptionsToGridStackOptions(options: AXGridLayoutOptions): gridstack.GridStackOptions;
334
+ declare function convertGridStackOptionsToAXGridLayoutOptions(options: gridstack.GridStackOptions): AXGridLayoutOptions;
335
+ /** remove keys which are undefined */
336
+ declare function removeUndefinedKeys<T extends object>(obj: T): T;
337
+ declare function writeAllowedSizesToElement(element: HTMLElement | undefined, allowedSizes: readonly AXGridLayoutSize[] | undefined): void;
338
+ declare function readAllowedSizesFromElement(element: HTMLElement): readonly AXGridLayoutSize[] | undefined;
339
+ declare function snapToAllowedSize(width: number, height: number, allowedSizes: readonly AXGridLayoutSize[]): AXGridLayoutSize;
340
+ declare function deriveMinMaxFromAllowedSizes(allowedSizes: readonly AXGridLayoutSize[]): Pick<AXGridLayoutWidget, 'minWidth' | 'maxWidth' | 'minHeight' | 'maxHeight'>;
341
+ declare function normalizeLayoutNodeWithAllowedSizes<T extends AXGridLayoutWidget>(node: T): T;
342
+ declare function snapElementToAllowedSize(grid: gridstack.GridStack, element: gridstack.GridItemHTMLElement): boolean;
343
+
344
+ export { AXGridLayoutBuilderModule, AXGridLayoutContainerComponent, AXGridLayoutWidgetComponent, AX_GRID_LAYOUT_ALLOWED_SIZES_ATTR, convertAXGridLayoutNodeToGridStackNode, convertAXGridLayoutOptionsToGridStackOptions, convertAXGridLayoutWidgetToGridStackWidget, convertGridStackNodeToAXGridLayoutNode, convertGridStackOptionsToAXGridLayoutOptions, convertGridStackWidgetToAXGridLayoutWidget, deriveMinMaxFromAllowedSizes, normalizeLayoutNodeWithAllowedSizes, readAllowedSizesFromElement, removeUndefinedKeys, snapElementToAllowedSize, snapToAllowedSize, writeAllowedSizesToElement };
345
+ export type { AXGridLayout, AXGridLayoutContainerElement, AXGridLayoutEvent, AXGridLayoutNode, AXGridLayoutOptions, AXGridLayoutPosition, AXGridLayoutSize, AXGridLayoutWidget, AXGridLayoutWidgetElement };