@cuby-ui/core 0.0.480 → 0.0.482

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.
Files changed (35) hide show
  1. package/esm2022/index.mjs +2 -1
  2. package/esm2022/interceptors/error-handler.interceptor.mjs +6 -2
  3. package/esm2022/interfaces/error-notification-service.mjs +2 -0
  4. package/esm2022/interfaces/error-stategy.mjs +2 -0
  5. package/esm2022/interfaces/index.mjs +3 -1
  6. package/esm2022/operators/handle-error.mjs +12 -0
  7. package/esm2022/operators/index.mjs +2 -0
  8. package/esm2022/providers/error-handler.options.mjs +2 -0
  9. package/esm2022/providers/error-handler.provider.mjs +23 -0
  10. package/esm2022/providers/index.mjs +2 -1
  11. package/esm2022/services/error-resolver-factory.service.mjs +75 -0
  12. package/esm2022/services/global-handler-error.service.mjs +26 -0
  13. package/esm2022/services/index.mjs +2 -1
  14. package/esm2022/tokens/error-notification-service.mjs +15 -0
  15. package/esm2022/tokens/error-translation-prefix.mjs +6 -0
  16. package/esm2022/tokens/index.mjs +3 -1
  17. package/esm2022/widgets/ui/button-change-theme/button-change-theme.component.mjs +3 -3
  18. package/fesm2022/cuby-ui-core.mjs +152 -8
  19. package/fesm2022/cuby-ui-core.mjs.map +1 -1
  20. package/index.d.ts +1 -0
  21. package/interfaces/error-notification-service.d.ts +3 -0
  22. package/interfaces/error-stategy.d.ts +3 -0
  23. package/interfaces/index.d.ts +2 -0
  24. package/operators/handle-error.d.ts +2 -0
  25. package/operators/index.d.ts +1 -0
  26. package/package.json +4 -4
  27. package/providers/error-handler.options.d.ts +6 -0
  28. package/providers/error-handler.provider.d.ts +3 -0
  29. package/providers/index.d.ts +2 -0
  30. package/services/error-resolver-factory.service.d.ts +10 -0
  31. package/services/global-handler-error.service.d.ts +10 -0
  32. package/services/index.d.ts +1 -0
  33. package/tokens/error-notification-service.d.ts +3 -0
  34. package/tokens/error-translation-prefix.d.ts +2 -0
  35. package/tokens/index.d.ts +2 -0
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, inject, Renderer2, input, model, effect, Directive, InjectionToken, Input, HostBinding, ChangeDetectorRef, ViewChild, EventEmitter, Output, NgModule, Injector, Injectable, SkipSelf, Optional, DestroyRef, NgZone, signal, Self, INJECTOR, TemplateRef, forwardRef, computed, ContentChildren, ElementRef, HostListener, ViewContainerRef, booleanAttribute, untracked, Pipe, viewChild, output, APP_INITIALIZER, makeEnvironmentProviders } from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, inject, Renderer2, input, model, effect, Directive, InjectionToken, Input, HostBinding, ChangeDetectorRef, ViewChild, EventEmitter, Output, NgModule, Injector, Injectable, SkipSelf, Optional, DestroyRef, NgZone, signal, Self, INJECTOR, TemplateRef, forwardRef, computed, ContentChildren, ElementRef, HostListener, ViewContainerRef, booleanAttribute, untracked, Pipe, viewChild, output, APP_INITIALIZER, makeEnvironmentProviders, ErrorHandler } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT, NgForOf, NgIf, NgComponentOutlet, NgTemplateOutlet, NgFor, NgClass, Location, UpperCasePipe, AsyncPipe, KeyValuePipe, LowerCasePipe, TitleCasePipe } from '@angular/common';
5
5
  import { DomSanitizer } from '@angular/platform-browser';
@@ -12,6 +12,9 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
12
12
  import { trigger, transition, query, animateChild, style, animate, stagger } from '@angular/animations';
13
13
  import { OAuthService, OAuthErrorEvent, OAuthSuccessEvent, OAuthInfoEvent, provideOAuthClient } from 'angular-oauth2-oidc';
14
14
  import { CuiExchangeContextApiService, CuiJTextApiService, CuiTreeStructNavigatorApiService, CuiNodeChecklistApiService, CuiTreeStructApiService, CuiFrameApiService, UserCompanyApiService, SHARED_CONSTRUCTION_HTTP_OPTIONS, SHARED_INSTRUCTION_HTTP_OPTIONS, CuiQuantumGroupResourcesStructureApiService, ResourceContentType, CuiFactoryApiService, SeasonType, SHARED_FACTORY_HTTP_OPTIONS, UtilityApiService, CuiCriterionApiService, CuiStorageObjectType, CuiJobApiService, JobType } from '@cuby-ui/api';
15
+ import { HttpErrorResponse } from '@angular/common/http';
16
+ import * as i4 from '@jsverse/transloco';
17
+ import { TranslocoService, TranslocoModule, TranslocoDirective, TranslocoPipe } from '@jsverse/transloco';
15
18
  import * as i2$1 from '@angular/forms';
16
19
  import { Validators, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule, FormControl, NonNullableFormBuilder } from '@angular/forms';
17
20
  import * as i2 from '@taiga-ui/polymorpheus';
@@ -19,13 +22,10 @@ import { PolymorpheusComponent, injectContext, PolymorpheusOutlet, PolymorpheusT
19
22
  import { maskitoParseNumber, maskitoNumberOptionsGenerator, maskitoTimeOptionsGenerator } from '@maskito/kit';
20
23
  import * as i3 from '@maskito/angular';
21
24
  import { MaskitoDirective } from '@maskito/angular';
22
- import * as i4 from '@jsverse/transloco';
23
- import { TranslocoModule, TranslocoDirective, TranslocoService, TranslocoPipe } from '@jsverse/transloco';
24
25
  import EditorJS from '@editorjs/editorjs';
25
26
  import Header from '@editorjs/header';
26
27
  import List from '@editorjs/list';
27
28
  import { createCustomElement } from '@angular/elements';
28
- import { HttpErrorResponse } from '@angular/common/http';
29
29
  import { Router } from '@angular/router';
30
30
  import { tap as tap$1, finalize as finalize$1, switchMap as switchMap$1 } from 'rxjs/operators';
31
31
 
@@ -1332,6 +1332,116 @@ function cuiAsViewport(accessor) {
1332
1332
  return cuiProvide(CUI_VIEWPORT, accessor);
1333
1333
  }
1334
1334
 
1335
+ class DefaultErrorNotificationService {
1336
+ constructor() {
1337
+ this.alertService = inject(CuiAlertService);
1338
+ }
1339
+ showError(message, options) {
1340
+ this.alertService.open(message, { status: 'error', ...options }).subscribe();
1341
+ }
1342
+ }
1343
+ const CUI_ERROR_NOTIFICATION_SERVICE = new InjectionToken('CUI_ERROR_NOTIFICATION_SERVICE', {
1344
+ providedIn: 'root',
1345
+ factory: () => new DefaultErrorNotificationService()
1346
+ });
1347
+
1348
+ const CUI_ERROR_TRANSLATION_PREFIX = new InjectionToken('CUI_ERROR_TRANSLATION_PREFIX', {
1349
+ providedIn: 'root',
1350
+ factory: () => 'BACKEND.'
1351
+ });
1352
+
1353
+ class CuiErrorResolverFactory {
1354
+ constructor() {
1355
+ this.nullErrorStrategy = inject(NullErrorStrategy);
1356
+ this.httpErrorStrategy = inject(HttpErrorStrategy);
1357
+ this.defaultErrorStrategy = inject(DefaultErrorStrategy);
1358
+ }
1359
+ getErrorStrategy(error) {
1360
+ if (error instanceof HttpErrorResponse) {
1361
+ return this.httpErrorStrategy;
1362
+ }
1363
+ if (error instanceof Error) {
1364
+ return this.defaultErrorStrategy;
1365
+ }
1366
+ return this.nullErrorStrategy;
1367
+ }
1368
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiErrorResolverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1369
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiErrorResolverFactory, providedIn: 'root' }); }
1370
+ }
1371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiErrorResolverFactory, decorators: [{
1372
+ type: Injectable,
1373
+ args: [{ providedIn: 'root' }]
1374
+ }] });
1375
+ class NullErrorStrategy {
1376
+ constructor() {
1377
+ this.translocoService = inject(TranslocoService);
1378
+ this.translatePrefix = inject(CUI_ERROR_TRANSLATION_PREFIX);
1379
+ }
1380
+ getMessage() {
1381
+ return this.translocoService.translate(`${this.translatePrefix}UNKNOWN_ERROR`);
1382
+ }
1383
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NullErrorStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1384
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NullErrorStrategy, providedIn: 'root' }); }
1385
+ }
1386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NullErrorStrategy, decorators: [{
1387
+ type: Injectable,
1388
+ args: [{ providedIn: 'root' }]
1389
+ }] });
1390
+ class HttpErrorStrategy {
1391
+ constructor() {
1392
+ this.translocoService = inject(TranslocoService);
1393
+ this.translatePrefix = inject(CUI_ERROR_TRANSLATION_PREFIX);
1394
+ }
1395
+ getMessage(error) {
1396
+ if (error.error?.code) {
1397
+ return this.translocoService.translate(`${this.translatePrefix}${error.error.code}`);
1398
+ }
1399
+ if (error.error?.message) {
1400
+ return error.error.message;
1401
+ }
1402
+ return error.message;
1403
+ }
1404
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HttpErrorStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1405
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HttpErrorStrategy, providedIn: 'root' }); }
1406
+ }
1407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HttpErrorStrategy, decorators: [{
1408
+ type: Injectable,
1409
+ args: [{ providedIn: 'root' }]
1410
+ }] });
1411
+ class DefaultErrorStrategy {
1412
+ getMessage(error) {
1413
+ return error.message;
1414
+ }
1415
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DefaultErrorStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1416
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DefaultErrorStrategy, providedIn: 'root' }); }
1417
+ }
1418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DefaultErrorStrategy, decorators: [{
1419
+ type: Injectable,
1420
+ args: [{ providedIn: 'root' }]
1421
+ }] });
1422
+
1423
+ class CuiGlobalErrorHandler {
1424
+ constructor() {
1425
+ this.errorNotificationService = inject(CUI_ERROR_NOTIFICATION_SERVICE);
1426
+ this.cuiErrorResolverFactory = inject(CuiErrorResolverFactory);
1427
+ }
1428
+ handleError(error) {
1429
+ console.error(error);
1430
+ this.errorNotificationService.showError(this.getErrorMessage(error));
1431
+ }
1432
+ getErrorMessage(error) {
1433
+ return this.cuiErrorResolverFactory.getErrorStrategy(error).getMessage(error);
1434
+ }
1435
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiGlobalErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1436
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiGlobalErrorHandler, providedIn: 'root' }); }
1437
+ }
1438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiGlobalErrorHandler, decorators: [{
1439
+ type: Injectable,
1440
+ args: [{
1441
+ providedIn: 'root'
1442
+ }]
1443
+ }] });
1444
+
1335
1445
  function cuiRemoveSpaces(value) {
1336
1446
  return value.replace(/\s+/g, '');
1337
1447
  }
@@ -7687,11 +7797,14 @@ const cuiLoaderInterceptor = (request, next) => {
7687
7797
  const cuiErrorHandlerInterceptor = (request, next) => {
7688
7798
  const translocoService = inject(TranslocoService);
7689
7799
  const cuiAlertService = inject(CuiAlertService);
7800
+ const errorTranslationPrefix = inject(CUI_ERROR_TRANSLATION_PREFIX);
7690
7801
  return next(request).pipe(catchError((error) => {
7691
7802
  console.error(error);
7692
7803
  if (error instanceof HttpErrorResponse) {
7693
7804
  cuiAlertService
7694
- .open(translocoService.translate(`BACKEND.${error.error.code}`), { status: 'error' })
7805
+ .open(translocoService.translate(`${errorTranslationPrefix}${error.error.code}`), {
7806
+ status: 'error'
7807
+ })
7695
7808
  .subscribe();
7696
7809
  }
7697
7810
  return throwError(() => error);
@@ -7774,6 +7887,26 @@ async function initAuth(authConfig) {
7774
7887
  return await authService.initAuth(authConfig);
7775
7888
  }
7776
7889
 
7890
+ function provideCuiErrorHandler({ errorNotificationService, translationPrefix = 'BACKEND.' } = {}) {
7891
+ const providers = [
7892
+ {
7893
+ provide: ErrorHandler,
7894
+ useClass: CuiGlobalErrorHandler
7895
+ },
7896
+ {
7897
+ provide: CUI_ERROR_TRANSLATION_PREFIX,
7898
+ useValue: translationPrefix
7899
+ }
7900
+ ];
7901
+ if (errorNotificationService) {
7902
+ providers.push({
7903
+ provide: CUI_ERROR_NOTIFICATION_SERVICE,
7904
+ useClass: errorNotificationService
7905
+ });
7906
+ }
7907
+ return providers;
7908
+ }
7909
+
7777
7910
  const cuiAuthInterceptor = (request, next) => {
7778
7911
  const authService = inject(CuiAuthService);
7779
7912
  if (!authService.hasValidAccessToken()) {
@@ -10499,7 +10632,7 @@ class ButtonChangeThemeComponent {
10499
10632
  this.cuiThemeService.next(theme);
10500
10633
  }
10501
10634
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonChangeThemeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10502
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ButtonChangeThemeComponent, isStandalone: true, selector: "cui-button-change-theme", ngImport: i0, template: "@let currentTheme = theme$ | async;\n\n<ng-container *transloco=\"let t\">\n<button type=\"button\">\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconPaletteSm\" />\n <div class=\"text-and-sub-button\">\n {{ t('SWITCH_THEME') }}\n <div class=\"group-sub-button\">\n <div\n [class.button-select]=\"currentTheme === 'dark'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconMoon\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('dark')\"\n />\n </div>\n <div\n [class.button-select]=\"currentTheme === 'light'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconSun\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('light')\"\n />\n </div>\n </div>\n </div>\n </div>\n</button>\n</ng-container>\n", styles: [".content-button{display:flex;gap:8px;align-items:center;padding-right:8px;padding-left:8px;height:36px;color:var(--cui-base-900)}.text-and-sub-button{display:flex;align-items:center;justify-content:space-between;width:100%}.group-sub-button{display:flex;gap:4px}.container-sub-button{display:flex;align-items:center;justify-content:center;text-transform:capitalize;border:solid 1px var(--cui-base-200);border-radius:4px;width:28px;height:28px}.button-select{border:solid 1px var(--cui-badge-blue-border);background-color:var(--cui-badge-blue-bg)}\n"], dependencies: [{ kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] }); }
10635
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ButtonChangeThemeComponent, isStandalone: true, selector: "cui-button-change-theme", ngImport: i0, template: "@let currentTheme = theme$ | async;\n\n<ng-container *transloco=\"let t\">\n<button type=\"button\"\n class=\"custom-button\">\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconPaletteSm\" />\n <div class=\"text-and-sub-button\">\n {{ t('SWITCH_THEME') }}\n <div class=\"group-sub-button\">\n <div\n [class.button-select]=\"currentTheme === 'dark'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconMoon\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('dark')\"\n />\n </div>\n <div\n [class.button-select]=\"currentTheme === 'light'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconSun\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('light')\"\n />\n </div>\n </div>\n </div>\n </div>\n</button>\n</ng-container>\n", styles: [".content-button{display:flex;gap:8px;align-items:center;padding-right:8px;padding-left:8px;height:36px;color:var(--cui-base-900)}.text-and-sub-button{display:flex;align-items:center;justify-content:space-between;width:100%}.group-sub-button{display:flex;gap:4px}.container-sub-button{display:flex;align-items:center;justify-content:center;text-transform:capitalize;border:solid 1px var(--cui-base-200);border-radius:4px;width:28px;height:28px}.button-select{border:solid 1px var(--cui-badge-blue-border);background-color:var(--cui-badge-blue-bg)}.custom-button{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] }); }
10503
10636
  }
10504
10637
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonChangeThemeComponent, decorators: [{
10505
10638
  type: Component,
@@ -10507,7 +10640,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
10507
10640
  CuiSvgModule,
10508
10641
  AsyncPipe,
10509
10642
  TranslocoDirective
10510
- ], template: "@let currentTheme = theme$ | async;\n\n<ng-container *transloco=\"let t\">\n<button type=\"button\">\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconPaletteSm\" />\n <div class=\"text-and-sub-button\">\n {{ t('SWITCH_THEME') }}\n <div class=\"group-sub-button\">\n <div\n [class.button-select]=\"currentTheme === 'dark'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconMoon\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('dark')\"\n />\n </div>\n <div\n [class.button-select]=\"currentTheme === 'light'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconSun\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('light')\"\n />\n </div>\n </div>\n </div>\n </div>\n</button>\n</ng-container>\n", styles: [".content-button{display:flex;gap:8px;align-items:center;padding-right:8px;padding-left:8px;height:36px;color:var(--cui-base-900)}.text-and-sub-button{display:flex;align-items:center;justify-content:space-between;width:100%}.group-sub-button{display:flex;gap:4px}.container-sub-button{display:flex;align-items:center;justify-content:center;text-transform:capitalize;border:solid 1px var(--cui-base-200);border-radius:4px;width:28px;height:28px}.button-select{border:solid 1px var(--cui-badge-blue-border);background-color:var(--cui-badge-blue-bg)}\n"] }]
10643
+ ], template: "@let currentTheme = theme$ | async;\n\n<ng-container *transloco=\"let t\">\n<button type=\"button\"\n class=\"custom-button\">\n <div class=\"content-button\">\n <cui-svg icon=\"cuiIconPaletteSm\" />\n <div class=\"text-and-sub-button\">\n {{ t('SWITCH_THEME') }}\n <div class=\"group-sub-button\">\n <div\n [class.button-select]=\"currentTheme === 'dark'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconMoon\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('dark')\"\n />\n </div>\n <div\n [class.button-select]=\"currentTheme === 'light'\"\n class=\"container-sub-button\"\n >\n <cui-svg\n icon=\"cuiIconSun\"\n color=\"var(--cui-base-500)\"\n (click)=\"onChangeTheme('light')\"\n />\n </div>\n </div>\n </div>\n </div>\n</button>\n</ng-container>\n", styles: [".content-button{display:flex;gap:8px;align-items:center;padding-right:8px;padding-left:8px;height:36px;color:var(--cui-base-900)}.text-and-sub-button{display:flex;align-items:center;justify-content:space-between;width:100%}.group-sub-button{display:flex;gap:4px}.container-sub-button{display:flex;align-items:center;justify-content:center;text-transform:capitalize;border:solid 1px var(--cui-base-200);border-radius:4px;width:28px;height:28px}.button-select{border:solid 1px var(--cui-badge-blue-border);background-color:var(--cui-badge-blue-bg)}.custom-button{width:100%}\n"] }]
10511
10644
  }] });
10512
10645
 
10513
10646
  class CuiUserActionContextMenuComponent {
@@ -12013,9 +12146,20 @@ const CuiLibTranslations = {
12013
12146
  ru: import('./cuby-ui-core-ru-bROcEQBf.mjs')
12014
12147
  };
12015
12148
 
12149
+ function handleError(handler, useDefaultError = true) {
12150
+ return catchError((error) => {
12151
+ if (useDefaultError) {
12152
+ setTimeout(() => {
12153
+ throw error;
12154
+ });
12155
+ }
12156
+ return of(handler(error));
12157
+ });
12158
+ }
12159
+
12016
12160
  /**
12017
12161
  * Generated bundle index. Do not edit.
12018
12162
  */
12019
12163
 
12020
- export { AlertHintComponent, AngularOutsideLoaderService, AssigneeRoleItemComponent, AssigneeRolesTabsComponent, ButtonChangeThemeComponent, CUI_ACTIVITY_SERVICE_TOKEN, CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_INPUT_TIME_DEFAULT_OPTIONS, CUI_INPUT_TIME_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_ICONS, CUI_NOTIFICATION_ICON_OPTIONS, CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE, CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE, CUI_NOTIFICATION_OPTIONS, CUI_RESOURCE_STATE_SERVICE_TOKEN, CUI_ROOT_SELECTOR, CUI_STORAGE_LIST_SERVICE_TOKEN, CUI_SUBJECT_MODAL_SERVICE_TOKEN, CUI_TABS_SERVICE_TOKEN, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CUI_TOOLTIP_COMPONENT, CUI_TOOLTIP_DEFAULT_OPTIONS, CUI_TOOLTIP_DIRECTIONS, CUI_TOOLTIP_OPTIONS, CUI_TOOLTIP_PROVIDERS, CUI_USED_ELEMENTS_SERVICE_TOKEN, CUI_UTILITY_SERVICE_TOKEN, ContentHeaderComponent, CuiAbstractTabsComponent, CuiAccordionComponent, CuiAccordionDirective, CuiAccordionItemComponent, CuiAccordionModule, CuiActivityBaseService, CuiActivityImplService, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiAttachesTool, CuiAuthBase, CuiAuthService, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCardWrapperComponent, CuiCategoriesComponent, CuiCheckboxComponent, CuiCheckboxModule, CuiChecklistBlockComponent, CuiCircleLoaderComponent, CuiContentWrapperComponent, CuiContextMenuComponent, CuiContextMenuModule, CuiCriterionInfoComponent, CuiCriterionModalCreateComponent, CuiDeleteModalComponent, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiDropdownDirective, CuiDropdownWrapperComponent, CuiEditorBlockComponent, CuiEditorComponent, CuiEditorModalComponent, CuiEditorReadonlyComponent, CuiEditorTranslations, CuiEmptyStateComponent, CuiFileIconComponent, CuiFileUploaderStatus, CuiFormFieldComponent, CuiFormFieldModule, CuiFramerPreviewComponent, CuiGeneralControlErrorHintComponent, CuiGhostInputComponent, CuiHeaderTool, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiImageTool, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiInputTimeModule, CuiInstructionInfoComponent, CuiInstructionInfoFormComponent, CuiInstructionModalCreateComponent, CuiInstructionReadonlyInfoComponent, CuiLabelComponent, CuiLabelModule, CuiLayoutComponent, CuiLetterBoxComponent, CuiLibTranslations, CuiLinearLoaderComponent, CuiLinkMarker, CuiListTool, CuiLoaderService, CuiLoadingState, CuiNotificationComponent, CuiNotificationModule, CuiPositionService, CuiRadioComponent, CuiRadioModule, CuiReadonlyCriterionModalComponent, CuiReadonlyInstructionModalComponent, CuiRenderDynamicComponentsComponent, CuiRenderDynamicComponentsService, CuiRoleMarker, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModalComponent, CuiSelectModalFolderComponent, CuiSelectModalSearchComponent, CuiSelectModalService, CuiSelectModule, CuiSelectedCategoryService, CuiSidebarContainerComponent, CuiSidebarHeaderComponent, CuiSidebarNavigationComponent, CuiSidebarNavigationContainerComponent, CuiSidebarNavigationItemComponent, CuiSidebarService, CuiStatedLoaderComponent, CuiStorageListComponent, CuiSvgComponent, CuiSvgModule, CuiTabDirective, CuiTabsComponent, CuiTabsServiceImpl, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, CuiToolMarker, CuiTooltip, CuiTooltipComponent, CuiTooltipDescribe, CuiTooltipDirective, CuiTooltipDriver, CuiTooltipHost, CuiTooltipHover, CuiTooltipManual, CuiTooltipOptionsDirective, CuiTooltipOverflow, CuiTooltipPointer, CuiTooltipPosition, CuiTooltipService, CuiTooltipUnstyled, CuiTooltipUnstyledComponent, CuiTooltips, CuiUserActionContextMenuComponent, CuiUtilityModalComponent, CuiVideoTool, CuiVisualViewportService, InsertedComponent, ModalDividedSectionComponent, ModalHeaderComponent, ModalHeaderInsertedButtonsComponent, ModalInfoTabComponent, ModalOperationPartComponent, ModalResourcesTabComponent, OptionsButtonComponent, RenderDynamicModalComponent, ResourceStateBaseService, ResourcesBlockComponent, ResourcesBlockPartComponent, ResourcesBlockTabsComponent$1 as ResourcesBlockTabsComponent, ResourcesOptionsComponent, SubjectModalBaseService, UTILITY_MODAL_SERVICE_TOKEN, UsedElementsBaseService, UtilityBaseService, UtilityInfoReadonlyComponent, createEditorTools, cuiAuthInterceptor, cuiCheckFixedPosition, cuiCreateDefaultValidators, cuiErrorHandlerInterceptor, cuiGetDuration, cuiIsObscured, cuiLoaderInterceptor, cuiOverrideOptions, cuiProvideEditor, cuiRemoveSpaces, cuiReplace, cuiToAnimationOptions, cuiTooltipOptionsProvider, cuiXNdjsonInterceptor, openFileInBrowser, provideCuiAuth, provideCuiTabs, setLoading };
12164
+ export { AlertHintComponent, AngularOutsideLoaderService, AssigneeRoleItemComponent, AssigneeRolesTabsComponent, ButtonChangeThemeComponent, CUI_ACTIVITY_SERVICE_TOKEN, CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_INPUT_TIME_DEFAULT_OPTIONS, CUI_INPUT_TIME_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_ICONS, CUI_NOTIFICATION_ICON_OPTIONS, CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE, CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE, CUI_NOTIFICATION_OPTIONS, CUI_RESOURCE_STATE_SERVICE_TOKEN, CUI_ROOT_SELECTOR, CUI_STORAGE_LIST_SERVICE_TOKEN, CUI_SUBJECT_MODAL_SERVICE_TOKEN, CUI_TABS_SERVICE_TOKEN, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CUI_TOOLTIP_COMPONENT, CUI_TOOLTIP_DEFAULT_OPTIONS, CUI_TOOLTIP_DIRECTIONS, CUI_TOOLTIP_OPTIONS, CUI_TOOLTIP_PROVIDERS, CUI_USED_ELEMENTS_SERVICE_TOKEN, CUI_UTILITY_SERVICE_TOKEN, ContentHeaderComponent, CuiAbstractTabsComponent, CuiAccordionComponent, CuiAccordionDirective, CuiAccordionItemComponent, CuiAccordionModule, CuiActivityBaseService, CuiActivityImplService, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiAttachesTool, CuiAuthBase, CuiAuthService, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCardWrapperComponent, CuiCategoriesComponent, CuiCheckboxComponent, CuiCheckboxModule, CuiChecklistBlockComponent, CuiCircleLoaderComponent, CuiContentWrapperComponent, CuiContextMenuComponent, CuiContextMenuModule, CuiCriterionInfoComponent, CuiCriterionModalCreateComponent, CuiDeleteModalComponent, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiDropdownDirective, CuiDropdownWrapperComponent, CuiEditorBlockComponent, CuiEditorComponent, CuiEditorModalComponent, CuiEditorReadonlyComponent, CuiEditorTranslations, CuiEmptyStateComponent, CuiFileIconComponent, CuiFileUploaderStatus, CuiFormFieldComponent, CuiFormFieldModule, CuiFramerPreviewComponent, CuiGeneralControlErrorHintComponent, CuiGhostInputComponent, CuiGlobalErrorHandler, CuiHeaderTool, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiImageTool, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiInputTimeModule, CuiInstructionInfoComponent, CuiInstructionInfoFormComponent, CuiInstructionModalCreateComponent, CuiInstructionReadonlyInfoComponent, CuiLabelComponent, CuiLabelModule, CuiLayoutComponent, CuiLetterBoxComponent, CuiLibTranslations, CuiLinearLoaderComponent, CuiLinkMarker, CuiListTool, CuiLoaderService, CuiLoadingState, CuiNotificationComponent, CuiNotificationModule, CuiPositionService, CuiRadioComponent, CuiRadioModule, CuiReadonlyCriterionModalComponent, CuiReadonlyInstructionModalComponent, CuiRenderDynamicComponentsComponent, CuiRenderDynamicComponentsService, CuiRoleMarker, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModalComponent, CuiSelectModalFolderComponent, CuiSelectModalSearchComponent, CuiSelectModalService, CuiSelectModule, CuiSelectedCategoryService, CuiSidebarContainerComponent, CuiSidebarHeaderComponent, CuiSidebarNavigationComponent, CuiSidebarNavigationContainerComponent, CuiSidebarNavigationItemComponent, CuiSidebarService, CuiStatedLoaderComponent, CuiStorageListComponent, CuiSvgComponent, CuiSvgModule, CuiTabDirective, CuiTabsComponent, CuiTabsServiceImpl, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, CuiToolMarker, CuiTooltip, CuiTooltipComponent, CuiTooltipDescribe, CuiTooltipDirective, CuiTooltipDriver, CuiTooltipHost, CuiTooltipHover, CuiTooltipManual, CuiTooltipOptionsDirective, CuiTooltipOverflow, CuiTooltipPointer, CuiTooltipPosition, CuiTooltipService, CuiTooltipUnstyled, CuiTooltipUnstyledComponent, CuiTooltips, CuiUserActionContextMenuComponent, CuiUtilityModalComponent, CuiVideoTool, CuiVisualViewportService, InsertedComponent, ModalDividedSectionComponent, ModalHeaderComponent, ModalHeaderInsertedButtonsComponent, ModalInfoTabComponent, ModalOperationPartComponent, ModalResourcesTabComponent, OptionsButtonComponent, RenderDynamicModalComponent, ResourceStateBaseService, ResourcesBlockComponent, ResourcesBlockPartComponent, ResourcesBlockTabsComponent$1 as ResourcesBlockTabsComponent, ResourcesOptionsComponent, SubjectModalBaseService, UTILITY_MODAL_SERVICE_TOKEN, UsedElementsBaseService, UtilityBaseService, UtilityInfoReadonlyComponent, createEditorTools, cuiAuthInterceptor, cuiCheckFixedPosition, cuiCreateDefaultValidators, cuiErrorHandlerInterceptor, cuiGetDuration, cuiIsObscured, cuiLoaderInterceptor, cuiOverrideOptions, cuiProvideEditor, cuiRemoveSpaces, cuiReplace, cuiToAnimationOptions, cuiTooltipOptionsProvider, cuiXNdjsonInterceptor, handleError, openFileInBrowser, provideCuiAuth, provideCuiErrorHandler, provideCuiTabs, setLoading };
12021
12165
  //# sourceMappingURL=cuby-ui-core.mjs.map