orbiq-neural-ui-kit 1.2.55 → 1.2.57

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.
@@ -8475,10 +8475,10 @@ class NeuralDialogComponent {
8475
8475
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralDialogComponent, isStandalone: true, selector: "neural-dialog", inputs: { openModel: { classPropertyName: "openModel", publicName: "openModel", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, paddingTop: { classPropertyName: "paddingTop", publicName: "paddingTop", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, bare: { classPropertyName: "bare", publicName: "bare", isSignal: true, isRequired: false, transformFunction: null }, hasTitleSlot: { classPropertyName: "hasTitleSlot", publicName: "hasTitleSlot", isSignal: true, isRequired: false, transformFunction: null }, hasActionsSlot: { classPropertyName: "hasActionsSlot", publicName: "hasActionsSlot", isSignal: true, isRequired: false, transformFunction: null }, hasDefaultSlot: { classPropertyName: "hasDefaultSlot", publicName: "hasDefaultSlot", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openModel: "openModelChange" }, ngImport: i0, template: `
8476
8476
  @if (openModel()) {
8477
8477
  <div class="fixed inset-0 z-[1000] overflow-y-auto dialog-scroll-container" (click)="onContainerClick($event)" (keydown.escape)="closeBare()" tabindex="-1">
8478
- <div class="fixed inset-0 bg-black-overlay-200 dialog-backdrop animate-in fade-in duration-200"></div>
8478
+ <div class="fixed inset-0 bg-black-overlay-200 dialog-backdrop animate-dialog-fade"></div>
8479
8479
 
8480
8480
  <div class="relative flex min-h-screen flex-col items-center px-4 py-4 text-center" [class]="dialogPositionClasses()" [style]="dialogPositionStyles()">
8481
- <div class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none animate-in fade-in zoom-in-95 duration-200 ease-out" [class]="sizeClass()">
8481
+ <div class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none animate-dialog-zoom" [class]="sizeClass()">
8482
8482
 
8483
8483
  <ng-template #defaultContent>
8484
8484
  <ng-content></ng-content>
@@ -8538,21 +8538,17 @@ class NeuralDialogComponent {
8538
8538
  </div>
8539
8539
  </div>
8540
8540
  }
8541
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "icon", "iconLeft", "iconRight", "iconOnly", "shape"], outputs: ["clicked"] }] });
8541
+ `, isInline: true, styles: ["@keyframes dialogFadeIn{0%{opacity:0}to{opacity:1}}@keyframes dialogZoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.animate-dialog-fade{animation:dialogFadeIn .2s ease-out forwards}.animate-dialog-zoom{animation:dialogZoomIn .2s ease-out forwards}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "icon", "iconLeft", "iconRight", "iconOnly", "shape"], outputs: ["clicked"] }] });
8542
8542
  }
8543
8543
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralDialogComponent, decorators: [{
8544
8544
  type: Component,
8545
- args: [{
8546
- selector: 'neural-dialog',
8547
- standalone: true,
8548
- imports: [CommonModule, NeuralButtonComponent],
8549
- template: `
8545
+ args: [{ selector: 'neural-dialog', standalone: true, imports: [CommonModule, NeuralButtonComponent], template: `
8550
8546
  @if (openModel()) {
8551
8547
  <div class="fixed inset-0 z-[1000] overflow-y-auto dialog-scroll-container" (click)="onContainerClick($event)" (keydown.escape)="closeBare()" tabindex="-1">
8552
- <div class="fixed inset-0 bg-black-overlay-200 dialog-backdrop animate-in fade-in duration-200"></div>
8548
+ <div class="fixed inset-0 bg-black-overlay-200 dialog-backdrop animate-dialog-fade"></div>
8553
8549
 
8554
8550
  <div class="relative flex min-h-screen flex-col items-center px-4 py-4 text-center" [class]="dialogPositionClasses()" [style]="dialogPositionStyles()">
8555
- <div class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none animate-in fade-in zoom-in-95 duration-200 ease-out" [class]="sizeClass()">
8551
+ <div class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none animate-dialog-zoom" [class]="sizeClass()">
8556
8552
 
8557
8553
  <ng-template #defaultContent>
8558
8554
  <ng-content></ng-content>
@@ -8612,8 +8608,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
8612
8608
  </div>
8613
8609
  </div>
8614
8610
  }
8615
- `
8616
- }]
8611
+ `, styles: ["@keyframes dialogFadeIn{0%{opacity:0}to{opacity:1}}@keyframes dialogZoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.animate-dialog-fade{animation:dialogFadeIn .2s ease-out forwards}.animate-dialog-zoom{animation:dialogZoomIn .2s ease-out forwards}\n"] }]
8617
8612
  }], ctorParameters: () => [], propDecorators: { openModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "openModel", required: false }] }, { type: i0.Output, args: ["openModelChange"] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], paddingTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingTop", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], bare: [{ type: i0.Input, args: [{ isSignal: true, alias: "bare", required: false }] }], hasTitleSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasTitleSlot", required: false }] }], hasActionsSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasActionsSlot", required: false }] }], hasDefaultSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasDefaultSlot", required: false }] }] } });
8618
8613
 
8619
8614
  class NeuralAwesomeBarComponent {
@@ -14779,25 +14774,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
14779
14774
  }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], appIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "appIcon", required: true }] }], iconClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconClass", required: false }] }], menuOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuOptions", required: false }] }] } });
14780
14775
 
14781
14776
  class NeuralAppLauncherComponent {
14777
+ router;
14782
14778
  openModel = model(false, /* @ts-ignore */
14783
14779
  ...(ngDevMode ? [{ debugName: "openModel" }] : /* istanbul ignore next */ []));
14784
14780
  modules = input([], /* @ts-ignore */
14785
14781
  ...(ngDevMode ? [{ debugName: "modules" }] : /* istanbul ignore next */ []));
14786
- handleModuleClick() {
14787
- this.openModel.set(false);
14782
+ path = signal([], /* @ts-ignore */
14783
+ ...(ngDevMode ? [{ debugName: "path" }] : /* istanbul ignore next */ []));
14784
+ constructor(router) {
14785
+ this.router = router;
14786
+ // Reset path when modal closes
14787
+ effect(() => {
14788
+ if (!this.openModel()) {
14789
+ setTimeout(() => this.path.set([]), 200); // delay reset to allow close animation
14790
+ }
14791
+ });
14788
14792
  }
14789
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralAppLauncherComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14793
+ currentParent = computed(() => {
14794
+ const p = this.path();
14795
+ return p.length > 0 ? p[p.length - 1] : null;
14796
+ }, /* @ts-ignore */
14797
+ ...(ngDevMode ? [{ debugName: "currentParent" }] : /* istanbul ignore next */ []));
14798
+ currentModules = computed(() => {
14799
+ const parent = this.currentParent();
14800
+ return parent ? (parent.children || []) : this.modules();
14801
+ }, /* @ts-ignore */
14802
+ ...(ngDevMode ? [{ debugName: "currentModules" }] : /* istanbul ignore next */ []));
14803
+ handleModuleClick(module) {
14804
+ if (module.children && module.children.length > 0) {
14805
+ // Drill down
14806
+ this.path.update(p => [...p, module]);
14807
+ }
14808
+ else if (module.route) {
14809
+ // Navigate and close
14810
+ this.openModel.set(false);
14811
+ this.router.navigate([module.route]);
14812
+ }
14813
+ }
14814
+ goBack() {
14815
+ this.path.update(p => p.slice(0, -1));
14816
+ }
14817
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralAppLauncherComponent, deps: [{ token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
14790
14818
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralAppLauncherComponent, isStandalone: true, selector: "neural-app-launcher", inputs: { openModel: { classPropertyName: "openModel", publicName: "openModel", isSignal: true, isRequired: false, transformFunction: null }, modules: { classPropertyName: "modules", publicName: "modules", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openModel: "openModelChange" }, ngImport: i0, template: `
14791
14819
  <neural-dialog [(openModel)]="openModel" size="4xl" [hasTitleSlot]="true" [hasDefaultSlot]="true">
14792
- <span title>Módulos de la Plataforma</span>
14820
+ <span title class="flex items-center gap-2">
14821
+ @if (path().length > 0) {
14822
+ <neural-button variant="ghost" [iconOnly]="true" icon="lucide-arrow-left" (clicked)="goBack()" class="-ml-2"></neural-button>
14823
+ <span>{{ currentParent()?.label }}</span>
14824
+ } @else {
14825
+ <span>Módulos de la Plataforma</span>
14826
+ }
14827
+ </span>
14793
14828
 
14794
- <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 p-4">
14795
- @for (module of modules(); track module.id) {
14829
+ <!-- We add a simple animation key to force re-render/animation on the grid when path changes -->
14830
+ <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 p-4 animate-in fade-in slide-in-from-bottom-2 duration-200" [attr.data-level]="path().length">
14831
+ @for (module of currentModules(); track module.id) {
14796
14832
  <div
14797
14833
  class="flex flex-col items-center justify-center p-4 rounded-xl border border-outline-gray-2 hover:shadow-md transition-all cursor-pointer bg-surface-base group"
14798
14834
  [ngClass]="module.colorClass"
14799
- [routerLink]="module.route"
14800
- (click)="handleModuleClick()"
14835
+ (click)="handleModuleClick(module)"
14801
14836
  >
14802
14837
  <div class="group-hover:scale-110 transition-transform flex items-center justify-center">
14803
14838
  <i [class]="module.icon" class="size-8 text-ink-gray-7 group-hover:text-ink-gray-9 transition-colors"></i>
@@ -14810,25 +14845,32 @@ class NeuralAppLauncherComponent {
14810
14845
  }
14811
14846
  </div>
14812
14847
  </neural-dialog>
14813
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: NeuralDialogComponent, selector: "neural-dialog", inputs: ["openModel", "title", "message", "icon", "size", "position", "paddingTop", "actions", "dismissible", "showCloseButton", "bare", "hasTitleSlot", "hasActionsSlot", "hasDefaultSlot"], outputs: ["openModelChange"] }] });
14848
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type: NeuralDialogComponent, selector: "neural-dialog", inputs: ["openModel", "title", "message", "icon", "size", "position", "paddingTop", "actions", "dismissible", "showCloseButton", "bare", "hasTitleSlot", "hasActionsSlot", "hasDefaultSlot"], outputs: ["openModelChange"] }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "icon", "iconLeft", "iconRight", "iconOnly", "shape"], outputs: ["clicked"] }] });
14814
14849
  }
14815
14850
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralAppLauncherComponent, decorators: [{
14816
14851
  type: Component,
14817
14852
  args: [{
14818
14853
  selector: 'neural-app-launcher',
14819
14854
  standalone: true,
14820
- imports: [CommonModule, RouterModule, NeuralDialogComponent],
14855
+ imports: [CommonModule, RouterModule, NeuralDialogComponent, NeuralButtonComponent],
14821
14856
  template: `
14822
14857
  <neural-dialog [(openModel)]="openModel" size="4xl" [hasTitleSlot]="true" [hasDefaultSlot]="true">
14823
- <span title>Módulos de la Plataforma</span>
14858
+ <span title class="flex items-center gap-2">
14859
+ @if (path().length > 0) {
14860
+ <neural-button variant="ghost" [iconOnly]="true" icon="lucide-arrow-left" (clicked)="goBack()" class="-ml-2"></neural-button>
14861
+ <span>{{ currentParent()?.label }}</span>
14862
+ } @else {
14863
+ <span>Módulos de la Plataforma</span>
14864
+ }
14865
+ </span>
14824
14866
 
14825
- <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 p-4">
14826
- @for (module of modules(); track module.id) {
14867
+ <!-- We add a simple animation key to force re-render/animation on the grid when path changes -->
14868
+ <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 p-4 animate-in fade-in slide-in-from-bottom-2 duration-200" [attr.data-level]="path().length">
14869
+ @for (module of currentModules(); track module.id) {
14827
14870
  <div
14828
14871
  class="flex flex-col items-center justify-center p-4 rounded-xl border border-outline-gray-2 hover:shadow-md transition-all cursor-pointer bg-surface-base group"
14829
14872
  [ngClass]="module.colorClass"
14830
- [routerLink]="module.route"
14831
- (click)="handleModuleClick()"
14873
+ (click)="handleModuleClick(module)"
14832
14874
  >
14833
14875
  <div class="group-hover:scale-110 transition-transform flex items-center justify-center">
14834
14876
  <i [class]="module.icon" class="size-8 text-ink-gray-7 group-hover:text-ink-gray-9 transition-colors"></i>
@@ -14843,7 +14885,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
14843
14885
  </neural-dialog>
14844
14886
  `
14845
14887
  }]
14846
- }], propDecorators: { openModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "openModel", required: false }] }, { type: i0.Output, args: ["openModelChange"] }], modules: [{ type: i0.Input, args: [{ isSignal: true, alias: "modules", required: false }] }] } });
14888
+ }], ctorParameters: () => [{ type: i2.Router }], propDecorators: { openModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "openModel", required: false }] }, { type: i0.Output, args: ["openModelChange"] }], modules: [{ type: i0.Input, args: [{ isSignal: true, alias: "modules", required: false }] }] } });
14847
14889
 
14848
14890
  // Note: TextEditor is deprecated in Frappe UI, but migrated for faithful parity.
14849
14891
  // For new projects, consider using the /editor module with RichTextKit.