@stemy/ngx-utils 10.2.44 → 10.3.3

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.
Files changed (182) hide show
  1. package/README.md +27 -27
  2. package/bundles/stemy-ngx-utils.umd.js +5654 -5640
  3. package/bundles/stemy-ngx-utils.umd.js.map +1 -1
  4. package/bundles/stemy-ngx-utils.umd.min.js +1 -1
  5. package/bundles/stemy-ngx-utils.umd.min.js.map +1 -1
  6. package/esm2015/ngx-utils/common-types.js +111 -111
  7. package/esm2015/ngx-utils/components/dynamic-table/dynamic-table.component.js +139 -139
  8. package/esm2015/ngx-utils/components/pagination-menu/pagination-menu.component.js +96 -96
  9. package/esm2015/ngx-utils/components/unordered-list/unordered-list.component.js +51 -51
  10. package/esm2015/ngx-utils/directives/async-method.directive.js +58 -58
  11. package/esm2015/ngx-utils/directives/background.directive.js +51 -51
  12. package/esm2015/ngx-utils/directives/dynamic-table-template.directive.js +19 -19
  13. package/esm2015/ngx-utils/directives/global-template.directive.js +27 -27
  14. package/esm2015/ngx-utils/directives/icon.directive.js +59 -59
  15. package/esm2015/ngx-utils/directives/ngx-template-outlet.directive.js +88 -88
  16. package/esm2015/ngx-utils/directives/pagination-item.directive.js +33 -33
  17. package/esm2015/ngx-utils/directives/pagination.directive.js +76 -71
  18. package/esm2015/ngx-utils/directives/resource-if.directive.js +51 -51
  19. package/esm2015/ngx-utils/directives/sticky-class.directive.js +35 -35
  20. package/esm2015/ngx-utils/directives/sticky.directive.js +48 -48
  21. package/esm2015/ngx-utils/directives/unordered-list-item.directive.js +70 -70
  22. package/esm2015/ngx-utils/directives/unordered-list-template.directive.js +26 -26
  23. package/esm2015/ngx-utils/ngx-utils.module.js +232 -232
  24. package/esm2015/ngx-utils/pipes/chunk.pipe.js +21 -21
  25. package/esm2015/ngx-utils/pipes/entries.pipe.js +24 -24
  26. package/esm2015/ngx-utils/pipes/extra-item-properties.pipe.js +27 -27
  27. package/esm2015/ngx-utils/pipes/filter.pipe.js +38 -38
  28. package/esm2015/ngx-utils/pipes/find.pipe.js +25 -25
  29. package/esm2015/ngx-utils/pipes/format-number.pipe.js +19 -19
  30. package/esm2015/ngx-utils/pipes/get-offset.pipe.js +13 -13
  31. package/esm2015/ngx-utils/pipes/get-type.pipe.js +12 -12
  32. package/esm2015/ngx-utils/pipes/global-template.pipe.js +35 -35
  33. package/esm2015/ngx-utils/pipes/group-by.pipe.js +23 -23
  34. package/esm2015/ngx-utils/pipes/is-type.pipe.js +12 -12
  35. package/esm2015/ngx-utils/pipes/join.pipe.js +15 -15
  36. package/esm2015/ngx-utils/pipes/keys.pipe.js +18 -18
  37. package/esm2015/ngx-utils/pipes/map.pipe.js +25 -25
  38. package/esm2015/ngx-utils/pipes/max.pipe.js +22 -22
  39. package/esm2015/ngx-utils/pipes/min.pipe.js +22 -22
  40. package/esm2015/ngx-utils/pipes/reduce.pipe.js +26 -26
  41. package/esm2015/ngx-utils/pipes/remap.pipe.js +28 -28
  42. package/esm2015/ngx-utils/pipes/replace.pipe.js +12 -12
  43. package/esm2015/ngx-utils/pipes/reverse.pipe.js +20 -20
  44. package/esm2015/ngx-utils/pipes/round.pipe.js +19 -19
  45. package/esm2015/ngx-utils/pipes/safe-html.pipe.js +32 -32
  46. package/esm2015/ngx-utils/pipes/translate.pipe.js +81 -81
  47. package/esm2015/ngx-utils/pipes/values.pipe.js +18 -18
  48. package/esm2015/ngx-utils/plugins/resize-event.plugin.js +59 -59
  49. package/esm2015/ngx-utils/plugins/scroll-event.plugin.js +52 -52
  50. package/esm2015/ngx-utils/services/acl.service.js +78 -78
  51. package/esm2015/ngx-utils/services/api.service.js +35 -35
  52. package/esm2015/ngx-utils/services/auth.service.js +14 -14
  53. package/esm2015/ngx-utils/services/base-http.client.js +46 -46
  54. package/esm2015/ngx-utils/services/base-http.service.js +274 -274
  55. package/esm2015/ngx-utils/services/config.service.js +95 -95
  56. package/esm2015/ngx-utils/services/error-handler.service.js +49 -49
  57. package/esm2015/ngx-utils/services/events.service.js +24 -24
  58. package/esm2015/ngx-utils/services/formatter.service.js +44 -44
  59. package/esm2015/ngx-utils/services/global-template.service.js +35 -35
  60. package/esm2015/ngx-utils/services/icon.service.js +24 -24
  61. package/esm2015/ngx-utils/services/language.service.js +117 -117
  62. package/esm2015/ngx-utils/services/open-api.service.js +41 -41
  63. package/esm2015/ngx-utils/services/promise.service.js +49 -49
  64. package/esm2015/ngx-utils/services/state.service.js +143 -143
  65. package/esm2015/ngx-utils/services/static-language.service.js +144 -144
  66. package/esm2015/ngx-utils/services/storage.service.js +48 -48
  67. package/esm2015/ngx-utils/services/toaster.service.js +29 -29
  68. package/esm2015/ngx-utils/services/translated-url.serializer.js +70 -70
  69. package/esm2015/ngx-utils/services/universal.service.js +73 -73
  70. package/esm2015/ngx-utils/utils/ajax-request-handler.js +40 -40
  71. package/esm2015/ngx-utils/utils/array.utils.js +100 -90
  72. package/esm2015/ngx-utils/utils/auth.guard.js +153 -153
  73. package/esm2015/ngx-utils/utils/canvas.utils.js +388 -388
  74. package/esm2015/ngx-utils/utils/date.utils.js +28 -28
  75. package/esm2015/ngx-utils/utils/file.utils.js +90 -90
  76. package/esm2015/ngx-utils/utils/generic-value.js +20 -20
  77. package/esm2015/ngx-utils/utils/geometry.js +132 -132
  78. package/esm2015/ngx-utils/utils/initializer.js +17 -17
  79. package/esm2015/ngx-utils/utils/loader.utils.js +55 -55
  80. package/esm2015/ngx-utils/utils/math.utils.js +15 -15
  81. package/esm2015/ngx-utils/utils/object.utils.js +248 -248
  82. package/esm2015/ngx-utils/utils/observable.utils.js +63 -63
  83. package/esm2015/ngx-utils/utils/reflect.utils.js +33 -33
  84. package/esm2015/ngx-utils/utils/set.utils.js +20 -20
  85. package/esm2015/ngx-utils/utils/string.utils.js +28 -28
  86. package/esm2015/ngx-utils/utils/timer.utils.js +52 -52
  87. package/esm2015/ngx-utils/utils/unique.utils.js +24 -24
  88. package/esm2015/ngx-utils/utils/vector.js +77 -77
  89. package/esm2015/public_api.js +83 -83
  90. package/esm2015/stemy-ngx-utils.js +7 -7
  91. package/fesm2015/stemy-ngx-utils.js +4552 -4537
  92. package/fesm2015/stemy-ngx-utils.js.map +1 -1
  93. package/ngx-utils/common-types.d.ts +284 -284
  94. package/ngx-utils/components/dynamic-table/dynamic-table.component.d.ts +43 -43
  95. package/ngx-utils/components/pagination-menu/pagination-menu.component.d.ts +28 -28
  96. package/ngx-utils/components/unordered-list/unordered-list.component.d.ts +22 -22
  97. package/ngx-utils/directives/async-method.directive.d.ts +16 -16
  98. package/ngx-utils/directives/background.directive.d.ts +14 -14
  99. package/ngx-utils/directives/dynamic-table-template.directive.d.ts +8 -8
  100. package/ngx-utils/directives/global-template.directive.d.ts +10 -10
  101. package/ngx-utils/directives/icon.directive.d.ts +20 -20
  102. package/ngx-utils/directives/ngx-template-outlet.directive.d.ts +14 -14
  103. package/ngx-utils/directives/pagination-item.directive.d.ts +12 -12
  104. package/ngx-utils/directives/pagination.directive.d.ts +22 -21
  105. package/ngx-utils/directives/resource-if.directive.d.ts +16 -16
  106. package/ngx-utils/directives/sticky-class.directive.d.ts +12 -12
  107. package/ngx-utils/directives/sticky.directive.d.ts +16 -16
  108. package/ngx-utils/directives/unordered-list-item.directive.d.ts +25 -25
  109. package/ngx-utils/directives/unordered-list-template.directive.d.ts +10 -10
  110. package/ngx-utils/ngx-utils.module.d.ts +76 -76
  111. package/ngx-utils/pipes/chunk.pipe.d.ts +4 -4
  112. package/ngx-utils/pipes/entries.pipe.d.ts +9 -9
  113. package/ngx-utils/pipes/extra-item-properties.pipe.d.ts +5 -5
  114. package/ngx-utils/pipes/filter.pipe.d.ts +5 -5
  115. package/ngx-utils/pipes/find.pipe.d.ts +5 -5
  116. package/ngx-utils/pipes/format-number.pipe.d.ts +7 -7
  117. package/ngx-utils/pipes/get-offset.pipe.d.ts +4 -4
  118. package/ngx-utils/pipes/get-type.pipe.d.ts +4 -4
  119. package/ngx-utils/pipes/global-template.pipe.d.ts +13 -13
  120. package/ngx-utils/pipes/group-by.pipe.d.ts +5 -5
  121. package/ngx-utils/pipes/is-type.pipe.d.ts +4 -4
  122. package/ngx-utils/pipes/join.pipe.d.ts +4 -4
  123. package/ngx-utils/pipes/keys.pipe.d.ts +4 -4
  124. package/ngx-utils/pipes/map.pipe.d.ts +5 -5
  125. package/ngx-utils/pipes/max.pipe.d.ts +4 -4
  126. package/ngx-utils/pipes/min.pipe.d.ts +4 -4
  127. package/ngx-utils/pipes/reduce.pipe.d.ts +5 -5
  128. package/ngx-utils/pipes/remap.pipe.d.ts +4 -4
  129. package/ngx-utils/pipes/replace.pipe.d.ts +4 -4
  130. package/ngx-utils/pipes/reverse.pipe.d.ts +4 -4
  131. package/ngx-utils/pipes/round.pipe.d.ts +7 -7
  132. package/ngx-utils/pipes/safe-html.pipe.d.ts +7 -7
  133. package/ngx-utils/pipes/translate.pipe.d.ts +15 -15
  134. package/ngx-utils/pipes/values.pipe.d.ts +4 -4
  135. package/ngx-utils/plugins/resize-event.plugin.d.ts +10 -10
  136. package/ngx-utils/plugins/scroll-event.plugin.d.ts +11 -11
  137. package/ngx-utils/services/acl.service.d.ts +12 -12
  138. package/ngx-utils/services/api.service.d.ts +14 -14
  139. package/ngx-utils/services/auth.service.d.ts +8 -8
  140. package/ngx-utils/services/base-http.client.d.ts +12 -12
  141. package/ngx-utils/services/base-http.service.d.ts +42 -42
  142. package/ngx-utils/services/config.service.d.ts +21 -21
  143. package/ngx-utils/services/error-handler.service.d.ts +10 -10
  144. package/ngx-utils/services/events.service.d.ts +11 -11
  145. package/ngx-utils/services/formatter.service.d.ts +12 -12
  146. package/ngx-utils/services/global-template.service.d.ts +16 -16
  147. package/ngx-utils/services/icon.service.d.ts +10 -10
  148. package/ngx-utils/services/language.service.d.ts +18 -18
  149. package/ngx-utils/services/open-api.service.d.ts +8 -8
  150. package/ngx-utils/services/promise.service.d.ts +15 -15
  151. package/ngx-utils/services/state.service.d.ts +41 -41
  152. package/ngx-utils/services/static-language.service.d.ts +41 -41
  153. package/ngx-utils/services/storage.service.d.ts +12 -12
  154. package/ngx-utils/services/toaster.service.d.ts +10 -10
  155. package/ngx-utils/services/translated-url.serializer.d.ts +16 -16
  156. package/ngx-utils/services/universal.service.d.ts +24 -24
  157. package/ngx-utils/utils/ajax-request-handler.d.ts +11 -11
  158. package/ngx-utils/utils/array.utils.d.ts +10 -9
  159. package/ngx-utils/utils/auth.guard.d.ts +26 -26
  160. package/ngx-utils/utils/canvas.utils.d.ts +13 -13
  161. package/ngx-utils/utils/date.utils.d.ts +8 -8
  162. package/ngx-utils/utils/file.utils.d.ts +14 -14
  163. package/ngx-utils/utils/generic-value.d.ts +8 -8
  164. package/ngx-utils/utils/geometry.d.ts +50 -50
  165. package/ngx-utils/utils/initializer.d.ts +11 -11
  166. package/ngx-utils/utils/loader.utils.d.ts +7 -7
  167. package/ngx-utils/utils/math.utils.d.ts +5 -5
  168. package/ngx-utils/utils/object.utils.d.ts +31 -31
  169. package/ngx-utils/utils/observable.utils.d.ts +12 -12
  170. package/ngx-utils/utils/reflect.utils.d.ts +9 -9
  171. package/ngx-utils/utils/set.utils.d.ts +4 -4
  172. package/ngx-utils/utils/string.utils.d.ts +7 -7
  173. package/ngx-utils/utils/timer.utils.d.ts +6 -6
  174. package/ngx-utils/utils/unique.utils.d.ts +5 -5
  175. package/ngx-utils/utils/vector.d.ts +23 -23
  176. package/package.json +1 -1
  177. package/public_api.d.ts +82 -82
  178. package/stemy-ngx-utils.d.ts +6 -6
  179. package/stemy-ngx-utils.metadata.json +1 -1
  180. package/tools/circular.js +116 -116
  181. package/tools/config.js +78 -78
  182. package/tools/icons.js +13 -13
@@ -1,284 +1,284 @@
1
- import { EventEmitter, InjectionToken, NgZone, Provider, TemplateRef, Type } from "@angular/core";
2
- import { HttpClient, HttpErrorResponse, HttpHeaders } from "@angular/common/http";
3
- import { ActivatedRouteSnapshot, Data, Route } from "@angular/router";
4
- import { Request } from "express";
5
- export interface IResolveFactory {
6
- func: Function;
7
- type?: any;
8
- params?: any[];
9
- }
10
- export declare class CanvasColor {
11
- r: number;
12
- g: number;
13
- b: number;
14
- a: number;
15
- constructor(r: number, g: number, b: number, a?: number);
16
- }
17
- export interface IIconService {
18
- isDisabled: boolean;
19
- iconsLoaded: EventEmitter<any>;
20
- getIcon(icon: string, activeIcon: string, active: boolean): Promise<string>;
21
- }
22
- export declare const ICON_SERVICE: InjectionToken<IIconService>;
23
- export interface ITranslation {
24
- lang: string;
25
- translation: string;
26
- }
27
- export interface ITranslations {
28
- [key: string]: any;
29
- }
30
- export interface ILanguageSettings {
31
- languages: string[];
32
- devLanguages: string[];
33
- defaultLanguage: string;
34
- settings?: any;
35
- }
36
- export interface ILanguageService {
37
- currentLanguage: string;
38
- editLanguage: string;
39
- disableTranslations: boolean;
40
- defaultLanguage: string;
41
- dictionary: ITranslations;
42
- readonly languages: string[];
43
- readonly httpClient: HttpClient;
44
- addLanguages(languages: string[]): void;
45
- getTranslationSync(key: string, params?: any): string;
46
- getTranslation(key: string, params?: any): Promise<string>;
47
- getTranslations(...keys: string[]): Promise<ITranslations>;
48
- getTranslationFromObject(translations: ITranslations, params?: any, lang?: string): string;
49
- getTranslationFromArray(translations: ITranslation[], params?: any, lang?: string): string;
50
- }
51
- export declare const LANGUAGE_SERVICE: InjectionToken<ILanguageService>;
52
- export interface IAuthService {
53
- isAuthenticated: boolean;
54
- userChanged: EventEmitter<any>;
55
- checkAuthenticated(): Promise<boolean>;
56
- }
57
- export declare type RouteValidator = (auth: IAuthService, route?: IRoute, next?: ActivatedRouteSnapshot) => Promise<boolean>;
58
- export interface IRouteData extends Data {
59
- returnState?: string[];
60
- guards?: Array<IResolveFactory | RouteValidator>;
61
- }
62
- export interface IRoute extends Route {
63
- data?: IRouteData;
64
- }
65
- export declare const AUTH_SERVICE: InjectionToken<IAuthService>;
66
- export interface IAclComponent {
67
- onUserInitialized(): void;
68
- onUserChanged(): void;
69
- }
70
- export interface IRouteStateInfo {
71
- route: IRoute;
72
- component: any;
73
- guard: any;
74
- dirty: boolean;
75
- first: boolean;
76
- }
77
- export declare enum StorageMode {
78
- Local = 0,
79
- Session = 1
80
- }
81
- export interface IToasterService {
82
- error(message: string, params?: any, title?: string): void;
83
- info(message: string, params?: any, title?: string): void;
84
- success(message: string, params?: any, title?: string): void;
85
- warning(message: string, params?: any, title?: string): void;
86
- }
87
- export declare const TOASTER_SERVICE: InjectionToken<IToasterService>;
88
- export interface IPromiseService {
89
- zone: NgZone;
90
- count: number;
91
- onChanged: EventEmitter<number>;
92
- create<T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
93
- all(promises: Promise<any>[]): Promise<any>;
94
- resolve<T>(value: T | PromiseLike<T>): Promise<T>;
95
- }
96
- export declare const PROMISE_SERVICE: InjectionToken<IPromiseService>;
97
- export interface IAsyncMessage {
98
- message: string;
99
- context?: any;
100
- }
101
- export declare type AsyncMethod = (context?: any) => Promise<IAsyncMessage>;
102
- export declare abstract class UnorederedListTemplate extends TemplateRef<any> {
103
- abstract type: string;
104
- abstract selector: string;
105
- }
106
- export interface UnorderedListTemplates {
107
- [type: string]: TemplateRef<any>;
108
- }
109
- export declare type UnorderedListStyle = "table" | "list";
110
- export interface IAjaxRequestDetails {
111
- request: XMLHttpRequest;
112
- method: string;
113
- url: string;
114
- }
115
- export declare type AjaxRequestCallback = (details: IAjaxRequestDetails, params: any) => void;
116
- export interface IScriptPromises {
117
- [src: string]: Promise<HTMLScriptElement>;
118
- }
119
- export interface IStylePromises {
120
- [src: string]: Promise<HTMLLinkElement>;
121
- }
122
- export interface ISearchObservable {
123
- search: string;
124
- getSearchResults(token: string): Promise<any[]>;
125
- }
126
- export declare function FactoryDependencies(...dependencies: Array<InjectionToken<any> | Provider>): MethodDecorator;
127
- export interface ITimer {
128
- id?: any;
129
- func?: Function;
130
- time?: number;
131
- run?: () => void;
132
- set?: (func: Function, time: number) => void;
133
- clear?: () => void;
134
- }
135
- export interface IExtraProperties {
136
- [prop: string]: any;
137
- }
138
- export interface IGroupMap {
139
- [column: string]: any;
140
- }
141
- export declare type TranslationQuery = string | ITranslations | ITranslation[];
142
- export interface IPageInfo {
143
- text: string;
144
- number: number;
145
- active: boolean;
146
- }
147
- export interface IPaginationData {
148
- total: number;
149
- items: any[];
150
- meta?: any;
151
- }
152
- export declare type PaginationDataLoader = (page: number, itemsPerPage: number) => Promise<IPaginationData>;
153
- export declare class PaginationItemContext {
154
- item: any;
155
- parallelItem: any;
156
- count: number;
157
- index: number;
158
- dataIndex: number;
159
- constructor(item: any, parallelItem: any, count: number, index: number, dataIndex: number);
160
- get first(): boolean;
161
- get last(): boolean;
162
- get even(): boolean;
163
- get odd(): boolean;
164
- get row(): any;
165
- get parallelRow(): any;
166
- filter(filterRx: RegExp): boolean;
167
- }
168
- export interface IHttpHeaders {
169
- [header: string]: string | string[];
170
- }
171
- export interface IHttpParams {
172
- [key: string]: any;
173
- }
174
- export interface IRequestOptions {
175
- method?: string;
176
- body?: any;
177
- headers?: IHttpHeaders | HttpHeaders;
178
- originalHeaders?: IHttpHeaders;
179
- params?: IHttpParams;
180
- observe?: "body";
181
- reportProgress?: boolean;
182
- responseType?: "arraybuffer" | "blob" | "json" | "text";
183
- withCredentials?: boolean;
184
- timeout?: number;
185
- }
186
- export interface IIssueContext {
187
- url: string;
188
- }
189
- export interface IProgress {
190
- percentage?: number;
191
- loaded?: number;
192
- total?: number;
193
- }
194
- export declare type ProgressListener = (progress: IProgress) => void;
195
- export declare type PromiseExecutor = (resolve: (value?: any | PromiseLike<any>) => void, reject: (reason?: any) => void) => void;
196
- export declare class HttpPromise extends Promise<any> {
197
- protected rejectHandler: (reason?: HttpErrorResponse) => void;
198
- protected hasRejectHandler: boolean;
199
- protected attachCount: number;
200
- protected runCount: number;
201
- constructor(rejectHandler: (reason?: HttpErrorResponse) => void, executor: PromiseExecutor);
202
- then<TResult1, TResult2>(onFulfilled?: ((value: any) => (PromiseLike<TResult1> | TResult1)) | null | undefined, onRejected?: ((reason: HttpErrorResponse) => (PromiseLike<TResult2> | TResult2)) | null | undefined): Promise<TResult1 | TResult2>;
203
- catch<TResult = never>(onRejected?: ((reason: HttpErrorResponse) => (PromiseLike<TResult> | TResult)) | null | undefined): Promise<any | TResult>;
204
- }
205
- export interface IHttpService {
206
- language: ILanguageService;
207
- url(url: string): string;
208
- makeListParams(page: number, itemsPerPage: number, orderBy?: string, orderDescending?: boolean, filter?: string): IHttpParams;
209
- }
210
- export declare const EXPRESS_REQUEST: InjectionToken<Request>;
211
- export interface IApiService extends IHttpService {
212
- cache: any;
213
- client: HttpClient;
214
- get(url: string, options?: IRequestOptions): Promise<any>;
215
- delete(url: string, options?: IRequestOptions): Promise<any>;
216
- post(url: string, body?: any, options?: IRequestOptions): Promise<any>;
217
- put(url: string, body?: any, options?: IRequestOptions): Promise<any>;
218
- patch(url: string, body?: any, options?: IRequestOptions): Promise<any>;
219
- upload(url: string, body: any, listener?: ProgressListener, options?: IRequestOptions): Promise<any>;
220
- list(url: string, params: IHttpParams): Promise<IPaginationData>;
221
- }
222
- export declare const API_SERVICE: InjectionToken<IApiService>;
223
- export interface IOpenApiSchemaProperty {
224
- id: string;
225
- type?: string;
226
- format?: string;
227
- column?: boolean;
228
- additionalProperties?: any;
229
- $ref?: string;
230
- items?: IOpenApiSchemaProperty;
231
- enum?: string[];
232
- [key: string]: any;
233
- }
234
- export interface IOpenApiSchema {
235
- properties: {
236
- [name: string]: IOpenApiSchemaProperty;
237
- };
238
- required: string[];
239
- }
240
- export interface IOpenApiSchemas {
241
- [name: string]: IOpenApiSchema;
242
- }
243
- export interface ITableColumns {
244
- [column: string]: string;
245
- }
246
- export interface ITableTemplate {
247
- column: string | string[];
248
- pure: boolean;
249
- ref: TemplateRef<any>;
250
- }
251
- export interface ITableTemplates {
252
- [column: string]: ITableTemplate;
253
- }
254
- export declare type TableDataLoader = (page: number, rowsPerPage: number, orderBy: string, orderDescending: boolean, filter: string) => Promise<IPaginationData>;
255
- export declare class ResourceIfContext {
256
- resource: string;
257
- url: string;
258
- }
259
- export declare class IConfiguration {
260
- baseUrl?: string;
261
- translationUrl?: string;
262
- [key: string]: any;
263
- }
264
- export interface IConfigService {
265
- config: IConfiguration;
266
- readonly load: () => Promise<IConfiguration>;
267
- prepareUrl(url: string, ending: string): string;
268
- getConfigValue(key: string): any;
269
- getQueryParameter(name: string, url?: string): string;
270
- }
271
- export declare const CONFIG_SERVICE: InjectionToken<IConfigService>;
272
- export declare const BASE_CONFIG: InjectionToken<IConfiguration>;
273
- export declare const SCRIPT_PARAMS: InjectionToken<any>;
274
- export declare type ErrorHandlerCallback = (error: string) => any;
275
- export declare const ERROR_HANDLER: InjectionToken<ErrorHandlerCallback>;
276
- export interface IModuleConfig {
277
- apiService?: Type<IApiService>;
278
- authService?: Type<IAuthService>;
279
- iconService?: Type<IIconService>;
280
- languageService?: Type<ILanguageService>;
281
- toasterService?: Type<IToasterService>;
282
- promiseService?: Type<IPromiseService>;
283
- configService?: Type<IConfigService>;
284
- }
1
+ import { EventEmitter, InjectionToken, NgZone, Provider, TemplateRef, Type } from "@angular/core";
2
+ import { HttpClient, HttpErrorResponse, HttpHeaders } from "@angular/common/http";
3
+ import { ActivatedRouteSnapshot, Data, Route } from "@angular/router";
4
+ import { Request } from "express";
5
+ export interface IResolveFactory {
6
+ func: Function;
7
+ type?: any;
8
+ params?: any[];
9
+ }
10
+ export declare class CanvasColor {
11
+ r: number;
12
+ g: number;
13
+ b: number;
14
+ a: number;
15
+ constructor(r: number, g: number, b: number, a?: number);
16
+ }
17
+ export interface IIconService {
18
+ isDisabled: boolean;
19
+ iconsLoaded: EventEmitter<any>;
20
+ getIcon(icon: string, activeIcon: string, active: boolean): Promise<string>;
21
+ }
22
+ export declare const ICON_SERVICE: InjectionToken<IIconService>;
23
+ export interface ITranslation {
24
+ lang: string;
25
+ translation: string;
26
+ }
27
+ export interface ITranslations {
28
+ [key: string]: any;
29
+ }
30
+ export interface ILanguageSettings {
31
+ languages: string[];
32
+ devLanguages: string[];
33
+ defaultLanguage: string;
34
+ settings?: any;
35
+ }
36
+ export interface ILanguageService {
37
+ currentLanguage: string;
38
+ editLanguage: string;
39
+ disableTranslations: boolean;
40
+ defaultLanguage: string;
41
+ dictionary: ITranslations;
42
+ readonly languages: string[];
43
+ readonly httpClient: HttpClient;
44
+ addLanguages(languages: string[]): void;
45
+ getTranslationSync(key: string, params?: any): string;
46
+ getTranslation(key: string, params?: any): Promise<string>;
47
+ getTranslations(...keys: string[]): Promise<ITranslations>;
48
+ getTranslationFromObject(translations: ITranslations, params?: any, lang?: string): string;
49
+ getTranslationFromArray(translations: ITranslation[], params?: any, lang?: string): string;
50
+ }
51
+ export declare const LANGUAGE_SERVICE: InjectionToken<ILanguageService>;
52
+ export interface IAuthService {
53
+ isAuthenticated: boolean;
54
+ userChanged: EventEmitter<any>;
55
+ checkAuthenticated(): Promise<boolean>;
56
+ }
57
+ export declare type RouteValidator = (auth: IAuthService, route?: IRoute, next?: ActivatedRouteSnapshot) => Promise<boolean>;
58
+ export interface IRouteData extends Data {
59
+ returnState?: string[];
60
+ guards?: Array<IResolveFactory | RouteValidator>;
61
+ }
62
+ export interface IRoute extends Route {
63
+ data?: IRouteData;
64
+ }
65
+ export declare const AUTH_SERVICE: InjectionToken<IAuthService>;
66
+ export interface IAclComponent {
67
+ onUserInitialized(): void;
68
+ onUserChanged(): void;
69
+ }
70
+ export interface IRouteStateInfo {
71
+ route: IRoute;
72
+ component: any;
73
+ guard: any;
74
+ dirty: boolean;
75
+ first: boolean;
76
+ }
77
+ export declare enum StorageMode {
78
+ Local = 0,
79
+ Session = 1
80
+ }
81
+ export interface IToasterService {
82
+ error(message: string, params?: any, title?: string): void;
83
+ info(message: string, params?: any, title?: string): void;
84
+ success(message: string, params?: any, title?: string): void;
85
+ warning(message: string, params?: any, title?: string): void;
86
+ }
87
+ export declare const TOASTER_SERVICE: InjectionToken<IToasterService>;
88
+ export interface IPromiseService {
89
+ zone: NgZone;
90
+ count: number;
91
+ onChanged: EventEmitter<number>;
92
+ create<T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
93
+ all(promises: Promise<any>[]): Promise<any>;
94
+ resolve<T>(value: T | PromiseLike<T>): Promise<T>;
95
+ }
96
+ export declare const PROMISE_SERVICE: InjectionToken<IPromiseService>;
97
+ export interface IAsyncMessage {
98
+ message: string;
99
+ context?: any;
100
+ }
101
+ export declare type AsyncMethod = (context?: any) => Promise<IAsyncMessage>;
102
+ export declare abstract class UnorederedListTemplate extends TemplateRef<any> {
103
+ abstract type: string;
104
+ abstract selector: string;
105
+ }
106
+ export interface UnorderedListTemplates {
107
+ [type: string]: TemplateRef<any>;
108
+ }
109
+ export declare type UnorderedListStyle = "table" | "list";
110
+ export interface IAjaxRequestDetails {
111
+ request: XMLHttpRequest;
112
+ method: string;
113
+ url: string;
114
+ }
115
+ export declare type AjaxRequestCallback = (details: IAjaxRequestDetails, params: any) => void;
116
+ export interface IScriptPromises {
117
+ [src: string]: Promise<HTMLScriptElement>;
118
+ }
119
+ export interface IStylePromises {
120
+ [src: string]: Promise<HTMLLinkElement>;
121
+ }
122
+ export interface ISearchObservable {
123
+ search: string;
124
+ getSearchResults(token: string): Promise<any[]>;
125
+ }
126
+ export declare function FactoryDependencies(...dependencies: Array<InjectionToken<any> | Provider>): MethodDecorator;
127
+ export interface ITimer {
128
+ id?: any;
129
+ func?: Function;
130
+ time?: number;
131
+ run?: () => void;
132
+ set?: (func: Function, time: number) => void;
133
+ clear?: () => void;
134
+ }
135
+ export interface IExtraProperties {
136
+ [prop: string]: any;
137
+ }
138
+ export interface IGroupMap {
139
+ [column: string]: any;
140
+ }
141
+ export declare type TranslationQuery = string | ITranslations | ITranslation[];
142
+ export interface IPageInfo {
143
+ text: string;
144
+ number: number;
145
+ active: boolean;
146
+ }
147
+ export interface IPaginationData {
148
+ total: number;
149
+ items: any[];
150
+ meta?: any;
151
+ }
152
+ export declare type PaginationDataLoader = (page: number, itemsPerPage: number) => Promise<IPaginationData>;
153
+ export declare class PaginationItemContext {
154
+ item: any;
155
+ parallelItem: any;
156
+ count: number;
157
+ index: number;
158
+ dataIndex: number;
159
+ constructor(item: any, parallelItem: any, count: number, index: number, dataIndex: number);
160
+ get first(): boolean;
161
+ get last(): boolean;
162
+ get even(): boolean;
163
+ get odd(): boolean;
164
+ get row(): any;
165
+ get parallelRow(): any;
166
+ filter(filterRx: RegExp): boolean;
167
+ }
168
+ export interface IHttpHeaders {
169
+ [header: string]: string | string[];
170
+ }
171
+ export interface IHttpParams {
172
+ [key: string]: any;
173
+ }
174
+ export interface IRequestOptions {
175
+ method?: string;
176
+ body?: any;
177
+ headers?: IHttpHeaders | HttpHeaders;
178
+ originalHeaders?: IHttpHeaders;
179
+ params?: IHttpParams;
180
+ observe?: "body";
181
+ reportProgress?: boolean;
182
+ responseType?: "arraybuffer" | "blob" | "json" | "text";
183
+ withCredentials?: boolean;
184
+ timeout?: number;
185
+ }
186
+ export interface IIssueContext {
187
+ url: string;
188
+ }
189
+ export interface IProgress {
190
+ percentage?: number;
191
+ loaded?: number;
192
+ total?: number;
193
+ }
194
+ export declare type ProgressListener = (progress: IProgress) => void;
195
+ export declare type PromiseExecutor = (resolve: (value?: any | PromiseLike<any>) => void, reject: (reason?: any) => void) => void;
196
+ export declare class HttpPromise extends Promise<any> {
197
+ protected rejectHandler: (reason?: HttpErrorResponse) => void;
198
+ protected hasRejectHandler: boolean;
199
+ protected attachCount: number;
200
+ protected runCount: number;
201
+ constructor(rejectHandler: (reason?: HttpErrorResponse) => void, executor: PromiseExecutor);
202
+ then<TResult1, TResult2>(onFulfilled?: ((value: any) => (PromiseLike<TResult1> | TResult1)) | null | undefined, onRejected?: ((reason: HttpErrorResponse) => (PromiseLike<TResult2> | TResult2)) | null | undefined): Promise<TResult1 | TResult2>;
203
+ catch<TResult = never>(onRejected?: ((reason: HttpErrorResponse) => (PromiseLike<TResult> | TResult)) | null | undefined): Promise<any | TResult>;
204
+ }
205
+ export interface IHttpService {
206
+ language: ILanguageService;
207
+ url(url: string): string;
208
+ makeListParams(page: number, itemsPerPage: number, orderBy?: string, orderDescending?: boolean, filter?: string): IHttpParams;
209
+ }
210
+ export declare const EXPRESS_REQUEST: InjectionToken<Request>;
211
+ export interface IApiService extends IHttpService {
212
+ cache: any;
213
+ client: HttpClient;
214
+ get(url: string, options?: IRequestOptions): Promise<any>;
215
+ delete(url: string, options?: IRequestOptions): Promise<any>;
216
+ post(url: string, body?: any, options?: IRequestOptions): Promise<any>;
217
+ put(url: string, body?: any, options?: IRequestOptions): Promise<any>;
218
+ patch(url: string, body?: any, options?: IRequestOptions): Promise<any>;
219
+ upload(url: string, body: any, listener?: ProgressListener, options?: IRequestOptions): Promise<any>;
220
+ list(url: string, params: IHttpParams): Promise<IPaginationData>;
221
+ }
222
+ export declare const API_SERVICE: InjectionToken<IApiService>;
223
+ export interface IOpenApiSchemaProperty {
224
+ id: string;
225
+ type?: string;
226
+ format?: string;
227
+ column?: boolean;
228
+ additionalProperties?: any;
229
+ $ref?: string;
230
+ items?: IOpenApiSchemaProperty;
231
+ enum?: string[];
232
+ [key: string]: any;
233
+ }
234
+ export interface IOpenApiSchema {
235
+ properties: {
236
+ [name: string]: IOpenApiSchemaProperty;
237
+ };
238
+ required: string[];
239
+ }
240
+ export interface IOpenApiSchemas {
241
+ [name: string]: IOpenApiSchema;
242
+ }
243
+ export interface ITableColumns {
244
+ [column: string]: string;
245
+ }
246
+ export interface ITableTemplate {
247
+ column: string | string[];
248
+ pure: boolean;
249
+ ref: TemplateRef<any>;
250
+ }
251
+ export interface ITableTemplates {
252
+ [column: string]: ITableTemplate;
253
+ }
254
+ export declare type TableDataLoader = (page: number, rowsPerPage: number, orderBy: string, orderDescending: boolean, filter: string) => Promise<IPaginationData>;
255
+ export declare class ResourceIfContext {
256
+ resource: string;
257
+ url: string;
258
+ }
259
+ export declare class IConfiguration {
260
+ baseUrl?: string;
261
+ translationUrl?: string;
262
+ [key: string]: any;
263
+ }
264
+ export interface IConfigService {
265
+ config: IConfiguration;
266
+ readonly load: () => Promise<IConfiguration>;
267
+ prepareUrl(url: string, ending: string): string;
268
+ getConfigValue(key: string): any;
269
+ getQueryParameter(name: string, url?: string): string;
270
+ }
271
+ export declare const CONFIG_SERVICE: InjectionToken<IConfigService>;
272
+ export declare const BASE_CONFIG: InjectionToken<IConfiguration>;
273
+ export declare const SCRIPT_PARAMS: InjectionToken<any>;
274
+ export declare type ErrorHandlerCallback = (error: string) => any;
275
+ export declare const ERROR_HANDLER: InjectionToken<ErrorHandlerCallback>;
276
+ export interface IModuleConfig {
277
+ apiService?: Type<IApiService>;
278
+ authService?: Type<IAuthService>;
279
+ iconService?: Type<IIconService>;
280
+ languageService?: Type<ILanguageService>;
281
+ toasterService?: Type<IToasterService>;
282
+ promiseService?: Type<IPromiseService>;
283
+ configService?: Type<IConfigService>;
284
+ }
@@ -1,43 +1,43 @@
1
- import { AfterContentInit, AfterViewInit, OnChanges, SimpleChanges, TemplateRef } from "@angular/core";
2
- import { IPaginationData, ITableColumns, ITableTemplates, TableDataLoader } from "../../common-types";
3
- export declare class DynamicTableComponent implements AfterContentInit, AfterViewInit, OnChanges {
4
- label: string;
5
- placeholder: string;
6
- dataLoader: TableDataLoader;
7
- data: any[];
8
- parallelData: any[];
9
- columns: ITableColumns | string[];
10
- showFilter: boolean;
11
- itemsPerPage: number;
12
- updateTime: number;
13
- maxPages: number;
14
- directionLinks: boolean;
15
- boundaryLinks: boolean;
16
- orderBy: string;
17
- orderDescending: boolean;
18
- tableId: string;
19
- templates: ITableTemplates;
20
- filter: string;
21
- orders: ITableColumns;
22
- cols: string[];
23
- get items(): any[];
24
- rowTemplate: TemplateRef<any>;
25
- wrapperTemplate: TemplateRef<any>;
26
- filterTemplate: TemplateRef<any>;
27
- columnsTemplate: TemplateRef<any>;
28
- defaultRowTemplate: TemplateRef<any>;
29
- defaultWrapperTemplate: TemplateRef<any>;
30
- defaultFilterTemplate: TemplateRef<any>;
31
- private pagination;
32
- private templateDirectives;
33
- private static compare;
34
- constructor();
35
- ngAfterContentInit(): void;
36
- ngAfterViewInit(): void;
37
- ngOnChanges(changes: SimpleChanges): void;
38
- refresh(): void;
39
- setFilter(filter: string): void;
40
- setOrder(column: string): void;
41
- loadData: (page: number, itemsPerPage: number) => Promise<IPaginationData>;
42
- private loadLocalData;
43
- }
1
+ import { AfterContentInit, AfterViewInit, OnChanges, SimpleChanges, TemplateRef } from "@angular/core";
2
+ import { IPaginationData, ITableColumns, ITableTemplates, TableDataLoader } from "../../common-types";
3
+ export declare class DynamicTableComponent implements AfterContentInit, AfterViewInit, OnChanges {
4
+ label: string;
5
+ placeholder: string;
6
+ dataLoader: TableDataLoader;
7
+ data: any[];
8
+ parallelData: any[];
9
+ columns: ITableColumns | string[];
10
+ showFilter: boolean;
11
+ itemsPerPage: number;
12
+ updateTime: number;
13
+ maxPages: number;
14
+ directionLinks: boolean;
15
+ boundaryLinks: boolean;
16
+ orderBy: string;
17
+ orderDescending: boolean;
18
+ tableId: string;
19
+ templates: ITableTemplates;
20
+ filter: string;
21
+ orders: ITableColumns;
22
+ cols: string[];
23
+ get items(): any[];
24
+ rowTemplate: TemplateRef<any>;
25
+ wrapperTemplate: TemplateRef<any>;
26
+ filterTemplate: TemplateRef<any>;
27
+ columnsTemplate: TemplateRef<any>;
28
+ defaultRowTemplate: TemplateRef<any>;
29
+ defaultWrapperTemplate: TemplateRef<any>;
30
+ defaultFilterTemplate: TemplateRef<any>;
31
+ private pagination;
32
+ private templateDirectives;
33
+ private static compare;
34
+ constructor();
35
+ ngAfterContentInit(): void;
36
+ ngAfterViewInit(): void;
37
+ ngOnChanges(changes: SimpleChanges): void;
38
+ refresh(): void;
39
+ setFilter(filter: string): void;
40
+ setOrder(column: string): void;
41
+ loadData: (page: number, itemsPerPage: number) => Promise<IPaginationData>;
42
+ private loadLocalData;
43
+ }