@acorex/platform 21.0.0-next.3 → 21.0.0-next.7
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-builder.mjs +11 -2
- package/fesm2022/acorex-platform-layout-builder.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 +67 -83
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +110 -33
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +19 -11
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs → acorex-platform-themes-default-entity-master-list-view.component-DfJEx_bs.mjs} +2 -2
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DfJEx_bs.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +2 -2
- package/fesm2022/acorex-platform-workflow.mjs +1268 -1699
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/index.d.ts +6 -0
- package/layout/entity/index.d.ts +2 -9
- package/layout/widget-core/index.d.ts +42 -4
- package/package.json +5 -5
- package/workflow/index.d.ts +650 -1074
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs.map +0 -1
|
@@ -822,152 +822,20 @@ function objectKeyValueTransforms(keyName) {
|
|
|
822
822
|
};
|
|
823
823
|
}
|
|
824
824
|
|
|
825
|
-
//#region ---- Imports ----
|
|
826
|
-
//#endregion
|
|
827
|
-
//#region ---- Provider Registry Service ----
|
|
828
|
-
/**
|
|
829
|
-
* Registry service for dynamically loaded module providers.
|
|
830
|
-
* Stores provider instances that are loaded conditionally based on access control.
|
|
831
|
-
*/
|
|
832
|
-
class AXPModuleProviderRegistry {
|
|
833
|
-
constructor() {
|
|
834
|
-
//#region ---- Fields ----
|
|
835
|
-
this.permissionProviders = [];
|
|
836
|
-
this.menuProviders = [];
|
|
837
|
-
this.entityProviders = [];
|
|
838
|
-
this.settingProviders = [];
|
|
839
|
-
this.searchProviders = [];
|
|
840
|
-
this.featureProviders = [];
|
|
841
|
-
this.datasourceProviders = [];
|
|
842
|
-
}
|
|
843
|
-
//#endregion
|
|
844
|
-
//#region ---- Public Methods ----
|
|
845
|
-
/**
|
|
846
|
-
* Register a permission provider.
|
|
847
|
-
*/
|
|
848
|
-
registerPermissionProvider(provider) {
|
|
849
|
-
this.permissionProviders.push(provider);
|
|
850
|
-
}
|
|
851
|
-
/**
|
|
852
|
-
* Get all registered permission providers.
|
|
853
|
-
*/
|
|
854
|
-
getPermissionProviders() {
|
|
855
|
-
return [...this.permissionProviders];
|
|
856
|
-
}
|
|
857
|
-
/**
|
|
858
|
-
* Register a menu provider.
|
|
859
|
-
*/
|
|
860
|
-
registerMenuProvider(provider) {
|
|
861
|
-
this.menuProviders.push(provider);
|
|
862
|
-
}
|
|
863
|
-
/**
|
|
864
|
-
* Get all registered menu providers.
|
|
865
|
-
*/
|
|
866
|
-
getMenuProviders() {
|
|
867
|
-
return [...this.menuProviders];
|
|
868
|
-
}
|
|
869
|
-
/**
|
|
870
|
-
* Register an entity provider.
|
|
871
|
-
*/
|
|
872
|
-
registerEntityProvider(provider) {
|
|
873
|
-
this.entityProviders.push(provider);
|
|
874
|
-
}
|
|
875
|
-
/**
|
|
876
|
-
* Get all registered entity providers.
|
|
877
|
-
*/
|
|
878
|
-
getEntityProviders() {
|
|
879
|
-
return [...this.entityProviders];
|
|
880
|
-
}
|
|
881
|
-
/**
|
|
882
|
-
* Register a settings provider.
|
|
883
|
-
*/
|
|
884
|
-
registerSettingProvider(provider) {
|
|
885
|
-
this.settingProviders.push(provider);
|
|
886
|
-
}
|
|
887
|
-
/**
|
|
888
|
-
* Get all registered settings providers.
|
|
889
|
-
*/
|
|
890
|
-
getSettingProviders() {
|
|
891
|
-
return [...this.settingProviders];
|
|
892
|
-
}
|
|
893
|
-
/**
|
|
894
|
-
* Register a search provider.
|
|
895
|
-
*/
|
|
896
|
-
registerSearchProvider(provider) {
|
|
897
|
-
this.searchProviders.push(provider);
|
|
898
|
-
}
|
|
899
|
-
/**
|
|
900
|
-
* Get all registered search providers.
|
|
901
|
-
*/
|
|
902
|
-
getSearchProviders() {
|
|
903
|
-
return [...this.searchProviders];
|
|
904
|
-
}
|
|
905
|
-
/**
|
|
906
|
-
* Register a feature provider.
|
|
907
|
-
*/
|
|
908
|
-
registerFeatureProvider(provider) {
|
|
909
|
-
this.featureProviders.push(provider);
|
|
910
|
-
}
|
|
911
|
-
/**
|
|
912
|
-
* Get all registered feature providers.
|
|
913
|
-
*/
|
|
914
|
-
getFeatureProviders() {
|
|
915
|
-
return [...this.featureProviders];
|
|
916
|
-
}
|
|
917
|
-
/**
|
|
918
|
-
* Register a datasource provider.
|
|
919
|
-
*/
|
|
920
|
-
registerDatasourceProvider(provider) {
|
|
921
|
-
this.datasourceProviders.push(provider);
|
|
922
|
-
}
|
|
923
|
-
/**
|
|
924
|
-
* Get all registered datasource providers.
|
|
925
|
-
*/
|
|
926
|
-
getDatasourceProviders() {
|
|
927
|
-
return [...this.datasourceProviders];
|
|
928
|
-
}
|
|
929
|
-
/**
|
|
930
|
-
* Clear all registered providers.
|
|
931
|
-
* Useful for testing or re-initialization.
|
|
932
|
-
*/
|
|
933
|
-
clear() {
|
|
934
|
-
this.permissionProviders.length = 0;
|
|
935
|
-
this.menuProviders.length = 0;
|
|
936
|
-
this.entityProviders.length = 0;
|
|
937
|
-
this.settingProviders.length = 0;
|
|
938
|
-
this.searchProviders.length = 0;
|
|
939
|
-
this.featureProviders.length = 0;
|
|
940
|
-
this.datasourceProviders.length = 0;
|
|
941
|
-
}
|
|
942
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPModuleProviderRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
943
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPModuleProviderRegistry, providedIn: 'root' }); }
|
|
944
|
-
}
|
|
945
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPModuleProviderRegistry, decorators: [{
|
|
946
|
-
type: Injectable,
|
|
947
|
-
args: [{ providedIn: 'root' }]
|
|
948
|
-
}] });
|
|
949
|
-
|
|
950
825
|
const AXP_DATASOURCE_DEFINITION_PROVIDER = new InjectionToken('AXP_DATASOURCE_TYPE_PROVIDER');
|
|
951
826
|
class AXPDataSourceDefinitionProviderService {
|
|
952
827
|
constructor() {
|
|
953
828
|
this.providers = inject(AXP_DATASOURCE_DEFINITION_PROVIDER, { optional: true });
|
|
954
|
-
this.providerRegistry = inject(AXPModuleProviderRegistry);
|
|
955
829
|
}
|
|
956
830
|
async items() {
|
|
957
831
|
const items = [];
|
|
958
|
-
// Load from DI tokens
|
|
832
|
+
// Load from DI tokens
|
|
959
833
|
if (Array.isArray(this.providers)) {
|
|
960
834
|
for (const provider of this.providers) {
|
|
961
835
|
set(provider, '__parent__', this);
|
|
962
836
|
items.push(...(await provider.items()));
|
|
963
837
|
}
|
|
964
838
|
}
|
|
965
|
-
// Load from registry (manifest-based, conditionally loaded)
|
|
966
|
-
const registryProviders = this.providerRegistry.getDatasourceProviders();
|
|
967
|
-
for (const provider of registryProviders) {
|
|
968
|
-
set(provider, '__parent__', this);
|
|
969
|
-
items.push(...(await provider.items()));
|
|
970
|
-
}
|
|
971
839
|
return items;
|
|
972
840
|
}
|
|
973
841
|
async get(name) {
|
|
@@ -1818,21 +1686,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1818
1686
|
//#endregion
|
|
1819
1687
|
|
|
1820
1688
|
//#region ---- Provider Interfaces ----
|
|
1821
|
-
/**
|
|
1822
|
-
* Injection token for edition service.
|
|
1823
|
-
* Modules should provide their implementation using this token.
|
|
1824
|
-
*/
|
|
1825
|
-
const AXP_EDITION_SERVICE = new InjectionToken('AXP_EDITION_SERVICE', {
|
|
1826
|
-
providedIn: 'root',
|
|
1827
|
-
factory: () => {
|
|
1828
|
-
return null;
|
|
1829
|
-
},
|
|
1830
|
-
});
|
|
1831
|
-
/**
|
|
1832
|
-
* Injection token for module provider loader.
|
|
1833
|
-
* Implementation: @acorex/platform/auth
|
|
1834
|
-
*/
|
|
1835
|
-
const AXP_MODULE_PROVIDER_LOADER = new InjectionToken('AXP_MODULE_PROVIDER_LOADER');
|
|
1836
1689
|
/**
|
|
1837
1690
|
* Injection token for session service.
|
|
1838
1691
|
* Implementation: @acorex/platform/auth
|
|
@@ -1845,6 +1698,41 @@ const AXP_SESSION_SERVICE = new InjectionToken('AXP_SESSION_SERVICE');
|
|
|
1845
1698
|
const AXP_MODULE_MANIFEST_PROVIDER = new InjectionToken('AXP_MODULE_MANIFEST_PROVIDER');
|
|
1846
1699
|
//#endregion
|
|
1847
1700
|
|
|
1701
|
+
//#region ---- Imports ----
|
|
1702
|
+
//#endregion
|
|
1703
|
+
//#region ---- Feature Definition Provider Interface ----
|
|
1704
|
+
/**
|
|
1705
|
+
* Context for feature definition providers.
|
|
1706
|
+
* Allows providers to add additional feature definitions dynamically.
|
|
1707
|
+
*/
|
|
1708
|
+
class AXPFeatureDefinitionProviderContext {
|
|
1709
|
+
constructor() {
|
|
1710
|
+
this.features = new Map();
|
|
1711
|
+
}
|
|
1712
|
+
/**
|
|
1713
|
+
* Add a feature definition.
|
|
1714
|
+
* @param key Full feature key (ModuleName:FeatureKey format with colon separator)
|
|
1715
|
+
* @param definition Feature definition
|
|
1716
|
+
*/
|
|
1717
|
+
addFeature(key, definition) {
|
|
1718
|
+
this.features.set(key, definition);
|
|
1719
|
+
}
|
|
1720
|
+
/**
|
|
1721
|
+
* Get all feature definitions.
|
|
1722
|
+
*/
|
|
1723
|
+
getFeatures() {
|
|
1724
|
+
return this.features;
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
/**
|
|
1728
|
+
* Injection token for feature definition providers.
|
|
1729
|
+
*/
|
|
1730
|
+
const AXP_FEATURE_DEFINITION_PROVIDER = new InjectionToken('AXP_FEATURE_DEFINITION_PROVIDER', {
|
|
1731
|
+
providedIn: 'root',
|
|
1732
|
+
factory: () => [],
|
|
1733
|
+
});
|
|
1734
|
+
//#endregion
|
|
1735
|
+
|
|
1848
1736
|
//#region ---- Imports ----
|
|
1849
1737
|
//#endregion
|
|
1850
1738
|
//#region ---- Registry Service ----
|
|
@@ -1910,6 +1798,8 @@ class AXPModuleManifestRegistry {
|
|
|
1910
1798
|
}
|
|
1911
1799
|
});
|
|
1912
1800
|
await Promise.all(registerPromises);
|
|
1801
|
+
// Load and register features from all feature definition providers
|
|
1802
|
+
await this.loadFeatureDefinitions();
|
|
1913
1803
|
this.isInitialized = true;
|
|
1914
1804
|
}
|
|
1915
1805
|
//#endregion
|
|
@@ -1946,6 +1836,53 @@ class AXPModuleManifestRegistry {
|
|
|
1946
1836
|
has(moduleName) {
|
|
1947
1837
|
return this.manifests.has(moduleName);
|
|
1948
1838
|
}
|
|
1839
|
+
/**
|
|
1840
|
+
* Load feature definitions from all registered feature definition providers.
|
|
1841
|
+
* Features are automatically associated with modules based on the module name in the feature key.
|
|
1842
|
+
*/
|
|
1843
|
+
async loadFeatureDefinitions() {
|
|
1844
|
+
try {
|
|
1845
|
+
const featureProviders = this.injector.get(AXP_FEATURE_DEFINITION_PROVIDER, []);
|
|
1846
|
+
if (!featureProviders || featureProviders.length === 0) {
|
|
1847
|
+
return;
|
|
1848
|
+
}
|
|
1849
|
+
const context = new AXPFeatureDefinitionProviderContext();
|
|
1850
|
+
// Call all providers to collect features
|
|
1851
|
+
for (const provider of featureProviders) {
|
|
1852
|
+
if (provider instanceof Promise) {
|
|
1853
|
+
// If provider is a promise, resolve it
|
|
1854
|
+
const resolvedProvider = await provider;
|
|
1855
|
+
await resolvedProvider.provide(context);
|
|
1856
|
+
}
|
|
1857
|
+
else {
|
|
1858
|
+
// If provider is a direct instance, use it directly
|
|
1859
|
+
await provider.provide(context);
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
// Register all features and associate them with their modules
|
|
1863
|
+
const features = context.getFeatures();
|
|
1864
|
+
for (const [key, definition] of features.entries()) {
|
|
1865
|
+
// Extract module name from key (format: ModuleName:FeatureKey)
|
|
1866
|
+
const [moduleName, ...keyParts] = key.split(':');
|
|
1867
|
+
const shortKey = keyParts.join(':');
|
|
1868
|
+
// Verify that the module exists
|
|
1869
|
+
if (!this.has(moduleName)) {
|
|
1870
|
+
console.warn(`Feature '${key}' references unknown module '${moduleName}'. Skipping.`);
|
|
1871
|
+
continue;
|
|
1872
|
+
}
|
|
1873
|
+
// Register feature definition
|
|
1874
|
+
this.registerFeatureDefinition({
|
|
1875
|
+
...definition,
|
|
1876
|
+
name: key,
|
|
1877
|
+
module: moduleName,
|
|
1878
|
+
key: shortKey,
|
|
1879
|
+
});
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
catch (error) {
|
|
1883
|
+
console.error('Failed to load feature definitions:', error);
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1949
1886
|
//#endregion
|
|
1950
1887
|
//#region ---- Feature Definition Management ----
|
|
1951
1888
|
/**
|
|
@@ -1982,7 +1919,7 @@ class AXPModuleManifestRegistry {
|
|
|
1982
1919
|
}
|
|
1983
1920
|
/**
|
|
1984
1921
|
* Register a feature definition dynamically (e.g., from feature definition provider).
|
|
1985
|
-
* Used to add features that are defined at runtime via
|
|
1922
|
+
* Used to add features that are defined at runtime via AXP_FEATURE_DEFINITION_PROVIDER.
|
|
1986
1923
|
*/
|
|
1987
1924
|
registerFeatureDefinition(definition) {
|
|
1988
1925
|
this.featureDefinitions.set(definition.name, definition);
|
|
@@ -1992,27 +1929,29 @@ class AXPModuleManifestRegistry {
|
|
|
1992
1929
|
/**
|
|
1993
1930
|
* Check if module dependencies are satisfied.
|
|
1994
1931
|
* Returns array of missing dependencies.
|
|
1932
|
+
* Dependencies can be module names or feature keys (ModuleName.FeatureKey format).
|
|
1995
1933
|
*/
|
|
1996
1934
|
checkDependencies(moduleName) {
|
|
1997
1935
|
const manifest = this.get(moduleName);
|
|
1998
|
-
if (!manifest?.dependencies) {
|
|
1936
|
+
if (!manifest?.dependencies || manifest.dependencies.length === 0) {
|
|
1999
1937
|
return { missingModules: [], missingFeatures: [] };
|
|
2000
1938
|
}
|
|
2001
1939
|
const missingModules = [];
|
|
2002
1940
|
const missingFeatures = [];
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
1941
|
+
for (const dependency of manifest.dependencies) {
|
|
1942
|
+
// If dependency contains a dot, it's a feature (ModuleName.FeatureKey)
|
|
1943
|
+
if (dependency.includes('.')) {
|
|
1944
|
+
// Convert dependency format (ModuleName.FeatureKey) to feature name format (ModuleName:Feature:FeatureKey)
|
|
1945
|
+
const [moduleName, featureKey] = dependency.split('.');
|
|
1946
|
+
const featureName = `${moduleName}:Feature:${featureKey}`;
|
|
1947
|
+
if (!this.isFeatureDefined(featureName)) {
|
|
1948
|
+
missingFeatures.push(dependency);
|
|
2008
1949
|
}
|
|
2009
1950
|
}
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
if (!this.isFeatureDefined(featureName)) {
|
|
2015
|
-
missingFeatures.push(featureName);
|
|
1951
|
+
else {
|
|
1952
|
+
// Otherwise, it's a module name
|
|
1953
|
+
if (!this.has(dependency)) {
|
|
1954
|
+
missingModules.push(dependency);
|
|
2016
1955
|
}
|
|
2017
1956
|
}
|
|
2018
1957
|
}
|
|
@@ -2066,17 +2005,16 @@ const AXPAppStartUpProvider = provideAppInitializer(() => {
|
|
|
2066
2005
|
//#endregion
|
|
2067
2006
|
//#region ---- Module ----
|
|
2068
2007
|
/**
|
|
2069
|
-
* Module for managing module manifests
|
|
2070
|
-
* Handles the registration of manifest
|
|
2008
|
+
* Module for managing module manifests initialization.
|
|
2009
|
+
* Handles the registration of manifest startup tasks.
|
|
2071
2010
|
*/
|
|
2072
2011
|
class AXPModuleManifestModule {
|
|
2073
2012
|
/**
|
|
2074
2013
|
* @ignore
|
|
2075
|
-
* Initializes module manifest
|
|
2014
|
+
* Initializes module manifest tasks on module construction.
|
|
2076
2015
|
*/
|
|
2077
2016
|
constructor(appInitService, injector) {
|
|
2078
2017
|
const manifestRegistry = injector.get(AXPModuleManifestRegistry);
|
|
2079
|
-
const moduleProviderLoader = injector.get(AXP_MODULE_PROVIDER_LOADER);
|
|
2080
2018
|
// Register manifest initialization task
|
|
2081
2019
|
appInitService.registerTask({
|
|
2082
2020
|
name: 'ModuleManifests',
|
|
@@ -2086,23 +2024,6 @@ class AXPModuleManifestModule {
|
|
|
2086
2024
|
await manifestRegistry.initialize();
|
|
2087
2025
|
},
|
|
2088
2026
|
});
|
|
2089
|
-
// Register module provider tasks
|
|
2090
|
-
appInitService.registerTask({
|
|
2091
|
-
name: 'RequiredModuleProviders',
|
|
2092
|
-
statusText: 'Loading required modules...',
|
|
2093
|
-
priority: 1.5,
|
|
2094
|
-
run: async () => {
|
|
2095
|
-
await moduleProviderLoader.loadRequiredModules();
|
|
2096
|
-
},
|
|
2097
|
-
});
|
|
2098
|
-
appInitService.registerTask({
|
|
2099
|
-
name: 'ModuleProviders',
|
|
2100
|
-
statusText: 'Loading module providers...',
|
|
2101
|
-
priority: 3,
|
|
2102
|
-
run: async () => {
|
|
2103
|
-
await moduleProviderLoader.loadProvidersIfReady();
|
|
2104
|
-
},
|
|
2105
|
-
});
|
|
2106
2027
|
}
|
|
2107
2028
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPModuleManifestModule, deps: [{ token: AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2108
2029
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPModuleManifestModule }); }
|
|
@@ -2115,69 +2036,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
2115
2036
|
}]
|
|
2116
2037
|
}], ctorParameters: () => [{ type: AXPAppStartUpService }, { type: i0.Injector }] });
|
|
2117
2038
|
|
|
2118
|
-
//#region ---- Imports ----
|
|
2119
|
-
//#endregion
|
|
2120
|
-
//#region ---- Feature Definition Provider Interface ----
|
|
2121
|
-
/**
|
|
2122
|
-
* Context for feature definition providers.
|
|
2123
|
-
* Allows providers to add additional feature definitions dynamically.
|
|
2124
|
-
*/
|
|
2125
|
-
class AXPFeatureDefinitionProviderContext {
|
|
2126
|
-
constructor() {
|
|
2127
|
-
this.features = new Map();
|
|
2128
|
-
}
|
|
2129
|
-
/**
|
|
2130
|
-
* Add a feature definition.
|
|
2131
|
-
* @param key Full feature key (ModuleName:FeatureKey format with colon separator)
|
|
2132
|
-
* @param definition Feature definition
|
|
2133
|
-
*/
|
|
2134
|
-
addFeature(key, definition) {
|
|
2135
|
-
this.features.set(key, definition);
|
|
2136
|
-
}
|
|
2137
|
-
/**
|
|
2138
|
-
* Get all feature definitions.
|
|
2139
|
-
*/
|
|
2140
|
-
getFeatures() {
|
|
2141
|
-
return this.features;
|
|
2142
|
-
}
|
|
2143
|
-
}
|
|
2144
|
-
/**
|
|
2145
|
-
* Injection token for feature definition providers.
|
|
2146
|
-
*/
|
|
2147
|
-
const AXP_FEATURE_DEFINITION_PROVIDER = new InjectionToken('AXP_FEATURE_DEFINITION_PROVIDER', {
|
|
2148
|
-
providedIn: 'root',
|
|
2149
|
-
factory: () => [],
|
|
2150
|
-
});
|
|
2151
|
-
//#endregion
|
|
2152
|
-
|
|
2153
|
-
//#region ---- Imports ----
|
|
2154
|
-
//#endregion
|
|
2155
|
-
//#region ---- Default Implementation ----
|
|
2156
|
-
/**
|
|
2157
|
-
* Default implementation of module access control service.
|
|
2158
|
-
* Checks if module is enabled in edition.modulesAndFeatures.modules.
|
|
2159
|
-
*/
|
|
2160
|
-
class DefaultModuleAccessControlService {
|
|
2161
|
-
checkAccess(manifest, context) {
|
|
2162
|
-
// Check if module is enabled in edition
|
|
2163
|
-
const enabledModules = context.edition.modulesAndFeatures?.modules || [];
|
|
2164
|
-
return enabledModules.includes(manifest.name);
|
|
2165
|
-
}
|
|
2166
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: DefaultModuleAccessControlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2167
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: DefaultModuleAccessControlService, providedIn: 'root' }); }
|
|
2168
|
-
}
|
|
2169
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: DefaultModuleAccessControlService, decorators: [{
|
|
2170
|
-
type: Injectable,
|
|
2171
|
-
args: [{ providedIn: 'root' }]
|
|
2172
|
-
}] });
|
|
2173
|
-
//#endregion
|
|
2174
|
-
//#region ---- Injection Token ----
|
|
2175
|
-
/**
|
|
2176
|
-
* Injection token for module access control service.
|
|
2177
|
-
* If not provided, DefaultModuleAccessControlService will be used as fallback.
|
|
2178
|
-
*/
|
|
2179
|
-
const AXP_MODULE_ACCESS_CONTROL_SERVICE = new InjectionToken('AXP_MODULE_ACCESS_CONTROL_SERVICE');
|
|
2180
|
-
|
|
2181
2039
|
//#region ---- Tag Types ----
|
|
2182
2040
|
//#endregion
|
|
2183
2041
|
|
|
@@ -3871,6 +3729,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
3871
3729
|
}]
|
|
3872
3730
|
}], ctorParameters: () => [] });
|
|
3873
3731
|
|
|
3732
|
+
/**
|
|
3733
|
+
* Creates a provider instance within an injection context.
|
|
3734
|
+
* Handles dynamic import, injector resolution, and provider instantiation.
|
|
3735
|
+
*
|
|
3736
|
+
* @param loader - Function that returns a promise resolving to the provider class
|
|
3737
|
+
* @returns Promise that resolves to the provider instance
|
|
3738
|
+
*
|
|
3739
|
+
* @example
|
|
3740
|
+
* ```typescript
|
|
3741
|
+
* useFactory: () => createProviderWithInjectionContext(() =>
|
|
3742
|
+
* import('./settings.provider').then(m => m.AXMSettingProvider)
|
|
3743
|
+
* )
|
|
3744
|
+
* ```
|
|
3745
|
+
*/
|
|
3746
|
+
async function createProviderWithInjectionContext(loader) {
|
|
3747
|
+
const injector = inject(Injector);
|
|
3748
|
+
const ProviderClass = await loader();
|
|
3749
|
+
return runInInjectionContext(injector, () => new ProviderClass());
|
|
3750
|
+
}
|
|
3751
|
+
/**
|
|
3752
|
+
* Creates a provider configuration for lazy-loaded providers with injection context.
|
|
3753
|
+
* Simplifies provider registration in NgModule providers array.
|
|
3754
|
+
*
|
|
3755
|
+
* @param token - The injection token to provide
|
|
3756
|
+
* @param loader - Function that returns a promise resolving to the provider class
|
|
3757
|
+
* @param multi - Whether the provider is multi-provider (defaults to true)
|
|
3758
|
+
* @returns Provider configuration object
|
|
3759
|
+
*
|
|
3760
|
+
* @example
|
|
3761
|
+
* ```typescript
|
|
3762
|
+
* providers: [
|
|
3763
|
+
* provideLazyProvider(
|
|
3764
|
+
* AXP_SETTING_DEFINITION_PROVIDER,
|
|
3765
|
+
* () => import('./settings.provider').then(m => m.AXMSettingProvider)
|
|
3766
|
+
* )
|
|
3767
|
+
* ]
|
|
3768
|
+
* ```
|
|
3769
|
+
*/
|
|
3770
|
+
function provideLazyProvider(token, loader, multi = true) {
|
|
3771
|
+
return {
|
|
3772
|
+
provide: token,
|
|
3773
|
+
useFactory: () => createProviderWithInjectionContext(loader),
|
|
3774
|
+
multi,
|
|
3775
|
+
};
|
|
3776
|
+
}
|
|
3777
|
+
|
|
3874
3778
|
function extractTextFromHtml(value) {
|
|
3875
3779
|
const div = document.createElement('div');
|
|
3876
3780
|
div.innerHTML = value;
|
|
@@ -3893,5 +3797,5 @@ function generateKebabCase(title) {
|
|
|
3893
3797
|
* Generated bundle index. Do not edit.
|
|
3894
3798
|
*/
|
|
3895
3799
|
|
|
3896
|
-
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,
|
|
3800
|
+
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 };
|
|
3897
3801
|
//# sourceMappingURL=acorex-platform-core.mjs.map
|