ngx-universal-zone 1.0.6 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/analytics/index.d.ts +237 -0
- package/database/index.d.ts +122 -6
- package/fesm2022/ngx-universal-zone-analytics.mjs +403 -0
- package/fesm2022/ngx-universal-zone-analytics.mjs.map +1 -0
- package/fesm2022/ngx-universal-zone-database.mjs +8 -22
- package/fesm2022/ngx-universal-zone-database.mjs.map +1 -1
- package/fesm2022/ngx-universal-zone-pipes.mjs +6 -6
- package/fesm2022/ngx-universal-zone-pipes.mjs.map +1 -1
- package/fesm2022/ngx-universal-zone-pub-sub.mjs +7 -7
- package/fesm2022/ngx-universal-zone-pub-sub.mjs.map +1 -1
- package/fesm2022/ngx-universal-zone-ui.mjs +20 -20
- package/fesm2022/ngx-universal-zone-ui.mjs.map +1 -1
- package/fesm2022/ngx-universal-zone.mjs +20 -34
- package/fesm2022/ngx-universal-zone.mjs.map +1 -1
- package/index.d.ts +184 -3
- package/package.json +8 -4
- package/pipes/index.d.ts +29 -2
- package/pub-sub/index.d.ts +37 -2
- package/ui/index.d.ts +56 -5
- package/database/db-base.service.d.ts +0 -37
- package/database/db-setting-constant.d.ts +0 -7
- package/database/db-web.service.d.ts +0 -50
- package/database/db.module.d.ts +0 -9
- package/database/schema.service.d.ts +0 -25
- package/pipes/formateDate.pipe.d.ts +0 -8
- package/pipes/safe.pipe.d.ts +0 -18
- package/pub-sub/i-hash.d.ts +0 -10
- package/pub-sub/ngx-pub-sub.module.d.ts +0 -7
- package/pub-sub/ngx-pub-sub.service.d.ts +0 -27
- package/pub-sub/subject-type.enum.d.ts +0 -5
- package/public-api.d.ts +0 -6
- package/shared/app-injector.d.ts +0 -6
- package/shared/app-setting.service.d.ts +0 -18
- package/shared/flag-based-preloading-strategy.d.ts +0 -12
- package/shared/helper.service.d.ts +0 -15
- package/shared/message-bus/index.d.ts +0 -4
- package/shared/message-bus/message-bus.d.ts +0 -15
- package/shared/message-bus/message-bus.testing.d.ts +0 -9
- package/shared/message-bus/messages.d.ts +0 -2
- package/shared/message-bus/models.d.ts +0 -39
- package/shared/universal-zone.module.d.ts +0 -2
- package/ui/directives/directives.module.d.ts +0 -9
- package/ui/directives/long-ress.directive.d.ts +0 -21
- package/ui/directives/only-number.directive.d.ts +0 -7
- package/ui/no-data/no-data.component.d.ts +0 -13
- package/ui/no-data/no-data.module.d.ts +0 -8
package/README.md
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Provider } from '@angular/core';
|
|
3
|
+
import { Router } from '@angular/router';
|
|
4
|
+
|
|
5
|
+
interface IAnalyticsConfig {
|
|
6
|
+
apiKey: string;
|
|
7
|
+
authDomain: string;
|
|
8
|
+
projectId: string;
|
|
9
|
+
storageBucket: string;
|
|
10
|
+
messagingSenderId: string;
|
|
11
|
+
appId: string;
|
|
12
|
+
measurementId: string;
|
|
13
|
+
}
|
|
14
|
+
interface IAnalyticsService {
|
|
15
|
+
/**
|
|
16
|
+
* Track page view
|
|
17
|
+
*/
|
|
18
|
+
trackPageView(pageName: string, pageTitle?: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* Track button click events
|
|
21
|
+
*/
|
|
22
|
+
trackButtonClick(buttonName: string, buttonLocation?: string): void;
|
|
23
|
+
/**
|
|
24
|
+
* Track user navigation events
|
|
25
|
+
*/
|
|
26
|
+
trackNavigation(from: string, to: string, method?: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* Track user actions in the app
|
|
29
|
+
*/
|
|
30
|
+
trackUserAction(action: string, category: string, label?: string, value?: number): void;
|
|
31
|
+
/**
|
|
32
|
+
* Track business-specific events
|
|
33
|
+
*/
|
|
34
|
+
trackBusinessEvent(eventName: string, parameters: {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}): void;
|
|
37
|
+
/**
|
|
38
|
+
* Track errors that occur in the app
|
|
39
|
+
*/
|
|
40
|
+
trackError(errorMessage: string, errorLocation: string, errorType?: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Set user ID for analytics
|
|
43
|
+
*/
|
|
44
|
+
setUserId(userId: string): void;
|
|
45
|
+
/**
|
|
46
|
+
* Set user properties
|
|
47
|
+
*/
|
|
48
|
+
setUserProperties(properties: {
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
}): void;
|
|
51
|
+
/**
|
|
52
|
+
* Test analytics functionality
|
|
53
|
+
*/
|
|
54
|
+
testAnalytics(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Get analytics debug info
|
|
57
|
+
*/
|
|
58
|
+
getDebugInfo(): any;
|
|
59
|
+
/**
|
|
60
|
+
* Dashboard specific events
|
|
61
|
+
*/
|
|
62
|
+
trackDashboardEvents: {
|
|
63
|
+
dashboardViewed(): void;
|
|
64
|
+
dashboardButtonClicked(buttonType: string): void;
|
|
65
|
+
storeInfoClicked(): void;
|
|
66
|
+
lottieAnimationCompleted(): void;
|
|
67
|
+
syncStatusViewed(status: string): void;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
declare abstract class BaseAnalyticsService implements IAnalyticsService {
|
|
71
|
+
protected isDebugMode: boolean;
|
|
72
|
+
protected eventCount: number;
|
|
73
|
+
abstract trackPageView(pageName: string, pageTitle?: string): void;
|
|
74
|
+
abstract trackButtonClick(buttonName: string, buttonLocation?: string): void;
|
|
75
|
+
abstract trackNavigation(from: string, to: string, method?: string): void;
|
|
76
|
+
abstract trackUserAction(action: string, category: string, label?: string, value?: number): void;
|
|
77
|
+
abstract trackBusinessEvent(eventName: string, parameters: {
|
|
78
|
+
[key: string]: any;
|
|
79
|
+
}): void;
|
|
80
|
+
abstract trackError(errorMessage: string, errorLocation: string, errorType?: string): void;
|
|
81
|
+
abstract setUserId(userId: string): void;
|
|
82
|
+
abstract setUserProperties(properties: {
|
|
83
|
+
[key: string]: any;
|
|
84
|
+
}): void;
|
|
85
|
+
abstract testAnalytics(): void;
|
|
86
|
+
abstract getDebugInfo(): any;
|
|
87
|
+
/**
|
|
88
|
+
* Dashboard specific events
|
|
89
|
+
*/
|
|
90
|
+
abstract trackDashboardEvents: {
|
|
91
|
+
dashboardViewed(): void;
|
|
92
|
+
dashboardButtonClicked(buttonType: string): void;
|
|
93
|
+
storeInfoClicked(): void;
|
|
94
|
+
lottieAnimationCompleted(): void;
|
|
95
|
+
syncStatusViewed(status: string): void;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Internal method to track event count in debug mode
|
|
99
|
+
*/
|
|
100
|
+
protected incrementEventCount(): void;
|
|
101
|
+
/**
|
|
102
|
+
* Log debug information
|
|
103
|
+
*/
|
|
104
|
+
protected logDebug(message: string, data?: any): void;
|
|
105
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseAnalyticsService, never>;
|
|
106
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BaseAnalyticsService>;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* No-op implementation for development environment
|
|
110
|
+
*/
|
|
111
|
+
declare class NoOpAnalyticsService extends BaseAnalyticsService {
|
|
112
|
+
trackPageView(pageName: string, pageTitle?: string): void;
|
|
113
|
+
trackButtonClick(buttonName: string, buttonLocation?: string): void;
|
|
114
|
+
trackNavigation(from: string, to: string, method?: string): void;
|
|
115
|
+
trackUserAction(action: string, category: string, label?: string, value?: number): void;
|
|
116
|
+
trackBusinessEvent(eventName: string, parameters: {
|
|
117
|
+
[key: string]: any;
|
|
118
|
+
}): void;
|
|
119
|
+
trackError(errorMessage: string, errorLocation: string, errorType?: string): void;
|
|
120
|
+
setUserId(userId: string): void;
|
|
121
|
+
setUserProperties(properties: {
|
|
122
|
+
[key: string]: any;
|
|
123
|
+
}): void;
|
|
124
|
+
testAnalytics(): void;
|
|
125
|
+
getDebugInfo(): any;
|
|
126
|
+
/**
|
|
127
|
+
* Dashboard specific events
|
|
128
|
+
*/
|
|
129
|
+
trackDashboardEvents: {
|
|
130
|
+
dashboardViewed: () => void;
|
|
131
|
+
dashboardButtonClicked: (buttonType: string) => void;
|
|
132
|
+
storeInfoClicked: () => void;
|
|
133
|
+
lottieAnimationCompleted: () => void;
|
|
134
|
+
syncStatusViewed: (status: string) => void;
|
|
135
|
+
};
|
|
136
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NoOpAnalyticsService, never>;
|
|
137
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NoOpAnalyticsService>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
interface IFirebaseAnalytics {
|
|
141
|
+
logEvent: (eventName: string, parameters?: {
|
|
142
|
+
[key: string]: any;
|
|
143
|
+
}) => void;
|
|
144
|
+
setUserId: (userId: string) => void;
|
|
145
|
+
setUserProperties: (properties: {
|
|
146
|
+
[key: string]: any;
|
|
147
|
+
}) => void;
|
|
148
|
+
setCurrentScreen: (screenName: string) => void;
|
|
149
|
+
}
|
|
150
|
+
declare class FirebaseAnalyticsService extends BaseAnalyticsService {
|
|
151
|
+
private analytics;
|
|
152
|
+
private config;
|
|
153
|
+
constructor();
|
|
154
|
+
/**
|
|
155
|
+
* Initialize Firebase Analytics
|
|
156
|
+
*/
|
|
157
|
+
initialize(analytics: IFirebaseAnalytics, config: IAnalyticsConfig, isDebugMode?: boolean): void;
|
|
158
|
+
/**
|
|
159
|
+
* Monitor gtag calls for debugging
|
|
160
|
+
*/
|
|
161
|
+
private monitorGtagCalls;
|
|
162
|
+
/**
|
|
163
|
+
* Track page view
|
|
164
|
+
*/
|
|
165
|
+
trackPageView(pageName: string, pageTitle?: string): void;
|
|
166
|
+
/**
|
|
167
|
+
* Track button click events
|
|
168
|
+
*/
|
|
169
|
+
trackButtonClick(buttonName: string, buttonLocation?: string): void;
|
|
170
|
+
/**
|
|
171
|
+
* Track user navigation events
|
|
172
|
+
*/
|
|
173
|
+
trackNavigation(from: string, to: string, method?: string): void;
|
|
174
|
+
/**
|
|
175
|
+
* Track user actions in the app
|
|
176
|
+
*/
|
|
177
|
+
trackUserAction(action: string, category: string, label?: string, value?: number): void;
|
|
178
|
+
/**
|
|
179
|
+
* Track business-specific events
|
|
180
|
+
*/
|
|
181
|
+
trackBusinessEvent(eventName: string, parameters: {
|
|
182
|
+
[key: string]: any;
|
|
183
|
+
}): void;
|
|
184
|
+
/**
|
|
185
|
+
* Track errors that occur in the app
|
|
186
|
+
*/
|
|
187
|
+
trackError(errorMessage: string, errorLocation: string, errorType?: string): void;
|
|
188
|
+
/**
|
|
189
|
+
* Set user ID for analytics
|
|
190
|
+
*/
|
|
191
|
+
setUserId(userId: string): void;
|
|
192
|
+
/**
|
|
193
|
+
* Set user properties
|
|
194
|
+
*/
|
|
195
|
+
setUserProperties(properties: {
|
|
196
|
+
[key: string]: any;
|
|
197
|
+
}): void;
|
|
198
|
+
/**
|
|
199
|
+
* Test analytics functionality
|
|
200
|
+
*/
|
|
201
|
+
testAnalytics(): void;
|
|
202
|
+
/**
|
|
203
|
+
* Get analytics debug info
|
|
204
|
+
*/
|
|
205
|
+
getDebugInfo(): any;
|
|
206
|
+
/**
|
|
207
|
+
* Dashboard specific events
|
|
208
|
+
*/
|
|
209
|
+
trackDashboardEvents: {
|
|
210
|
+
dashboardViewed: () => void;
|
|
211
|
+
dashboardButtonClicked: (buttonType: string) => void;
|
|
212
|
+
storeInfoClicked: () => void;
|
|
213
|
+
lottieAnimationCompleted: () => void;
|
|
214
|
+
syncStatusViewed: (status: string) => void;
|
|
215
|
+
};
|
|
216
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FirebaseAnalyticsService, never>;
|
|
217
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FirebaseAnalyticsService>;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
declare class RouterAnalyticsService {
|
|
221
|
+
private router;
|
|
222
|
+
private analyticsService;
|
|
223
|
+
private previousUrl;
|
|
224
|
+
private currentUrl;
|
|
225
|
+
constructor(router: Router, analyticsService: BaseAnalyticsService);
|
|
226
|
+
private initializeRouterTracking;
|
|
227
|
+
private trackPageView;
|
|
228
|
+
private trackNavigation;
|
|
229
|
+
private getPageNameFromUrl;
|
|
230
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RouterAnalyticsService, never>;
|
|
231
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RouterAnalyticsService>;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
declare function provideUzAnalytics(): Provider[];
|
|
235
|
+
|
|
236
|
+
export { BaseAnalyticsService, FirebaseAnalyticsService, NoOpAnalyticsService, RouterAnalyticsService, provideUzAnalytics };
|
|
237
|
+
export type { IAnalyticsConfig, IAnalyticsService, IFirebaseAnalytics };
|
package/database/index.d.ts
CHANGED
|
@@ -1,6 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { EnvironmentProviders } from '@angular/core';
|
|
4
|
+
import Dexie from 'dexie';
|
|
5
|
+
|
|
6
|
+
interface ITableOptions {
|
|
7
|
+
name: string;
|
|
8
|
+
columns: Array<{
|
|
9
|
+
name: any;
|
|
10
|
+
isPrimaryKey?: any;
|
|
11
|
+
type?: any;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
declare class SchemaService {
|
|
15
|
+
schema: {
|
|
16
|
+
stores: ITableOptions[];
|
|
17
|
+
};
|
|
18
|
+
tables: Record<string, string>;
|
|
19
|
+
private _config;
|
|
20
|
+
/**
|
|
21
|
+
* Represents a SchemaService that manages the database schema.
|
|
22
|
+
*/
|
|
23
|
+
constructor();
|
|
24
|
+
get config(): DbServiceConfig;
|
|
25
|
+
init(config: DbServiceConfig): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SchemaService, never>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SchemaService>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare class DbWebService extends Dexie implements DbService {
|
|
31
|
+
private config;
|
|
32
|
+
private schemaService;
|
|
33
|
+
private _db;
|
|
34
|
+
private dbInitialized;
|
|
35
|
+
constructor(config: DbServiceConfig, schemaService: SchemaService);
|
|
36
|
+
dbInitialized$: Observable<any>;
|
|
37
|
+
get Db(): Dexie;
|
|
38
|
+
putLocal(store: any, data: any): Promise<{
|
|
39
|
+
rowsAffected: any;
|
|
40
|
+
insertId: any;
|
|
41
|
+
}>;
|
|
42
|
+
putLocalRx(store: any, data: any): Observable<unknown>;
|
|
43
|
+
get<T>(store: string, key: any): Promise<T>;
|
|
44
|
+
getRx<T>(store: string, key: any): Observable<T>;
|
|
45
|
+
getByFieldName<T>(storeName: any, fieldName: any, key: any): Promise<Array<T>>;
|
|
46
|
+
getAll<T>(store: string, opt?: DbFilter): Promise<T>;
|
|
47
|
+
getAllRx<T>(store: string, opt?: DbFilter): Observable<T>;
|
|
48
|
+
remove(store: any, key: any): Promise<any>;
|
|
49
|
+
removeRx(store: any, key: any): Observable<any>;
|
|
50
|
+
removeAll(store: any): Promise<void>;
|
|
51
|
+
removeAllRx(store: string): Observable<any[]>;
|
|
52
|
+
count(store: any, opts?: {
|
|
53
|
+
key: any;
|
|
54
|
+
}): Promise<number>;
|
|
55
|
+
countRx(store: any, opts?: {
|
|
56
|
+
key: any;
|
|
57
|
+
}): Observable<number>;
|
|
58
|
+
deleteDb(): Promise<unknown>;
|
|
59
|
+
deleteTable(store: any): Observable<void>;
|
|
60
|
+
}
|
|
61
|
+
interface DbFilter {
|
|
62
|
+
key?: any;
|
|
63
|
+
value?: any;
|
|
64
|
+
keyRange?: KeyRangeType;
|
|
65
|
+
pageIndex?: number;
|
|
66
|
+
pageSize?: number;
|
|
67
|
+
sortBy?: any;
|
|
68
|
+
sortType?: 'asc' | 'desc';
|
|
69
|
+
}
|
|
70
|
+
declare enum KeyRangeType {
|
|
71
|
+
equalToIgnoreCase = 1,
|
|
72
|
+
startsWithIgnoreCase = 2,
|
|
73
|
+
equalTo = 3,
|
|
74
|
+
notEqualTo = 4
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
declare class DbServiceConfig {
|
|
78
|
+
dbName: string;
|
|
79
|
+
schema: ITableOptions[];
|
|
80
|
+
}
|
|
81
|
+
declare enum DbServiceType {
|
|
82
|
+
IndexDd = 0,
|
|
83
|
+
Sqlite = 1
|
|
84
|
+
}
|
|
85
|
+
declare abstract class DbService {
|
|
86
|
+
dbInitialized$: Observable<any>;
|
|
87
|
+
get Db(): any;
|
|
88
|
+
putLocal(store: any, data: any): Promise<{
|
|
89
|
+
rowsAffected: any;
|
|
90
|
+
insertId: any;
|
|
91
|
+
}>;
|
|
92
|
+
putLocalRx(store: any, data: any): Observable<any>;
|
|
93
|
+
get<T>(store: string, key: any): Promise<T>;
|
|
94
|
+
getRx<T>(store: string, key: any): Observable<T>;
|
|
95
|
+
getAll<T>(store: string, opt?: DbFilter): Promise<T>;
|
|
96
|
+
getAllRx<T>(store: string, opt?: DbFilter): Observable<T>;
|
|
97
|
+
remove(store: any, id: any): Promise<any>;
|
|
98
|
+
removeRx(store: any, key: any): Observable<any>;
|
|
99
|
+
removeAll(store: any): Promise<any>;
|
|
100
|
+
removeAllRx(store: string): Observable<any>;
|
|
101
|
+
count(store: any, opts?: {
|
|
102
|
+
key: any;
|
|
103
|
+
}): Promise<number>;
|
|
104
|
+
countRx(store: any, opts?: {
|
|
105
|
+
key: any;
|
|
106
|
+
}): Observable<number>;
|
|
107
|
+
deleteDb(): Promise<any>;
|
|
108
|
+
deleteTable(store: any): Observable<void>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
declare class DbSettingConstant {
|
|
112
|
+
static readonly SETTING = "setting";
|
|
113
|
+
}
|
|
114
|
+
declare const DbSettingConfig: {
|
|
115
|
+
schema: ITableOptions;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
declare function dbFactory(schemaSvc: SchemaService): DbWebService;
|
|
119
|
+
declare function provideDb(): EnvironmentProviders;
|
|
120
|
+
|
|
121
|
+
export { DbService, DbServiceConfig, DbServiceType, DbSettingConfig, DbSettingConstant, DbWebService, KeyRangeType, SchemaService, dbFactory, provideDb };
|
|
122
|
+
export type { DbFilter, ITableOptions };
|