@yomotech/view-toolkit 0.0.3 → 0.0.4
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/fesm2022/yomotech-view-toolkit.mjs +1893 -0
- package/fesm2022/yomotech-view-toolkit.mjs.map +1 -0
- package/package.json +47 -36
- package/types/yomotech-view-toolkit.d.ts +301 -0
- package/ng-package.json +0 -7
- package/src/lib/app-version.ts +0 -2
- package/src/lib/containers/card/card.component.css +0 -0
- package/src/lib/containers/card/card.component.html +0 -449
- package/src/lib/containers/card/card.component.ts +0 -471
- package/src/lib/containers/form/form.component.css +0 -0
- package/src/lib/containers/form/form.component.html +0 -1
- package/src/lib/containers/form/form.component.ts +0 -12
- package/src/lib/containers/grid/grid.component.css +0 -0
- package/src/lib/containers/grid/grid.component.html +0 -1
- package/src/lib/containers/grid/grid.component.ts +0 -12
- package/src/lib/containers/pagination/pagination.component.css +0 -0
- package/src/lib/containers/pagination/pagination.component.html +0 -1
- package/src/lib/containers/pagination/pagination.component.ts +0 -12
- package/src/lib/services/app-version-reset.service.ts +0 -59
- package/src/lib/services/config.service.ts +0 -128
- package/src/lib/services/couchdb.ts +0 -224
- package/src/lib/services/mobile-keycloak.service.ts +0 -116
- package/src/lib/services/network-log.service.ts +0 -27
- package/src/lib/services/notification.service.ts +0 -26
- package/src/lib/services/pouchdb.service.ts +0 -183
- package/src/lib/services/request.service.ts +0 -125
- package/src/lib/services/utility.service.ts +0 -593
- package/src/lib/view-toolkit.module.ts +0 -25
- package/src/lib/view-toolkit.spec.ts +0 -23
- package/src/lib/view-toolkit.ts +0 -15
- package/src/public-api.ts +0 -22
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, ChangeDetectorRef, NgZone, SimpleChanges } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { Platform } from '@angular/cdk/platform';
|
|
5
|
+
import * as rxjs from 'rxjs';
|
|
6
|
+
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
7
|
+
import { OAuthService } from 'angular-oauth2-oidc';
|
|
8
|
+
import { NzModalService } from 'ng-zorro-antd/modal';
|
|
9
|
+
import { ToastrService } from 'ngx-toastr';
|
|
10
|
+
|
|
11
|
+
declare class RequestService {
|
|
12
|
+
private http;
|
|
13
|
+
pageSize: number;
|
|
14
|
+
constructor(http: HttpClient);
|
|
15
|
+
getAllProject(): rxjs.Observable<Object>;
|
|
16
|
+
getEnvironmet(selectedProject: any): rxjs.Observable<Object>;
|
|
17
|
+
getSectionInfo(url: string, envUrl?: any, passToken?: boolean, selectedProject?: string, userInfo?: any): rxjs.Observable<Object>;
|
|
18
|
+
getMainLayout(selectedProject: any): rxjs.Observable<Object>;
|
|
19
|
+
getInfo(url: string): rxjs.Observable<Object>;
|
|
20
|
+
dynamicCall(method: string | undefined, body: any | undefined, url: string, passToken?: boolean, selectedProject?: string, userInfo?: any): rxjs.Observable<Object>;
|
|
21
|
+
createAuthorizationHeader(userInfo: any, tokenExist?: boolean): HttpHeaders;
|
|
22
|
+
getLoginUser(token: any): rxjs.Observable<Object>;
|
|
23
|
+
saveDb(token: any, userInfo: any, order?: any): void;
|
|
24
|
+
getSaveOrder(token: any, userInfo: any, fromDate: any, toDate: any): rxjs.Observable<Object>;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RequestService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RequestService>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare class UtilityService {
|
|
30
|
+
private platform;
|
|
31
|
+
private requestService;
|
|
32
|
+
stripe: any;
|
|
33
|
+
constructor(platform: Platform, requestService: RequestService);
|
|
34
|
+
getScope(scope: any): string;
|
|
35
|
+
getProperty(scope: any, itemInfo?: any): {
|
|
36
|
+
key: any;
|
|
37
|
+
productSchema: any;
|
|
38
|
+
};
|
|
39
|
+
setStorage(key: string, value: any): Promise<void>;
|
|
40
|
+
getStorage(key: string): Promise<string | null>;
|
|
41
|
+
setLocalStorage(key: string, value: any): Promise<void>;
|
|
42
|
+
removeLocalStorage(keyName: string): Promise<void>;
|
|
43
|
+
removeStorage(key: string): Promise<void>;
|
|
44
|
+
getLocalStorage(key: string): Promise<any>;
|
|
45
|
+
showAllProjects(): Promise<void>;
|
|
46
|
+
parseBodyObject(obj: any): any;
|
|
47
|
+
getTotalPrice(tableitemInfo: any): number;
|
|
48
|
+
getTotalQuantity(tableitemInfo: any): number;
|
|
49
|
+
replacePaginationParams(url: string, currentPage: number, pageSize: number): string;
|
|
50
|
+
customButton(option: any, propertySchema: any, projectSeleted: any, environment: any): void;
|
|
51
|
+
setDefaultUser(item: any, userInfo: any, environment: any): any;
|
|
52
|
+
setTableData(data: any, options: any | undefined, tableitemInfo: any, projectSeleted: any): any;
|
|
53
|
+
setOktaWebCredential(environment: any, projectName: any): {
|
|
54
|
+
logo: string;
|
|
55
|
+
baseUrl: any;
|
|
56
|
+
clientId: any;
|
|
57
|
+
redirectUri: any;
|
|
58
|
+
authParams: {
|
|
59
|
+
pkce: boolean;
|
|
60
|
+
issuer: any;
|
|
61
|
+
scopes: any;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
setOktaMobileCredential(environment: any): {
|
|
65
|
+
appId: any;
|
|
66
|
+
authorizationBaseUrl: any;
|
|
67
|
+
accessTokenEndpoint: any;
|
|
68
|
+
redirectUrl: any;
|
|
69
|
+
scope: any;
|
|
70
|
+
responseType: any;
|
|
71
|
+
pkceEnabled: any;
|
|
72
|
+
};
|
|
73
|
+
setupStripePaymentForm(environment: any, form: any, onCardChange: (message: string) => void): Promise<void>;
|
|
74
|
+
formData(form: any, environment: any, cartInfo: any): Promise<void>;
|
|
75
|
+
processData(data: any, options: {
|
|
76
|
+
dataKey?: string;
|
|
77
|
+
setImageUrl?: boolean;
|
|
78
|
+
showTable?: boolean;
|
|
79
|
+
projectSelected: string;
|
|
80
|
+
}, tenantName: any): Promise<any[]>;
|
|
81
|
+
setTableDataImages(records: any, tenantName: any, projectSelected: any): Promise<any[]>;
|
|
82
|
+
normalizeDatesForStorage(obj: any): any;
|
|
83
|
+
isDateLike(value: any): boolean;
|
|
84
|
+
toLocalISOString(date: Date): string;
|
|
85
|
+
restoreDatesFromStorage(records: any[], propertySchema: any): any[];
|
|
86
|
+
parseLocalISODate(value: string): Date;
|
|
87
|
+
convertToDailyLogs(cardOrCards: any | any[]): any[];
|
|
88
|
+
private applyTimeToDay;
|
|
89
|
+
private startOfDay;
|
|
90
|
+
private endOfDay;
|
|
91
|
+
private isSameDay;
|
|
92
|
+
private toLocalISO;
|
|
93
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UtilityService, never>;
|
|
94
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UtilityService>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
declare class CardComponent {
|
|
98
|
+
private utilityService;
|
|
99
|
+
private platform;
|
|
100
|
+
private http;
|
|
101
|
+
private cdr;
|
|
102
|
+
private zone;
|
|
103
|
+
private modalService;
|
|
104
|
+
private oauthService;
|
|
105
|
+
private requestService;
|
|
106
|
+
itemInfo: any;
|
|
107
|
+
currentPage: number;
|
|
108
|
+
pageSize: number;
|
|
109
|
+
selectedLanguageInfo: any;
|
|
110
|
+
pages: number[];
|
|
111
|
+
cardButtonClick: EventEmitter<any>;
|
|
112
|
+
cardHeaderButtonClick: EventEmitter<any>;
|
|
113
|
+
linkDetails: EventEmitter<any>;
|
|
114
|
+
imageDetails: EventEmitter<any>;
|
|
115
|
+
onPageSizeChange: EventEmitter<any>;
|
|
116
|
+
onPageChange: EventEmitter<any>;
|
|
117
|
+
cardPerRow: string;
|
|
118
|
+
isLoading: boolean;
|
|
119
|
+
layoutSchemaCopy: any;
|
|
120
|
+
headerSchemaCopy: any;
|
|
121
|
+
footerSchemaCopy: any;
|
|
122
|
+
constructor(utilityService: UtilityService, platform: Platform, http: HttpClient, cdr: ChangeDetectorRef, zone: NgZone, modalService: NzModalService, oauthService: OAuthService, requestService: RequestService);
|
|
123
|
+
ngOnInit(): void;
|
|
124
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
125
|
+
private safeUpdate;
|
|
126
|
+
forceNumericKeyboard(event: any): void;
|
|
127
|
+
onDateTyping(event: any): void;
|
|
128
|
+
updatebuttonLanguage<T>(schema: T, translations: Record<string, string>): T;
|
|
129
|
+
updateLayoutLanguage<T>(schema: T, translations: Record<string, string>): T;
|
|
130
|
+
dateChangeEvent(filter: any, value: any): void;
|
|
131
|
+
applyDateFilter(filters: any): Promise<void>;
|
|
132
|
+
getSaveOrder(token: string, userInfo: any, fromDate: any, toDate: any): Promise<any>;
|
|
133
|
+
formatToOffsetISO(date: Date): string;
|
|
134
|
+
extractFilterValues(schema: Record<string, any>): Record<string, any>;
|
|
135
|
+
invokeOnPageSizeChange(pageSize: any): void;
|
|
136
|
+
invokeGoToPage(page: any): void;
|
|
137
|
+
invokeOnCardHeader(element: any): void;
|
|
138
|
+
invokeOnCardFooter(element: any): void;
|
|
139
|
+
invokeButtonClick(layout: any, record: any, recordIndex: any): Promise<void>;
|
|
140
|
+
showConfirm(option: any, recordIndex: any): void;
|
|
141
|
+
d4_SaveAll(): Promise<void>;
|
|
142
|
+
deleteRecord(recordIndex: any, data_url: any): void;
|
|
143
|
+
deleteAllRecord(): void;
|
|
144
|
+
saveToDb(orders: any, orderIndex?: any, data_url?: any, deleteAll?: boolean): Promise<void>;
|
|
145
|
+
webSaveDb(token: any, userInfo: any, order?: any, orderIndex?: any, dataUrl?: any, deleteAll?: boolean): void;
|
|
146
|
+
mobileSaveDb(token: string, userInfo: any, order: any | undefined, orderIndex: number, dataUrl: any, deleteAll?: boolean): Promise<any>;
|
|
147
|
+
showLinkDetails(option: any, record: any): void;
|
|
148
|
+
showImageDetails(option: any, record: any): void;
|
|
149
|
+
getProperty(scope: any): {
|
|
150
|
+
key: any;
|
|
151
|
+
productSchema: any;
|
|
152
|
+
};
|
|
153
|
+
getStyleWithoutClasses(styleObject: any): {
|
|
154
|
+
classes: any;
|
|
155
|
+
style: any;
|
|
156
|
+
};
|
|
157
|
+
getScope(scope: any): string;
|
|
158
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardComponent, never>;
|
|
159
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "vt-card", never, { "itemInfo": { "alias": "itemInfo"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; }, { "cardButtonClick": "cardButtonClick"; "cardHeaderButtonClick": "cardHeaderButtonClick"; "linkDetails": "linkDetails"; "imageDetails": "imageDetails"; "onPageSizeChange": "onPageSizeChange"; "onPageChange": "onPageChange"; }, never, never, true, never>;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
declare class FormComponent {
|
|
163
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, never>;
|
|
164
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "vt-form", never, {}, {}, never, never, true, never>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare class GridComponent {
|
|
168
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GridComponent, never>;
|
|
169
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "vt-grid", never, {}, {}, never, never, true, never>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
declare class PaginationComponent {
|
|
173
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
|
|
174
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "vt-pagination", never, {}, {}, never, never, true, never>;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
declare class ViewToolkitModule {
|
|
178
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ViewToolkitModule, never>;
|
|
179
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ViewToolkitModule, never, [typeof i1.CommonModule, typeof CardComponent, typeof FormComponent, typeof GridComponent, typeof PaginationComponent], [typeof CardComponent, typeof FormComponent, typeof GridComponent, typeof PaginationComponent]>;
|
|
180
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ViewToolkitModule>;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
declare class AppVersionResetService {
|
|
184
|
+
private platform;
|
|
185
|
+
constructor(platform: Platform);
|
|
186
|
+
run(): Promise<void>;
|
|
187
|
+
private clearNativeIfChanged;
|
|
188
|
+
private clearWebStores;
|
|
189
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppVersionResetService, never>;
|
|
190
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AppVersionResetService>;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
declare class Couchdb {
|
|
194
|
+
private utilityService;
|
|
195
|
+
private readonly couchDbBaseUrl;
|
|
196
|
+
constructor(utilityService: UtilityService);
|
|
197
|
+
getTenantDatabases(tenantKey: any): Promise<any[]>;
|
|
198
|
+
private parseJsonOrText;
|
|
199
|
+
private stringifyErrorDetails;
|
|
200
|
+
getFileContentFromCouchDb(couchDbName: string, filePath: string): Promise<any | null>;
|
|
201
|
+
private isImageFile;
|
|
202
|
+
private getImageMimeType;
|
|
203
|
+
private fromBase64;
|
|
204
|
+
private isJsonFile;
|
|
205
|
+
private getDocumentUrl;
|
|
206
|
+
private getDbUrl;
|
|
207
|
+
private getReadHeaders;
|
|
208
|
+
private buildTenantHeaders;
|
|
209
|
+
getImageSrcFromCouchDb(couchDbName: string, filePath: string): Promise<string>;
|
|
210
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Couchdb, never>;
|
|
211
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<Couchdb>;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
declare class ConfigService {
|
|
215
|
+
private couchdbService;
|
|
216
|
+
private utilityService;
|
|
217
|
+
private platform;
|
|
218
|
+
private config;
|
|
219
|
+
private skipOkta;
|
|
220
|
+
private keycloakConfig;
|
|
221
|
+
constructor(couchdbService: Couchdb, utilityService: UtilityService, platform: Platform);
|
|
222
|
+
loadOktaConfig(projectName: string): Promise<void>;
|
|
223
|
+
setConfiguration(config: any): void;
|
|
224
|
+
skipOktaConfig(): void;
|
|
225
|
+
get oktaConfig(): any;
|
|
226
|
+
loadKeycloakConfig(projectName: string): Promise<void>;
|
|
227
|
+
getKeycloakConfig(): any;
|
|
228
|
+
getKeycloakMobileConfig(): {
|
|
229
|
+
issuer: any;
|
|
230
|
+
clientId: any;
|
|
231
|
+
redirectUri: any;
|
|
232
|
+
logoutRedirectUri: any;
|
|
233
|
+
scope: any;
|
|
234
|
+
responseType: any;
|
|
235
|
+
} | null;
|
|
236
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigService, never>;
|
|
237
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigService>;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
interface MobileAuthTokens {
|
|
241
|
+
access_token: string;
|
|
242
|
+
refresh_token?: string;
|
|
243
|
+
id_token?: string;
|
|
244
|
+
expires_in?: number;
|
|
245
|
+
token_type?: string;
|
|
246
|
+
}
|
|
247
|
+
declare class MobileKeycloakService {
|
|
248
|
+
private config;
|
|
249
|
+
private http;
|
|
250
|
+
private utilityService;
|
|
251
|
+
private platform;
|
|
252
|
+
private tokens;
|
|
253
|
+
constructor(config: ConfigService, http: HttpClient, utilityService: UtilityService, platform: Platform);
|
|
254
|
+
login(): Promise<any>;
|
|
255
|
+
getUserInfo(accessToken: any, issuer: any): Promise<any>;
|
|
256
|
+
getAccessToken(): string | null;
|
|
257
|
+
getRefreshToken(): string | null;
|
|
258
|
+
logout(): Promise<void>;
|
|
259
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MobileKeycloakService, never>;
|
|
260
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MobileKeycloakService>;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
declare class NetworkLogService {
|
|
264
|
+
private logs;
|
|
265
|
+
addLog(log: any): void;
|
|
266
|
+
getLogsByDate(date: string): any[];
|
|
267
|
+
getAll(): any[];
|
|
268
|
+
clear(): void;
|
|
269
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NetworkLogService, never>;
|
|
270
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NetworkLogService>;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare class NotificationService {
|
|
274
|
+
toastr: ToastrService;
|
|
275
|
+
constructor(toastr: ToastrService);
|
|
276
|
+
success(message: string, time?: number): void;
|
|
277
|
+
info(message: string, time?: number): void;
|
|
278
|
+
warning(message: string, time?: number): void;
|
|
279
|
+
error(error: string, time?: number, message?: string): void;
|
|
280
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
|
|
281
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
declare class PouchdbService {
|
|
285
|
+
private db;
|
|
286
|
+
uploadAndStoreZip(zipFile: File, couchDbURl?: any): Promise<void>;
|
|
287
|
+
getFile(path: string, remoteDB: any): Promise<Blob>;
|
|
288
|
+
private decodeBlob;
|
|
289
|
+
getTextFile(path: string, remotedbUrl: any): Promise<any>;
|
|
290
|
+
blobToBase64(blob: Blob): Promise<string>;
|
|
291
|
+
getMimeType(fileName: string): string;
|
|
292
|
+
getAllDatabasesWithContent(couchdbBaseUrl: any): Promise<{
|
|
293
|
+
databaseName: string;
|
|
294
|
+
content: boolean;
|
|
295
|
+
}[]>;
|
|
296
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PouchdbService, never>;
|
|
297
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PouchdbService>;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export { AppVersionResetService, CardComponent, ConfigService, Couchdb, FormComponent, GridComponent, MobileKeycloakService, NetworkLogService, NotificationService, PaginationComponent, PouchdbService, RequestService, UtilityService, ViewToolkitModule };
|
|
301
|
+
export type { MobileAuthTokens };
|
package/ng-package.json
DELETED
package/src/lib/app-version.ts
DELETED
|
File without changes
|