Skip to content

Commit

Permalink
refactor: migrating remaining brain libraries to secondary entrypoints (
Browse files Browse the repository at this point in the history
#523)

* refactor: migrating remaining brain libraries to secondary entrypoints

* refactor: migrating remaining brain libraries to secondary entrypoints
  • Loading branch information
ashley-hunter authored Dec 10, 2024
1 parent b9ae283 commit be4a87d
Show file tree
Hide file tree
Showing 632 changed files with 595 additions and 5,047 deletions.
6 changes: 0 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ command:
nx g @spartan-ng/tools:brain-secondary-entrypoint --name=feature-name
```

If you are migrating an existing feature to a Brain feature, you can use something like the following command:

```shell
nx g @spartan-ng/tools:brain-secondary-entrypoint --name=checkbox --project=ui-checkbox-brain
```

## Submitting pull requests

**Please follow these basic steps to simplify pull request reviews. If you don't you'll probably just be asked to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import { BrnAlertDialogContentDirective, BrnAlertDialogTriggerDirective } from '@spartan-ng/ui-alertdialog-brain';
import { BrnAlertDialogContentDirective, BrnAlertDialogTriggerDirective } from '@spartan-ng/brain/alert-dialog';
import {
HlmAlertDialogActionButtonDirective,
HlmAlertDialogCancelButtonDirective,
Expand Down Expand Up @@ -58,7 +58,7 @@ import { Component } from '@angular/core';
import {
BrnAlertDialogContentDirective,
BrnAlertDialogTriggerDirective,
} from '@spartan-ng/ui-alertdialog-brain';
} from '@spartan-ng/brain/alert-dialog';
import {
HlmAlertDialogActionButtonDirective,
HlmAlertDialogCancelButtonDirective,
Expand Down Expand Up @@ -114,7 +114,7 @@ export class AlertDialogPreviewComponent {}
`;

export const defaultImports = `
import { BrnAlertDialogContentDirective, BrnAlertDialogTriggerDirective } from '@spartan-ng/ui-alertdialog-brain';
import { BrnAlertDialogContentDirective, BrnAlertDialogTriggerDirective } from '@spartan-ng/brain/alert-dialog';
import {
HlmAlertDialogActionButtonDirective,
HlmAlertDialogCancelButtonDirective,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { lucideChevronDown, lucideSlash } from '@ng-icons/lucide';
import { BrnMenuTriggerDirective } from '@spartan-ng/brain/menu';
import {
HlmBreadcrumbDirective,
HlmBreadcrumbItemDirective,
Expand All @@ -9,7 +10,6 @@ import {
HlmBreadcrumbSeparatorComponent,
} from '@spartan-ng/ui-breadcrumb-helm';
import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
import { BrnMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import { HlmMenuComponent, HlmMenuItemDirective } from '@spartan-ng/ui-menu-helm';

@Component({
Expand Down Expand Up @@ -81,7 +81,7 @@ import {
HlmBreadcrumbSeparatorComponent,
} from '@spartan-ng/ui-breadcrumb-helm';
import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
import { BrnMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import { BrnMenuTriggerDirective } from '@spartan-ng/brain/menu';
import { HlmMenuComponent, HlmMenuItemDirective } from '@spartan-ng/ui-menu-helm';
@Component({
Expand Down Expand Up @@ -143,7 +143,7 @@ export class BreadcrumbDropdownComponent {}
`;

export const breadcrumbDropdownSkeleton = `
import { BrnMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import { BrnMenuTriggerDirective } from '@spartan-ng/brain/menu';
import { HlmMenuComponent, HlmMenuItemDirective } from '@spartan-ng/ui-menu-helm';
...
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
import { BrnMenuTriggerDirective } from '@spartan-ng/brain/menu';
import {
HlmBreadcrumbDirective,
HlmBreadcrumbEllipsisComponent,
Expand All @@ -8,7 +9,6 @@ import {
HlmBreadcrumbPageDirective,
HlmBreadcrumbSeparatorComponent,
} from '@spartan-ng/ui-breadcrumb-helm';
import { BrnMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import { HlmMenuComponent, HlmMenuItemDirective } from '@spartan-ng/ui-menu-helm';

@Component({
Expand Down Expand Up @@ -77,7 +77,7 @@ import {
HlmBreadcrumbPageDirective,
HlmBreadcrumbSeparatorComponent,
} from '@spartan-ng/ui-breadcrumb-helm';
import { BrnMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import { BrnMenuTriggerDirective } from '@spartan-ng/brain/menu';
import { HlmMenuComponent, HlmMenuItemDirective } from '@spartan-ng/ui-menu-helm';
@Component({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Component, signal } from '@angular/core';
import { lucideCheck, lucideChevronDown } from '@ng-icons/lucide';
import { BrnCommandImports } from '@spartan-ng/brain/command';
import { BrnPopoverComponent, BrnPopoverContentDirective, BrnPopoverTriggerDirective } from '@spartan-ng/brain/popover';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import {
HlmCardContentDirective,
Expand All @@ -9,16 +11,10 @@ import {
HlmCardHeaderDirective,
HlmCardTitleDirective,
} from '@spartan-ng/ui-card-helm';
import { BrnCommandImports } from '@spartan-ng/ui-command-brain';
import { HlmCommandImports } from '@spartan-ng/ui-command-helm';
import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
import { HlmInputDirective } from '@spartan-ng/ui-input-helm';
import { HlmLabelDirective } from '@spartan-ng/ui-label-helm';
import {
BrnPopoverComponent,
BrnPopoverContentDirective,
BrnPopoverTriggerDirective,
} from '@spartan-ng/ui-popover-brain';
import { HlmPopoverContentDirective } from '@spartan-ng/ui-popover-helm';

type Framework = { label: string; value: string };
Expand Down Expand Up @@ -156,7 +152,7 @@ import {
HlmCardHeaderDirective,
HlmCardTitleDirective,
} from '@spartan-ng/ui-card-helm';
import { BrnCommandImports } from '@spartan-ng/ui-command-brain';
import { BrnCommandImports } from '@spartan-ng/brain/command';
import { HlmCommandImports } from '@spartan-ng/ui-command-helm';
import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
import { HlmInputDirective } from '@spartan-ng/ui-input-helm';
Expand All @@ -166,7 +162,7 @@ import {
BrnPopoverComponent,
BrnPopoverContentDirective,
BrnPopoverTriggerDirective,
} from '@spartan-ng/ui-popover-brain';
} from '@spartan-ng/brain/popover';
type Framework = { label: string; value: string };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Component } from '@angular/core';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import {
BrnCollapsibleComponent,
BrnCollapsibleContentComponent,
BrnCollapsibleTriggerDirective,
} from '@spartan-ng/ui-collapsible-brain';
} from '@spartan-ng/brain/collapsible';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';

@Component({
selector: 'spartan-collapsible-preview',
Expand Down Expand Up @@ -54,7 +54,7 @@ import {
BrnCollapsibleComponent,
BrnCollapsibleContentComponent,
BrnCollapsibleTriggerDirective,
} from '@spartan-ng/ui-collapsible-brain';
} from '@spartan-ng/brain/collapsible';
@Component({
selector: 'spartan-collapsible-preview',
Expand Down Expand Up @@ -103,7 +103,7 @@ import {
BrnCollapsibleComponent,
BrnCollapsibleContentComponent,
BrnCollapsibleTriggerDirective,
} from '@spartan-ng/ui-collapsible-brain';
} from '@spartan-ng/brain/collapsible';
`;

export const defaultSkeleton = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ import { NgForOf } from '@angular/common';
import { Component, signal } from '@angular/core';
import { provideIcons } from '@ng-icons/core';
import { lucideCheck, lucideChevronsUpDown, lucideSearch } from '@ng-icons/lucide';
import { BrnCommandImports } from '@spartan-ng/brain/command';
import { BrnPopoverComponent, BrnPopoverContentDirective, BrnPopoverTriggerDirective } from '@spartan-ng/brain/popover';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import { BrnCommandImports } from '@spartan-ng/ui-command-brain';
import { HlmCommandImports } from '@spartan-ng/ui-command-helm';
import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
import {
BrnPopoverComponent,
BrnPopoverContentDirective,
BrnPopoverTriggerDirective,
} from '@spartan-ng/ui-popover-brain';
import { HlmPopoverContentDirective } from '@spartan-ng/ui-popover-helm';

type Framework = { label: string; value: string };
Expand Down Expand Up @@ -113,15 +109,15 @@ export class ComboboxPreviewComponent {

export const defaultCode = `
import { Component, signal } from '@angular/core';
import { BrnCommandImports } from '@spartan-ng/ui-command-brain';
import { BrnCommandImports } from '@spartan-ng/brain/command';
import { HlmCommandImports } from '@spartan-ng/ui-command-helm';
import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import {
BrnPopoverComponent,
BrnPopoverContentDirective,
BrnPopoverTriggerDirective,
} from '@spartan-ng/ui-popover-brain';
} from '@spartan-ng/brain/popover';
import { HlmPopoverContentDirective } from '@spartan-ng/ui-popover-helm';
import { NgForOf } from '@angular/common';
import { provideIcons } from '@ng-icons/core';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ import {
lucideUser,
lucideX,
} from '@ng-icons/lucide';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import { BrnCommandImports } from '@spartan-ng/ui-command-brain';
import { HlmCommandImports } from '@spartan-ng/ui-command-helm';
import { BrnCommandImports } from '@spartan-ng/brain/command';
import {
BrnDialogCloseDirective,
BrnDialogComponent,
BrnDialogContentDirective,
BrnDialogOverlayComponent,
BrnDialogTriggerDirective,
} from '@spartan-ng/ui-dialog-brain';
} from '@spartan-ng/brain/dialog';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import { HlmCommandImports } from '@spartan-ng/ui-command-helm';
import { HlmDialogOverlayDirective } from '@spartan-ng/ui-dialog-helm';
import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
import { HlmCodeDirective } from '@spartan-ng/ui-typography-helm';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
lucideUser,
lucideWallet,
} from '@ng-icons/lucide';
import { BrnCommandImports } from '@spartan-ng/brain/command';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import { BrnCommandImports } from '@spartan-ng/ui-command-brain';
import { HlmCommandImports } from '@spartan-ng/ui-command-helm';
import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';

Expand Down Expand Up @@ -77,7 +77,7 @@ export class CommandPreviewComponent {}

export const defaultCode = `
import { Component } from '@angular/core';
import { BrnCommandImports } from '@spartan-ng/ui-command-brain';
import { BrnCommandImports } from '@spartan-ng/brain/command';
import { HlmCommandImports } from '@spartan-ng/ui-command-helm';
import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
Expand Down Expand Up @@ -147,7 +147,7 @@ export class CommandPreviewComponent {}
`;

export const defaultImports = `
import { BrnCommandImports } from '@spartan-ng/ui-command-brain';
import { BrnCommandImports } from '@spartan-ng/brain/command';
import { HlmCommandImports } from '@spartan-ng/ui-command-helm';
`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component } from '@angular/core';
import { BrnContextMenuTriggerDirective, BrnMenuTriggerDirective } from '@spartan-ng/brain/menu';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
import { BrnContextMenuTriggerDirective, BrnMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import {
HlmMenuComponent,
HlmMenuGroupComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component } from '@angular/core';
import { BrnContextMenuTriggerDirective, BrnMenuTriggerDirective } from '@spartan-ng/brain/menu';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
import { BrnContextMenuTriggerDirective, BrnMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import {
HlmMenuComponent,
HlmMenuGroupComponent,
Expand Down Expand Up @@ -124,7 +124,7 @@ export const defaultCode = `
import { Component } from '@angular/core';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import { HlmIconComponent } from '@spartan-ng/ui-icon-helm';
import { BrnContextMenuTriggerDirective, BrnMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import { BrnContextMenuTriggerDirective, BrnMenuTriggerDirective } from '@spartan-ng/brain/menu';
import {
HlmMenuComponent,
HlmMenuGroupComponent,
Expand Down Expand Up @@ -245,7 +245,7 @@ export class ContextMenuPreviewComponent {}
`;

export const defaultImports = `
import { BrnContextMenuTriggerDirective, BrnMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import { BrnContextMenuTriggerDirective, BrnMenuTriggerDirective } from '@spartan-ng/brain/menu';
import {
HlmMenuComponent,
HlmMenuGroupComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { Component, type TrackByFunction, computed, effect, signal } from '@angu
import { toObservable, toSignal } from '@angular/core/rxjs-interop';
import { FormsModule } from '@angular/forms';
import { lucideArrowUpDown, lucideChevronDown, lucideEllipsis } from '@ng-icons/lucide';
import { BrnMenuTriggerDirective } from '@spartan-ng/brain/menu';
import { BrnSelectModule } from '@spartan-ng/brain/select';
import { BrnTableModule, type PaginatorState, useBrnColumnManager } from '@spartan-ng/brain/table';
import { HlmButtonModule } from '@spartan-ng/ui-button-helm';
import { HlmCheckboxCheckIconComponent, HlmCheckboxComponent } from '@spartan-ng/ui-checkbox-helm';
import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
import { HlmInputDirective } from '@spartan-ng/ui-input-helm';
import { BrnMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import { HlmMenuModule } from '@spartan-ng/ui-menu-helm';
import { BrnSelectModule } from '@spartan-ng/ui-select-brain';
import { HlmSelectModule } from '@spartan-ng/ui-select-helm';
import { BrnTableModule, type PaginatorState, useBrnColumnManager } from '@spartan-ng/ui-table-brain';
import { HlmTableModule } from '@spartan-ng/ui-table-helm';
import { hlmMuted } from '@spartan-ng/ui-typography-helm';
import { debounceTime, map } from 'rxjs';
Expand Down Expand Up @@ -405,11 +405,11 @@ import { HlmButtonModule } from '@spartan-ng/ui-button-helm';
import { HlmCheckboxCheckIconComponent, HlmCheckboxComponent } from '@spartan-ng/ui-checkbox-helm';
import { HlmIconComponent, provideIcons } from '@spartan-ng/ui-icon-helm';
import { HlmInputDirective } from '@spartan-ng/ui-input-helm';
import { BrnMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import { BrnMenuTriggerDirective } from '@spartan-ng/brain/menu';
import { HlmMenuModule } from '@spartan-ng/ui-menu-helm';
import { BrnTableModule, PaginatorState, useBrnColumnManager } from '@spartan-ng/ui-table-brain';
import { BrnTableModule, PaginatorState, useBrnColumnManager } from '@spartan-ng/brain/table';
import { HlmTableModule } from '@spartan-ng/ui-table-helm';
import { BrnSelectModule } from '@spartan-ng/ui-select-brain';
import { BrnSelectModule } from '@spartan-ng/brain/select';
import { HlmSelectModule } from '@spartan-ng/ui-select-helm';
import { hlmMuted } from '@spartan-ng/ui-typography-helm';
import { debounceTime, map } from 'rxjs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component } from '@angular/core';
import { BrnDialogContentDirective, BrnDialogTriggerDirective } from '@spartan-ng/brain/dialog';
import { BrnContextMenuTriggerDirective } from '@spartan-ng/brain/menu';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import { BrnDialogContentDirective, BrnDialogTriggerDirective } from '@spartan-ng/ui-dialog-brain';
import {
HlmDialogComponent,
HlmDialogContentComponent,
Expand All @@ -11,7 +12,6 @@ import {
} from '@spartan-ng/ui-dialog-helm';
import { HlmInputDirective } from '@spartan-ng/ui-input-helm';
import { HlmLabelDirective } from '@spartan-ng/ui-label-helm';
import { BrnContextMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import {
HlmMenuComponent,
HlmMenuGroupComponent,
Expand Down Expand Up @@ -97,7 +97,7 @@ export class DialogContextMenuPreviewComponent {
export const contextMenuCode = `
import { Component } from '@angular/core';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import { BrnDialogContentDirective, BrnDialogTriggerDirective } from '@spartan-ng/ui-dialog-brain';
import { BrnDialogContentDirective, BrnDialogTriggerDirective } from '@spartan-ng/brain/dialog';
import {
HlmDialogComponent,
HlmDialogContentComponent,
Expand All @@ -108,7 +108,7 @@ import {
} from '@spartan-ng/ui-dialog-helm';
import { HlmInputDirective } from '@spartan-ng/ui-input-helm';
import { HlmLabelDirective } from '@spartan-ng/ui-label-helm';
import { BrnContextMenuTriggerDirective } from '@spartan-ng/ui-menu-brain';
import { BrnContextMenuTriggerDirective } from '@spartan-ng/brain/menu';
import {
HlmMenuComponent,
HlmMenuGroupComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component, signal } from '@angular/core';
import { toObservable, toSignal } from '@angular/core/rxjs-interop';
import { FormsModule } from '@angular/forms';
import { BrnDialogContentDirective } from '@spartan-ng/brain/dialog';
import { HlmBadgeDirective } from '@spartan-ng/ui-badge-helm';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import { BrnDialogContentDirective } from '@spartan-ng/ui-dialog-brain';
import {
HlmDialogComponent,
HlmDialogContentComponent,
Expand Down Expand Up @@ -78,7 +78,7 @@ import { toObservable, toSignal } from '@angular/core/rxjs-interop';
import { FormsModule } from '@angular/forms';
import { HlmBadgeDirective } from '@spartan-ng/ui-badge-helm';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import { BrnDialogContentDirective } from '@spartan-ng/ui-dialog-brain';
import { BrnDialogContentDirective } from '@spartan-ng/brain/dialog';
import {
HlmDialogComponent,
HlmDialogContentComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, HostBinding, inject } from '@angular/core';
import { lucideCheck } from '@ng-icons/lucide';
import { BrnDialogRef, injectBrnDialogContext } from '@spartan-ng/brain/dialog';
import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
import { BrnDialogRef, injectBrnDialogContext } from '@spartan-ng/ui-dialog-brain';
import {
HlmDialogDescriptionDirective,
HlmDialogHeaderComponent,
Expand Down
Loading

0 comments on commit be4a87d

Please sign in to comment.