@flusys/ng-shared 1.0.0 → 1.0.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,13 +1,13 @@
1
1
  {
2
2
  "name": "@flusys/ng-shared",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Shared components and utilities for FLUSYS Angular packages",
5
5
  "license": "MIT",
6
6
  "peerDependencies": {
7
7
  "@angular/common": ">=21.0.0",
8
8
  "@angular/core": ">=21.0.0",
9
9
  "@angular/forms": ">=21.0.0",
10
- "@flusys/ng-core": ">=1.0.0",
10
+ "@flusys/ng-core": ">=1.0.1",
11
11
  "@primeuix/themes": ">=1.0.0",
12
12
  "primeicons": ">=7.0.0",
13
13
  "primeng": ">=21.0.0"
@@ -949,6 +949,9 @@ declare class PrimeModule {
949
949
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<PrimeModule>;
950
950
  }
951
951
 
952
+ /** Service names that can be used for feature-specific base URLs */
953
+ type ServiceName = 'auth' | 'administration' | 'iam' | 'storage' | 'formBuilder' | 'email';
954
+
952
955
  /**
953
956
  * Service interface for CRUD operations.
954
957
  * Matches NestJS shared API controller endpoints:
@@ -990,11 +993,20 @@ interface IApiService<DtoT, InterfaceT> {
990
993
  *
991
994
  * @example
992
995
  * ```typescript
993
- * // Define service
996
+ * // Define service with global apiBaseUrl
994
997
  * @Injectable({ providedIn: 'root' })
995
998
  * export class UserService extends ApiResourceService<UserDto, User> {
996
- * constructor(http: HttpClient) {
997
- * super('users', http);
999
+ * constructor() {
1000
+ * super('auth/users', inject(HttpClient));
1001
+ * }
1002
+ * }
1003
+ *
1004
+ * // Define service with feature-specific baseUrl
1005
+ * @Injectable({ providedIn: 'root' })
1006
+ * export class FormService extends ApiResourceService<FormDto, Form> {
1007
+ * constructor() {
1008
+ * super('form', inject(HttpClient), 'formBuilder');
1009
+ * // URL: services.formBuilder.baseUrl + '/form'
998
1010
  * }
999
1011
  * }
1000
1012
  *
@@ -1068,7 +1080,12 @@ declare abstract class ApiResourceService<DtoT, InterfaceT> implements IApiServi
1068
1080
  * Tracks _resourceInitSignal to re-evaluate when resource is created.
1069
1081
  */
1070
1082
  readonly hasMore: _angular_core.Signal<boolean>;
1071
- constructor(moduleApiName: string, http: HttpClient);
1083
+ /**
1084
+ * @param moduleApiName - The API resource path (e.g., 'form' for /form-builder/form)
1085
+ * @param http - HttpClient instance
1086
+ * @param serviceName - Optional service name for feature-specific base URL (e.g., 'formBuilder')
1087
+ */
1088
+ constructor(moduleApiName: string, http: HttpClient, serviceName?: ServiceName);
1072
1089
  protected getHttpOptions(endpoint: string, params?: HttpParams): {
1073
1090
  params?: HttpParams | undefined;
1074
1091
  headers: HttpHeaders;
@@ -2019,4 +2036,4 @@ interface ScrollPaginationConfig {
2019
2036
  declare function checkScrollPagination(event: Event, config: ScrollPaginationConfig): IPagination | null;
2020
2037
 
2021
2038
  export { ACTION_PERMISSIONS, AUTH_STATE_PROVIDER, AngularModule, ApiResourceService, ApiResourceService as ApiService, BRANCH_PERMISSIONS, BaseFormControl, BaseFormPage, BaseListPage, BaseUserSelectComponent, COMPANY_ACTION_PERMISSIONS, COMPANY_API_PROVIDER, COMPANY_PERMISSIONS, ContactTypeEnum, CookieService, EMAIL_CONFIG_PERMISSIONS, EMAIL_TEMPLATE_PERMISSIONS, EditModeElementChangerDirective, FILE_PERMISSIONS, FILE_TYPE_FILTERS, FOLDER_PERMISSIONS, FORM_PERMISSIONS, FileSelectorDialogComponent, FileUploaderComponent, FileUrlService, HasPermissionDirective, IconComponent, IconTypeEnum, IsEmptyImageDirective, LazyMultiSelectComponent, LazySelectComponent, PERMISSIONS, PROFILE_PERMISSION_PROVIDER, PROFILE_UPLOAD_PROVIDER, PermissionValidatorService, PlatformService, PreventDefaultDirective, PrimeModule, ROLE_ACTION_PERMISSIONS, ROLE_PERMISSIONS, STORAGE_CONFIG_PERMISSIONS, USER_ACTION_PERMISSIONS, USER_LIST_PROVIDER, USER_PERMISSIONS, USER_PERMISSION_PROVIDER, USER_PROVIDER, USER_ROLE_PERMISSIONS, UserMultiSelectComponent, UserSelectComponent, allPermissionsGuard, anyPermissionGuard, checkScrollPagination, evaluateLogicNode, evaluatePermission, formatFileSize, getAcceptString, getFileIconClass, hasAllPermissions, hasAnyPermission, hasPermission, isFileTypeAllowed, permissionGuard, provideValueAccessor };
2022
- export type { ApiResponse, DeleteType, FilesResponseDto, GetFileUrlsFn, IActionNode, IActivatable, IApiService, IAuthStateProvider, IBaseEntity, IBulkMeta, IBulkResponse, ICompanyApiProvider, ICompanyBasicInfo, IDeleteData, IDropDown, IErrorResponse, IFileBasicInfo, IFileData, IFileSelectFilter, IFileUploadOptions, IFilter, IFilterData, IGroupNode, IListResponse, ILoggedUserInfo, ILogicNode, ILoginResponse, ILoginUserData, IMessageResponse, IMetadata, IOrderable, IPagination, IPaginationMeta, IProfileActionInfo, IProfilePermissionProvider, IProfileRoleInfo, IProfileUploadOptions, IProfileUploadProvider, IProfileUploadResult, IRefreshTokenResponse, IRequestMeta, ISingleResponse, ISoftDeletable, ISort, ITimestampable, IUploadedFile, IUserBasicInfo, IUserBranchPayload, IUserBranchPermission, IUserCompanyPayload, IUserListAction, IUserListColumn, IUserListFilter, IUserListItem, IUserListProvider, IUserPermissionProvider, IUserProvider, IUserSelectFilter, IValidationError, LoadFilesFn, LoadUsersFn, PermissionCode, ScrollPaginationConfig, UploadFileFn };
2039
+ export type { ApiResponse, DeleteType, FilesResponseDto, GetFileUrlsFn, IActionNode, IActivatable, IApiService, IAuthStateProvider, IBaseEntity, IBulkMeta, IBulkResponse, ICompanyApiProvider, ICompanyBasicInfo, IDeleteData, IDropDown, IErrorResponse, IFileBasicInfo, IFileData, IFileSelectFilter, IFileUploadOptions, IFilter, IFilterData, IGroupNode, IListResponse, ILoggedUserInfo, ILogicNode, ILoginResponse, ILoginUserData, IMessageResponse, IMetadata, IOrderable, IPagination, IPaginationMeta, IProfileActionInfo, IProfilePermissionProvider, IProfileRoleInfo, IProfileUploadOptions, IProfileUploadProvider, IProfileUploadResult, IRefreshTokenResponse, IRequestMeta, ISingleResponse, ISoftDeletable, ISort, ITimestampable, IUploadedFile, IUserBasicInfo, IUserBranchPayload, IUserBranchPermission, IUserCompanyPayload, IUserListAction, IUserListColumn, IUserListFilter, IUserListItem, IUserListProvider, IUserPermissionProvider, IUserProvider, IUserSelectFilter, IValidationError, LoadFilesFn, LoadUsersFn, PermissionCode, ScrollPaginationConfig, ServiceName, UploadFileFn };