@smartsoft001/angular 2.82.0 → 2.83.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.
|
@@ -4,13 +4,13 @@ import { Title, DomSanitizer } from '@angular/platform-browser';
|
|
|
4
4
|
import { Router, NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
|
|
5
5
|
import * as i1 from '@ngx-translate/core';
|
|
6
6
|
import { TranslateService, TranslateModule, TranslatePipe } from '@ngx-translate/core';
|
|
7
|
-
import { BehaviorSubject, firstValueFrom, Subscription, Subject } from 'rxjs';
|
|
7
|
+
import { BehaviorSubject, firstValueFrom, Subscription, Subject, isObservable } from 'rxjs';
|
|
8
8
|
import { ArrayService, SPECIFICATION_ROOT_KEY, SpecificationService, PeselService, ZipCodeService, ObjectService, NipService } from '@smartsoft001/utils';
|
|
9
9
|
import * as moment from 'moment';
|
|
10
10
|
import moment__default from 'moment';
|
|
11
11
|
import { jwtDecode } from 'jwt-decode';
|
|
12
12
|
import { HttpClient, HttpEventType, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
|
|
13
|
-
import { map, filter, takeUntil, tap, delay, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
13
|
+
import { map, filter, takeUntil, tap, delay, debounceTime, distinctUntilChanged, first, catchError } 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';
|
|
16
16
|
import * as i2 from 'ngx-cookie';
|
|
@@ -32,6 +32,7 @@ import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
|
32
32
|
import * as i1$3 from '@ngrx/effects';
|
|
33
33
|
import { createEffect, EffectsModule } from '@ngrx/effects';
|
|
34
34
|
import * as i1$4 from '@ngrx/store';
|
|
35
|
+
import { Guid } from 'guid-typescript';
|
|
35
36
|
|
|
36
37
|
class AppService {
|
|
37
38
|
titleService = inject(Title);
|
|
@@ -7232,9 +7233,149 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImpor
|
|
|
7232
7233
|
}]
|
|
7233
7234
|
}], ctorParameters: () => [{ type: i1$4.Store }, { type: NgrxStoreService }] });
|
|
7234
7235
|
|
|
7236
|
+
const ReduxAction = ReduxActionDecorator;
|
|
7237
|
+
function ReduxActionDecorator(options = {}) {
|
|
7238
|
+
function getActionsNames(target, key) {
|
|
7239
|
+
const base = `${target.constructor.name} ${key}`;
|
|
7240
|
+
return {
|
|
7241
|
+
begin: base,
|
|
7242
|
+
success: `${base} Success`,
|
|
7243
|
+
failure: `${base} Failure`,
|
|
7244
|
+
};
|
|
7245
|
+
}
|
|
7246
|
+
function beginAction(executionId, names, params) {
|
|
7247
|
+
NgrxStoreService.store.dispatch({
|
|
7248
|
+
executionId,
|
|
7249
|
+
type: names.begin,
|
|
7250
|
+
params,
|
|
7251
|
+
});
|
|
7252
|
+
}
|
|
7253
|
+
function errorAction(executionId, names, params, error) {
|
|
7254
|
+
NgrxStoreService.store.dispatch({
|
|
7255
|
+
executionId,
|
|
7256
|
+
type: names.failure,
|
|
7257
|
+
params,
|
|
7258
|
+
error,
|
|
7259
|
+
});
|
|
7260
|
+
}
|
|
7261
|
+
function successAction(executionId, names, result) {
|
|
7262
|
+
NgrxStoreService.store.dispatch({
|
|
7263
|
+
executionId,
|
|
7264
|
+
type: names.success,
|
|
7265
|
+
result,
|
|
7266
|
+
});
|
|
7267
|
+
}
|
|
7268
|
+
return (target, key, desc) => {
|
|
7269
|
+
const names = getActionsNames(target, key);
|
|
7270
|
+
const baseAction = target[key];
|
|
7271
|
+
desc.value = function (...params) {
|
|
7272
|
+
const executionId = Guid.raw();
|
|
7273
|
+
beginAction(executionId, names, params);
|
|
7274
|
+
let result;
|
|
7275
|
+
try {
|
|
7276
|
+
result = baseAction.apply(this, params);
|
|
7277
|
+
}
|
|
7278
|
+
catch (error) {
|
|
7279
|
+
errorAction(executionId, names, params, error);
|
|
7280
|
+
throw error;
|
|
7281
|
+
}
|
|
7282
|
+
if (result instanceof Promise) {
|
|
7283
|
+
result = result
|
|
7284
|
+
.then((r) => {
|
|
7285
|
+
successAction(executionId, names, r);
|
|
7286
|
+
return r;
|
|
7287
|
+
})
|
|
7288
|
+
.catch((e) => {
|
|
7289
|
+
errorAction(executionId, names, params, e);
|
|
7290
|
+
throw e;
|
|
7291
|
+
});
|
|
7292
|
+
}
|
|
7293
|
+
else if (isObservable(result)) {
|
|
7294
|
+
result = result.pipe(first(), tap((r) => {
|
|
7295
|
+
successAction(executionId, names, r);
|
|
7296
|
+
}), catchError((e) => {
|
|
7297
|
+
errorAction(executionId, names, params, e);
|
|
7298
|
+
throw e;
|
|
7299
|
+
}));
|
|
7300
|
+
}
|
|
7301
|
+
else {
|
|
7302
|
+
successAction(executionId, names, result);
|
|
7303
|
+
}
|
|
7304
|
+
return result;
|
|
7305
|
+
};
|
|
7306
|
+
};
|
|
7307
|
+
}
|
|
7308
|
+
|
|
7309
|
+
function ReduxSelect(selectorOrFeature, ...paths) {
|
|
7310
|
+
return function (target, name) {
|
|
7311
|
+
const selectorFnName = '__' + name + '__selector';
|
|
7312
|
+
let fn;
|
|
7313
|
+
// Nothing here? Use propery name as selector
|
|
7314
|
+
if (!selectorOrFeature) {
|
|
7315
|
+
selectorOrFeature = name;
|
|
7316
|
+
}
|
|
7317
|
+
// Handle string vs Selector<TState, TValue>
|
|
7318
|
+
if (typeof selectorOrFeature === 'string') {
|
|
7319
|
+
const propsArray = paths.length
|
|
7320
|
+
? [selectorOrFeature, ...paths]
|
|
7321
|
+
: selectorOrFeature.split('.');
|
|
7322
|
+
fn = fastPropGetter(propsArray);
|
|
7323
|
+
}
|
|
7324
|
+
else {
|
|
7325
|
+
fn = selectorOrFeature;
|
|
7326
|
+
}
|
|
7327
|
+
const createSelect = () => {
|
|
7328
|
+
const store = NgrxStoreService.store;
|
|
7329
|
+
if (!store) {
|
|
7330
|
+
throw new Error('NgrxSelect not connected to store!');
|
|
7331
|
+
}
|
|
7332
|
+
return store.select(fn);
|
|
7333
|
+
};
|
|
7334
|
+
if (target[selectorFnName]) {
|
|
7335
|
+
throw new Error('You cannot use @Select decorator and a ' +
|
|
7336
|
+
selectorFnName +
|
|
7337
|
+
' property.');
|
|
7338
|
+
}
|
|
7339
|
+
// Redefine property
|
|
7340
|
+
if (delete target[name]) {
|
|
7341
|
+
Object.defineProperty(target, selectorFnName, {
|
|
7342
|
+
writable: true,
|
|
7343
|
+
enumerable: false,
|
|
7344
|
+
configurable: true,
|
|
7345
|
+
});
|
|
7346
|
+
Object.defineProperty(target, name, {
|
|
7347
|
+
get: function () {
|
|
7348
|
+
return (this[selectorFnName] ||
|
|
7349
|
+
(this[selectorFnName] = createSelect.apply(this)));
|
|
7350
|
+
},
|
|
7351
|
+
enumerable: true,
|
|
7352
|
+
configurable: true,
|
|
7353
|
+
});
|
|
7354
|
+
}
|
|
7355
|
+
};
|
|
7356
|
+
}
|
|
7357
|
+
function fastPropGetter(paths) {
|
|
7358
|
+
const segments = paths;
|
|
7359
|
+
let seg = 'store.' + segments[0], i = 0;
|
|
7360
|
+
const l = segments.length;
|
|
7361
|
+
let expr = seg;
|
|
7362
|
+
while (++i < l) {
|
|
7363
|
+
expr = expr + ' && ' + (seg = seg + '.' + segments[i]);
|
|
7364
|
+
}
|
|
7365
|
+
const fn = new Function('store', 'return ' + expr + ';');
|
|
7366
|
+
return fn;
|
|
7367
|
+
}
|
|
7368
|
+
|
|
7369
|
+
const SmartNgModule = SmartNgModuleDecorator;
|
|
7370
|
+
function SmartNgModuleDecorator(options) {
|
|
7371
|
+
return (constructor) => {
|
|
7372
|
+
return NgModule(options)(constructor);
|
|
7373
|
+
};
|
|
7374
|
+
}
|
|
7375
|
+
|
|
7235
7376
|
/**
|
|
7236
7377
|
* Generated bundle index. Do not edit.
|
|
7237
7378
|
*/
|
|
7238
7379
|
|
|
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 };
|
|
7380
|
+
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, ReduxAction, ReduxActionDecorator, ReduxSelect, SearchbarComponent, SharedDirectivesModule, SharedFactoriesModule, SharedModule, SharedPagesModule, SharedPipesModule, SharedServicesModule, SmartFormGroup, SmartNgModule, SmartNgModuleDecorator, StorageService, StyleService, ToastService, TrustHtmlPipe, UIService, fastPropGetter };
|
|
7240
7381
|
//# sourceMappingURL=smartsoft001-angular.mjs.map
|