@flusys/ng-shared 7.1.0 → 8.0.0-beta.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flusys/ng-shared",
3
- "version": "7.1.0",
3
+ "version": "8.0.0-beta.1",
4
4
  "description": "Shared components and utilities for FLUSYS Angular packages",
5
5
  "license": "MIT",
6
6
  "peerDependencies": {
@@ -8,8 +8,8 @@
8
8
  "@angular/core": ">=22.0.0",
9
9
  "@angular/forms": ">=22.0.0",
10
10
  "@angular/router": ">=22.0.0",
11
- "@flusys/ng-core": ">=7.1.0",
12
- "@flusys/ng-ui": ">=7.1.0",
11
+ "@flusys/ng-core": ">=8.0.0-beta.1",
12
+ "@flusys/ng-ui": ">=8.0.0-beta.1",
13
13
  "rxjs": "^7.8.0"
14
14
  },
15
15
  "sideEffects": false,
@@ -3,13 +3,10 @@ import { Observable } from 'rxjs';
3
3
  import * as _angular_core from '@angular/core';
4
4
  import { Signal, PipeTransform, ResourceRef, ResourceStatus, Injector, model, TemplateRef, OnDestroy, ElementRef, DestroyRef, InjectionToken } from '@angular/core';
5
5
  import { HttpContextToken, HttpRequest, HttpHandlerFn, HttpEvent, HttpClient, HttpParams, HttpHeaders } from '@angular/common/http';
6
- import * as i3 from '@angular/router';
7
6
  import { ResolveFn, CanActivateFn } from '@angular/router';
8
- import * as i1 from '@angular/common';
9
- import * as i2 from '@angular/forms';
10
- import { ControlValueAccessor } from '@angular/forms';
11
7
  import * as _flusys_ng_shared from '@flusys/ng-shared';
12
8
  import { ServiceName } from '@flusys/ng-core';
9
+ import { ControlValueAccessor } from '@angular/forms';
13
10
  import { FormValueControl } from '@angular/forms/signals';
14
11
  import * as _angular_platform_browser from '@angular/platform-browser';
15
12
  import { CheckboxChangeEvent } from '@flusys/ng-ui';
@@ -858,7 +855,6 @@ declare const SKIP_ERROR_TOAST: HttpContextToken<boolean>;
858
855
  * ```typescript
859
856
  * // In app.config.ts
860
857
  * provideHttpClient(
861
- * withFetch(),
862
858
  * withInterceptors([
863
859
  * authInterceptor, // from @flusys/ng-auth
864
860
  * tokenRefreshInterceptor, // from @flusys/ng-auth
@@ -876,12 +872,6 @@ interface IResolverModuleConfig {
876
872
  }
877
873
  declare function resolveTranslationModule(config: IResolverModuleConfig): ResolveFn<boolean>;
878
874
 
879
- declare class AngularModule {
880
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AngularModule, never>;
881
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AngularModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.RouterOutlet, typeof i3.RouterLink, typeof i3.RouterLinkActive, typeof IsEmptyImageDirective, typeof i1.NgOptimizedImage, typeof i1.NgComponentOutlet, typeof PreventDefaultDirective], [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.RouterOutlet, typeof i3.RouterLink, typeof i3.RouterLinkActive, typeof IsEmptyImageDirective, typeof i1.NgOptimizedImage, typeof i1.NgComponentOutlet, typeof PreventDefaultDirective]>;
882
- static ɵinj: _angular_core.ɵɵInjectorDeclaration<AngularModule>;
883
- }
884
-
885
875
  interface IApiService<DtoT, InterfaceT> {
886
876
  insert(dto: DtoT): Promise<ISingleResponse<InterfaceT>>;
887
877
  insertMany(dtos: DtoT[]): Promise<IBulkResponse<InterfaceT>>;
@@ -1280,8 +1270,8 @@ declare class FileUploaderComponent {
1280
1270
  }
1281
1271
 
1282
1272
  declare class IconComponent {
1283
- icon: _angular_core.InputSignal<string>;
1284
- iconType: _angular_core.InputSignal<IconTypeEnum | undefined>;
1273
+ readonly icon: _angular_core.InputSignal<string>;
1274
+ readonly iconType: _angular_core.InputSignal<IconTypeEnum | undefined>;
1285
1275
  protected readonly IconTypeEnum: typeof IconTypeEnum;
1286
1276
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<IconComponent, never>;
1287
1277
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<IconComponent, "lib-icon", never, { "icon": { "alias": "icon"; "required": true; "isSignal": true; }; "iconType": { "alias": "iconType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
@@ -1608,6 +1598,19 @@ declare function anyPermissionGuard(permissions: string[], redirectTo?: string):
1608
1598
  */
1609
1599
  declare function allPermissionsGuard(permissions: string[], redirectTo?: string): CanActivateFn;
1610
1600
 
1601
+ /**
1602
+ * Authenticated Guard - Redirects to login when the user isn't authenticated.
1603
+ *
1604
+ * Uses AUTH_STATE_PROVIDER so feature packages can gate routes requiring
1605
+ * authentication without depending on ng-auth directly.
1606
+ *
1607
+ * @example
1608
+ * ```typescript
1609
+ * { path: 'notifications', canActivate: [authenticatedGuard()] }
1610
+ * ```
1611
+ */
1612
+ declare function authenticatedGuard(redirectTo?: string): CanActivateFn;
1613
+
1611
1614
  declare function localToUtc(dateStr: string, timeStr: string, timezone: string): Date;
1612
1615
  declare function utcToLocal(utcDate: Date | string, timezone: string): {
1613
1616
  date: string;
@@ -1667,5 +1670,5 @@ interface ScrollPaginationConfig {
1667
1670
  */
1668
1671
  declare function checkScrollPagination(event: Event, config: ScrollPaginationConfig): IPagination | null;
1669
1672
 
1670
- export { ACTION_PERMISSIONS, AUTH_STATE_PROVIDER, AngularModule, ApiResourceService, ApiResourceService as ApiService, BRANCH_PERMISSIONS, BaseFormComponent, BaseFormControl, BaseFormTemplateDirective, BaseListComponent, BaseListTemplateDirective, BaseUserSelectComponent, COMPANY_ACTION_PERMISSIONS, COMPANY_API_PROVIDER, COMPANY_PERMISSIONS, CookieService, EMAIL_CONFIG_PERMISSIONS, EMAIL_TEMPLATE_PERMISSIONS, EVENT_PERMISSIONS, EditModeElementChangerDirective, FILE_PERMISSIONS, FILE_PROVIDER, FILE_TYPE_FILTERS, FOLDER_PERMISSIONS, FORM_PERMISSIONS, FORM_RESULT_PERMISSIONS, FaviconService, FileSelectorDialogComponent, FileUploaderComponent, FileUrlService, HasPermissionDirective, IconComponent, IconTypeEnum, InlineSvgComponent, IsEmptyImageDirective, LANGUAGE_PERMISSIONS, LazyMultiSelectComponent, LazySelectComponent, NOTIFICATION_PERMISSIONS, PERMISSIONS, PROFILE_PERMISSION_PROVIDER, PermissionValidatorService, PlatformService, PreventDefaultDirective, ROLE_ACTION_PERMISSIONS, ROLE_PERMISSIONS, RouterTabsComponent, SHARED_MESSAGES, SKIP_ERROR_TOAST, SOCIAL_AUTH_CONFIG_PERMISSIONS, STORAGE_CONFIG_PERMISSIONS, TRANSLATION_KEY_PERMISSIONS, TRANSLATION_PERMISSIONS, TranslatePipe, TranslateService, UPLOAD_CONFIG_PERMISSIONS, USER_ACTION_PERMISSIONS, USER_PERMISSIONS, USER_PERMISSION_PROVIDER, USER_PROVIDER, USER_ROLE_PERMISSIONS, UserMultiSelectComponent, UserSelectComponent, allPermissionsGuard, anyPermissionGuard, checkScrollPagination, errorCatchingInterceptor, evaluateLogicNode, evaluatePermission, formatFileSize, formatInTimezone, getAcceptString, getFileIconClass, getUserTimezone, hasAllPermissions, hasAnyPermission, hasPermission, isFileTypeAllowed, localToUtc, permissionGuard, provideValueAccessor, resolveTranslationModule, utcToLocal };
1673
+ export { ACTION_PERMISSIONS, AUTH_STATE_PROVIDER, ApiResourceService, ApiResourceService as ApiService, BRANCH_PERMISSIONS, BaseFormComponent, BaseFormControl, BaseFormTemplateDirective, BaseListComponent, BaseListTemplateDirective, BaseUserSelectComponent, COMPANY_ACTION_PERMISSIONS, COMPANY_API_PROVIDER, COMPANY_PERMISSIONS, CookieService, EMAIL_CONFIG_PERMISSIONS, EMAIL_TEMPLATE_PERMISSIONS, EVENT_PERMISSIONS, EditModeElementChangerDirective, FILE_PERMISSIONS, FILE_PROVIDER, FILE_TYPE_FILTERS, FOLDER_PERMISSIONS, FORM_PERMISSIONS, FORM_RESULT_PERMISSIONS, FaviconService, FileSelectorDialogComponent, FileUploaderComponent, FileUrlService, HasPermissionDirective, IconComponent, IconTypeEnum, InlineSvgComponent, IsEmptyImageDirective, LANGUAGE_PERMISSIONS, LazyMultiSelectComponent, LazySelectComponent, NOTIFICATION_PERMISSIONS, PERMISSIONS, PROFILE_PERMISSION_PROVIDER, PermissionValidatorService, PlatformService, PreventDefaultDirective, ROLE_ACTION_PERMISSIONS, ROLE_PERMISSIONS, RouterTabsComponent, SHARED_MESSAGES, SKIP_ERROR_TOAST, SOCIAL_AUTH_CONFIG_PERMISSIONS, STORAGE_CONFIG_PERMISSIONS, TRANSLATION_KEY_PERMISSIONS, TRANSLATION_PERMISSIONS, TranslatePipe, TranslateService, UPLOAD_CONFIG_PERMISSIONS, USER_ACTION_PERMISSIONS, USER_PERMISSIONS, USER_PERMISSION_PROVIDER, USER_PROVIDER, USER_ROLE_PERMISSIONS, UserMultiSelectComponent, UserSelectComponent, allPermissionsGuard, anyPermissionGuard, authenticatedGuard, checkScrollPagination, errorCatchingInterceptor, evaluateLogicNode, evaluatePermission, formatFileSize, formatInTimezone, getAcceptString, getFileIconClass, getUserTimezone, hasAllPermissions, hasAnyPermission, hasPermission, isFileTypeAllowed, localToUtc, permissionGuard, provideValueAccessor, resolveTranslationModule, utcToLocal };
1671
1674
  export type { ActionSeverity, DeleteType, FilesResponseDto, FormFieldType, IActionNode, IActivatable, IApiService, IAuthStateProvider, IBaseEntity, IBulkMeta, IBulkResponse, ICompanyApiProvider, ICompanyBasicInfo, IDeleteData, IDropDown, IFileBasicInfo, IFileProvider, IFileSelectFilter, IFileUploadOptions, IFilter, IFilterData, IFolderBasicInfo, IFormField, IFormSelectOption, IGroupNode, IListResponse, ILoggedUserInfo, ILogicNode, IMessageResponse, IOrderable, IPagination, IPaginationMeta, IProfileActionInfo, IProfilePermissionProvider, IProfileRoleInfo, IRequestMeta, IResolverModuleConfig, ISelectFilter, ISingleResponse, ISoftDeletable, ISort, IStorageConfigBasicInfo, ITableAction, ITableColumn, ITagConfig, ITimestampable, IUploadedFile, IUserBasicInfo, IUserBranchPermission, IUserCompanyInfo, IUserPermissionProvider, IUserProvider, IUserSelectFilter, LoadUsersFn, PermissionCode, RouterTabItem, ScrollPaginationConfig, TableColumnType, UploadFileFn, UploadMultipleFilesFn };