@acorex/platform 21.0.0-next.3 → 21.0.0-next.5
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/auth/index.d.ts +6 -6
- package/common/index.d.ts +10 -5
- package/core/index.d.ts +55 -315
- package/fesm2022/acorex-platform-auth.mjs +18 -22
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +62 -38
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +150 -246
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +3 -3
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +30 -60
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +2 -32
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +12 -6
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +474 -1527
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/entity/index.d.ts +0 -9
- package/layout/widget-core/index.d.ts +0 -3
- package/package.json +9 -9
- package/workflow/index.d.ts +182 -817
package/auth/index.d.ts
CHANGED
|
@@ -143,7 +143,6 @@ interface AXPPermissionDefinitionProvider {
|
|
|
143
143
|
declare const AXP_PERMISSION_DEFINITION_PROVIDER: InjectionToken<AXPPermissionDefinitionProvider[]>;
|
|
144
144
|
declare class AXPPermissionDefinitionService {
|
|
145
145
|
private providers;
|
|
146
|
-
private providerRegistry;
|
|
147
146
|
private sessionService;
|
|
148
147
|
private cache;
|
|
149
148
|
private load;
|
|
@@ -275,11 +274,6 @@ declare class AXPSessionService {
|
|
|
275
274
|
private readonly applicationLoader;
|
|
276
275
|
private readonly permissionChecker;
|
|
277
276
|
private readonly featureChecker;
|
|
278
|
-
/**
|
|
279
|
-
* Get module provider loader lazily to avoid circular dependency.
|
|
280
|
-
* ModuleProviderLoader depends on AXPSessionService, which is this service.
|
|
281
|
-
*/
|
|
282
|
-
private getModuleProviderLoader;
|
|
283
277
|
private status;
|
|
284
278
|
readonly status$: Observable<AXPSessionStatus>;
|
|
285
279
|
private isLoading;
|
|
@@ -320,6 +314,12 @@ declare class AXPSessionService {
|
|
|
320
314
|
private clearSession;
|
|
321
315
|
authorize(...keys: string[]): boolean;
|
|
322
316
|
isFeatureEnabled(...keys: string[]): boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Checks if a module is enabled for the current tenant/application.
|
|
319
|
+
* Module names are stored as features with value: true when enabled.
|
|
320
|
+
* Module names can be provided in PascalCase (e.g., 'SecurityManagement') or kebab-case (e.g., 'security-management').
|
|
321
|
+
*/
|
|
322
|
+
isModuleEnabled(moduleName: string): boolean;
|
|
323
323
|
getToken(): string | undefined;
|
|
324
324
|
getContext(): AXPSessionContext;
|
|
325
325
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPSessionService, never>;
|
package/common/index.d.ts
CHANGED
|
@@ -985,7 +985,6 @@ interface AXPMenuProvider {
|
|
|
985
985
|
declare const AXP_MENU_PROVIDER: InjectionToken<AXPMenuProvider[]>;
|
|
986
986
|
declare class AXPMenuProviderService {
|
|
987
987
|
private providers;
|
|
988
|
-
private providerRegistry;
|
|
989
988
|
private middlewareRegistry;
|
|
990
989
|
private cache;
|
|
991
990
|
private pendingInserts;
|
|
@@ -1405,7 +1404,6 @@ interface AXPSearchDefinitionProvider {
|
|
|
1405
1404
|
declare const AXP_SEARCH_DEFINITION_PROVIDER: InjectionToken<AXPSearchDefinitionProvider[]>;
|
|
1406
1405
|
declare class AXPSearchDefinitionProviderService {
|
|
1407
1406
|
private providers;
|
|
1408
|
-
private providerRegistry;
|
|
1409
1407
|
private cache;
|
|
1410
1408
|
private load;
|
|
1411
1409
|
getListAsync(): Promise<AXPSearchDefinition[]>;
|
|
@@ -1427,7 +1425,6 @@ declare abstract class AXPSearchCommandProvider {
|
|
|
1427
1425
|
declare const AXP_SEARCH_PROVIDER: InjectionToken<AXPSearchProvider[]>;
|
|
1428
1426
|
declare class AXPSearchService {
|
|
1429
1427
|
private providers;
|
|
1430
|
-
private providerRegistry;
|
|
1431
1428
|
private definitionService;
|
|
1432
1429
|
private formatService;
|
|
1433
1430
|
search(text: string): Promise<AXPSearchDisplayGroupResult[]>;
|
|
@@ -1619,7 +1616,6 @@ interface AXPSettingDefinitionProvider {
|
|
|
1619
1616
|
declare const AXP_SETTING_DEFINITION_PROVIDER: InjectionToken<AXPSettingDefinitionProvider[]>;
|
|
1620
1617
|
declare class AXPSettingDefinitionProviderService {
|
|
1621
1618
|
private providers;
|
|
1622
|
-
private providerRegistry;
|
|
1623
1619
|
private cache;
|
|
1624
1620
|
private load;
|
|
1625
1621
|
reload(): Promise<void>;
|
|
@@ -1862,10 +1858,19 @@ declare class AXPStatusDefinitionProviderService {
|
|
|
1862
1858
|
private providers;
|
|
1863
1859
|
private commandService;
|
|
1864
1860
|
private statusMap;
|
|
1861
|
+
private initializationPromise;
|
|
1862
|
+
private isInitialized;
|
|
1865
1863
|
constructor();
|
|
1864
|
+
/**
|
|
1865
|
+
* Initialize providers (resolve promises if needed)
|
|
1866
|
+
* Called lazily on first access
|
|
1867
|
+
*/
|
|
1868
|
+
private initialize;
|
|
1869
|
+
private _doInitialize;
|
|
1866
1870
|
/**
|
|
1867
1871
|
* Get a status provider by key
|
|
1868
|
-
* Direct access from Map
|
|
1872
|
+
* Direct synchronous access from Map. Providers are initialized in the constructor,
|
|
1873
|
+
* including lazy-loaded providers (promises) which are resolved during initialization.
|
|
1869
1874
|
*
|
|
1870
1875
|
* @param key - Status key (e.g., 'task-management.status')
|
|
1871
1876
|
* @returns Status provider with all statuses and transitions, or undefined if not found
|
package/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Type, InjectionToken, OnInit, ElementRef, EventEmitter, OnChanges, Renderer2, SimpleChanges, ViewContainerRef, OnDestroy, Injector, PipeTransform } from '@angular/core';
|
|
2
|
+
import { Type, InjectionToken, OnInit, ElementRef, EventEmitter, OnChanges, Renderer2, SimpleChanges, ViewContainerRef, OnDestroy, Injector, PipeTransform, Provider } from '@angular/core';
|
|
3
3
|
import { AXStyleColorType, AXDataSource, AXDataSourceSortOption, AXDataSourceFilterOption, AXDataSourceQuery, AXDataSourceCallbackResult } from '@acorex/cdk/common';
|
|
4
4
|
import * as _ngrx_signals from '@ngrx/signals';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
@@ -1577,7 +1577,6 @@ interface AXPDataSourceDefinitionProvider {
|
|
|
1577
1577
|
declare const AXP_DATASOURCE_DEFINITION_PROVIDER: InjectionToken<AXPDataSourceDefinitionProvider[]>;
|
|
1578
1578
|
declare class AXPDataSourceDefinitionProviderService implements AXPDataSourceDefinitionProvider {
|
|
1579
1579
|
private providers;
|
|
1580
|
-
private providerRegistry;
|
|
1581
1580
|
items(): Promise<AXPDataSourceDefinition[]>;
|
|
1582
1581
|
get(name: string): Promise<AXPDataSourceDefinition | undefined>;
|
|
1583
1582
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPDataSourceDefinitionProviderService, never>;
|
|
@@ -1897,7 +1896,8 @@ interface AXPModuleFeatureDefinitionWithKey extends AXPModuleFeatureDefinition {
|
|
|
1897
1896
|
}
|
|
1898
1897
|
/**
|
|
1899
1898
|
* Module manifest structure.
|
|
1900
|
-
* Defines module metadata
|
|
1899
|
+
* Defines module metadata and dependencies.
|
|
1900
|
+
* Features are provided via AXP_FEATURE_DEFINITION_PROVIDER token.
|
|
1901
1901
|
*/
|
|
1902
1902
|
interface AXPModuleManifest {
|
|
1903
1903
|
/**
|
|
@@ -1925,70 +1925,11 @@ interface AXPModuleManifest {
|
|
|
1925
1925
|
*/
|
|
1926
1926
|
i18n?: string;
|
|
1927
1927
|
/**
|
|
1928
|
-
*
|
|
1928
|
+
* Module dependencies.
|
|
1929
|
+
* Simple array format: module names (e.g., "MeasurementCore") or feature keys (e.g., "DataManagement.MetaDataDefinitions").
|
|
1930
|
+
* Features use ModuleName.FeatureKey format (dot separator).
|
|
1929
1931
|
*/
|
|
1930
|
-
|
|
1931
|
-
provider: () => Promise<any>;
|
|
1932
|
-
};
|
|
1933
|
-
/**
|
|
1934
|
-
* Menu provider reference (lazy-loaded).
|
|
1935
|
-
*/
|
|
1936
|
-
menus?: {
|
|
1937
|
-
provider: () => Promise<any>;
|
|
1938
|
-
};
|
|
1939
|
-
/**
|
|
1940
|
-
* Entity definition provider reference (lazy-loaded).
|
|
1941
|
-
*/
|
|
1942
|
-
entities?: {
|
|
1943
|
-
provider: () => Promise<any>;
|
|
1944
|
-
};
|
|
1945
|
-
/**
|
|
1946
|
-
* Settings provider reference (lazy-loaded).
|
|
1947
|
-
*/
|
|
1948
|
-
settings?: {
|
|
1949
|
-
provider: () => Promise<any>;
|
|
1950
|
-
};
|
|
1951
|
-
/**
|
|
1952
|
-
* Search provider reference (lazy-loaded).
|
|
1953
|
-
*/
|
|
1954
|
-
search?: {
|
|
1955
|
-
provider: () => Promise<any>;
|
|
1956
|
-
};
|
|
1957
|
-
/**
|
|
1958
|
-
* Feature definition provider reference (lazy-loaded).
|
|
1959
|
-
* Used to provide feature definitions for the module.
|
|
1960
|
-
*/
|
|
1961
|
-
features?: {
|
|
1962
|
-
provider: () => Promise<any>;
|
|
1963
|
-
};
|
|
1964
|
-
/**
|
|
1965
|
-
* Data source provider reference (lazy-loaded).
|
|
1966
|
-
*/
|
|
1967
|
-
datasources?: {
|
|
1968
|
-
provider: () => Promise<any>;
|
|
1969
|
-
};
|
|
1970
|
-
/**
|
|
1971
|
-
* Component slots provider reference (lazy-loaded).
|
|
1972
|
-
* Returns component slot configurations grouped by slot name.
|
|
1973
|
-
* Slots registered via manifest are loaded after application selection.
|
|
1974
|
-
* Module-level registration (AXPComponentSlotModule.forChild) still works for immediate availability.
|
|
1975
|
-
*/
|
|
1976
|
-
componentSlots?: {
|
|
1977
|
-
provider: () => Promise<any>;
|
|
1978
|
-
};
|
|
1979
|
-
/**
|
|
1980
|
-
* Module dependencies
|
|
1981
|
-
*/
|
|
1982
|
-
dependencies?: {
|
|
1983
|
-
/**
|
|
1984
|
-
* Required module names
|
|
1985
|
-
*/
|
|
1986
|
-
modules?: string[];
|
|
1987
|
-
/**
|
|
1988
|
-
* Required feature keys (full format: ModuleName.FeatureKey)
|
|
1989
|
-
*/
|
|
1990
|
-
features?: string[];
|
|
1991
|
-
};
|
|
1932
|
+
dependencies?: string[];
|
|
1992
1933
|
/**
|
|
1993
1934
|
* Whether this module is required (always enabled, cannot be disabled).
|
|
1994
1935
|
* Required modules like 'auth' and 'common' are always available.
|
|
@@ -2060,6 +2001,11 @@ declare class AXPModuleManifestRegistry {
|
|
|
2060
2001
|
* Check if a module manifest is registered.
|
|
2061
2002
|
*/
|
|
2062
2003
|
has(moduleName: string): boolean;
|
|
2004
|
+
/**
|
|
2005
|
+
* Load feature definitions from all registered feature definition providers.
|
|
2006
|
+
* Features are automatically associated with modules based on the module name in the feature key.
|
|
2007
|
+
*/
|
|
2008
|
+
private loadFeatureDefinitions;
|
|
2063
2009
|
/**
|
|
2064
2010
|
* Get all feature definitions from all manifests.
|
|
2065
2011
|
*/
|
|
@@ -2083,12 +2029,13 @@ declare class AXPModuleManifestRegistry {
|
|
|
2083
2029
|
getModuleFeatures(moduleName: string): AXPFeatureDefinition[];
|
|
2084
2030
|
/**
|
|
2085
2031
|
* Register a feature definition dynamically (e.g., from feature definition provider).
|
|
2086
|
-
* Used to add features that are defined at runtime via
|
|
2032
|
+
* Used to add features that are defined at runtime via AXP_FEATURE_DEFINITION_PROVIDER.
|
|
2087
2033
|
*/
|
|
2088
2034
|
registerFeatureDefinition(definition: AXPFeatureDefinition): void;
|
|
2089
2035
|
/**
|
|
2090
2036
|
* Check if module dependencies are satisfied.
|
|
2091
2037
|
* Returns array of missing dependencies.
|
|
2038
|
+
* Dependencies can be module names or feature keys (ModuleName.FeatureKey format).
|
|
2092
2039
|
*/
|
|
2093
2040
|
checkDependencies(moduleName: string): {
|
|
2094
2041
|
missingModules: string[];
|
|
@@ -2116,13 +2063,13 @@ declare class AXPAppStartUpService {
|
|
|
2116
2063
|
declare const AXPAppStartUpProvider: i0.EnvironmentProviders;
|
|
2117
2064
|
|
|
2118
2065
|
/**
|
|
2119
|
-
* Module for managing module manifests
|
|
2120
|
-
* Handles the registration of manifest
|
|
2066
|
+
* Module for managing module manifests initialization.
|
|
2067
|
+
* Handles the registration of manifest startup tasks.
|
|
2121
2068
|
*/
|
|
2122
2069
|
declare class AXPModuleManifestModule {
|
|
2123
2070
|
/**
|
|
2124
2071
|
* @ignore
|
|
2125
|
-
* Initializes module manifest
|
|
2072
|
+
* Initializes module manifest tasks on module construction.
|
|
2126
2073
|
*/
|
|
2127
2074
|
constructor(appInitService: AXPAppStartUpService, injector: Injector);
|
|
2128
2075
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPModuleManifestModule, never>;
|
|
@@ -2163,99 +2110,6 @@ interface AXPFeatureDefinitionProvider {
|
|
|
2163
2110
|
*/
|
|
2164
2111
|
declare const AXP_FEATURE_DEFINITION_PROVIDER: InjectionToken<AXPFeatureDefinitionProvider[]>;
|
|
2165
2112
|
|
|
2166
|
-
/**
|
|
2167
|
-
* Minimal provider interfaces for the module provider registry.
|
|
2168
|
-
* These interfaces are defined in core to avoid circular dependencies.
|
|
2169
|
-
* The actual implementations in platform/auth and platform/common implement these interfaces.
|
|
2170
|
-
*/
|
|
2171
|
-
/**
|
|
2172
|
-
* Permission definition provider interface.
|
|
2173
|
-
* Actual implementation: @acorex/platform/auth
|
|
2174
|
-
*/
|
|
2175
|
-
interface AXPIPermissionDefinitionProvider {
|
|
2176
|
-
define(context: any): Promise<void>;
|
|
2177
|
-
}
|
|
2178
|
-
/**
|
|
2179
|
-
* Menu provider interface.
|
|
2180
|
-
* Actual implementation: @acorex/platform/common
|
|
2181
|
-
*/
|
|
2182
|
-
interface AXPIMenuProvider {
|
|
2183
|
-
provide(context: any): Promise<void>;
|
|
2184
|
-
}
|
|
2185
|
-
/**
|
|
2186
|
-
* Setting definition provider interface.
|
|
2187
|
-
* Actual implementation: @acorex/platform/common
|
|
2188
|
-
*/
|
|
2189
|
-
interface AXPISettingDefinitionProvider {
|
|
2190
|
-
provide(context: any): Promise<void>;
|
|
2191
|
-
}
|
|
2192
|
-
/**
|
|
2193
|
-
* Search command provider interface.
|
|
2194
|
-
* Actual implementation: @acorex/platform/common
|
|
2195
|
-
*/
|
|
2196
|
-
interface AXPISearchCommandProvider {
|
|
2197
|
-
search(text: string): Promise<any[]>;
|
|
2198
|
-
commands?: any[];
|
|
2199
|
-
}
|
|
2200
|
-
/**
|
|
2201
|
-
* Entity definition loader interface.
|
|
2202
|
-
* Actual implementation: @acorex/platform/layout/entity
|
|
2203
|
-
*/
|
|
2204
|
-
interface AXIEntityDefinitionLoader {
|
|
2205
|
-
get(moduleName: string, entityName: string): Promise<any | null>;
|
|
2206
|
-
}
|
|
2207
|
-
/**
|
|
2208
|
-
* Edition service interface for querying edition information.
|
|
2209
|
-
* Actual implementation: @acorex/modules/application-management
|
|
2210
|
-
*
|
|
2211
|
-
* This interface is defined in core to avoid circular dependencies.
|
|
2212
|
-
* Modules provide implementations that extend AXMEntityCrudServiceImpl.
|
|
2213
|
-
*/
|
|
2214
|
-
interface AXPIEditionService {
|
|
2215
|
-
/**
|
|
2216
|
-
* Query editions with pagination and filtering.
|
|
2217
|
-
* @param request Query request with skip, take, and optional filters
|
|
2218
|
-
* @returns Promise that resolves to paged list of editions
|
|
2219
|
-
*/
|
|
2220
|
-
query(request: {
|
|
2221
|
-
skip: number;
|
|
2222
|
-
take: number;
|
|
2223
|
-
[key: string]: any;
|
|
2224
|
-
}): Promise<{
|
|
2225
|
-
items: Array<{
|
|
2226
|
-
id: string;
|
|
2227
|
-
title: string;
|
|
2228
|
-
modulesAndFeatures?: {
|
|
2229
|
-
modules: string[];
|
|
2230
|
-
features: Record<string, any>;
|
|
2231
|
-
};
|
|
2232
|
-
[key: string]: any;
|
|
2233
|
-
}>;
|
|
2234
|
-
total: number;
|
|
2235
|
-
}>;
|
|
2236
|
-
}
|
|
2237
|
-
/**
|
|
2238
|
-
* Injection token for edition service.
|
|
2239
|
-
* Modules should provide their implementation using this token.
|
|
2240
|
-
*/
|
|
2241
|
-
declare const AXP_EDITION_SERVICE: InjectionToken<AXPIEditionService>;
|
|
2242
|
-
/**
|
|
2243
|
-
* Module provider loader interface.
|
|
2244
|
-
* Implementation: @acorex/platform/auth
|
|
2245
|
-
*/
|
|
2246
|
-
interface AXPIModuleProviderLoader {
|
|
2247
|
-
loadRequiredModules(): Promise<void>;
|
|
2248
|
-
loadProviders(context: any): Promise<void>;
|
|
2249
|
-
loadProvidersIfReady(): Promise<void>;
|
|
2250
|
-
loadProvidersForApplication(application: any): Promise<void>;
|
|
2251
|
-
clear(): Promise<void>;
|
|
2252
|
-
isModuleRegistered(moduleName: string): boolean;
|
|
2253
|
-
}
|
|
2254
|
-
/**
|
|
2255
|
-
* Injection token for module provider loader.
|
|
2256
|
-
* Implementation: @acorex/platform/auth
|
|
2257
|
-
*/
|
|
2258
|
-
declare const AXP_MODULE_PROVIDER_LOADER: InjectionToken<AXPIModuleProviderLoader>;
|
|
2259
2113
|
/**
|
|
2260
2114
|
* Session service interface for module provider operations.
|
|
2261
2115
|
* Implementation: @acorex/platform/auth
|
|
@@ -2278,156 +2132,6 @@ declare const AXP_SESSION_SERVICE: InjectionToken<AXPISessionService>;
|
|
|
2278
2132
|
*/
|
|
2279
2133
|
declare const AXP_MODULE_MANIFEST_PROVIDER: InjectionToken<AXPModuleManifest[]>;
|
|
2280
2134
|
|
|
2281
|
-
/**
|
|
2282
|
-
* Registry service for dynamically loaded module providers.
|
|
2283
|
-
* Stores provider instances that are loaded conditionally based on access control.
|
|
2284
|
-
*/
|
|
2285
|
-
declare class AXPModuleProviderRegistry {
|
|
2286
|
-
private readonly permissionProviders;
|
|
2287
|
-
private readonly menuProviders;
|
|
2288
|
-
private readonly entityProviders;
|
|
2289
|
-
private readonly settingProviders;
|
|
2290
|
-
private readonly searchProviders;
|
|
2291
|
-
private readonly featureProviders;
|
|
2292
|
-
private readonly datasourceProviders;
|
|
2293
|
-
/**
|
|
2294
|
-
* Register a permission provider.
|
|
2295
|
-
*/
|
|
2296
|
-
registerPermissionProvider(provider: AXPIPermissionDefinitionProvider): void;
|
|
2297
|
-
/**
|
|
2298
|
-
* Get all registered permission providers.
|
|
2299
|
-
*/
|
|
2300
|
-
getPermissionProviders(): AXPIPermissionDefinitionProvider[];
|
|
2301
|
-
/**
|
|
2302
|
-
* Register a menu provider.
|
|
2303
|
-
*/
|
|
2304
|
-
registerMenuProvider(provider: AXPIMenuProvider): void;
|
|
2305
|
-
/**
|
|
2306
|
-
* Get all registered menu providers.
|
|
2307
|
-
*/
|
|
2308
|
-
getMenuProviders(): AXPIMenuProvider[];
|
|
2309
|
-
/**
|
|
2310
|
-
* Register an entity provider.
|
|
2311
|
-
*/
|
|
2312
|
-
registerEntityProvider(provider: AXIEntityDefinitionLoader): void;
|
|
2313
|
-
/**
|
|
2314
|
-
* Get all registered entity providers.
|
|
2315
|
-
*/
|
|
2316
|
-
getEntityProviders(): AXIEntityDefinitionLoader[];
|
|
2317
|
-
/**
|
|
2318
|
-
* Register a settings provider.
|
|
2319
|
-
*/
|
|
2320
|
-
registerSettingProvider(provider: AXPISettingDefinitionProvider): void;
|
|
2321
|
-
/**
|
|
2322
|
-
* Get all registered settings providers.
|
|
2323
|
-
*/
|
|
2324
|
-
getSettingProviders(): AXPISettingDefinitionProvider[];
|
|
2325
|
-
/**
|
|
2326
|
-
* Register a search provider.
|
|
2327
|
-
*/
|
|
2328
|
-
registerSearchProvider(provider: AXPISearchCommandProvider): void;
|
|
2329
|
-
/**
|
|
2330
|
-
* Get all registered search providers.
|
|
2331
|
-
*/
|
|
2332
|
-
getSearchProviders(): AXPISearchCommandProvider[];
|
|
2333
|
-
/**
|
|
2334
|
-
* Register a feature provider.
|
|
2335
|
-
*/
|
|
2336
|
-
registerFeatureProvider(provider: AXPFeatureDefinitionProvider): void;
|
|
2337
|
-
/**
|
|
2338
|
-
* Get all registered feature providers.
|
|
2339
|
-
*/
|
|
2340
|
-
getFeatureProviders(): AXPFeatureDefinitionProvider[];
|
|
2341
|
-
/**
|
|
2342
|
-
* Register a datasource provider.
|
|
2343
|
-
*/
|
|
2344
|
-
registerDatasourceProvider(provider: AXPDataSourceDefinitionProvider): void;
|
|
2345
|
-
/**
|
|
2346
|
-
* Get all registered datasource providers.
|
|
2347
|
-
*/
|
|
2348
|
-
getDatasourceProviders(): AXPDataSourceDefinitionProvider[];
|
|
2349
|
-
/**
|
|
2350
|
-
* Clear all registered providers.
|
|
2351
|
-
* Useful for testing or re-initialization.
|
|
2352
|
-
*/
|
|
2353
|
-
clear(): void;
|
|
2354
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPModuleProviderRegistry, never>;
|
|
2355
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPModuleProviderRegistry>;
|
|
2356
|
-
}
|
|
2357
|
-
|
|
2358
|
-
/**
|
|
2359
|
-
* Access control context for module loading.
|
|
2360
|
-
* Note: Types are defined locally to avoid circular dependency with @acorex/platform/auth
|
|
2361
|
-
* These types match the structure of AXPTenant, AXPApplication, and AXPUser
|
|
2362
|
-
*/
|
|
2363
|
-
interface AXPModuleAccessContext {
|
|
2364
|
-
tenant: {
|
|
2365
|
-
id: string;
|
|
2366
|
-
name: string;
|
|
2367
|
-
title: string;
|
|
2368
|
-
description?: string;
|
|
2369
|
-
logo?: any;
|
|
2370
|
-
[key: string]: any;
|
|
2371
|
-
};
|
|
2372
|
-
application: {
|
|
2373
|
-
id: string;
|
|
2374
|
-
name: string;
|
|
2375
|
-
title?: string;
|
|
2376
|
-
version?: string;
|
|
2377
|
-
edition?: {
|
|
2378
|
-
id: string;
|
|
2379
|
-
title: string;
|
|
2380
|
-
description?: string;
|
|
2381
|
-
};
|
|
2382
|
-
description?: string;
|
|
2383
|
-
logo?: any;
|
|
2384
|
-
[key: string]: any;
|
|
2385
|
-
};
|
|
2386
|
-
edition: {
|
|
2387
|
-
id: string;
|
|
2388
|
-
title: string;
|
|
2389
|
-
modulesAndFeatures?: {
|
|
2390
|
-
modules: string[];
|
|
2391
|
-
features: Record<string, any>;
|
|
2392
|
-
};
|
|
2393
|
-
};
|
|
2394
|
-
subscription?: any;
|
|
2395
|
-
user: {
|
|
2396
|
-
id: string;
|
|
2397
|
-
name: string;
|
|
2398
|
-
title: string;
|
|
2399
|
-
avatar?: string;
|
|
2400
|
-
[key: string]: any;
|
|
2401
|
-
};
|
|
2402
|
-
}
|
|
2403
|
-
/**
|
|
2404
|
-
* Service for checking module access control.
|
|
2405
|
-
* Provides centralized access control logic that can be overridden per module.
|
|
2406
|
-
*/
|
|
2407
|
-
interface AXPModuleAccessControlService {
|
|
2408
|
-
/**
|
|
2409
|
-
* Check if user has access to a module based on context.
|
|
2410
|
-
* @param moduleName Module name to check access for
|
|
2411
|
-
* @param context Access control context
|
|
2412
|
-
* @returns true if module should be loaded, false otherwise
|
|
2413
|
-
*/
|
|
2414
|
-
checkAccess(manifest: AXPModuleManifest, context: AXPModuleAccessContext): boolean | Promise<boolean>;
|
|
2415
|
-
}
|
|
2416
|
-
/**
|
|
2417
|
-
* Default implementation of module access control service.
|
|
2418
|
-
* Checks if module is enabled in edition.modulesAndFeatures.modules.
|
|
2419
|
-
*/
|
|
2420
|
-
declare class DefaultModuleAccessControlService implements AXPModuleAccessControlService {
|
|
2421
|
-
checkAccess(manifest: AXPModuleManifest, context: AXPModuleAccessContext): boolean;
|
|
2422
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultModuleAccessControlService, never>;
|
|
2423
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DefaultModuleAccessControlService>;
|
|
2424
|
-
}
|
|
2425
|
-
/**
|
|
2426
|
-
* Injection token for module access control service.
|
|
2427
|
-
* If not provided, DefaultModuleAccessControlService will be used as fallback.
|
|
2428
|
-
*/
|
|
2429
|
-
declare const AXP_MODULE_ACCESS_CONTROL_SERVICE: InjectionToken<AXPModuleAccessControlService>;
|
|
2430
|
-
|
|
2431
2135
|
/**
|
|
2432
2136
|
* Represents a tag with text, color, and metadata
|
|
2433
2137
|
*/
|
|
@@ -2692,11 +2396,47 @@ declare function getEnumValues(enumType: any): {
|
|
|
2692
2396
|
title: string;
|
|
2693
2397
|
}[];
|
|
2694
2398
|
|
|
2399
|
+
/**
|
|
2400
|
+
* Creates a provider instance within an injection context.
|
|
2401
|
+
* Handles dynamic import, injector resolution, and provider instantiation.
|
|
2402
|
+
*
|
|
2403
|
+
* @param loader - Function that returns a promise resolving to the provider class
|
|
2404
|
+
* @returns Promise that resolves to the provider instance
|
|
2405
|
+
*
|
|
2406
|
+
* @example
|
|
2407
|
+
* ```typescript
|
|
2408
|
+
* useFactory: () => createProviderWithInjectionContext(() =>
|
|
2409
|
+
* import('./settings.provider').then(m => m.AXMSettingProvider)
|
|
2410
|
+
* )
|
|
2411
|
+
* ```
|
|
2412
|
+
*/
|
|
2413
|
+
declare function createProviderWithInjectionContext<T>(loader: () => Promise<new () => T>): Promise<T>;
|
|
2414
|
+
/**
|
|
2415
|
+
* Creates a provider configuration for lazy-loaded providers with injection context.
|
|
2416
|
+
* Simplifies provider registration in NgModule providers array.
|
|
2417
|
+
*
|
|
2418
|
+
* @param token - The injection token to provide
|
|
2419
|
+
* @param loader - Function that returns a promise resolving to the provider class
|
|
2420
|
+
* @param multi - Whether the provider is multi-provider (defaults to true)
|
|
2421
|
+
* @returns Provider configuration object
|
|
2422
|
+
*
|
|
2423
|
+
* @example
|
|
2424
|
+
* ```typescript
|
|
2425
|
+
* providers: [
|
|
2426
|
+
* provideLazyProvider(
|
|
2427
|
+
* AXP_SETTING_DEFINITION_PROVIDER,
|
|
2428
|
+
* () => import('./settings.provider').then(m => m.AXMSettingProvider)
|
|
2429
|
+
* )
|
|
2430
|
+
* ]
|
|
2431
|
+
* ```
|
|
2432
|
+
*/
|
|
2433
|
+
declare function provideLazyProvider<TProvider>(token: InjectionToken<any>, loader: () => Promise<new () => TProvider>, multi?: boolean): Provider;
|
|
2434
|
+
|
|
2695
2435
|
declare function extractTextFromHtml(value: string): string;
|
|
2696
2436
|
/**
|
|
2697
2437
|
* Generate kebab-case group name from title
|
|
2698
2438
|
*/
|
|
2699
2439
|
declare function generateKebabCase(title: string): string;
|
|
2700
2440
|
|
|
2701
|
-
export { AXFullscreenDirective, AXHighlightService, AXPActivityLogProvider, AXPActivityLogService, AXPAppStartUpProvider, AXPAppStartUpService, AXPBroadcastEventService, AXPColorPaletteProvider, AXPColorPaletteService, AXPComponentLogoConfig, AXPContentCheckerDirective, AXPContextChangeEvent, AXPContextStore, AXPCountdownPipe, AXPDataGenerator, AXPDataSourceDefinitionProviderService, AXPDblClickDirective, AXPDefaultColorPalettesProvider, AXPDeviceService, AXPDeviceType, AXPDistributedEventListenerService, AXPElementDataDirective, AXPExportTemplateToken, AXPExpressionEvaluatorScopeProviderContext, AXPExpressionEvaluatorScopeProviderService, AXPExpressionEvaluatorService, AXPFeatureDefinitionProviderContext, AXPGridLayoutDirective, AXPHookService, AXPIconLogoConfig, AXPImageUrlLogoConfig, AXPModuleManifestModule, AXPModuleManifestRegistry,
|
|
2702
|
-
export type {
|
|
2441
|
+
export { AXFullscreenDirective, AXHighlightService, AXPActivityLogProvider, AXPActivityLogService, AXPAppStartUpProvider, AXPAppStartUpService, AXPBroadcastEventService, AXPColorPaletteProvider, AXPColorPaletteService, AXPComponentLogoConfig, AXPContentCheckerDirective, AXPContextChangeEvent, AXPContextStore, AXPCountdownPipe, AXPDataGenerator, AXPDataSourceDefinitionProviderService, AXPDblClickDirective, AXPDefaultColorPalettesProvider, AXPDeviceService, AXPDeviceType, AXPDistributedEventListenerService, AXPElementDataDirective, AXPExportTemplateToken, AXPExpressionEvaluatorScopeProviderContext, AXPExpressionEvaluatorScopeProviderService, AXPExpressionEvaluatorService, AXPFeatureDefinitionProviderContext, AXPGridLayoutDirective, AXPHookService, AXPIconLogoConfig, AXPImageUrlLogoConfig, AXPModuleManifestModule, AXPModuleManifestRegistry, AXPPlatformScope, AXPScreenSize, AXPSystemActionType, AXPSystemActions, AXPTagProvider, AXPTagService, AXP_ACTIVITY_LOG_PROVIDER, AXP_COLOR_PALETTE_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_MODULE_MANIFEST_PROVIDER, AXP_SESSION_SERVICE, AXP_TAG_PROVIDER, applyFilterArray, applyPagination, applyQueryArray, applySortArray, applySystemActionDefault, cleanDeep, createProviderWithInjectionContext, extractNestedFieldsWildcard, extractTextFromHtml, extractValue, generateKebabCase, getActionButton, getChangedPaths, getDetailedChanges, getEnumValues, getNestedKeys, getSmart, getSystemActions, objectKeyValueTransforms, provideLazyProvider, resolveActionLook, resolvePlatformScopeKey, resolvePlatformScopeName, setSmart };
|
|
2442
|
+
export type { AXPActionMenuItem, AXPActivityLog, AXPActivityLogChange, AXPApplicationUserReference, AXPBackButton, AXPBadge, AXPBreadcrumbItem, AXPCategorizedEntity, AXPCategorizedEntityDto, AXPCategoryEntity, AXPCategoryEntityWithItems, AXPColorPalette, AXPColorPaletteFilterOptions, AXPColumnQuery, AXPCommandMessage, AXPContent, AXPContentDirection, AXPContentType, AXPContextData, AXPContextState, AXPDataSource, AXPDataSourceDataFieldDefinition, AXPDataSourceDefinition, AXPDataSourceDefinitionProvider, AXPDataType, AXPDistributedEventListenerProvider, AXPDistributedEventListenerProviderToken, AXPEntityReference, AXPEqualValidationRule, AXPExecuteCommand, AXPExecuteCommandResult, AXPExportCsvOptions, AXPExportExcelOptions, AXPExportOptions, AXPExportPdfOptions, AXPExportPrintOptions, AXPExpression, AXPExpressionEvaluatorScope, AXPExpressionEvaluatorScopeProvider, AXPExpressionEvaluatorScopeProviders, AXPFeatureDefinition, AXPFeatureDefinitionProvider, AXPFeatureName, AXPFileListItem, AXPFileSource, AXPFileStatus, AXPFilterClause, AXPFilterDefinition, AXPFilterQuery, AXPFlowDirection, AXPGridLayoutOptions, AXPGridPlacement, AXPISessionService, AXPLogoConfig, AXPMaxLengthValidationRule, AXPMetaData, AXPMiddlewareErrorResponse, AXPMinLengthValidationRule, AXPModuleFeatureDefinition, AXPModuleFeatureDefinitionWithKey, AXPModuleManifest, AXPNavigateActionCommand, AXPNavigateActionOptions, AXPOptionsData, AXPPagedListResult, AXPPartialNested, AXPPlatformScopeKey, AXPQueryFetchResult, AXPQueryRequest, AXPReqexValidationRule, AXPRequiredValidationRule, AXPSortDefinition, AXPSortQuery, AXPStartUpTask, AXPStringValidationRules, AXPSystemAction, AXPTag, AXPTagFilterOptions, AXPUserReference, AXPValidationRule, AXPValidationRules, AXPValueTransformerFunction, AXPValueTransformerFunctions, AXPValueUnit, AXPValueUnits, AXPViewBlockDefinition, AXPViewDefinition, AXPViewFieldDefinition, AXPViewQuery, AXPWidgetTrigger, AXPWidgetTriggers };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, Injector, Injectable, signal, inject, Input, Directive, provideAppInitializer, Optional, Inject, NgModule } from '@angular/core';
|
|
3
|
-
import { AXPBroadcastEventService,
|
|
3
|
+
import { AXPBroadcastEventService, AXP_SESSION_SERVICE } from '@acorex/platform/core';
|
|
4
4
|
import { isEmpty } from 'lodash-es';
|
|
5
5
|
import { map, BehaviorSubject, shareReplay, defaultIfEmpty, switchMap, filter, from, first } from 'rxjs';
|
|
6
6
|
|
|
@@ -274,13 +274,6 @@ class AXPSessionService {
|
|
|
274
274
|
this.isAuthorized$ = this.status$.pipe(map((status) => status === AXPSessionStatus.Authorized), shareReplay(1));
|
|
275
275
|
}
|
|
276
276
|
static { this.SESSION_KEY = 'AXP_SESSION'; }
|
|
277
|
-
/**
|
|
278
|
-
* Get module provider loader lazily to avoid circular dependency.
|
|
279
|
-
* ModuleProviderLoader depends on AXPSessionService, which is this service.
|
|
280
|
-
*/
|
|
281
|
-
getModuleProviderLoader() {
|
|
282
|
-
return this.injector.get(AXP_MODULE_PROVIDER_LOADER);
|
|
283
|
-
}
|
|
284
277
|
get user() {
|
|
285
278
|
const session = this.getSessionData();
|
|
286
279
|
if (session?.user && !this.currentUserSubject.value) {
|
|
@@ -329,10 +322,6 @@ class AXPSessionService {
|
|
|
329
322
|
this.currentApplicationSubject.next(sessionData.application);
|
|
330
323
|
}
|
|
331
324
|
this.status.next(AXPSessionStatus.Authenticated);
|
|
332
|
-
// Load required modules first to ensure entities are available for loaders
|
|
333
|
-
// This is critical because loaders (like application.loader) need entities
|
|
334
|
-
// from required modules (ApplicationManagement, TenantManagement, SecurityManagement)
|
|
335
|
-
await this.getModuleProviderLoader().loadRequiredModules();
|
|
336
325
|
await this.loadPermissions();
|
|
337
326
|
await this.loadFeatures();
|
|
338
327
|
await this.signInComplete();
|
|
@@ -450,9 +439,6 @@ class AXPSessionService {
|
|
|
450
439
|
}
|
|
451
440
|
//
|
|
452
441
|
const userId = this.user?.id;
|
|
453
|
-
// Clear module provider loader cache before clearing session
|
|
454
|
-
// This ensures modules and providers from previous user are not cached
|
|
455
|
-
await this.getModuleProviderLoader().clear();
|
|
456
442
|
this.clearSession();
|
|
457
443
|
this.eventService.publish(AXPSessionStatus.SignedOut, { id: userId });
|
|
458
444
|
this.isLoading.next(false);
|
|
@@ -620,6 +606,22 @@ class AXPSessionService {
|
|
|
620
606
|
}
|
|
621
607
|
return baseResult;
|
|
622
608
|
}
|
|
609
|
+
/**
|
|
610
|
+
* Checks if a module is enabled for the current tenant/application.
|
|
611
|
+
* Module names are stored as features with value: true when enabled.
|
|
612
|
+
* Module names can be provided in PascalCase (e.g., 'SecurityManagement') or kebab-case (e.g., 'security-management').
|
|
613
|
+
*/
|
|
614
|
+
isModuleEnabled(moduleName) {
|
|
615
|
+
if (!moduleName) {
|
|
616
|
+
return false;
|
|
617
|
+
}
|
|
618
|
+
// Normalize module name: convert kebab-case to PascalCase if needed
|
|
619
|
+
const normalizedModuleName = moduleName.includes('-')
|
|
620
|
+
? moduleName.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('')
|
|
621
|
+
: moduleName;
|
|
622
|
+
// Module names are stored as features with value: true when enabled
|
|
623
|
+
return this.features.some(f => f.name === normalizedModuleName && f.value === true);
|
|
624
|
+
}
|
|
623
625
|
getToken() {
|
|
624
626
|
const sessionData = this.getSessionData();
|
|
625
627
|
return sessionData?.accessToken;
|
|
@@ -803,7 +805,6 @@ const AXP_PERMISSION_DEFINITION_PROVIDER = new InjectionToken('AXP_PERMISSION_DE
|
|
|
803
805
|
class AXPPermissionDefinitionService {
|
|
804
806
|
constructor() {
|
|
805
807
|
this.providers = inject(AXP_PERMISSION_DEFINITION_PROVIDER, { optional: true });
|
|
806
|
-
this.providerRegistry = inject(AXPModuleProviderRegistry);
|
|
807
808
|
this.sessionService = inject(AXPSessionService);
|
|
808
809
|
this.cache = null;
|
|
809
810
|
}
|
|
@@ -812,7 +813,7 @@ class AXPPermissionDefinitionService {
|
|
|
812
813
|
return;
|
|
813
814
|
}
|
|
814
815
|
const context = new AXPPermissionDefinitionProviderContext();
|
|
815
|
-
// Load providers from DI tokens
|
|
816
|
+
// Load providers from DI tokens
|
|
816
817
|
if (Array.isArray(this.providers)) {
|
|
817
818
|
for (const provider of this.providers) {
|
|
818
819
|
if (provider instanceof Promise) {
|
|
@@ -826,11 +827,6 @@ class AXPPermissionDefinitionService {
|
|
|
826
827
|
}
|
|
827
828
|
}
|
|
828
829
|
}
|
|
829
|
-
// Load providers from registry (manifest-based, conditionally loaded)
|
|
830
|
-
const registryProviders = this.providerRegistry.getPermissionProviders();
|
|
831
|
-
for (const provider of registryProviders) {
|
|
832
|
-
await provider.define(context);
|
|
833
|
-
}
|
|
834
830
|
// Filter permissions based on required features
|
|
835
831
|
const allGroups = context.getGroupDefinitions();
|
|
836
832
|
this.cache = this.filterByFeatures(allGroups);
|