orbiq-neural-ui-kit 1.1.25 → 1.1.26

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.
@@ -13831,6 +13831,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
13831
13831
  }] } });
13832
13832
 
13833
13833
  class NeuralSettingsDialogComponent {
13834
+ dialog;
13835
+ viewContainerRef;
13834
13836
  open = model(false, /* @ts-ignore */
13835
13837
  ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
13836
13838
  size = input('4xl', /* @ts-ignore */
@@ -13839,58 +13841,132 @@ class NeuralSettingsDialogComponent {
13839
13841
  ...(ngDevMode ? [{ debugName: "hasTitleSlot" }] : /* istanbul ignore next */ []));
13840
13842
  hasDescriptionSlot = input(false, /* @ts-ignore */
13841
13843
  ...(ngDevMode ? [{ debugName: "hasDescriptionSlot" }] : /* istanbul ignore next */ []));
13842
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralSettingsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13843
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralSettingsDialogComponent, isStandalone: true, selector: "neural-settings-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, hasTitleSlot: { classPropertyName: "hasTitleSlot", publicName: "hasTitleSlot", isSignal: true, isRequired: false, transformFunction: null }, hasDescriptionSlot: { classPropertyName: "hasDescriptionSlot", publicName: "hasDescriptionSlot", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, ngImport: i0, template: `
13844
- <neural-dialog [(openModel)]="open" [size]="size()" [bare]="true">
13845
- <div class="flex h-[100dvh] min-h-0 w-screen flex-col overflow-hidden sm:h-[min(860px,calc(100vh-8rem))] sm:min-h-[560px] sm:w-auto sm:flex-row">
13846
- <h1 class="sr-only">
13847
- @if (hasTitleSlot()) {
13848
- <ng-content select="[title]"></ng-content>
13849
- } @else {
13850
- Settings
13851
- }
13852
- </h1>
13853
- <p class="sr-only">
13854
- @if (hasDescriptionSlot()) {
13855
- <ng-content select="[description]"></ng-content>
13856
- } @else {
13857
- Manage your settings across the tabs in this dialog.
13858
- }
13859
- </p>
13860
- <ng-content></ng-content>
13844
+ dialogTemplate;
13845
+ dialogRef = null;
13846
+ constructor(dialog, viewContainerRef) {
13847
+ this.dialog = dialog;
13848
+ this.viewContainerRef = viewContainerRef;
13849
+ effect(() => {
13850
+ const isOpen = this.open();
13851
+ if (isOpen && !this.dialogRef && this.dialogTemplate) {
13852
+ this.openDialog();
13853
+ }
13854
+ else if (!isOpen && this.dialogRef) {
13855
+ this.dialogRef.close();
13856
+ this.dialogRef = null;
13857
+ }
13858
+ });
13859
+ }
13860
+ openDialog() {
13861
+ this.dialogRef = this.dialog.open(this.dialogTemplate, {
13862
+ disableClose: false,
13863
+ backdropClass: 'bg-black-overlay-200',
13864
+ panelClass: ['w-full', 'h-full', 'bg-transparent', 'shadow-none'],
13865
+ hasBackdrop: true,
13866
+ viewContainerRef: this.viewContainerRef,
13867
+ });
13868
+ this.dialogRef.closed.subscribe(() => {
13869
+ this.dialogRef = null;
13870
+ if (this.open()) {
13871
+ this.open.set(false);
13872
+ }
13873
+ });
13874
+ }
13875
+ ngOnDestroy() {
13876
+ if (this.dialogRef) {
13877
+ this.dialogRef.close();
13878
+ }
13879
+ }
13880
+ sizeClass = computed(() => {
13881
+ const map = {
13882
+ xs: 'max-w-xs',
13883
+ sm: 'max-w-sm',
13884
+ md: 'max-w-md',
13885
+ lg: 'max-w-lg',
13886
+ xl: 'max-w-xl',
13887
+ '2xl': 'max-w-2xl',
13888
+ '3xl': 'max-w-3xl',
13889
+ '4xl': 'max-w-4xl',
13890
+ '5xl': 'max-w-5xl',
13891
+ '6xl': 'max-w-6xl',
13892
+ '7xl': 'max-w-7xl',
13893
+ };
13894
+ return map[this.size()] || 'max-w-4xl';
13895
+ }, /* @ts-ignore */
13896
+ ...(ngDevMode ? [{ debugName: "sizeClass" }] : /* istanbul ignore next */ []));
13897
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralSettingsDialogComponent, deps: [{ token: i1$3.Dialog }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
13898
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralSettingsDialogComponent, isStandalone: true, selector: "neural-settings-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, hasTitleSlot: { classPropertyName: "hasTitleSlot", publicName: "hasTitleSlot", isSignal: true, isRequired: false, transformFunction: null }, hasDescriptionSlot: { classPropertyName: "hasDescriptionSlot", publicName: "hasDescriptionSlot", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, viewQueries: [{ propertyName: "dialogTemplate", first: true, predicate: ["dialogTemplate"], descendants: true }], ngImport: i0, template: `
13899
+ <ng-template #dialogTemplate>
13900
+ <div class="fixed inset-0 z-50 overflow-y-auto dialog-scroll-container">
13901
+ <div class="flex min-h-screen flex-col items-center justify-center px-4 py-4 text-center">
13902
+ <div
13903
+ 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"
13904
+ [class]="sizeClass()"
13905
+ >
13906
+ <div class="flex h-[100dvh] min-h-0 w-screen flex-col overflow-hidden sm:h-[min(860px,calc(100vh-8rem))] sm:min-h-[560px] sm:w-auto sm:flex-row">
13907
+ <h1 class="sr-only">
13908
+ @if (hasTitleSlot()) {
13909
+ <ng-content select="[title]"></ng-content>
13910
+ } @else {
13911
+ Settings
13912
+ }
13913
+ </h1>
13914
+ <p class="sr-only">
13915
+ @if (hasDescriptionSlot()) {
13916
+ <ng-content select="[description]"></ng-content>
13917
+ } @else {
13918
+ Manage your settings across the tabs in this dialog.
13919
+ }
13920
+ </p>
13921
+ <ng-content></ng-content>
13922
+ </div>
13923
+ </div>
13924
+ </div>
13861
13925
  </div>
13862
- </neural-dialog>
13863
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: NeuralDialogComponent, selector: "neural-dialog", inputs: ["openModel", "title", "message", "icon", "size", "position", "paddingTop", "actions", "dismissible", "showCloseButton", "bare", "hasTitleSlot", "hasActionsSlot", "hasDefaultSlot"], outputs: ["openModelChange"] }] });
13926
+ </ng-template>
13927
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DialogModule }] });
13864
13928
  }
13865
13929
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralSettingsDialogComponent, decorators: [{
13866
13930
  type: Component,
13867
13931
  args: [{
13868
13932
  selector: 'neural-settings-dialog',
13869
13933
  standalone: true,
13870
- imports: [CommonModule, NeuralDialogComponent],
13934
+ imports: [CommonModule, DialogModule],
13871
13935
  template: `
13872
- <neural-dialog [(openModel)]="open" [size]="size()" [bare]="true">
13873
- <div class="flex h-[100dvh] min-h-0 w-screen flex-col overflow-hidden sm:h-[min(860px,calc(100vh-8rem))] sm:min-h-[560px] sm:w-auto sm:flex-row">
13874
- <h1 class="sr-only">
13875
- @if (hasTitleSlot()) {
13876
- <ng-content select="[title]"></ng-content>
13877
- } @else {
13878
- Settings
13879
- }
13880
- </h1>
13881
- <p class="sr-only">
13882
- @if (hasDescriptionSlot()) {
13883
- <ng-content select="[description]"></ng-content>
13884
- } @else {
13885
- Manage your settings across the tabs in this dialog.
13886
- }
13887
- </p>
13888
- <ng-content></ng-content>
13936
+ <ng-template #dialogTemplate>
13937
+ <div class="fixed inset-0 z-50 overflow-y-auto dialog-scroll-container">
13938
+ <div class="flex min-h-screen flex-col items-center justify-center px-4 py-4 text-center">
13939
+ <div
13940
+ 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"
13941
+ [class]="sizeClass()"
13942
+ >
13943
+ <div class="flex h-[100dvh] min-h-0 w-screen flex-col overflow-hidden sm:h-[min(860px,calc(100vh-8rem))] sm:min-h-[560px] sm:w-auto sm:flex-row">
13944
+ <h1 class="sr-only">
13945
+ @if (hasTitleSlot()) {
13946
+ <ng-content select="[title]"></ng-content>
13947
+ } @else {
13948
+ Settings
13949
+ }
13950
+ </h1>
13951
+ <p class="sr-only">
13952
+ @if (hasDescriptionSlot()) {
13953
+ <ng-content select="[description]"></ng-content>
13954
+ } @else {
13955
+ Manage your settings across the tabs in this dialog.
13956
+ }
13957
+ </p>
13958
+ <ng-content></ng-content>
13959
+ </div>
13960
+ </div>
13961
+ </div>
13889
13962
  </div>
13890
- </neural-dialog>
13963
+ </ng-template>
13891
13964
  `
13892
13965
  }]
13893
- }], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hasTitleSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasTitleSlot", required: false }] }], hasDescriptionSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasDescriptionSlot", required: false }] }] } });
13966
+ }], ctorParameters: () => [{ type: i1$3.Dialog }, { type: i0.ViewContainerRef }], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hasTitleSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasTitleSlot", required: false }] }], hasDescriptionSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasDescriptionSlot", required: false }] }], dialogTemplate: [{
13967
+ type: ViewChild,
13968
+ args: ['dialogTemplate']
13969
+ }] } });
13894
13970
  class NeuralSettingsSidebarComponent {
13895
13971
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralSettingsSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13896
13972
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: NeuralSettingsSidebarComponent, isStandalone: true, selector: "neural-settings-sidebar", ngImport: i0, template: `