@asor-studio/asor-core 1.1.6 → 1.1.8
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/README.md +8 -6
- package/fesm2022/asor-studio-asor-core.mjs +1 -1
- package/index.d.ts +438 -64
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnInit, OnDestroy, QueryList, Type, PipeTransform } from '@angular/core';
|
|
3
|
-
import { ActivatedRoute,
|
|
3
|
+
import { ActivatedRoute, Data, CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree, RedirectCommand } from '@angular/router';
|
|
4
4
|
import { Location } from '@angular/common';
|
|
5
5
|
import { Observable, BehaviorSubject, ReplaySubject } from 'rxjs';
|
|
6
6
|
import { HttpParams, HttpHeaders, HttpResponse, HttpRequest, HttpErrorResponse, HttpStatusCode, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
|
|
@@ -778,6 +778,248 @@ declare abstract class BaseComponent implements IComp, OnInit, OnDestroy {
|
|
|
778
778
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseComponent, never, never, {}, {}, never, never, true, never>;
|
|
779
779
|
}
|
|
780
780
|
|
|
781
|
+
/**
|
|
782
|
+
* Base abstract class for Atom components following the Atomic Design pattern.
|
|
783
|
+
* Atoms are the smallest functional units of the UI.
|
|
784
|
+
* Automatically extracts atom configuration from route data and sets up i18n paths.
|
|
785
|
+
*
|
|
786
|
+
* This class provides foundational functionality for all atom-level components,
|
|
787
|
+
* including access to route data, current atom configuration, and translation paths.
|
|
788
|
+
*
|
|
789
|
+
* @Directive - Can be extended by Angular components
|
|
790
|
+
* @abstract - Must be extended, cannot be instantiated directly
|
|
791
|
+
*
|
|
792
|
+
* @example
|
|
793
|
+
* // Create an atom component
|
|
794
|
+
* @Component({
|
|
795
|
+
* selector: 'app-base-button',
|
|
796
|
+
* templateUrl: './base-button.component.html'
|
|
797
|
+
* })
|
|
798
|
+
* export class BaseButtonComponent extends BaseAtom implements OnInit {
|
|
799
|
+
* ngOnInit() {
|
|
800
|
+
* // Access atom configuration
|
|
801
|
+
* console.log(this.currentAtom.I18nPath);
|
|
802
|
+
* // Use inherited i18n paths
|
|
803
|
+
* console.log(this.I18nPath);
|
|
804
|
+
* }
|
|
805
|
+
* }
|
|
806
|
+
*/
|
|
807
|
+
declare abstract class BaseAtom implements IBaseAtom, IConsoleLoggable, OnInit, OnDestroy {
|
|
808
|
+
static readonly className: string;
|
|
809
|
+
/**
|
|
810
|
+
* Injected ActivatedRoute for accessing route data and parameters.
|
|
811
|
+
*/
|
|
812
|
+
protected route: ActivatedRoute;
|
|
813
|
+
/**
|
|
814
|
+
* Configuration object for the current atom component.
|
|
815
|
+
* Contains metadata like component name, i18n paths, and other atom-specific settings.
|
|
816
|
+
*/
|
|
817
|
+
protected currentAtom: IAtom;
|
|
818
|
+
/**
|
|
819
|
+
* Array of i18n translation paths for this atom.
|
|
820
|
+
* Inherited from the atom configuration in route data.
|
|
821
|
+
* Used by translation utilities to load appropriate language files.
|
|
822
|
+
*
|
|
823
|
+
* @example
|
|
824
|
+
* // I18nPath might contain: ['/common', '/atoms']
|
|
825
|
+
* this.translateUtility.getTranslation$('SUBMIT', this.I18nPath, 'en');
|
|
826
|
+
*/
|
|
827
|
+
I18nPath: string[];
|
|
828
|
+
/**
|
|
829
|
+
* Initializes the base atom by extracting configuration from route data.
|
|
830
|
+
* Automatically finds the matching atom configuration based on component class name
|
|
831
|
+
* and sets up i18n translation paths.
|
|
832
|
+
*
|
|
833
|
+
* @example
|
|
834
|
+
* // Route configuration with atom data:
|
|
835
|
+
* {
|
|
836
|
+
* path: 'users',
|
|
837
|
+
* component: UserListComponent,
|
|
838
|
+
* data: {
|
|
839
|
+
* Atoms: [
|
|
840
|
+
* {
|
|
841
|
+
* Component: BaseButtonComponent,
|
|
842
|
+
* I18nPath: ['/common', '/buttons']
|
|
843
|
+
* }
|
|
844
|
+
* ]
|
|
845
|
+
* } as IAsorRoute
|
|
846
|
+
* }
|
|
847
|
+
*/
|
|
848
|
+
constructor();
|
|
849
|
+
/**
|
|
850
|
+
* Lifecycle hook called when the component view is about to enter.
|
|
851
|
+
* Must be implemented by derived classes to define component-specific initialization logic.
|
|
852
|
+
*/
|
|
853
|
+
baseCompViewEnter(): void;
|
|
854
|
+
/**
|
|
855
|
+
* Lifecycle hook called when the component view is about to leave.
|
|
856
|
+
* Must be implemented by derived classes to define component-specific cleanup logic.
|
|
857
|
+
*/
|
|
858
|
+
baseCompViewLeave(): void;
|
|
859
|
+
/**
|
|
860
|
+
* Lifecycle hook called when the component view is about to enter.
|
|
861
|
+
* Must be implemented by derived classes to define component-specific initialization logic.
|
|
862
|
+
*/
|
|
863
|
+
baseAtomViewWillEnter(): void;
|
|
864
|
+
/**
|
|
865
|
+
* Lifecycle hook called when the component view is about to leave.
|
|
866
|
+
* Must be implemented by derived classes to define component-specific cleanup logic.
|
|
867
|
+
*/
|
|
868
|
+
baseAtomViewWillLeave(): void;
|
|
869
|
+
/**
|
|
870
|
+
* Returns the name of the current component class.
|
|
871
|
+
* Used internally to match the component with its configuration in route data.
|
|
872
|
+
*
|
|
873
|
+
* @returns The class name of the component as a string
|
|
874
|
+
*/
|
|
875
|
+
getClassName(): string;
|
|
876
|
+
/**
|
|
877
|
+
* Lifecycle hook called when the component is initialized.
|
|
878
|
+
* Calls the baseAtomViewWillEnter() method.
|
|
879
|
+
*/
|
|
880
|
+
ngOnInit(): void;
|
|
881
|
+
/**
|
|
882
|
+
* Lifecycle hook called when the component is destroyed.
|
|
883
|
+
* Calls the baseAtomViewWillLeave() method.
|
|
884
|
+
*/
|
|
885
|
+
ngOnDestroy(): void;
|
|
886
|
+
/**
|
|
887
|
+
* Ionic lifecycle hook called when the view is about to enter and become the active view.
|
|
888
|
+
* This is called regardless of whether it is the first load or cached view.
|
|
889
|
+
* Delegates to baseAtomViewWillEnter() for consistency across Angular and Ionic.
|
|
890
|
+
*/
|
|
891
|
+
ionViewWillEnter(): void;
|
|
892
|
+
/**
|
|
893
|
+
* Ionic lifecycle hook called when the view is about to leave and no longer be the active view.
|
|
894
|
+
* This is called when navigating away from the current view.
|
|
895
|
+
* Delegates to baseAtomViewWillLeave() for consistency across Angular and Ionic.
|
|
896
|
+
*/
|
|
897
|
+
ionViewWillLeave(): void;
|
|
898
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseAtom, never>;
|
|
899
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseAtom, never, never, {}, {}, never, never, true, never>;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Base abstract class for Organism components following the Atomic Design pattern.
|
|
904
|
+
* Organisms are complex UI components made up of molecules and/or atoms.
|
|
905
|
+
* Automatically extracts organism configuration from route data and sets up i18n paths.
|
|
906
|
+
*
|
|
907
|
+
* This class provides foundational functionality for all organism-level components,
|
|
908
|
+
* including access to route data, current organism configuration, and translation paths.
|
|
909
|
+
*
|
|
910
|
+
* @Directive - Can be extended by Angular components
|
|
911
|
+
* @abstract - Must be extended, cannot be instantiated directly
|
|
912
|
+
*
|
|
913
|
+
* @example
|
|
914
|
+
* // Create an organism component
|
|
915
|
+
* @Component({
|
|
916
|
+
* selector: 'app-user-profile',
|
|
917
|
+
* templateUrl: './user-profile.component.html'
|
|
918
|
+
* })
|
|
919
|
+
* export class UserProfileComponent extends BaseOrganism implements OnInit {
|
|
920
|
+
* ngOnInit() {
|
|
921
|
+
* // Access organism configuration
|
|
922
|
+
* console.log(this.currentOrganism.I18nPath);
|
|
923
|
+
* // Use inherited i18n paths
|
|
924
|
+
* console.log(this.I18nPath);
|
|
925
|
+
* }
|
|
926
|
+
* }
|
|
927
|
+
*/
|
|
928
|
+
declare abstract class BaseOrganism implements IBaseOrganism, IConsoleLoggable, OnInit, OnDestroy {
|
|
929
|
+
static readonly className: string;
|
|
930
|
+
/**
|
|
931
|
+
* Injected ActivatedRoute for accessing route data and parameters.
|
|
932
|
+
*/
|
|
933
|
+
protected route: ActivatedRoute;
|
|
934
|
+
/**
|
|
935
|
+
* Configuration object for the current organism component.
|
|
936
|
+
* Contains metadata like component name, i18n paths, and other organism-specific settings.
|
|
937
|
+
*/
|
|
938
|
+
protected currentOrganism: IOrganism;
|
|
939
|
+
/**
|
|
940
|
+
* Array of i18n translation paths for this organism.
|
|
941
|
+
* Inherited from the organism configuration in route data.
|
|
942
|
+
* Used by translation utilities to load appropriate language files.
|
|
943
|
+
*
|
|
944
|
+
* @example
|
|
945
|
+
* // I18nPath might contain: ['/common', '/organisms']
|
|
946
|
+
* this.translateUtility.getTranslation$('HEADER', this.I18nPath, 'en');
|
|
947
|
+
*/
|
|
948
|
+
I18nPath: string[];
|
|
949
|
+
/**
|
|
950
|
+
* Initializes the base organism by extracting configuration from route data.
|
|
951
|
+
* Automatically finds the matching organism configuration based on component class name
|
|
952
|
+
* and sets up i18n translation paths.
|
|
953
|
+
*
|
|
954
|
+
* @example
|
|
955
|
+
* // Route configuration with organism data:
|
|
956
|
+
* {
|
|
957
|
+
* path: 'users',
|
|
958
|
+
* component: UserListComponent,
|
|
959
|
+
* data: {
|
|
960
|
+
* Organisms: [
|
|
961
|
+
* {
|
|
962
|
+
* Component: UserProfileComponent,
|
|
963
|
+
* I18nPath: ['/common', '/profile']
|
|
964
|
+
* }
|
|
965
|
+
* ]
|
|
966
|
+
* } as IAsorRoute
|
|
967
|
+
* }
|
|
968
|
+
*/
|
|
969
|
+
constructor();
|
|
970
|
+
/**
|
|
971
|
+
* Lifecycle hook called when the component view is about to enter.
|
|
972
|
+
* Must be implemented by derived classes to define component-specific initialization logic.
|
|
973
|
+
*/
|
|
974
|
+
baseCompViewEnter(): void;
|
|
975
|
+
/**
|
|
976
|
+
* Lifecycle hook called when the component view is about to leave.
|
|
977
|
+
* Must be implemented by derived classes to define component-specific cleanup logic.
|
|
978
|
+
*/
|
|
979
|
+
baseCompViewLeave(): void;
|
|
980
|
+
/**
|
|
981
|
+
* Lifecycle hook called when the component view is about to enter.
|
|
982
|
+
* Must be implemented by derived classes to define component-specific initialization logic.
|
|
983
|
+
*/
|
|
984
|
+
baseOrganismViewWillEnter(): void;
|
|
985
|
+
/**
|
|
986
|
+
* Lifecycle hook called when the component view is about to leave.
|
|
987
|
+
* Must be implemented by derived classes to define component-specific cleanup logic.
|
|
988
|
+
*/
|
|
989
|
+
baseOrganismViewWillLeave(): void;
|
|
990
|
+
/**
|
|
991
|
+
* Returns the name of the current component class.
|
|
992
|
+
* Used internally to match the component with its configuration in route data.
|
|
993
|
+
*
|
|
994
|
+
* @returns The class name of the component as a string
|
|
995
|
+
*/
|
|
996
|
+
getClassName(): string;
|
|
997
|
+
/**
|
|
998
|
+
* Lifecycle hook called when the component is initialized.
|
|
999
|
+
* Calls the baseOrganismViewWillEnter() method.
|
|
1000
|
+
*/
|
|
1001
|
+
ngOnInit(): void;
|
|
1002
|
+
/**
|
|
1003
|
+
* Lifecycle hook called when the component is destroyed.
|
|
1004
|
+
* Calls the baseOrganismViewWillLeave() method.
|
|
1005
|
+
*/
|
|
1006
|
+
ngOnDestroy(): void;
|
|
1007
|
+
/**
|
|
1008
|
+
* Ionic lifecycle hook called when the view is about to enter and become the active view.
|
|
1009
|
+
* This is called regardless of whether it is the first load or cached view.
|
|
1010
|
+
* Delegates to baseOrganismViewWillEnter() for consistency across Angular and Ionic.
|
|
1011
|
+
*/
|
|
1012
|
+
ionViewWillEnter(): void;
|
|
1013
|
+
/**
|
|
1014
|
+
* Ionic lifecycle hook called when the view is about to leave and no longer be the active view.
|
|
1015
|
+
* This is called when navigating away from the current view.
|
|
1016
|
+
* Delegates to baseOrganismViewWillLeave() for consistency across Angular and Ionic.
|
|
1017
|
+
*/
|
|
1018
|
+
ionViewWillLeave(): void;
|
|
1019
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseOrganism, never>;
|
|
1020
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseOrganism, never, never, {}, {}, never, never, true, never>;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
781
1023
|
/**
|
|
782
1024
|
* Interface for route guard configuration with authentication and molecule support.
|
|
783
1025
|
* Used in route data configuration to define page-level authentication, child guards, and molecule components.
|
|
@@ -810,6 +1052,10 @@ interface IAsorRoute {
|
|
|
810
1052
|
I18nPath: string[];
|
|
811
1053
|
/** Array of molecule components to be used in this route */
|
|
812
1054
|
Molecules?: IMolecule[];
|
|
1055
|
+
/** Array of atom components to be used in this route */
|
|
1056
|
+
Atoms?: IAtom[];
|
|
1057
|
+
/** Array of organism components to be used in this route */
|
|
1058
|
+
Organisms?: IOrganism[];
|
|
813
1059
|
/** Array of component to be used in this route */
|
|
814
1060
|
Components?: IComponent[];
|
|
815
1061
|
/** Optional dataset creation configuration */
|
|
@@ -856,6 +1102,20 @@ interface ICreateDataSet {
|
|
|
856
1102
|
/** Optional creation options (encryption, storage type, etc.) */
|
|
857
1103
|
option?: CreateDataSetOption;
|
|
858
1104
|
}
|
|
1105
|
+
/**
|
|
1106
|
+
* Interface representing an Atom component in the Atomic Design pattern.
|
|
1107
|
+
* Atoms are the smallest UI components.
|
|
1108
|
+
*/
|
|
1109
|
+
interface IAtom {
|
|
1110
|
+
/** Array of i18n translation paths for this atom */
|
|
1111
|
+
I18nPath: string[];
|
|
1112
|
+
/** Optional state handler configuration */
|
|
1113
|
+
ConnectDataSet?: IConnectDataSet;
|
|
1114
|
+
/** The Angular component class extending BaseAtom */
|
|
1115
|
+
Atom: Type<BaseAtom> & ICompStatic;
|
|
1116
|
+
/** Optional extra data to pass to the atom component */
|
|
1117
|
+
ExtraData?: Data;
|
|
1118
|
+
}
|
|
859
1119
|
/**
|
|
860
1120
|
* Interface representing a Molecule component in the Atomic Design pattern.
|
|
861
1121
|
* Molecules are composite UI components made up of smaller atoms.
|
|
@@ -877,6 +1137,20 @@ interface IMolecule {
|
|
|
877
1137
|
/** Optional extra data to pass to the molecule component */
|
|
878
1138
|
ExtraData?: Data;
|
|
879
1139
|
}
|
|
1140
|
+
/**
|
|
1141
|
+
* Interface representing an Organism component in the Atomic Design pattern.
|
|
1142
|
+
* Organisms are composite UI components made up of molecules and atoms.
|
|
1143
|
+
*/
|
|
1144
|
+
interface IOrganism {
|
|
1145
|
+
/** Array of i18n translation paths for this organism */
|
|
1146
|
+
I18nPath: string[];
|
|
1147
|
+
/** Optional state handler configuration */
|
|
1148
|
+
ConnectDataSet?: IConnectDataSet;
|
|
1149
|
+
/** The Angular component class extending BaseOrganism */
|
|
1150
|
+
Organism: Type<BaseOrganism> & ICompStatic;
|
|
1151
|
+
/** Optional extra data to pass to the organism component */
|
|
1152
|
+
ExtraData?: Data;
|
|
1153
|
+
}
|
|
880
1154
|
/**
|
|
881
1155
|
* Interface representing a Component in the Atomic Design pattern.
|
|
882
1156
|
* Components are the smallest UI components.
|
|
@@ -935,6 +1209,19 @@ interface IComp {
|
|
|
935
1209
|
/** Called when the component view is about to leave/destroy */
|
|
936
1210
|
baseCompViewLeave(): void;
|
|
937
1211
|
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Interface for BaseAtom
|
|
1214
|
+
*/
|
|
1215
|
+
interface IBaseAtom extends IComp {
|
|
1216
|
+
/**
|
|
1217
|
+
* Called when the atom view is about to enter/initialize
|
|
1218
|
+
*/
|
|
1219
|
+
baseAtomViewWillEnter(): void;
|
|
1220
|
+
/**
|
|
1221
|
+
* Called when the atom view is about to leave/destroy
|
|
1222
|
+
*/
|
|
1223
|
+
baseAtomViewWillLeave(): void;
|
|
1224
|
+
}
|
|
938
1225
|
/**
|
|
939
1226
|
* Interface for BaseMolecule
|
|
940
1227
|
*/
|
|
@@ -948,6 +1235,19 @@ interface IBaseMolecule extends IComp {
|
|
|
948
1235
|
*/
|
|
949
1236
|
baseMoleculeViewWillLeave(): void;
|
|
950
1237
|
}
|
|
1238
|
+
/**
|
|
1239
|
+
* Interface for BaseOrganism
|
|
1240
|
+
*/
|
|
1241
|
+
interface IBaseOrganism extends IComp {
|
|
1242
|
+
/**
|
|
1243
|
+
* Called when the organism view is about to enter/initialize
|
|
1244
|
+
*/
|
|
1245
|
+
baseOrganismViewWillEnter(): void;
|
|
1246
|
+
/**
|
|
1247
|
+
* Called when the organism view is about to leave/destroy
|
|
1248
|
+
*/
|
|
1249
|
+
baseOrganismViewWillLeave(): void;
|
|
1250
|
+
}
|
|
951
1251
|
/**
|
|
952
1252
|
* Interface for authorization response from the backend API.
|
|
953
1253
|
* Contains the authorization status indicating if the user is allowed to perform an action.
|
|
@@ -1116,6 +1416,10 @@ interface IRequestMapping {
|
|
|
1116
1416
|
* // AND your custom cache paths (/api/users, /api/dashboard/stats, etc.)
|
|
1117
1417
|
*/
|
|
1118
1418
|
declare abstract class ConfigCache {
|
|
1419
|
+
/**
|
|
1420
|
+
* Name of the global state used for persistent cache storage.
|
|
1421
|
+
*/
|
|
1422
|
+
static globalStateName: string;
|
|
1119
1423
|
/**
|
|
1120
1424
|
* Base cache path configurations from the library.
|
|
1121
1425
|
* These define caching behavior for i18n components and molecules.
|
|
@@ -1671,7 +1975,7 @@ declare class CachePathUtility {
|
|
|
1671
1975
|
/**
|
|
1672
1976
|
* Routing utility instance for checking current navigation state.
|
|
1673
1977
|
*/
|
|
1674
|
-
protected
|
|
1978
|
+
protected _routingUtility: RoutingUtility;
|
|
1675
1979
|
/**
|
|
1676
1980
|
* Initializes the cache path utility with an array of path configurations.
|
|
1677
1981
|
*
|
|
@@ -1798,6 +2102,10 @@ declare class CacheUtility implements IConsoleLoggable {
|
|
|
1798
2102
|
* Name of the sessionStorage key used for persistent cache storage.
|
|
1799
2103
|
*/
|
|
1800
2104
|
protected cache_name: string;
|
|
2105
|
+
/**
|
|
2106
|
+
* Name of the global state used for persistent cache storage.
|
|
2107
|
+
*/
|
|
2108
|
+
protected globalStateName: string;
|
|
1801
2109
|
/**
|
|
1802
2110
|
* In-memory cache storage using a Map for fast lookups.
|
|
1803
2111
|
* Key: request URL (optionally with payload hash), Value: cached HTTP response
|
|
@@ -2119,69 +2427,19 @@ declare function BaseHandlerMixin<T extends object = any, TBase extends Construc
|
|
|
2119
2427
|
*/
|
|
2120
2428
|
declare function createFlattenedReactiveProxy<T>(propsStore: Record<string, any>): T;
|
|
2121
2429
|
|
|
2122
|
-
declare const
|
|
2430
|
+
declare const BaseStorageAtom_base: _asor_studio_asor_core.Constructor<IStorageHandler<any> & {
|
|
2123
2431
|
propsStore: any;
|
|
2124
2432
|
registryElement: _asor_studio_asor_core.RegistryElement;
|
|
2125
2433
|
storageHandlerDataChanges(prev: any, curr: any): void;
|
|
2126
|
-
}> & typeof
|
|
2434
|
+
}> & typeof BaseAtom;
|
|
2127
2435
|
/**
|
|
2128
|
-
* Base abstract class for
|
|
2129
|
-
* Extends
|
|
2436
|
+
* Base abstract class for Atom-level components with integrated storage handler functionality.
|
|
2437
|
+
* Extends BaseAtom with automatic state management, reactive props, and store synchronization.
|
|
2130
2438
|
*
|
|
2131
|
-
* This class combines the
|
|
2439
|
+
* This class combines the Atomic Design atom structure and i18n capabilities of BaseAtom
|
|
2132
2440
|
* with the storage handling features from BaseHandlerMixin.
|
|
2133
|
-
*
|
|
2134
|
-
* Storage features:
|
|
2135
|
-
* - Automatic dataset creation from route configuration
|
|
2136
|
-
* - Reactive connection to state store
|
|
2137
|
-
* - Proxy-based prop-to-store synchronization
|
|
2138
|
-
* - Support for nested object updates
|
|
2139
|
-
* - Full object/array assignment reactivity (e.g. this.props.list = [...])
|
|
2140
|
-
*
|
|
2141
|
-
* @Directive - Can be extended by Angular components
|
|
2142
|
-
* @abstract - Must be extended, cannot be instantiated directly
|
|
2143
|
-
*
|
|
2144
|
-
* @example
|
|
2145
|
-
* // Route configuration with storage:
|
|
2146
|
-
* {
|
|
2147
|
-
* path: 'user-profile',
|
|
2148
|
-
* component: UserProfileComponent,
|
|
2149
|
-
* data: {
|
|
2150
|
-
* I18nPath: ['/common', '/user'],
|
|
2151
|
-
* CreateDataSet: {
|
|
2152
|
-
* name: 'userProfile',
|
|
2153
|
-
* data: { name: '', email: '' },
|
|
2154
|
-
* option: CreateDataSetOption.CREATE_IF_NOT_EXISTS
|
|
2155
|
-
* },
|
|
2156
|
-
* ConnectDataSet: {
|
|
2157
|
-
* propStructure: {
|
|
2158
|
-
* name: ['userProfile', 'name'],
|
|
2159
|
-
* email: ['userProfile', 'email']
|
|
2160
|
-
* }
|
|
2161
|
-
* }
|
|
2162
|
-
* } as IAsorRoute
|
|
2163
|
-
* }
|
|
2164
|
-
*
|
|
2165
|
-
* @example
|
|
2166
|
-
* // Component implementation:
|
|
2167
|
-
* @Component({
|
|
2168
|
-
* selector: 'app-user-profile',
|
|
2169
|
-
* templateUrl: './user-profile.component.html'
|
|
2170
|
-
* })
|
|
2171
|
-
* export class UserProfileComponent extends BaseStorageHandlerComp {
|
|
2172
|
-
*
|
|
2173
|
-
* storageHandlerDataChanges(data: any): void {
|
|
2174
|
-
* console.log('Store data updated:', data);
|
|
2175
|
-
* // React to store changes
|
|
2176
|
-
* }
|
|
2177
|
-
*
|
|
2178
|
-
* updateUserName(newName: string): void {
|
|
2179
|
-
* // This automatically updates the store
|
|
2180
|
-
* this.props.name = newName;
|
|
2181
|
-
* }
|
|
2182
|
-
* }
|
|
2183
2441
|
*/
|
|
2184
|
-
declare abstract class
|
|
2442
|
+
declare abstract class BaseStorageAtom<T extends object = Record<string, any>> extends BaseStorageAtom_base implements IStorageHandler<T> {
|
|
2185
2443
|
/**
|
|
2186
2444
|
* Typed props object for type-safe state management.
|
|
2187
2445
|
* Returns a flattened reactive proxy over propsStore so that both
|
|
@@ -2193,9 +2451,13 @@ declare abstract class BaseStorageComponent<T extends object = Record<string, an
|
|
|
2193
2451
|
* Override baseCompViewLeave to unregister from store
|
|
2194
2452
|
*/
|
|
2195
2453
|
baseCompViewLeave(): void;
|
|
2454
|
+
/**
|
|
2455
|
+
* Override baseAtomViewWillLeave to unregister from store
|
|
2456
|
+
*/
|
|
2457
|
+
baseAtomViewWillLeave(): void;
|
|
2196
2458
|
constructor();
|
|
2197
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
2198
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
2459
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseStorageAtom<any>, never>;
|
|
2460
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseStorageAtom<any>, never, never, {}, {}, never, never, true, never>;
|
|
2199
2461
|
}
|
|
2200
2462
|
|
|
2201
2463
|
declare const BaseStorageMolecule_base: _asor_studio_asor_core.Constructor<IStorageHandler<any> & {
|
|
@@ -2295,6 +2557,118 @@ declare abstract class BaseStorageMolecule<T extends object = Record<string, any
|
|
|
2295
2557
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseStorageMolecule<any>, never, never, {}, {}, never, never, true, never>;
|
|
2296
2558
|
}
|
|
2297
2559
|
|
|
2560
|
+
declare const BaseStorageOrganism_base: _asor_studio_asor_core.Constructor<IStorageHandler<any> & {
|
|
2561
|
+
propsStore: any;
|
|
2562
|
+
registryElement: _asor_studio_asor_core.RegistryElement;
|
|
2563
|
+
storageHandlerDataChanges(prev: any, curr: any): void;
|
|
2564
|
+
}> & typeof BaseOrganism;
|
|
2565
|
+
/**
|
|
2566
|
+
* Base abstract class for Organism-level components with integrated storage handler functionality.
|
|
2567
|
+
* Extends BaseOrganism with automatic state management, reactive props, and store synchronization.
|
|
2568
|
+
*
|
|
2569
|
+
* This class combines the Atomic Design organism structure and i18n capabilities of BaseOrganism
|
|
2570
|
+
* with the storage handling features from BaseHandlerMixin.
|
|
2571
|
+
*/
|
|
2572
|
+
declare abstract class BaseStorageOrganism<T extends object = Record<string, any>> extends BaseStorageOrganism_base implements IStorageHandler<T> {
|
|
2573
|
+
/**
|
|
2574
|
+
* Typed props object for type-safe state management.
|
|
2575
|
+
* Returns a flattened reactive proxy over propsStore so that both
|
|
2576
|
+
* read and write operations (including full object/array assignment)
|
|
2577
|
+
* are forwarded through the reactive proxy, triggering state updates.
|
|
2578
|
+
*/
|
|
2579
|
+
get props(): T;
|
|
2580
|
+
/**
|
|
2581
|
+
* Override baseCompViewLeave to unregister from store
|
|
2582
|
+
*/
|
|
2583
|
+
baseCompViewLeave(): void;
|
|
2584
|
+
/**
|
|
2585
|
+
* Override baseOrganismViewWillLeave to unregister from store
|
|
2586
|
+
*/
|
|
2587
|
+
baseOrganismViewWillLeave(): void;
|
|
2588
|
+
constructor();
|
|
2589
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseStorageOrganism<any>, never>;
|
|
2590
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseStorageOrganism<any>, never, never, {}, {}, never, never, true, never>;
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
declare const BaseStorageComponent_base: _asor_studio_asor_core.Constructor<IStorageHandler<any> & {
|
|
2594
|
+
propsStore: any;
|
|
2595
|
+
registryElement: _asor_studio_asor_core.RegistryElement;
|
|
2596
|
+
storageHandlerDataChanges(prev: any, curr: any): void;
|
|
2597
|
+
}> & typeof BaseComponent;
|
|
2598
|
+
/**
|
|
2599
|
+
* Base abstract class for Page/Component-level components with integrated storage handler functionality.
|
|
2600
|
+
* Extends BaseComponent with automatic state management, reactive props, and store synchronization.
|
|
2601
|
+
*
|
|
2602
|
+
* This class combines the lifecycle management and i18n capabilities of BaseComponent
|
|
2603
|
+
* with the storage handling features from BaseHandlerMixin.
|
|
2604
|
+
*
|
|
2605
|
+
* Storage features:
|
|
2606
|
+
* - Automatic dataset creation from route configuration
|
|
2607
|
+
* - Reactive connection to state store
|
|
2608
|
+
* - Proxy-based prop-to-store synchronization
|
|
2609
|
+
* - Support for nested object updates
|
|
2610
|
+
* - Full object/array assignment reactivity (e.g. this.props.list = [...])
|
|
2611
|
+
*
|
|
2612
|
+
* @Directive - Can be extended by Angular components
|
|
2613
|
+
* @abstract - Must be extended, cannot be instantiated directly
|
|
2614
|
+
*
|
|
2615
|
+
* @example
|
|
2616
|
+
* // Route configuration with storage:
|
|
2617
|
+
* {
|
|
2618
|
+
* path: 'user-profile',
|
|
2619
|
+
* component: UserProfileComponent,
|
|
2620
|
+
* data: {
|
|
2621
|
+
* I18nPath: ['/common', '/user'],
|
|
2622
|
+
* CreateDataSet: {
|
|
2623
|
+
* name: 'userProfile',
|
|
2624
|
+
* data: { name: '', email: '' },
|
|
2625
|
+
* option: CreateDataSetOption.CREATE_IF_NOT_EXISTS
|
|
2626
|
+
* },
|
|
2627
|
+
* ConnectDataSet: {
|
|
2628
|
+
* propStructure: {
|
|
2629
|
+
* name: ['userProfile', 'name'],
|
|
2630
|
+
* email: ['userProfile', 'email']
|
|
2631
|
+
* }
|
|
2632
|
+
* }
|
|
2633
|
+
* } as IAsorRoute
|
|
2634
|
+
* }
|
|
2635
|
+
*
|
|
2636
|
+
* @example
|
|
2637
|
+
* // Component implementation:
|
|
2638
|
+
* @Component({
|
|
2639
|
+
* selector: 'app-user-profile',
|
|
2640
|
+
* templateUrl: './user-profile.component.html'
|
|
2641
|
+
* })
|
|
2642
|
+
* export class UserProfileComponent extends BaseStorageHandlerComp {
|
|
2643
|
+
*
|
|
2644
|
+
* storageHandlerDataChanges(data: any): void {
|
|
2645
|
+
* console.log('Store data updated:', data);
|
|
2646
|
+
* // React to store changes
|
|
2647
|
+
* }
|
|
2648
|
+
*
|
|
2649
|
+
* updateUserName(newName: string): void {
|
|
2650
|
+
* // This automatically updates the store
|
|
2651
|
+
* this.props.name = newName;
|
|
2652
|
+
* }
|
|
2653
|
+
* }
|
|
2654
|
+
*/
|
|
2655
|
+
declare abstract class BaseStorageComponent<T extends object = Record<string, any>> extends BaseStorageComponent_base implements IStorageHandler<T> {
|
|
2656
|
+
/**
|
|
2657
|
+
* Typed props object for type-safe state management.
|
|
2658
|
+
* Returns a flattened reactive proxy over propsStore so that both
|
|
2659
|
+
* read and write operations (including full object/array assignment)
|
|
2660
|
+
* are forwarded through the reactive proxy, triggering state updates.
|
|
2661
|
+
*/
|
|
2662
|
+
get props(): T;
|
|
2663
|
+
/**
|
|
2664
|
+
* Override baseCompViewLeave to unregister from store
|
|
2665
|
+
*/
|
|
2666
|
+
baseCompViewLeave(): void;
|
|
2667
|
+
constructor();
|
|
2668
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseStorageComponent<any>, never>;
|
|
2669
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseStorageComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2298
2672
|
/**
|
|
2299
2673
|
* Service for managing and distributing HTTP error notifications across the application.
|
|
2300
2674
|
* Implements a centralized error notification system using RxJS observables.
|
|
@@ -2492,9 +2866,9 @@ declare class StateService implements IConsoleLoggable {
|
|
|
2492
2866
|
*/
|
|
2493
2867
|
initialize(conf?: StateHandlerConfig): void;
|
|
2494
2868
|
/**
|
|
2495
|
-
*
|
|
2869
|
+
* Clean up data sets to storage
|
|
2496
2870
|
*/
|
|
2497
|
-
|
|
2871
|
+
cleanUp(): void;
|
|
2498
2872
|
/**
|
|
2499
2873
|
* Update data sets to storage
|
|
2500
2874
|
*/
|
|
@@ -2673,5 +3047,5 @@ declare class AsorWidgetComponent {
|
|
|
2673
3047
|
static ɵcmp: i0.ɵɵComponentDeclaration<AsorWidgetComponent, "asor-core-widget", never, { "mode": { "alias": "mode"; "required": false; }; }, {}, never, never, true, never>;
|
|
2674
3048
|
}
|
|
2675
3049
|
|
|
2676
|
-
export { GlobalEnum_d as AsorGlobalEnum, StateConstants_d as AsorStorage, AsorWidgetComponent, AuthGuard, AuthUtility, BaseComponent, BaseHandlerMixin, BaseMolecule, BaseStorageComponent, BaseStorageMolecule, CacheInterceptor, CachePathUtility, CacheUtility, CollectionUtils, ConfigCache, ConfigConst, ConsoleLogsConfig, ConsoleLogsUtility, CookieUtils, ErrorInterceptor, HttpRequestHandler, MockHttpInterceptor, MockOrchestratorService, MockRequestMapping, NotifyErrorService, ObjectUtils, RandomUtils, RoutingUtility, StateConst, StateService, StringUtils, TranslatePipe, TranslateUtility, createFlattenedReactiveProxy };
|
|
2677
|
-
export type { AsorWidgetMode, Constructor, CreateDataSetOption, DataElement, DataMethod, EncryptType, GenerateType, IAsorRoute, IAuth, IBaseMolecule, IComp, ICompStatic, IComponent, IConnectDataSet, IConsoleLoggable, ICreateDataSet, IHttpAuthSubscribe, IHttpFormError, IHttpRequest, IHttpRequestHandlerConfig, IHttpResponseError, IHttpSubscribe, IMolecule, IPath, IRequestMapping, IStorageHandler, LogClassConfig, LogEntry, LogLevel, RegistryElement, RegistryEntry, StateHandlerConfig, StoreType, UpdateDataSetOption };
|
|
3050
|
+
export { GlobalEnum_d as AsorGlobalEnum, StateConstants_d as AsorStorage, AsorWidgetComponent, AuthGuard, AuthUtility, BaseAtom, BaseComponent, BaseHandlerMixin, BaseMolecule, BaseOrganism, BaseStorageAtom, BaseStorageComponent, BaseStorageMolecule, BaseStorageOrganism, CacheInterceptor, CachePathUtility, CacheUtility, CollectionUtils, ConfigCache, ConfigConst, ConsoleLogsConfig, ConsoleLogsUtility, CookieUtils, ErrorInterceptor, HttpRequestHandler, MockHttpInterceptor, MockOrchestratorService, MockRequestMapping, NotifyErrorService, ObjectUtils, RandomUtils, RoutingUtility, StateConst, StateService, StringUtils, TranslatePipe, TranslateUtility, createFlattenedReactiveProxy };
|
|
3051
|
+
export type { AsorWidgetMode, Constructor, CreateDataSetOption, DataElement, DataMethod, EncryptType, GenerateType, IAsorRoute, IAtom, IAuth, IBaseAtom, IBaseMolecule, IBaseOrganism, IComp, ICompStatic, IComponent, IConnectDataSet, IConsoleLoggable, ICreateDataSet, IHttpAuthSubscribe, IHttpFormError, IHttpRequest, IHttpRequestHandlerConfig, IHttpResponseError, IHttpSubscribe, IMolecule, IOrganism, IPath, IRequestMapping, IStorageHandler, LogClassConfig, LogEntry, LogLevel, RegistryElement, RegistryEntry, StateHandlerConfig, StoreType, UpdateDataSetOption };
|