@smartsoft001/angular 2.80.0 → 2.82.0
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.
|
@@ -9,7 +9,7 @@ import { ArrayService, SPECIFICATION_ROOT_KEY, SpecificationService, PeselServic
|
|
|
9
9
|
import * as moment from 'moment';
|
|
10
10
|
import moment__default from 'moment';
|
|
11
11
|
import { jwtDecode } from 'jwt-decode';
|
|
12
|
-
import { HttpClient, HttpEventType, HttpClientModule } from '@angular/common/http';
|
|
12
|
+
import { HttpClient, HttpEventType, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
|
|
13
13
|
import { map, filter, takeUntil, tap, delay, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
14
14
|
import * as i1$1 from '@angular/forms';
|
|
15
15
|
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule, FormsModule, NG_VALUE_ACCESSOR, UntypedFormControl } from '@angular/forms';
|
|
@@ -29,6 +29,9 @@ import { CdkTableModule, CdkTable, CdkHeaderCell, CdkCell, CdkHeaderRow, CdkRow
|
|
|
29
29
|
import * as i1$2 from 'ng-lazyload-image';
|
|
30
30
|
import { LazyLoadImageModule } from 'ng-lazyload-image';
|
|
31
31
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
32
|
+
import * as i1$3 from '@ngrx/effects';
|
|
33
|
+
import { createEffect, EffectsModule } from '@ngrx/effects';
|
|
34
|
+
import * as i1$4 from '@ngrx/store';
|
|
32
35
|
|
|
33
36
|
class AppService {
|
|
34
37
|
titleService = inject(Title);
|
|
@@ -959,6 +962,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImpor
|
|
|
959
962
|
}]
|
|
960
963
|
}] });
|
|
961
964
|
|
|
965
|
+
class NgrxStoreService {
|
|
966
|
+
static _reducers = {};
|
|
967
|
+
static store = undefined;
|
|
968
|
+
static addReducer(key, reducer) {
|
|
969
|
+
if (!NgrxStoreService._reducers[key]) {
|
|
970
|
+
NgrxStoreService._reducers[key] = reducer;
|
|
971
|
+
NgrxStoreService.store.addReducer(key, reducer);
|
|
972
|
+
console.log(`${NgrxStoreService.name} register reducer ${key}`);
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
connect(store) {
|
|
976
|
+
NgrxStoreService.store = store;
|
|
977
|
+
}
|
|
978
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: NgrxStoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
979
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: NgrxStoreService });
|
|
980
|
+
}
|
|
981
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: NgrxStoreService, decorators: [{
|
|
982
|
+
type: Injectable
|
|
983
|
+
}] });
|
|
984
|
+
|
|
985
|
+
class ErrorService {
|
|
986
|
+
toastService;
|
|
987
|
+
translateService;
|
|
988
|
+
constructor(toastService, translateService) {
|
|
989
|
+
this.toastService = toastService;
|
|
990
|
+
this.translateService = translateService;
|
|
991
|
+
}
|
|
992
|
+
async log(obj) {
|
|
993
|
+
let message = '';
|
|
994
|
+
if (obj instanceof HttpErrorResponse) {
|
|
995
|
+
if (obj.error && obj.error.details === 'Invalid username or password') {
|
|
996
|
+
message = await this.translateService
|
|
997
|
+
.get('ERRORS.invalidUsernameOrPassword')
|
|
998
|
+
.toPromise();
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
if (!message)
|
|
1002
|
+
message = await this.translateService.get('ERRORS.other').toPromise();
|
|
1003
|
+
console.error(obj);
|
|
1004
|
+
await this.toastService.error({ message });
|
|
1005
|
+
}
|
|
1006
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ErrorService, deps: [{ token: ToastService }, { token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1007
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ErrorService });
|
|
1008
|
+
}
|
|
1009
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ErrorService, decorators: [{
|
|
1010
|
+
type: Injectable
|
|
1011
|
+
}], ctorParameters: () => [{ type: ToastService }, { type: i1.TranslateService }] });
|
|
1012
|
+
|
|
962
1013
|
class AccordionComponent {
|
|
963
1014
|
show = model(false, ...(ngDevMode ? [{ debugName: "show" }] : []));
|
|
964
1015
|
update() {
|
|
@@ -7146,9 +7197,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImpor
|
|
|
7146
7197
|
}]
|
|
7147
7198
|
}], ctorParameters: () => [{ type: i1.TranslateService }] });
|
|
7148
7199
|
|
|
7200
|
+
class ErrorEffects {
|
|
7201
|
+
actions$;
|
|
7202
|
+
service;
|
|
7203
|
+
error$ = createEffect(() => this.actions$.pipe(filter((action) => {
|
|
7204
|
+
return action.type.indexOf(' Failure') > -1;
|
|
7205
|
+
}), tap((action) => {
|
|
7206
|
+
this.service.log(action.error).then();
|
|
7207
|
+
})), { dispatch: false });
|
|
7208
|
+
constructor(actions$, service) {
|
|
7209
|
+
this.actions$ = actions$;
|
|
7210
|
+
this.service = service;
|
|
7211
|
+
}
|
|
7212
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ErrorEffects, deps: [{ token: i1$3.Actions }, { token: ErrorService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7213
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ErrorEffects });
|
|
7214
|
+
}
|
|
7215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ErrorEffects, decorators: [{
|
|
7216
|
+
type: Injectable
|
|
7217
|
+
}], ctorParameters: () => [{ type: i1$3.Actions }, { type: ErrorService }] });
|
|
7218
|
+
|
|
7219
|
+
class NgrxSharedModule {
|
|
7220
|
+
constructor(store, storeService) {
|
|
7221
|
+
storeService.connect(store);
|
|
7222
|
+
}
|
|
7223
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: NgrxSharedModule, deps: [{ token: i1$4.Store }, { token: NgrxStoreService }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
7224
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.0", ngImport: i0, type: NgrxSharedModule, imports: [SharedModule, i1$3.EffectsFeatureModule] });
|
|
7225
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: NgrxSharedModule, providers: [NgrxStoreService], imports: [SharedModule, EffectsModule.forFeature([ErrorEffects])] });
|
|
7226
|
+
}
|
|
7227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: NgrxSharedModule, decorators: [{
|
|
7228
|
+
type: NgModule,
|
|
7229
|
+
args: [{
|
|
7230
|
+
providers: [NgrxStoreService],
|
|
7231
|
+
imports: [SharedModule, EffectsModule.forFeature([ErrorEffects])],
|
|
7232
|
+
}]
|
|
7233
|
+
}], ctorParameters: () => [{ type: i1$4.Store }, { type: NgrxStoreService }] });
|
|
7234
|
+
|
|
7149
7235
|
/**
|
|
7150
7236
|
* Generated bundle index. Do not edit.
|
|
7151
7237
|
*/
|
|
7152
7238
|
|
|
7153
|
-
export { AUTH_TOKEN, AccordionBodyComponent, AccordionComponent, AccordionHeaderComponent, AlertService, AppBaseComponent, AppService, AuthService, BaseComponent, ButtonBaseComponent, ButtonComponent, ButtonStandardComponent, CalendarService, CardComponent, CreateDynamicComponent, DYNAMIC_COMPONENTS_STORE, DateEditComponent, DateRangeComponent, DateRangeModalComponent, DetailAddressComponent, DetailArrayComponent, DetailAttachmentComponent, DetailBaseComponent, DetailColorComponent, DetailComponent, DetailDateRangeComponent, DetailEmailComponent, DetailEnumComponent, DetailFlagComponent, DetailImageComponent, DetailLogoComponent, DetailObjectComponent, DetailPdfComponent, DetailPhoneNumberPlComponent, DetailTextComponent, DetailVideoComponent, DetailsBaseComponent, DetailsComponent, DetailsDirective, DetailsPage, DetailsService, DetailsStandardComponent, DynamicComponentLoader, DynamicComponentStorageService, DynamicContentDirective, EnumToListPipe, ExportComponent, FILE_SERVICE_CONFIG, FileService, FileUrlPipe, FormBaseComponent, FormComponent, FormFactory, FormStandardComponent, HardwareService, IModelExportProvider, IModelImportProvider, IModelLabelProvider, IModelPossibilitiesProvider, IModelValidatorsProvider, ImportComponent, InfoComponent, InfoModalComponent, InputAddressComponent, InputArrayComponent, InputAttachmentComponent, InputBaseComponent, InputCheckComponent, InputColorComponent, InputComponent, InputCurrencyComponent, InputDateComponent, InputDateRangeComponent, InputDateWithEditComponent, InputEmailComponent, InputEnumComponent, InputErrorComponent, InputFileComponent, InputFlagComponent, InputFloatComponent, InputImageComponent, InputIntComponent, InputIntsComponent, InputLogoComponent, InputLongTextComponent, InputNipComponent, InputObjectComponent, InputPasswordComponent, InputPdfComponent, InputPeselComponent, InputPhoneNumberComponent, InputPhoneNumberPlComponent, InputRadioComponent, InputStringsComponent, InputTextComponent, InputVideoComponent, ListBaseComponent, ListCellPipe, ListComponent, ListDesktopComponent, ListHeaderPipe, ListMasonryGridComponent, ListMobileComponent, ListMode, LoaderComponent, MODEL_EXPORT_PROVIDER, MODEL_IMPORT_PROVIDER, MODEL_LABEL_PROVIDER, MODEL_POSSIBILITIES_PROVIDER, MODEL_VALIDATORS_PROVIDER, MenuService, ModalService, ModelLabelPipe, PIPES, PageBaseComponent, PageComponent, PageStandardComponent, PaginationMode, PagingComponent, PasswordStrengthComponent, PopoverService, SearchbarComponent, SharedDirectivesModule, SharedFactoriesModule, SharedModule, SharedPagesModule, SharedPipesModule, SharedServicesModule, SmartFormGroup, StorageService, StyleService, ToastService, TrustHtmlPipe, UIService };
|
|
7239
|
+
export { AUTH_TOKEN, AccordionBodyComponent, AccordionComponent, AccordionHeaderComponent, AlertService, AppBaseComponent, AppService, AuthService, BaseComponent, ButtonBaseComponent, ButtonComponent, ButtonStandardComponent, CalendarService, CardComponent, CreateDynamicComponent, DYNAMIC_COMPONENTS_STORE, DateEditComponent, DateRangeComponent, DateRangeModalComponent, DetailAddressComponent, DetailArrayComponent, DetailAttachmentComponent, DetailBaseComponent, DetailColorComponent, DetailComponent, DetailDateRangeComponent, DetailEmailComponent, DetailEnumComponent, DetailFlagComponent, DetailImageComponent, DetailLogoComponent, DetailObjectComponent, DetailPdfComponent, DetailPhoneNumberPlComponent, DetailTextComponent, DetailVideoComponent, DetailsBaseComponent, DetailsComponent, DetailsDirective, DetailsPage, DetailsService, DetailsStandardComponent, DynamicComponentLoader, DynamicComponentStorageService, DynamicContentDirective, EnumToListPipe, ErrorService, ExportComponent, FILE_SERVICE_CONFIG, FileService, FileUrlPipe, FormBaseComponent, FormComponent, FormFactory, FormStandardComponent, HardwareService, IModelExportProvider, IModelImportProvider, IModelLabelProvider, IModelPossibilitiesProvider, IModelValidatorsProvider, ImportComponent, InfoComponent, InfoModalComponent, InputAddressComponent, InputArrayComponent, InputAttachmentComponent, InputBaseComponent, InputCheckComponent, InputColorComponent, InputComponent, InputCurrencyComponent, InputDateComponent, InputDateRangeComponent, InputDateWithEditComponent, InputEmailComponent, InputEnumComponent, InputErrorComponent, InputFileComponent, InputFlagComponent, InputFloatComponent, InputImageComponent, InputIntComponent, InputIntsComponent, InputLogoComponent, InputLongTextComponent, InputNipComponent, InputObjectComponent, InputPasswordComponent, InputPdfComponent, InputPeselComponent, InputPhoneNumberComponent, InputPhoneNumberPlComponent, InputRadioComponent, InputStringsComponent, InputTextComponent, InputVideoComponent, ListBaseComponent, ListCellPipe, ListComponent, ListDesktopComponent, ListHeaderPipe, ListMasonryGridComponent, ListMobileComponent, ListMode, LoaderComponent, MODEL_EXPORT_PROVIDER, MODEL_IMPORT_PROVIDER, MODEL_LABEL_PROVIDER, MODEL_POSSIBILITIES_PROVIDER, MODEL_VALIDATORS_PROVIDER, MenuService, ModalService, ModelLabelPipe, NgrxSharedModule, NgrxStoreService, PIPES, PageBaseComponent, PageComponent, PageStandardComponent, PaginationMode, PagingComponent, PasswordStrengthComponent, PopoverService, SearchbarComponent, SharedDirectivesModule, SharedFactoriesModule, SharedModule, SharedPagesModule, SharedPipesModule, SharedServicesModule, SmartFormGroup, StorageService, StyleService, ToastService, TrustHtmlPipe, UIService };
|
|
7154
7240
|
//# sourceMappingURL=smartsoft001-angular.mjs.map
|