@flusys/ng-shared 7.0.2 → 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.0.2",
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.0.2",
12
- "@flusys/ng-ui": ">=7.0.2",
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';
@@ -35,6 +32,12 @@ declare const BRANCH_PERMISSIONS: {
35
32
  readonly UPDATE: "branch.update";
36
33
  readonly DELETE: "branch.delete";
37
34
  };
35
+ declare const SOCIAL_AUTH_CONFIG_PERMISSIONS: {
36
+ readonly CREATE: "social-config.create";
37
+ readonly READ: "social-config.read";
38
+ readonly UPDATE: "social-config.update";
39
+ readonly DELETE: "social-config.delete";
40
+ };
38
41
  declare const ACTION_PERMISSIONS: {
39
42
  readonly CREATE: "action.create";
40
43
  readonly READ: "action.read";
@@ -158,6 +161,12 @@ declare const PERMISSIONS: {
158
161
  readonly UPDATE: "branch.update";
159
162
  readonly DELETE: "branch.delete";
160
163
  };
164
+ readonly SOCIAL_AUTH_CONFIG: {
165
+ readonly CREATE: "social-config.create";
166
+ readonly READ: "social-config.read";
167
+ readonly UPDATE: "social-config.update";
168
+ readonly DELETE: "social-config.delete";
169
+ };
161
170
  readonly ACTION: {
162
171
  readonly CREATE: "action.create";
163
172
  readonly READ: "action.read";
@@ -846,7 +855,6 @@ declare const SKIP_ERROR_TOAST: HttpContextToken<boolean>;
846
855
  * ```typescript
847
856
  * // In app.config.ts
848
857
  * provideHttpClient(
849
- * withFetch(),
850
858
  * withInterceptors([
851
859
  * authInterceptor, // from @flusys/ng-auth
852
860
  * tokenRefreshInterceptor, // from @flusys/ng-auth
@@ -864,12 +872,6 @@ interface IResolverModuleConfig {
864
872
  }
865
873
  declare function resolveTranslationModule(config: IResolverModuleConfig): ResolveFn<boolean>;
866
874
 
867
- declare class AngularModule {
868
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AngularModule, never>;
869
- 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]>;
870
- static ɵinj: _angular_core.ɵɵInjectorDeclaration<AngularModule>;
871
- }
872
-
873
875
  interface IApiService<DtoT, InterfaceT> {
874
876
  insert(dto: DtoT): Promise<ISingleResponse<InterfaceT>>;
875
877
  insertMany(dtos: DtoT[]): Promise<IBulkResponse<InterfaceT>>;
@@ -1268,8 +1270,8 @@ declare class FileUploaderComponent {
1268
1270
  }
1269
1271
 
1270
1272
  declare class IconComponent {
1271
- icon: _angular_core.InputSignal<string>;
1272
- iconType: _angular_core.InputSignal<IconTypeEnum | undefined>;
1273
+ readonly icon: _angular_core.InputSignal<string>;
1274
+ readonly iconType: _angular_core.InputSignal<IconTypeEnum | undefined>;
1273
1275
  protected readonly IconTypeEnum: typeof IconTypeEnum;
1274
1276
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<IconComponent, never>;
1275
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>;
@@ -1596,6 +1598,19 @@ declare function anyPermissionGuard(permissions: string[], redirectTo?: string):
1596
1598
  */
1597
1599
  declare function allPermissionsGuard(permissions: string[], redirectTo?: string): CanActivateFn;
1598
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
+
1599
1614
  declare function localToUtc(dateStr: string, timeStr: string, timezone: string): Date;
1600
1615
  declare function utcToLocal(utcDate: Date | string, timezone: string): {
1601
1616
  date: string;
@@ -1655,5 +1670,5 @@ interface ScrollPaginationConfig {
1655
1670
  */
1656
1671
  declare function checkScrollPagination(event: Event, config: ScrollPaginationConfig): IPagination | null;
1657
1672
 
1658
- 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, 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 };
1659
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 };