@yuuvis/client-core 0.6.5

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 (153) hide show
  1. package/README.md +111 -0
  2. package/esm2022/index.mjs +65 -0
  3. package/esm2022/lib/client-core.module.mjs +117 -0
  4. package/esm2022/lib/client-core.shared.module.mjs +18 -0
  5. package/esm2022/lib/common/pipes/filesize.pipe.mjs +37 -0
  6. package/esm2022/lib/common/pipes/index.mjs +6 -0
  7. package/esm2022/lib/common/pipes/keys.pipe.mjs +17 -0
  8. package/esm2022/lib/common/pipes/locale-date.pipe.mjs +45 -0
  9. package/esm2022/lib/common/pipes/locale-number.pipe.mjs +115 -0
  10. package/esm2022/lib/common/pipes/safe-html.pipe.mjs +44 -0
  11. package/esm2022/lib/common/services/native-notifications.interface.mjs +2 -0
  12. package/esm2022/lib/common/services/native-notifications.mjs +40 -0
  13. package/esm2022/lib/model/dms-object.interface.mjs +2 -0
  14. package/esm2022/lib/model/dms-object.model.mjs +79 -0
  15. package/esm2022/lib/model/object-flavor.interface.mjs +2 -0
  16. package/esm2022/lib/model/range-value.interface.mjs +2 -0
  17. package/esm2022/lib/model/yuv-error.model.mjs +37 -0
  18. package/esm2022/lib/model/yuv-user.model.mjs +38 -0
  19. package/esm2022/lib/service/audit/audit.interface.mjs +2 -0
  20. package/esm2022/lib/service/audit/audit.service.mjs +135 -0
  21. package/esm2022/lib/service/auth/auth.interceptor.mjs +50 -0
  22. package/esm2022/lib/service/auth/auth.interface.mjs +7 -0
  23. package/esm2022/lib/service/auth/auth.service.mjs +130 -0
  24. package/esm2022/lib/service/auth/oidc.service.mjs +81 -0
  25. package/esm2022/lib/service/backend/api.enum.mjs +11 -0
  26. package/esm2022/lib/service/backend/backend.interface.mjs +2 -0
  27. package/esm2022/lib/service/backend/backend.service.mjs +206 -0
  28. package/esm2022/lib/service/bpm/bpm.interface.mjs +8 -0
  29. package/esm2022/lib/service/bpm/bpm.service.mjs +51 -0
  30. package/esm2022/lib/service/cache/app-cache.service.mjs +51 -0
  31. package/esm2022/lib/service/catalog/catalog.interface.mjs +2 -0
  32. package/esm2022/lib/service/catalog/catalog.service.mjs +13 -0
  33. package/esm2022/lib/service/clipboard/clipboard.interface.mjs +2 -0
  34. package/esm2022/lib/service/clipboard/clipboard.service.mjs +90 -0
  35. package/esm2022/lib/service/config/config.interface.mjs +6 -0
  36. package/esm2022/lib/service/config/config.service.mjs +115 -0
  37. package/esm2022/lib/service/config/core-config.mjs +20 -0
  38. package/esm2022/lib/service/config/core-config.tokens.mjs +9 -0
  39. package/esm2022/lib/service/connection/connection.service.mjs +36 -0
  40. package/esm2022/lib/service/connection/offline.interceptor.mjs +28 -0
  41. package/esm2022/lib/service/core-init/core-init.service.mjs +29 -0
  42. package/esm2022/lib/service/core-init/missing-translation-handler.mjs +10 -0
  43. package/esm2022/lib/service/core-init/translate-json-loader.mjs +117 -0
  44. package/esm2022/lib/service/device/device.interface.mjs +6 -0
  45. package/esm2022/lib/service/device/device.service.mjs +144 -0
  46. package/esm2022/lib/service/dms/dms.service.interface.mjs +2 -0
  47. package/esm2022/lib/service/dms/dms.service.mjs +440 -0
  48. package/esm2022/lib/service/event/event.interface.mjs +2 -0
  49. package/esm2022/lib/service/event/event.service.mjs +38 -0
  50. package/esm2022/lib/service/event/events.mjs +14 -0
  51. package/esm2022/lib/service/idm/idm.interface.mjs +2 -0
  52. package/esm2022/lib/service/idm/idm.service.mjs +34 -0
  53. package/esm2022/lib/service/logger/logger-console.service.mjs +73 -0
  54. package/esm2022/lib/service/logger/logger.interface.mjs +2 -0
  55. package/esm2022/lib/service/logger/logger.mjs +27 -0
  56. package/esm2022/lib/service/notification/notification.service.mjs +131 -0
  57. package/esm2022/lib/service/object-config/object-config.interface.mjs +2 -0
  58. package/esm2022/lib/service/object-config/object-config.service.mjs +229 -0
  59. package/esm2022/lib/service/pending-changes/pending-changes-component.interface.mjs +5 -0
  60. package/esm2022/lib/service/pending-changes/pending-changes-guard.service.mjs +25 -0
  61. package/esm2022/lib/service/pending-changes/pending-changes.service.mjs +123 -0
  62. package/esm2022/lib/service/prediction/prediction.interface.mjs +2 -0
  63. package/esm2022/lib/service/prediction/prediction.service.mjs +60 -0
  64. package/esm2022/lib/service/search/search.service.interface.mjs +39 -0
  65. package/esm2022/lib/service/search/search.service.mjs +178 -0
  66. package/esm2022/lib/service/session-storage/session-storage.service.mjs +50 -0
  67. package/esm2022/lib/service/system/object-form.interface.mjs +2 -0
  68. package/esm2022/lib/service/system/system.enum.mjs +179 -0
  69. package/esm2022/lib/service/system/system.interface.mjs +2 -0
  70. package/esm2022/lib/service/system/system.service.mjs +597 -0
  71. package/esm2022/lib/service/upload/upload.interface.mjs +2 -0
  72. package/esm2022/lib/service/upload/upload.service.mjs +228 -0
  73. package/esm2022/lib/service/user/user.service.mjs +211 -0
  74. package/esm2022/lib/util/utils.helper.enum.mjs +15 -0
  75. package/esm2022/lib/util/utils.mjs +373 -0
  76. package/esm2022/yuuvis-client-core.mjs +5 -0
  77. package/fesm2022/yuuvis-client-core.mjs +4775 -0
  78. package/fesm2022/yuuvis-client-core.mjs.map +1 -0
  79. package/index.d.ts +61 -0
  80. package/lib/client-core.module.d.ts +20 -0
  81. package/lib/client-core.shared.module.d.ts +10 -0
  82. package/lib/common/pipes/filesize.pipe.d.ts +18 -0
  83. package/lib/common/pipes/index.d.ts +5 -0
  84. package/lib/common/pipes/keys.pipe.d.ts +10 -0
  85. package/lib/common/pipes/locale-date.pipe.d.ts +12 -0
  86. package/lib/common/pipes/locale-number.pipe.d.ts +47 -0
  87. package/lib/common/pipes/safe-html.pipe.d.ts +28 -0
  88. package/lib/common/services/native-notifications.d.ts +8 -0
  89. package/lib/common/services/native-notifications.interface.d.ts +5 -0
  90. package/lib/model/dms-object.interface.d.ts +16 -0
  91. package/lib/model/dms-object.model.d.ts +26 -0
  92. package/lib/model/object-flavor.interface.d.ts +30 -0
  93. package/lib/model/range-value.interface.d.ts +9 -0
  94. package/lib/model/yuv-error.model.d.ts +18 -0
  95. package/lib/model/yuv-user.model.d.ts +44 -0
  96. package/lib/service/audit/audit.interface.d.ts +47 -0
  97. package/lib/service/audit/audit.service.d.ts +35 -0
  98. package/lib/service/auth/auth.interceptor.d.ts +12 -0
  99. package/lib/service/auth/auth.interface.d.ts +34 -0
  100. package/lib/service/auth/auth.service.d.ts +50 -0
  101. package/lib/service/auth/oidc.service.d.ts +16 -0
  102. package/lib/service/backend/api.enum.d.ts +7 -0
  103. package/lib/service/backend/backend.interface.d.ts +29 -0
  104. package/lib/service/backend/backend.service.d.ts +118 -0
  105. package/lib/service/bpm/bpm.interface.d.ts +86 -0
  106. package/lib/service/bpm/bpm.service.d.ts +19 -0
  107. package/lib/service/cache/app-cache.service.d.ts +18 -0
  108. package/lib/service/catalog/catalog.interface.d.ts +12 -0
  109. package/lib/service/catalog/catalog.service.d.ts +5 -0
  110. package/lib/service/clipboard/clipboard.interface.d.ts +11 -0
  111. package/lib/service/clipboard/clipboard.service.d.ts +23 -0
  112. package/lib/service/config/config.interface.d.ts +34 -0
  113. package/lib/service/config/config.service.d.ts +45 -0
  114. package/lib/service/config/core-config.d.ts +14 -0
  115. package/lib/service/config/core-config.tokens.d.ts +7 -0
  116. package/lib/service/connection/connection.service.d.ts +25 -0
  117. package/lib/service/connection/offline.interceptor.d.ts +15 -0
  118. package/lib/service/core-init/core-init.service.d.ts +11 -0
  119. package/lib/service/core-init/missing-translation-handler.d.ts +8 -0
  120. package/lib/service/core-init/translate-json-loader.d.ts +20 -0
  121. package/lib/service/device/device.interface.d.ts +15 -0
  122. package/lib/service/device/device.service.d.ts +54 -0
  123. package/lib/service/dms/dms.service.d.ts +153 -0
  124. package/lib/service/dms/dms.service.interface.d.ts +59 -0
  125. package/lib/service/event/event.interface.d.ts +13 -0
  126. package/lib/service/event/event.service.d.ts +23 -0
  127. package/lib/service/event/events.d.ts +12 -0
  128. package/lib/service/idm/idm.interface.d.ts +5 -0
  129. package/lib/service/idm/idm.service.d.ts +9 -0
  130. package/lib/service/logger/logger-console.service.d.ts +20 -0
  131. package/lib/service/logger/logger.d.ts +17 -0
  132. package/lib/service/logger/logger.interface.d.ts +10 -0
  133. package/lib/service/notification/notification.service.d.ts +71 -0
  134. package/lib/service/object-config/object-config.interface.d.ts +62 -0
  135. package/lib/service/object-config/object-config.service.d.ts +38 -0
  136. package/lib/service/pending-changes/pending-changes-component.interface.d.ts +6 -0
  137. package/lib/service/pending-changes/pending-changes-guard.service.d.ts +14 -0
  138. package/lib/service/pending-changes/pending-changes.service.d.ts +57 -0
  139. package/lib/service/prediction/prediction.interface.d.ts +18 -0
  140. package/lib/service/prediction/prediction.service.d.ts +15 -0
  141. package/lib/service/search/search.service.d.ts +46 -0
  142. package/lib/service/search/search.service.interface.d.ts +119 -0
  143. package/lib/service/session-storage/session-storage.service.d.ts +15 -0
  144. package/lib/service/system/object-form.interface.d.ts +46 -0
  145. package/lib/service/system/system.enum.d.ts +141 -0
  146. package/lib/service/system/system.interface.d.ts +146 -0
  147. package/lib/service/system/system.service.d.ts +168 -0
  148. package/lib/service/upload/upload.interface.d.ts +55 -0
  149. package/lib/service/upload/upload.service.d.ts +34 -0
  150. package/lib/service/user/user.service.d.ts +69 -0
  151. package/lib/util/utils.d.ts +118 -0
  152. package/lib/util/utils.helper.enum.d.ts +13 -0
  153. package/package.json +33 -0
@@ -0,0 +1,118 @@
1
+ import { HttpHeaders } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { ConfigService } from '../config/config.service';
4
+ import { HttpDeleteOptions, HttpOptions } from './backend.interface';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Service for providing an yuuvis Backend
8
+ */
9
+ export declare class BackendService {
10
+ #private;
11
+ configService: ConfigService;
12
+ authUsesOpenIdConnect(): boolean;
13
+ /**
14
+ * OpenIdConnect authorization headers
15
+ */
16
+ getAuthHeaders(): HttpHeaders;
17
+ /**
18
+ * Add a new header.
19
+ * @param key The headers name
20
+ * @param value The value to be added to the headers. Setting this to null
21
+ * will remove the header
22
+ */
23
+ setHeader(key: string, value: string): void;
24
+ /**
25
+ * Wrapped HTTP GET method
26
+ * @param uri The REST URI to be queried
27
+ * @param base The Base URI (backend service) to be used
28
+ * @param requestOptions Additional request options
29
+ * @returns The data retrieved from the given endpoint
30
+ */
31
+ get(uri: string, base?: string, requestOptions?: HttpOptions): Observable<any>;
32
+ /**
33
+ * Wrapped HTTP POST method
34
+ * @param uri The target REST URI
35
+ * @param data Data to be 'posted'
36
+ * @param base The Base URI (backend service) to be used
37
+ * @param requestOptions Additional request options
38
+ * @returns The return value of the target POST endpoint
39
+ */
40
+ post(uri: string, data?: any, base?: string, requestOptions?: HttpOptions): Observable<any>;
41
+ /**
42
+ * Performs a multipart form data POST request.
43
+ * @param uri The target REST URI
44
+ * @param formData FormData to be 'posted'
45
+ * @param base The Base URI (backend service) to be used
46
+ * @param requestOptions Additional request options
47
+ * @returns The return value of the target POST endpoint
48
+ */
49
+ postMultiPart(uri: string, formData: FormData, base?: string, requestOptions?: HttpOptions): Observable<any>;
50
+ /**
51
+ * Wrapped HTTP PATCH method
52
+ * @param uri The target REST URI
53
+ * @param data Data to be 'patched'
54
+ * @param base The Base URI (backend service) to be used
55
+ * @param requestOptions Additional request options
56
+ * @returns The return value of the target PATCH endpoint
57
+ */
58
+ patch(uri: string, data?: any, base?: string, requestOptions?: HttpOptions): Observable<any>;
59
+ /**
60
+ * Wrapped HTTP PUT method
61
+ * @param uri The target REST URI
62
+ * @param data Data to be 'posted'
63
+ * @param base The Base URI (backend service) to be used
64
+ * @param requestOptions Additional request options
65
+ * @returns The return value of the target PUT endpoint
66
+ */
67
+ put(uri: string, data?: any, base?: string, requestOptions?: HttpOptions): Observable<any>;
68
+ /**
69
+ * Wrapped HTTP DELETE method
70
+ * @param uri The target REST URI
71
+ * @param base The Base URI (backend service) to be used
72
+ * @param requestOptions Additional request options
73
+ * @returns The return value of the target DELETE endpoint
74
+ */
75
+ delete(uri: string, base?: string, requestOptions?: HttpDeleteOptions): Observable<any>;
76
+ /**
77
+ * @ignore
78
+ * Cache for small requests like icons and configs
79
+ *
80
+ * @param string uri
81
+ * @returns Observable<any>
82
+ */
83
+ getViaCache(uri: string): Observable<any>;
84
+ /**
85
+ * @ignore
86
+ * Temporary Cache for multiple identical requests
87
+ *
88
+ * @param string id
89
+ * @param Function request
90
+ * @returns Observable<any>
91
+ */
92
+ getViaTempCache(id: string, request?: () => Observable<object>): Observable<any>;
93
+ download(uri: string, filename?: string): void;
94
+ /**
95
+ * Gets the base URI for an API endpoint
96
+ * @param api The API to get the base URI for. Leaving this blank will return
97
+ * base URI for the web API
98
+ * @param origin The flag to include location origin
99
+ * @returns Base URI for the given API.
100
+ */
101
+ getApiBase(api?: string, origin?: boolean): string;
102
+ /**
103
+ * @ignore
104
+ */
105
+ getHttpOptions(requestOptions?: HttpOptions): HttpOptions;
106
+ /**
107
+ * Batch service
108
+ */
109
+ batch(requests: {
110
+ method?: string;
111
+ uri: string;
112
+ body?: any;
113
+ base?: string;
114
+ requestOptions?: HttpOptions;
115
+ }[]): Observable<any[]>;
116
+ static ɵfac: i0.ɵɵFactoryDeclaration<BackendService, never>;
117
+ static ɵprov: i0.ɵɵInjectableDeclaration<BackendService>;
118
+ }
@@ -0,0 +1,86 @@
1
+ export declare const ProcessAction: {
2
+ complete: string;
3
+ claim: string;
4
+ delegate: string;
5
+ resolve: string;
6
+ save: string;
7
+ };
8
+ export interface Process {
9
+ id: string;
10
+ attachments: string[];
11
+ businessKey: string;
12
+ deleteReason: string;
13
+ durationInMillis: number;
14
+ endActivityId: string;
15
+ endTime: Date;
16
+ initiator: ProcessUser;
17
+ name: string;
18
+ processDefinition: {
19
+ description: string;
20
+ id: string;
21
+ idPrefix: string;
22
+ name: string;
23
+ };
24
+ startActivityId: string;
25
+ startTime: Date;
26
+ startUserId: string;
27
+ suspended?: boolean;
28
+ variables: ProcessVariable[];
29
+ }
30
+ export interface ProcessCreatePayload extends ProcessPostPayload {
31
+ processDefinitionKey: string;
32
+ name?: string;
33
+ businessKey?: string;
34
+ returnVariables?: boolean;
35
+ }
36
+ export interface ProcessPostPayload {
37
+ variables?: ProcessVariable[];
38
+ attachments?: string[];
39
+ subject?: string;
40
+ }
41
+ export interface ProcessVariable {
42
+ name: string;
43
+ type?: string;
44
+ value: any;
45
+ readonly?: boolean;
46
+ scope?: string;
47
+ }
48
+ /**
49
+ * Tasks are basically activities defined by a process.
50
+ * Processes may contain several tasks.
51
+ */
52
+ export interface InboxTask {
53
+ id: string;
54
+ processInstanceId: string;
55
+ assignee: ProcessUser;
56
+ claimTime: Date;
57
+ createTime: Date;
58
+ dueDate: Date;
59
+ description: string;
60
+ delegationState?: string;
61
+ formKey: string;
62
+ initiator: ProcessUser;
63
+ name: string;
64
+ owner: ProcessUser;
65
+ parentTaskId: string;
66
+ processDefinition: {
67
+ id: string;
68
+ idPrefix: string;
69
+ };
70
+ suspended: false;
71
+ variables: ProcessVariable[];
72
+ resolvedValues?: {
73
+ [id: string]: string;
74
+ };
75
+ attachments: string[];
76
+ }
77
+ export interface ProcessUser {
78
+ id: string;
79
+ title: string;
80
+ }
81
+ export interface FetchTaskOptions {
82
+ businessKey?: string;
83
+ includeProcessVar?: boolean;
84
+ isCompleted?: boolean;
85
+ processDefinitionKey?: string;
86
+ }
@@ -0,0 +1,19 @@
1
+ import { FetchTaskOptions, Process, ProcessCreatePayload, ProcessPostPayload } from './bpm.interface';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class BpmService {
5
+ #private;
6
+ startProcess(payload: ProcessCreatePayload): Observable<any>;
7
+ /**
8
+ * Finsihes a task.
9
+ * @param taskId ID of the taks to finish
10
+ * @param payload Data to be send with the complete request (may contain attachments, a new subject or variables)
11
+ */
12
+ completeTask(taskId: string, payload?: ProcessPostPayload): Observable<any>;
13
+ updateTask(taskId: string, payload?: ProcessPostPayload): Observable<any>;
14
+ getProcessPoll(): Observable<any>;
15
+ getProcessInstance(processDefinitionKey: string, options?: FetchTaskOptions): Observable<Process>;
16
+ deleteProcess(processInstanceId: string): Observable<any>;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<BpmService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<BpmService>;
19
+ }
@@ -0,0 +1,18 @@
1
+ import { Observable } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Service for saving or caching data on the users device. It uses the most efficient storage
5
+ * available (IndexDB, localstorage, ...) on the device. Depending on the type of storage used,
6
+ * its limitations apply.
7
+ */
8
+ export declare class AppCacheService {
9
+ #private;
10
+ setItem(key: string, value: any): Observable<boolean>;
11
+ getItem(key: string): Observable<any>;
12
+ removeItem(key: string): Observable<boolean>;
13
+ clear(filter?: (key: any) => boolean): Observable<boolean>;
14
+ getStorageKeys(): Observable<any>;
15
+ setStorage(options: any): Observable<any>;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppCacheService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<AppCacheService>;
18
+ }
@@ -0,0 +1,12 @@
1
+ export interface BaseCatalog {
2
+ entries: CatalogEntry[];
3
+ readonly?: boolean;
4
+ }
5
+ export interface Catalog extends BaseCatalog {
6
+ qname: string;
7
+ tenant?: string;
8
+ }
9
+ export interface CatalogEntry {
10
+ name: string;
11
+ disabled?: boolean;
12
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CatalogService {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<CatalogService, never>;
4
+ static ɵprov: i0.ɵɵInjectableDeclaration<CatalogService>;
5
+ }
@@ -0,0 +1,11 @@
1
+ import { DmsObject } from "../../model/dms-object.model";
2
+ export interface ClipboardStore {
3
+ buckets?: Record<string, ClipboardData>;
4
+ main?: ClipboardData;
5
+ }
6
+ export interface ClipboardData {
7
+ mode?: ClipboardDataMode;
8
+ files?: File[];
9
+ objects?: DmsObject[];
10
+ }
11
+ export type ClipboardDataMode = 'copy' | 'cut';
@@ -0,0 +1,23 @@
1
+ import { Signal } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { DmsObject } from '../../model/dms-object.model';
4
+ import { ClipboardData, ClipboardDataMode } from './clipboard.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ClipboardService {
7
+ #private;
8
+ clipboard(bucket?: string): Signal<ClipboardData | undefined>;
9
+ clipboard$(bucket?: string): Observable<ClipboardData | undefined>;
10
+ paste$(bucket?: string): Observable<ClipboardData>;
11
+ getClipboardData(bucket?: string): ClipboardData | undefined;
12
+ /**
13
+ * Add objects to the clipboard
14
+ * @param bucket Buckets are ways to separate data from the global scope.
15
+ * If you have an app that would like to have a separate section in the clipboard
16
+ * you'll use a unique bucket to store your stuff. When observing chages to the
17
+ * clipboard you couls as well provide the bucket and you will only get
18
+ */
19
+ addObjects(objects: DmsObject[], mode: ClipboardDataMode, bucket?: string): void;
20
+ clear(bucket?: string): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipboardService, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClipboardService>;
23
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Interface for the applications main config file
3
+ * @ignore
4
+ */
5
+ export interface YuvConfig {
6
+ core: {
7
+ languages: YuvConfigLanguages[];
8
+ logging?: {
9
+ level: 'debug' | 'error' | 'warn' | 'info';
10
+ };
11
+ permissions?: {
12
+ retentionManagerRole?: string;
13
+ advancedUserRole?: string;
14
+ manageSettingsRole?: string;
15
+ };
16
+ };
17
+ location?: {
18
+ hostname?: string;
19
+ port?: number;
20
+ };
21
+ }
22
+ /**
23
+ * interface providing localization of application
24
+ */
25
+ export interface YuvConfigLanguages {
26
+ iso: string;
27
+ label: string;
28
+ dir?: Direction;
29
+ fallback?: boolean;
30
+ }
31
+ export declare enum Direction {
32
+ LTR = "ltr",
33
+ RTL = "rtl"
34
+ }
@@ -0,0 +1,45 @@
1
+ import { HttpHeaders } from '@angular/common/http';
2
+ import { YuvConfig, YuvConfigLanguages } from './config.interface';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Load and provide configuration for hole apllication while application is inizialized.
6
+ */
7
+ export declare class ConfigService {
8
+ private translate;
9
+ private oidcService;
10
+ static GLOBAL_RESOURCES: string;
11
+ static PARSER(c: any): any;
12
+ static GLOBAL_MAIN_CONFIG(prefix?: 'system' | 'admin' | ''): string;
13
+ static GLOBAL_MAIN_CONFIG_LANG(iso?: string, prefix?: 'system' | 'admin' | ''): string;
14
+ static GLOBAL_RESOURCES_PATH(section?: string, prefix?: 'system' | 'admin' | ''): string;
15
+ get oidc(): import("@yuuvis/client-core").OpenIdConfig | undefined;
16
+ private cfg?;
17
+ /**
18
+ * Set during app init (see CoreInit)
19
+ * @ignore
20
+ */
21
+ set(cfg: YuvConfig): void;
22
+ get(configKey: string): any;
23
+ extendTranslations(translations: any, lang?: string): void;
24
+ extendConfig(configs: YuvConfig[]): void;
25
+ private _mergeConfigs;
26
+ authUsesOpenIdConnect(): boolean;
27
+ /**
28
+ * OpenIdConnect authorization headers
29
+ */
30
+ getAuthHeaders(authorization?: boolean): HttpHeaders;
31
+ /**
32
+ * Getter for the available client locales
33
+ * @returns available client locales
34
+ */
35
+ getClientLocales(): YuvConfigLanguages[];
36
+ getApiBase(api?: string, origin?: boolean): string;
37
+ /**
38
+ * Get the default client locale
39
+ * @returns ISO string of the locale
40
+ */
41
+ getDefaultClientLocale(): string;
42
+ private _getCoreConfig;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfigService, never>;
44
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConfigService>;
45
+ }
@@ -0,0 +1,14 @@
1
+ import { OpenIdConfig } from '../backend/backend.interface';
2
+ import { YuvConfig } from './config.interface';
3
+ /**
4
+ * @ignore
5
+ */
6
+ export declare class CoreConfig {
7
+ main?: YuvConfig | string[];
8
+ translations?: string[];
9
+ environment?: {
10
+ production: boolean;
11
+ };
12
+ oidc?: OpenIdConfig;
13
+ constructor(__config: CoreConfig);
14
+ }
@@ -0,0 +1,7 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { CoreConfig } from './core-config';
3
+ /**
4
+ * @ignore
5
+ */
6
+ export declare const CUSTOM_CONFIG: InjectionToken<CoreConfig>;
7
+ export declare const CORE_CONFIG: InjectionToken<CoreConfig>;
@@ -0,0 +1,25 @@
1
+ import { Observable } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * This service is used for connecting and initializing in the client
5
+ */
6
+ export declare class ConnectionService {
7
+ private currentState;
8
+ private connectionStateSource;
9
+ connection$: Observable<ConnectionState>;
10
+ /**
11
+ * @ignore
12
+ */
13
+ constructor();
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConnectionService, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConnectionService>;
16
+ }
17
+ /**
18
+ * Check a connection state of a client
19
+ */
20
+ export interface ConnectionState {
21
+ /**
22
+ * whether or not the application is online.
23
+ */
24
+ isOnline: boolean;
25
+ }
@@ -0,0 +1,15 @@
1
+ import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { ConnectionService } from './connection.service';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Http Offline interceptor trys to serving offline content for method/url
7
+ */
8
+ export declare class OfflineInterceptor implements HttpInterceptor {
9
+ private connectionService;
10
+ offline: boolean;
11
+ constructor(connectionService: ConnectionService);
12
+ intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<OfflineInterceptor, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<OfflineInterceptor>;
15
+ }
@@ -0,0 +1,11 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { AuthService } from '../auth/auth.service';
3
+ import { YuvConfig } from '../config/config.interface';
4
+ import { ConfigService } from '../config/config.service';
5
+ import { CoreConfig } from '../config/core-config';
6
+ import { DeviceService } from '../device/device.service';
7
+ import { Logger } from '../logger/logger';
8
+ /**
9
+ * Providing functions,that are are injected at application startup and executed during app initialization.
10
+ */
11
+ export declare function init_moduleFnc(coreConfig: CoreConfig, deviceService: DeviceService, logger: Logger, http: HttpClient, configService: ConfigService, authService: AuthService): () => import("rxjs").Observable<YuvConfig[]> | import("rxjs").Observable<boolean | import("@yuuvis/client-core").YuvUser>;
@@ -0,0 +1,8 @@
1
+ import { MissingTranslationHandler, MissingTranslationHandlerParams } from '@ngx-translate/core';
2
+ /**
3
+ * Handles missing translations
4
+ * @ignore
5
+ */
6
+ export declare class EoxMissingTranslationHandler implements MissingTranslationHandler {
7
+ handle(params: MissingTranslationHandlerParams): string;
8
+ }
@@ -0,0 +1,20 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { TranslateLoader } from '@ngx-translate/core';
3
+ import { Observable } from 'rxjs';
4
+ import { CoreConfig } from '../config/core-config';
5
+ /**
6
+ * Loader that fetches translations based on the configured locations
7
+ * @ignore
8
+ */
9
+ export declare class EoxTranslateJsonLoader implements TranslateLoader {
10
+ http: HttpClient;
11
+ config: CoreConfig;
12
+ constructor(http: HttpClient, config: CoreConfig);
13
+ /**
14
+ *
15
+ * @param string lang
16
+ * @returns Observable<Object>
17
+ */
18
+ getTranslation(lang: string): Observable<Object>;
19
+ private loadTranslationFile;
20
+ }
@@ -0,0 +1,15 @@
1
+ export declare enum DeviceScreenOrientation {
2
+ PORTRAIT = "portrait",
3
+ LANDSCAPE = "landscape"
4
+ }
5
+ export interface DeviceScreen {
6
+ size: ScreenSize;
7
+ orientation: DeviceScreenOrientation;
8
+ width: number;
9
+ height: number;
10
+ }
11
+ export interface DeviceScreenBounds {
12
+ width: number;
13
+ height: number;
14
+ }
15
+ export type ScreenSize = 's' | 'm' | 'l' | 'xl';
@@ -0,0 +1,54 @@
1
+ import { DeviceInfo } from 'ngx-device-detector';
2
+ import { Observable } from 'rxjs';
3
+ import { DeviceScreen } from './device.interface';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * This service is used to adapt styles and designs of the client to
7
+ * different devices and screen sizes.
8
+ *
9
+ * Using `screenChange$` observable you are able to monitor changes to
10
+ * the screen size and act upon it.
11
+ *
12
+ * This service will also adds attributes to the body tag that reflect the
13
+ * current screen/device state. This way you can apply secific styles in your
14
+ * css files for different screen resolutions and orientations.
15
+ *
16
+ * Attributes applied to the body tag are:
17
+ *
18
+ * - `data-screen` - [s, m, l, xl] - for different screen sizes
19
+ * (s: for mobile phone like screen sizes, m: for tablet like screen
20
+ * sizes, 'l': for desktop like screen sizes, 'xl': for screen sizes exceeding
21
+ * the desktop screen size).
22
+ *
23
+ * - `data-orientation` - [portrait, landscape] - for the current screen orientation
24
+ *
25
+ * - `data-touch-enabled` - [true] - if the device has touch capabilities (won't be added if the device doesn't have touch capabilities)
26
+ *
27
+ * ```html
28
+ * <body data-screen-size="s" data-screen-orientation="portrait" data-touch-enabled="true">
29
+ * ...
30
+ * </body>
31
+ * ```
32
+ */
33
+ export declare class DeviceService {
34
+ #private;
35
+ screenChange$: Observable<DeviceScreen>;
36
+ /**
37
+ * if the device is a mobile device (android / iPhone / windows-phone etc)
38
+ */
39
+ isMobile: boolean;
40
+ /**
41
+ * if the device us a tablet (iPad etc)
42
+ */
43
+ isTablet: boolean;
44
+ /**
45
+ * if the app is running on a Desktop browser
46
+ */
47
+ isDesktop: boolean;
48
+ info?: DeviceInfo;
49
+ isTouchEnabled: boolean;
50
+ constructor();
51
+ init(): void;
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<DeviceService, never>;
53
+ static ɵprov: i0.ɵɵInjectableDeclaration<DeviceService>;
54
+ }