@nettyapps/ntybase 21.0.26 → 21.0.28
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Injectable, inject, NgModule, Inject, signal, input, output, computed, effect, model, ViewChild, InjectionToken, Optional, Input } from '@angular/core';
|
|
2
|
+
import { Component, Injectable, inject, NgModule, Inject, signal, input, output, computed, effect, model, ViewChild, InjectionToken, Optional, Input, makeEnvironmentProviders, provideAppInitializer } from '@angular/core';
|
|
3
3
|
import * as i1$3 from '@angular/common/http';
|
|
4
4
|
import { HttpErrorResponse, HttpResponse, HTTP_INTERCEPTORS, HttpClient, HttpHeaders } from '@angular/common/http';
|
|
5
5
|
import { of, throwError, lastValueFrom, map, catchError as catchError$1, Subject, finalize, take as take$1, takeUntil } from 'rxjs';
|
|
6
|
-
import { catchError, map as map$1, take,
|
|
6
|
+
import { catchError, map as map$1, take, finalize as finalize$1 } from 'rxjs/operators';
|
|
7
7
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
8
8
|
import * as i2$1 from '@nettyapps/ntycontract';
|
|
9
9
|
import { EnvironmentProxy } from '@nettyapps/ntycontract';
|
|
@@ -2001,19 +2001,19 @@ class NettyAgGridBase extends NettyAppsBase {
|
|
|
2001
2001
|
var fields = this.columnDefs()
|
|
2002
2002
|
.filter((columnDef) => columnDef.ntyHide === 'x')
|
|
2003
2003
|
.map((columnDef) => columnDef.field);
|
|
2004
|
-
this.gridApi
|
|
2004
|
+
this.gridApi?.setColumnsVisible(fields, this.gridColumnsVisible());
|
|
2005
2005
|
}
|
|
2006
2006
|
showHideEmbeddedColumnsAsync() {
|
|
2007
2007
|
setTimeout(() => this.showHideEmbeddedColumns(), 100);
|
|
2008
2008
|
}
|
|
2009
2009
|
showHideEmbeddedColumns() {
|
|
2010
|
-
if (this.columnDefs == undefined || this.columnDefs == null) {
|
|
2010
|
+
if (this.columnDefs() == undefined || this.columnDefs() == null) {
|
|
2011
2011
|
return;
|
|
2012
2012
|
}
|
|
2013
2013
|
var fields = this.columnDefs()
|
|
2014
2014
|
.filter((columnDef) => columnDef.ntyEmbeddedHide == 'x')
|
|
2015
2015
|
.map((columnDef) => columnDef.field);
|
|
2016
|
-
this.gridApi
|
|
2016
|
+
this.gridApi?.setColumnsVisible(fields, !this.isEmbedded);
|
|
2017
2017
|
}
|
|
2018
2018
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NettyAgGridBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2019
2019
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: NettyAgGridBase, isStandalone: true, selector: "ntybase-ag-grid-base", inputs: { readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, popupFilterValid: { classPropertyName: "popupFilterValid", publicName: "popupFilterValid", isSignal: true, isRequired: false, transformFunction: null }, popupValid: { classPropertyName: "popupValid", publicName: "popupValid", isSignal: true, isRequired: false, transformFunction: null }, isEmbedded: { classPropertyName: "isEmbedded", publicName: "isEmbedded", isSignal: true, isRequired: false, transformFunction: null }, componantParameterGUID: { classPropertyName: "componantParameterGUID", publicName: "componantParameterGUID", isSignal: true, isRequired: false, transformFunction: null }, componantParameterType: { classPropertyName: "componantParameterType", publicName: "componantParameterType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onElementSelect: "onElementSelect", selectedElement: "selectedElement" }, usesInheritance: true, ngImport: i0, template: "<p>ag-grid-base works!</p>\n", styles: [""] });
|
|
@@ -4104,6 +4104,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
4104
4104
|
args: [NETTY_APP_ENVIRONMENT]
|
|
4105
4105
|
}] }] });
|
|
4106
4106
|
|
|
4107
|
+
/**
|
|
4108
|
+
* Uygulamanın environment altyapısını kurar.
|
|
4109
|
+
*
|
|
4110
|
+
* @usage
|
|
4111
|
+
* providers: [
|
|
4112
|
+
* provideNettyEnvironment()
|
|
4113
|
+
* // Not: { provide: NETTY_APP_ENVIRONMENT, useValue: environment } dışarıdan verilmelidir.
|
|
4114
|
+
* ]
|
|
4115
|
+
*/
|
|
4116
|
+
function provideNtyEnvironment() {
|
|
4117
|
+
return makeEnvironmentProviders([
|
|
4118
|
+
// 1. EnvironmentService'in kendisi (providedIn: 'root' varsa buraya gerek yok ama zararı da yok)
|
|
4119
|
+
NtyEnvironmentService,
|
|
4120
|
+
// 2. ENVIRONMENT_CONFIG provider'ı
|
|
4121
|
+
{
|
|
4122
|
+
provide: ENVIRONMENT_CONFIG,
|
|
4123
|
+
useFactory: ntyEnvironmentConfigFactory,
|
|
4124
|
+
deps: [NtyEnvironmentService],
|
|
4125
|
+
},
|
|
4126
|
+
// 3. APP_INITIALIZER (Uygulama başlamadan önce env yüklemesi)
|
|
4127
|
+
provideAppInitializer(() => {
|
|
4128
|
+
const initializerFn = ntyInitializeEnvironment(inject(NtyEnvironmentService));
|
|
4129
|
+
return initializerFn();
|
|
4130
|
+
}),
|
|
4131
|
+
]);
|
|
4132
|
+
}
|
|
4133
|
+
|
|
4107
4134
|
class NtyLoadingService {
|
|
4108
4135
|
requestCount = 0;
|
|
4109
4136
|
isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
@@ -4132,16 +4159,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
4132
4159
|
|
|
4133
4160
|
const NtyLoadingInterceptor = (req, next) => {
|
|
4134
4161
|
const loadingService = inject(NtyLoadingService);
|
|
4135
|
-
// Optional: Skip specific URLs if needed (e.g. background polling)
|
|
4136
|
-
// if (req.url.includes('/silent-api')) return next(req);
|
|
4137
4162
|
loadingService.show();
|
|
4138
|
-
return next(req).pipe(
|
|
4139
|
-
catchError((error) => {
|
|
4140
|
-
loadingService.hide(); // Handle error
|
|
4141
|
-
return throwError(() => error);
|
|
4142
|
-
}));
|
|
4163
|
+
return next(req).pipe(finalize$1(() => loadingService.hide()));
|
|
4143
4164
|
};
|
|
4144
4165
|
|
|
4166
|
+
class NtyLoadingComponent {
|
|
4167
|
+
loadingService = inject(NtyLoadingService);
|
|
4168
|
+
isLoading = this.loadingService.isLoading;
|
|
4169
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NtyLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4170
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: NtyLoadingComponent, isStandalone: true, selector: "app-nty-loading", ngImport: i0, template: "@if (isLoading()) {\n<div class=\"loading-overlay\" (click)=\"$event.stopPropagation(); $event.preventDefault()\">\n <div class=\"spinner\">\n <i class=\"fas fa-spinner\"></i>\n </div>\n <div style=\"margin-top: 10px;\">{{'@loading' | translate}}</div>\n</div>\n}", styles: [".loading-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:2147483647;display:flex;justify-content:center;align-items:center;color:#fff;flex-direction:column;pointer-events:all;cursor:wait;-webkit-user-select:none;user-select:none}.spinner{font-size:3rem}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fa-spinner{animation:spin 1s linear infinite}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
4171
|
+
}
|
|
4172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NtyLoadingComponent, decorators: [{
|
|
4173
|
+
type: Component,
|
|
4174
|
+
args: [{ selector: 'app-nty-loading', imports: [TranslateModule], template: "@if (isLoading()) {\n<div class=\"loading-overlay\" (click)=\"$event.stopPropagation(); $event.preventDefault()\">\n <div class=\"spinner\">\n <i class=\"fas fa-spinner\"></i>\n </div>\n <div style=\"margin-top: 10px;\">{{'@loading' | translate}}</div>\n</div>\n}", styles: [".loading-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:2147483647;display:flex;justify-content:center;align-items:center;color:#fff;flex-direction:column;pointer-events:all;cursor:wait;-webkit-user-select:none;user-select:none}.spinner{font-size:3rem}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fa-spinner{animation:spin 1s linear infinite}\n"] }]
|
|
4175
|
+
}] });
|
|
4176
|
+
|
|
4145
4177
|
class NettyMenuService {
|
|
4146
4178
|
http = inject(HttpClient);
|
|
4147
4179
|
environmentProxy = inject(EnvironmentProxy);
|
|
@@ -4191,5 +4223,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
4191
4223
|
* Generated bundle index. Do not edit.
|
|
4192
4224
|
*/
|
|
4193
4225
|
|
|
4194
|
-
export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ExcelImportBase, ForgotPassword, Login, LoginDto, MFACodeDto, MfaLogin, NETTY_APP_ENVIRONMENT, NettyAgGridBase, NettyAgGridSaveBase, NettyAgGridService, NettyAppsBase, NettyBaseApp, NettyHelper, NettyImageService, NettyMenuService, NtyEnvironmentService, NtyLoadingInterceptor, Ntybase, NtybaseModule, RangeDateTimeFilter, RangeNumberFilter, RangeStringFilter, UrlHelperService, ntyAuthenticationInterceptor, ntyEnvironmentConfigFactory, ntyInitializeEnvironment };
|
|
4226
|
+
export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ExcelImportBase, ForgotPassword, Login, LoginDto, MFACodeDto, MfaLogin, NETTY_APP_ENVIRONMENT, NettyAgGridBase, NettyAgGridSaveBase, NettyAgGridService, NettyAppsBase, NettyBaseApp, NettyHelper, NettyImageService, NettyMenuService, NtyEnvironmentService, NtyLoadingComponent, NtyLoadingInterceptor, Ntybase, NtybaseModule, RangeDateTimeFilter, RangeNumberFilter, RangeStringFilter, UrlHelperService, ntyAuthenticationInterceptor, ntyEnvironmentConfigFactory, ntyInitializeEnvironment, provideNtyEnvironment };
|
|
4195
4227
|
//# sourceMappingURL=nettyapps-ntybase.mjs.map
|