codexly-ui 0.15.2 → 0.15.3
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/fesm2022/codexly-ui.mjs +100 -22
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +22 -2
package/package.json
CHANGED
package/types/codexly-ui.d.ts
CHANGED
|
@@ -3709,9 +3709,17 @@ declare class ClxGridItemDirective {
|
|
|
3709
3709
|
* using column/row units, supports drag-to-reorder (via Angular CDK's CdkDropList/CdkDrag — no
|
|
3710
3710
|
* new dependency, @angular/cdk is already pulled in by ClxProfileComponent/ClxWidgetCardComponent's
|
|
3711
3711
|
* overlay usage) and resize-by-dragging a corner handle. Persistence is the caller's job: listen
|
|
3712
|
-
* to (layoutChange) and save the resulting ClxGridItem[] (e.g. to rp_dashboard_layouts.layout).
|
|
3713
|
-
|
|
3712
|
+
* to (layoutChange) and save the resulting ClxGridItem[] (e.g. to rp_dashboard_layouts.layout).
|
|
3713
|
+
*
|
|
3714
|
+
* Responsive: `columns` is the desktop column count; the grid itself halves it under 1024px and
|
|
3715
|
+
* collapses to a single column under 640px (both breakpoints measured off its own host width via
|
|
3716
|
+
* ResizeObserver, not the viewport — correct inside a narrow sidebar-pushed layout too). Below
|
|
3717
|
+
* 640px, pointer-drag reorder/resize is replaced by an up/down reorder button pair per item —
|
|
3718
|
+
* CdkDrag's pointer events are unreliable with real fingers on a dense grid, and a 1-column layout
|
|
3719
|
+
* has nothing to resize width-wise anyway. */
|
|
3720
|
+
declare class ClxDashboardGridComponent implements OnDestroy {
|
|
3714
3721
|
private readonly _themeSvc;
|
|
3722
|
+
private readonly _isBrowser;
|
|
3715
3723
|
readonly items: _angular_core.InputSignal<ClxGridItem[]>;
|
|
3716
3724
|
readonly columns: _angular_core.InputSignal<number>;
|
|
3717
3725
|
readonly rowHeight: _angular_core.InputSignal<number>;
|
|
@@ -3720,13 +3728,25 @@ declare class ClxDashboardGridComponent {
|
|
|
3720
3728
|
readonly layoutChange: _angular_core.OutputEmitterRef<ClxGridItem[]>;
|
|
3721
3729
|
readonly itemResize: _angular_core.OutputEmitterRef<ClxGridItemResizeEvent>;
|
|
3722
3730
|
protected readonly _itemTemplate: _angular_core.Signal<ClxGridItemDirective | undefined>;
|
|
3731
|
+
private readonly _container;
|
|
3732
|
+
private readonly _hostWidth;
|
|
3733
|
+
private _resizeObserver?;
|
|
3734
|
+
/** Below 640px: single column, no drag/resize (reorder buttons instead). 640-1024px: half the
|
|
3735
|
+
* desktop column count (min 2). 1024px+: the full `columns()` count. */
|
|
3736
|
+
protected readonly _isCompact: _angular_core.Signal<boolean>;
|
|
3737
|
+
private readonly _effectiveColumns;
|
|
3723
3738
|
protected readonly _gridCols: _angular_core.Signal<string>;
|
|
3724
3739
|
/** Editing gets a visibly distinct "canvas" — dashed border + dotted background + surface-2 tint
|
|
3725
3740
|
* — so the grid reads as an editable panel, not bare page background with cards floating on it. */
|
|
3726
3741
|
protected readonly _containerClass: _angular_core.Signal<string>;
|
|
3727
3742
|
private _resizing;
|
|
3743
|
+
constructor();
|
|
3744
|
+
ngOnDestroy(): void;
|
|
3728
3745
|
protected _onDrop(event: CdkDragDrop<ClxGridItem[]>): void;
|
|
3729
3746
|
protected _onDragMoved(_event: CdkDragMove<ClxGridItem>): void;
|
|
3747
|
+
/** Compact-mode reorder (touch-friendly alternative to CdkDrag) — swap item at `index` with its
|
|
3748
|
+
* neighbor `delta` positions away (-1 = up/earlier, 1 = down/later). */
|
|
3749
|
+
protected _moveBy(index: number, delta: number): void;
|
|
3730
3750
|
protected _startResize(event: PointerEvent, item: ClxGridItem): void;
|
|
3731
3751
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClxDashboardGridComponent, never>;
|
|
3732
3752
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClxDashboardGridComponent, "clx-dashboard-grid", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; }, { "layoutChange": "layoutChange"; "itemResize": "itemResize"; }, ["_itemTemplate"], never, true, never>;
|