codexly-ui 0.15.1 → 0.15.2

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.
@@ -16585,6 +16585,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16585
16585
  * overlay usage) and resize-by-dragging a corner handle. Persistence is the caller's job: listen
16586
16586
  * to (layoutChange) and save the resulting ClxGridItem[] (e.g. to rp_dashboard_layouts.layout). */
16587
16587
  class ClxDashboardGridComponent {
16588
+ _themeSvc = inject(ClxThemeService);
16588
16589
  items = input.required(...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
16589
16590
  columns = input(4, ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
16590
16591
  rowHeight = input(92, ...(ngDevMode ? [{ debugName: "rowHeight" }] : /* istanbul ignore next */ []));
@@ -16594,6 +16595,14 @@ class ClxDashboardGridComponent {
16594
16595
  itemResize = output();
16595
16596
  _itemTemplate = contentChild(ClxGridItemDirective, ...(ngDevMode ? [{ debugName: "_itemTemplate" }] : /* istanbul ignore next */ []));
16596
16597
  _gridCols = computed(() => `repeat(${this.columns()}, minmax(0, 1fr))`, ...(ngDevMode ? [{ debugName: "_gridCols" }] : /* istanbul ignore next */ []));
16598
+ /** Editing gets a visibly distinct "canvas" — dashed border + dotted background + surface-2 tint
16599
+ * — so the grid reads as an editable panel, not bare page background with cards floating on it. */
16600
+ _containerClass = computed(() => {
16601
+ const radius = resolveContainerRadius(this._themeSvc.config().borderRadius);
16602
+ if (!this.editable())
16603
+ return `${radius} p-1`;
16604
+ return `${radius} p-4 border-2 border-dashed border-clx-border bg-clx-surface-2`;
16605
+ }, ...(ngDevMode ? [{ debugName: "_containerClass" }] : /* istanbul ignore next */ []));
16597
16606
  _resizing = null;
16598
16607
  _onDrop(event) {
16599
16608
  const next = [...this.items()];
@@ -16636,38 +16645,40 @@ class ClxDashboardGridComponent {
16636
16645
  }
16637
16646
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxDashboardGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16638
16647
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxDashboardGridComponent, isStandalone: true, selector: "clx-dashboard-grid", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { layoutChange: "layoutChange", itemResize: "itemResize" }, host: { classAttribute: "block w-full" }, queries: [{ propertyName: "_itemTemplate", first: true, predicate: ClxGridItemDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
16639
- <div
16640
- cdkDropList
16641
- [cdkDropListDisabled]="!editable()"
16642
- (cdkDropListDropped)="_onDrop($event)"
16643
- class="grid w-full"
16644
- [style.grid-template-columns]="_gridCols()"
16645
- [style.grid-auto-rows.px]="rowHeight()"
16646
- [style.gap.px]="gap()">
16647
- @for (item of items(); track item.id) {
16648
- <div
16649
- cdkDrag
16650
- [cdkDragDisabled]="!editable()"
16651
- [cdkDragData]="item"
16652
- (cdkDragMoved)="_onDragMoved($event)"
16653
- class="relative min-w-0"
16654
- [class.cursor-grab]="editable()"
16655
- [style.grid-column]="'span ' + item.w"
16656
- [style.grid-row]="'span ' + item.h">
16657
-
16658
- <ng-container
16659
- [ngTemplateOutlet]="_itemTemplate()?.templateRef ?? null"
16660
- [ngTemplateOutletContext]="{ $implicit: item }">
16661
- </ng-container>
16662
-
16663
- @if (editable()) {
16664
- <div
16665
- class="absolute -right-1 -bottom-1 w-3.5 h-3.5 rounded bg-clx-primary border-2 border-clx-surface shadow cursor-nwse-resize"
16666
- (pointerdown)="_startResize($event, item)">
16667
- </div>
16668
- }
16669
- </div>
16670
- }
16648
+ <div [class]="_containerClass()">
16649
+ <div
16650
+ cdkDropList
16651
+ [cdkDropListDisabled]="!editable()"
16652
+ (cdkDropListDropped)="_onDrop($event)"
16653
+ class="grid w-full"
16654
+ [style.grid-template-columns]="_gridCols()"
16655
+ [style.grid-auto-rows.px]="rowHeight()"
16656
+ [style.gap.px]="gap()">
16657
+ @for (item of items(); track item.id) {
16658
+ <div
16659
+ cdkDrag
16660
+ [cdkDragDisabled]="!editable()"
16661
+ [cdkDragData]="item"
16662
+ (cdkDragMoved)="_onDragMoved($event)"
16663
+ class="relative min-w-0"
16664
+ [class.cursor-grab]="editable()"
16665
+ [style.grid-column]="'span ' + item.w"
16666
+ [style.grid-row]="'span ' + item.h">
16667
+
16668
+ <ng-container
16669
+ [ngTemplateOutlet]="_itemTemplate()?.templateRef ?? null"
16670
+ [ngTemplateOutletContext]="{ $implicit: item }">
16671
+ </ng-container>
16672
+
16673
+ @if (editable()) {
16674
+ <div
16675
+ class="absolute -right-1 -bottom-1 w-3.5 h-3.5 rounded bg-clx-primary border-2 border-clx-surface shadow cursor-nwse-resize z-10"
16676
+ (pointerdown)="_startResize($event, item)">
16677
+ </div>
16678
+ }
16679
+ </div>
16680
+ }
16681
+ </div>
16671
16682
  </div>
16672
16683
  `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
16673
16684
  }
@@ -16681,38 +16692,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16681
16692
  changeDetection: ChangeDetectionStrategy.OnPush,
16682
16693
  host: { class: 'block w-full' },
16683
16694
  template: `
16684
- <div
16685
- cdkDropList
16686
- [cdkDropListDisabled]="!editable()"
16687
- (cdkDropListDropped)="_onDrop($event)"
16688
- class="grid w-full"
16689
- [style.grid-template-columns]="_gridCols()"
16690
- [style.grid-auto-rows.px]="rowHeight()"
16691
- [style.gap.px]="gap()">
16692
- @for (item of items(); track item.id) {
16693
- <div
16694
- cdkDrag
16695
- [cdkDragDisabled]="!editable()"
16696
- [cdkDragData]="item"
16697
- (cdkDragMoved)="_onDragMoved($event)"
16698
- class="relative min-w-0"
16699
- [class.cursor-grab]="editable()"
16700
- [style.grid-column]="'span ' + item.w"
16701
- [style.grid-row]="'span ' + item.h">
16702
-
16703
- <ng-container
16704
- [ngTemplateOutlet]="_itemTemplate()?.templateRef ?? null"
16705
- [ngTemplateOutletContext]="{ $implicit: item }">
16706
- </ng-container>
16707
-
16708
- @if (editable()) {
16709
- <div
16710
- class="absolute -right-1 -bottom-1 w-3.5 h-3.5 rounded bg-clx-primary border-2 border-clx-surface shadow cursor-nwse-resize"
16711
- (pointerdown)="_startResize($event, item)">
16712
- </div>
16713
- }
16714
- </div>
16715
- }
16695
+ <div [class]="_containerClass()">
16696
+ <div
16697
+ cdkDropList
16698
+ [cdkDropListDisabled]="!editable()"
16699
+ (cdkDropListDropped)="_onDrop($event)"
16700
+ class="grid w-full"
16701
+ [style.grid-template-columns]="_gridCols()"
16702
+ [style.grid-auto-rows.px]="rowHeight()"
16703
+ [style.gap.px]="gap()">
16704
+ @for (item of items(); track item.id) {
16705
+ <div
16706
+ cdkDrag
16707
+ [cdkDragDisabled]="!editable()"
16708
+ [cdkDragData]="item"
16709
+ (cdkDragMoved)="_onDragMoved($event)"
16710
+ class="relative min-w-0"
16711
+ [class.cursor-grab]="editable()"
16712
+ [style.grid-column]="'span ' + item.w"
16713
+ [style.grid-row]="'span ' + item.h">
16714
+
16715
+ <ng-container
16716
+ [ngTemplateOutlet]="_itemTemplate()?.templateRef ?? null"
16717
+ [ngTemplateOutletContext]="{ $implicit: item }">
16718
+ </ng-container>
16719
+
16720
+ @if (editable()) {
16721
+ <div
16722
+ class="absolute -right-1 -bottom-1 w-3.5 h-3.5 rounded bg-clx-primary border-2 border-clx-surface shadow cursor-nwse-resize z-10"
16723
+ (pointerdown)="_startResize($event, item)">
16724
+ </div>
16725
+ }
16726
+ </div>
16727
+ }
16728
+ </div>
16716
16729
  </div>
16717
16730
  `,
16718
16731
  }]