codexly-ui 0.10.5 → 0.10.6

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.
@@ -9771,6 +9771,13 @@ class ClxMenuComponent {
9771
9771
  active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
9772
9772
  routerLink = input('', ...(ngDevMode ? [{ debugName: "routerLink" }] : /* istanbul ignore next */ []));
9773
9773
  routerLinkActiveOptions = input({ exact: false }, ...(ngDevMode ? [{ debugName: "routerLinkActiveOptions" }] : /* istanbul ignore next */ []));
9774
+ /** Whether this module has any nested clx-menu-item children. When false and routerLink is set,
9775
+ * clicking navigates straight through instead of only toggling an (empty) expand arrow — the
9776
+ * module keeps its normal "Módulos" color either way, only the click behavior and the arrow's
9777
+ * presence change. See ShellComponent's usage for the real case this covers: a module with no
9778
+ * options assigned still needs somewhere to go rather than dead-ending on a submenu with nothing
9779
+ * in it. */
9780
+ hasChildren = input(true, ...(ngDevMode ? [{ debugName: "hasChildren" }] : /* istanbul ignore next */ []));
9774
9781
  _isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "_isExpanded" }] : /* istanbul ignore next */ []));
9775
9782
  _rla;
9776
9783
  _destroyRef = inject(DestroyRef);
@@ -9808,8 +9815,18 @@ class ClxMenuComponent {
9808
9815
  _toggle() {
9809
9816
  this._isExpanded.update(v => !v);
9810
9817
  }
9818
+ /** With children: the anchor's real navigation is suppressed, click only toggles the submenu
9819
+ * (the routerLink here exists solely to drive routerLinkActive styling on the row). Without
9820
+ * children: there's nothing to expand, so the click is left to navigate normally instead. */
9821
+ _onRouterLinkClick(event) {
9822
+ if (!this.hasChildren())
9823
+ return;
9824
+ event.preventDefault();
9825
+ if (!this.collapsed())
9826
+ this._toggle();
9827
+ }
9811
9828
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9812
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxMenuComponent, isStandalone: true, selector: "clx-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, viewQueries: [{ propertyName: "_rla", first: true, predicate: RouterLinkActive, descendants: true }], ngImport: i0, template: `
9829
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxMenuComponent, isStandalone: true, selector: "clx-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null }, hasChildren: { classPropertyName: "hasChildren", publicName: "hasChildren", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, viewQueries: [{ propertyName: "_rla", first: true, predicate: RouterLinkActive, descendants: true }], ngImport: i0, template: `
9813
9830
  @if (routerLink()) {
9814
9831
  <a
9815
9832
  [routerLink]="routerLink()"
@@ -9818,19 +9835,21 @@ class ClxMenuComponent {
9818
9835
  [routerLinkActiveOptions]="routerLinkActiveOptions()"
9819
9836
  [class]="_buttonCls(rla.isActive)"
9820
9837
  [title]="collapsed() ? label() : ''"
9821
- (click)="$event.preventDefault(); !collapsed() && _toggle()">
9838
+ (click)="_onRouterLinkClick($event)">
9822
9839
  @if (icon()) {
9823
9840
  <span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
9824
9841
  }
9825
9842
  @if (!collapsed()) {
9826
9843
  <span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
9827
- <span
9828
- clx-icon
9829
- name="expand_more"
9830
- size="sm"
9831
- [class]="'shrink-0 transition-transform duration-300 ' + (rla.isActive ? '' : 'text-clx-text-subtle')"
9832
- [style.transform]="_isExpanded() ? 'rotate(180deg)' : 'rotate(0deg)'">
9833
- </span>
9844
+ @if (hasChildren()) {
9845
+ <span
9846
+ clx-icon
9847
+ name="expand_more"
9848
+ size="sm"
9849
+ [class]="'shrink-0 transition-transform duration-300 ' + (rla.isActive ? '' : 'text-clx-text-subtle')"
9850
+ [style.transform]="_isExpanded() ? 'rotate(180deg)' : 'rotate(0deg)'">
9851
+ </span>
9852
+ }
9834
9853
  }
9835
9854
  </a>
9836
9855
  } @else {
@@ -9881,19 +9900,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
9881
9900
  [routerLinkActiveOptions]="routerLinkActiveOptions()"
9882
9901
  [class]="_buttonCls(rla.isActive)"
9883
9902
  [title]="collapsed() ? label() : ''"
9884
- (click)="$event.preventDefault(); !collapsed() && _toggle()">
9903
+ (click)="_onRouterLinkClick($event)">
9885
9904
  @if (icon()) {
9886
9905
  <span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
9887
9906
  }
9888
9907
  @if (!collapsed()) {
9889
9908
  <span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
9890
- <span
9891
- clx-icon
9892
- name="expand_more"
9893
- size="sm"
9894
- [class]="'shrink-0 transition-transform duration-300 ' + (rla.isActive ? '' : 'text-clx-text-subtle')"
9895
- [style.transform]="_isExpanded() ? 'rotate(180deg)' : 'rotate(0deg)'">
9896
- </span>
9909
+ @if (hasChildren()) {
9910
+ <span
9911
+ clx-icon
9912
+ name="expand_more"
9913
+ size="sm"
9914
+ [class]="'shrink-0 transition-transform duration-300 ' + (rla.isActive ? '' : 'text-clx-text-subtle')"
9915
+ [style.transform]="_isExpanded() ? 'rotate(180deg)' : 'rotate(0deg)'">
9916
+ </span>
9917
+ }
9897
9918
  }
9898
9919
  </a>
9899
9920
  } @else {
@@ -9932,7 +9953,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
9932
9953
  changeDetection: ChangeDetectionStrategy.OnPush,
9933
9954
  host: { class: 'block' },
9934
9955
  }]
9935
- }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], routerLinkActiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkActiveOptions", required: false }] }], _rla: [{
9956
+ }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], routerLinkActiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkActiveOptions", required: false }] }], hasChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasChildren", required: false }] }], _rla: [{
9936
9957
  type: ViewChild,
9937
9958
  args: [RouterLinkActive]
9938
9959
  }] } });