@idea-ionic/uncommon 8.5.12 → 8.6.0-beta.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.
Files changed (57) hide show
  1. package/fesm2022/idea-ionic-uncommon.mjs +85 -85
  2. package/fesm2022/idea-ionic-uncommon.mjs.map +1 -1
  3. package/index.d.ts +1405 -3
  4. package/package.json +12 -13
  5. package/esm2022/idea-ionic-uncommon.mjs +0 -5
  6. package/esm2022/public-api.mjs +0 -26
  7. package/esm2022/src/AWSAPI.service.mjs +0 -431
  8. package/esm2022/src/AWSAPISocket.service.mjs +0 -188
  9. package/esm2022/src/address/address.component.mjs +0 -409
  10. package/esm2022/src/announcement/announcement.component.mjs +0 -72
  11. package/esm2022/src/cachedResources.service.mjs +0 -55
  12. package/esm2022/src/colors/colorPicker.component.mjs +0 -191
  13. package/esm2022/src/contacts/contacts.component.mjs +0 -188
  14. package/esm2022/src/dateTime/calendarPicker.component.mjs +0 -213
  15. package/esm2022/src/dateTime/dateTime.component.mjs +0 -217
  16. package/esm2022/src/duration/duration.component.mjs +0 -195
  17. package/esm2022/src/echo/echo.page.mjs +0 -233
  18. package/esm2022/src/echo/echo.routes.mjs +0 -6
  19. package/esm2022/src/errorReporting.service.mjs +0 -69
  20. package/esm2022/src/mde/mde.component.mjs +0 -143
  21. package/esm2022/src/mde/mdeToolbar.component.mjs +0 -25
  22. package/esm2022/src/offline/cacheableResource.component.mjs +0 -56
  23. package/esm2022/src/offline/offline.service.mjs +0 -63
  24. package/esm2022/src/offline/offlineData.service.mjs +0 -480
  25. package/esm2022/src/offline/offlineIndicator.component.mjs +0 -105
  26. package/esm2022/src/offline/offlineManager.component.mjs +0 -101
  27. package/esm2022/src/pushNotifications.service.mjs +0 -57
  28. package/esm2022/src/sentiment/sentiment.component.mjs +0 -112
  29. package/esm2022/src/timeInterval/fromTimeToTime.component.mjs +0 -171
  30. package/esm2022/src/timeInterval/timeInterval.component.mjs +0 -206
  31. package/esm2022/src/tinCan.service.mjs +0 -49
  32. package/public-api.d.ts +0 -25
  33. package/src/AWSAPI.service.d.ts +0 -178
  34. package/src/AWSAPISocket.service.d.ts +0 -129
  35. package/src/address/address.component.d.ts +0 -64
  36. package/src/announcement/announcement.component.d.ts +0 -23
  37. package/src/cachedResources.service.d.ts +0 -34
  38. package/src/colors/colorPicker.component.d.ts +0 -78
  39. package/src/contacts/contacts.component.d.ts +0 -31
  40. package/src/dateTime/calendarPicker.component.d.ts +0 -45
  41. package/src/dateTime/dateTime.component.d.ts +0 -81
  42. package/src/duration/duration.component.d.ts +0 -68
  43. package/src/echo/echo.page.d.ts +0 -34
  44. package/src/echo/echo.routes.d.ts +0 -2
  45. package/src/errorReporting.service.d.ts +0 -26
  46. package/src/mde/mde.component.d.ts +0 -39
  47. package/src/mde/mdeToolbar.component.d.ts +0 -5
  48. package/src/offline/cacheableResource.component.d.ts +0 -11
  49. package/src/offline/offline.service.d.ts +0 -39
  50. package/src/offline/offlineData.service.d.ts +0 -281
  51. package/src/offline/offlineIndicator.component.d.ts +0 -25
  52. package/src/offline/offlineManager.component.d.ts +0 -17
  53. package/src/pushNotifications.service.d.ts +0 -26
  54. package/src/sentiment/sentiment.component.d.ts +0 -35
  55. package/src/timeInterval/fromTimeToTime.component.d.ts +0 -61
  56. package/src/timeInterval/timeInterval.component.d.ts +0 -84
  57. package/src/tinCan.service.d.ts +0 -31
@@ -1,81 +0,0 @@
1
- import { EventEmitter, SimpleChanges, OnInit, OnDestroy, OnChanges } from '@angular/core';
2
- import { epochDateTime, epochISOString } from 'idea-toolbox';
3
- import * as i0 from "@angular/core";
4
- export declare class IDEADateTimeComponent implements OnInit, OnDestroy, OnChanges {
5
- private _modal;
6
- private _translate;
7
- /**
8
- * The date to show/pick.
9
- */
10
- date: epochDateTime | epochISOString;
11
- /**
12
- * Whether to show the time picker (datetime) or not (date).
13
- */
14
- timePicker: boolean;
15
- /**
16
- * Whether to show the MANUAL time picker (datetime) or not (date).
17
- */
18
- manualTimePicker: boolean;
19
- /**
20
- * Whether to use the `epochISOString` format instead of `epochDateTime`.
21
- */
22
- useISOFormat: boolean;
23
- /**
24
- * The label for the field.
25
- */
26
- label: string;
27
- /**
28
- * The icon for the field.
29
- */
30
- icon: string;
31
- /**
32
- * The color of the icon.
33
- */
34
- iconColor: string;
35
- /**
36
- * Lines preferences for the item.
37
- */
38
- lines: string;
39
- /**
40
- * The color for the component.
41
- */
42
- color: string;
43
- /**
44
- * A placeholder for the field.
45
- */
46
- placeholder: string;
47
- /**
48
- * If true, the component is disabled.
49
- */
50
- disabled: boolean;
51
- /**
52
- * If true, the obligatory dot is shown.
53
- */
54
- obligatory: boolean;
55
- /**
56
- * If true, hidew the clear button in the header.
57
- */
58
- hideClearButton: boolean;
59
- /**
60
- * If set, is the minimum date selectable.
61
- */
62
- min: epochDateTime | epochISOString;
63
- /**
64
- * If set, is the maximum date selectable.
65
- */
66
- max: epochDateTime | epochISOString;
67
- dateChange: EventEmitter<any>;
68
- iconSelect: EventEmitter<void>;
69
- valueToDisplay: string;
70
- private langChangeSubscription;
71
- isOpening: boolean;
72
- ngOnInit(): void;
73
- ngOnDestroy(): void;
74
- ngOnChanges(changes: SimpleChanges): void;
75
- openCalendarPicker(): Promise<void>;
76
- private getValueToDisplay;
77
- doSelect(date: Date): void;
78
- doIconSelect(event: Event): void;
79
- static ɵfac: i0.ɵɵFactoryDeclaration<IDEADateTimeComponent, never>;
80
- static ɵcmp: i0.ɵɵComponentDeclaration<IDEADateTimeComponent, "idea-date-time", never, { "date": { "alias": "date"; "required": false; }; "timePicker": { "alias": "timePicker"; "required": false; }; "manualTimePicker": { "alias": "manualTimePicker"; "required": false; }; "useISOFormat": { "alias": "useISOFormat"; "required": false; }; "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "lines": { "alias": "lines"; "required": false; }; "color": { "alias": "color"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "obligatory": { "alias": "obligatory"; "required": false; }; "hideClearButton": { "alias": "hideClearButton"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, { "dateChange": "dateChange"; "iconSelect": "iconSelect"; }, never, never, true, never>;
81
- }
@@ -1,68 +0,0 @@
1
- import { EventEmitter, SimpleChanges, OnChanges } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class IDEADurationComponent implements OnChanges {
4
- /**
5
- * The default number of seconds, to build the duration.
6
- */
7
- default: number;
8
- /**
9
- * The label for the field.
10
- */
11
- label: string;
12
- /**
13
- * The icon (alternative to the label) for the field.
14
- */
15
- icon: string;
16
- /**
17
- * The title (hint) for the field.
18
- */
19
- title: string;
20
- /**
21
- * If true, the component is disabled.
22
- */
23
- disabled: boolean;
24
- /**
25
- * If true, the obligatory dot is shown.
26
- */
27
- obligatory: boolean;
28
- /**
29
- * Lines preferences for the item.
30
- */
31
- lines: string;
32
- /**
33
- * The color for the component.
34
- */
35
- color: string;
36
- /**
37
- * Whether to show or hide the seconds input.
38
- */
39
- hideSeconds: boolean;
40
- /**
41
- * Whether to show a shortened version of the labels.
42
- */
43
- shortLabels: boolean;
44
- /**
45
- * On change event. It emits a number of seconds representing the duration.
46
- */
47
- set: EventEmitter<number>;
48
- /**
49
- * The hour part of the duration.
50
- */
51
- hours: number;
52
- /**
53
- * The minutes part of the duration.
54
- */
55
- minutes: number;
56
- /**
57
- * The seconds part of the duration.
58
- */
59
- seconds: number;
60
- constructor();
61
- ngOnChanges(changes: SimpleChanges): void;
62
- /**
63
- * When one of the parts changes, emit the new duration.
64
- */
65
- setDuration(type: string): void;
66
- static ɵfac: i0.ɵɵFactoryDeclaration<IDEADurationComponent, never>;
67
- static ɵcmp: i0.ɵɵComponentDeclaration<IDEADurationComponent, "idea-duration", never, { "default": { "alias": "default"; "required": false; }; "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "title": { "alias": "title"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "obligatory": { "alias": "obligatory"; "required": false; }; "lines": { "alias": "lines"; "required": false; }; "color": { "alias": "color"; "required": false; }; "hideSeconds": { "alias": "hideSeconds"; "required": false; }; "shortLabels": { "alias": "shortLabels"; "required": false; }; }, { "set": "set"; }, never, never, true, never>;
68
- }
@@ -1,34 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { ExternalCalendarSources } from 'idea-toolbox';
3
- import * as i0 from "@angular/core";
4
- export declare class IDEAEchoPage implements OnInit {
5
- protected _env: any;
6
- private _route;
7
- private _tc;
8
- private _loading;
9
- private _API;
10
- private _translate;
11
- content: string;
12
- htmlContent: string;
13
- success: boolean;
14
- ngOnInit(): void;
15
- maintenanceMode(): void;
16
- followRegistrationLink(code: string, user: string): Promise<void>;
17
- followInvitationLink(code: string): Promise<void>;
18
- followEmailChangeConfirmationLink(code: string): Promise<void>;
19
- endGitHubIntegrationFlow(success: boolean): void;
20
- endTrelloIntegrationFlow(token: string): void;
21
- endExternalCalendarsIntegrationFlow(service: ExternalCalendarSources, code: string, calendarId: string): Promise<void>;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<IDEAEchoPage, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<IDEAEchoPage, "idea-echo", never, {}, {}, never, never, true, never>;
24
- }
25
- export declare enum EchoRequests {
26
- MAINTENANCE = "maintenance",
27
- REGISTRATION = "registration",
28
- INVITATION = "invitation",
29
- EMAIL_CHANGE = "email-change",
30
- GITHUB_INTEGRATION = "github-integration",
31
- TRELLO_INTEGRATION = "trello-integration",
32
- MICROSOFT_CALENDARS_INTEGRATION = "microsoft-calendars-integration",
33
- GOOGLE_CALENDARS_INTEGRATION = "google-calendars-integration"
34
- }
@@ -1,2 +0,0 @@
1
- import { Routes } from '@angular/router';
2
- export declare const ideaEchoRoutes: Routes;
@@ -1,26 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { Platform } from '@ionic/angular/standalone';
3
- import { ClientInfo } from 'idea-toolbox';
4
- import * as i0 from "@angular/core";
5
- export declare class IDEAErrorReportingService {
6
- protected _env: any;
7
- protected _http: HttpClient;
8
- protected _platform: Platform;
9
- apiStage: string;
10
- apiUrl: string;
11
- constructor();
12
- /**
13
- * Send the error report to the back-end.
14
- */
15
- sendReport(error: Error, forceSend?: boolean): Promise<void>;
16
- /**
17
- * Whether we should send the reporting or we are in a scenario in which we should skip it.
18
- */
19
- shouldSend(): boolean;
20
- /**
21
- * Acquire the client's info.
22
- */
23
- getClientInfo(): ClientInfo;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<IDEAErrorReportingService, never>;
25
- static ɵprov: i0.ɵɵInjectableDeclaration<IDEAErrorReportingService>;
26
- }
@@ -1,39 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class IDEAMDEComponent implements OnInit {
4
- private _modal;
5
- /**
6
- * Id to identify this specific Markdown Editor (default: 'mde').
7
- */
8
- id: string;
9
- /**
10
- * The title of the modal.
11
- */
12
- title: string;
13
- /**
14
- * The header text content.
15
- */
16
- header: string;
17
- /**
18
- * The sub-header description.
19
- */
20
- description: string;
21
- /**
22
- * A series of text variables to substitute with values.
23
- */
24
- variables: string[];
25
- /**
26
- * If set, will customize the initial value of the editor.
27
- */
28
- initialValue: string;
29
- /**
30
- * Custom placeholder that should be displayed.
31
- */
32
- placeholder: string;
33
- value: string;
34
- ngOnInit(): void;
35
- close(): void;
36
- confirm(): void;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<IDEAMDEComponent, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<IDEAMDEComponent, "idea-mde", never, { "id": { "alias": "id"; "required": false; }; "title": { "alias": "title"; "required": false; }; "header": { "alias": "header"; "required": false; }; "description": { "alias": "description"; "required": false; }; "variables": { "alias": "variables"; "required": false; }; "initialValue": { "alias": "initialValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, {}, never, never, true, never>;
39
- }
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class IDEAMDEToolbarComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<IDEAMDEToolbarComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<IDEAMDEToolbarComponent, "idea-mde-toolbar", never, {}, {}, never, never, true, never>;
5
- }
@@ -1,11 +0,0 @@
1
- import { IDEAOfflineDataService, CacheableResource } from './offlineData.service';
2
- import * as i0 from "@angular/core";
3
- export declare class IDEACacheableResourceComponent {
4
- _offline: IDEAOfflineDataService;
5
- /**
6
- * The resouece to manage.
7
- */
8
- resource: CacheableResource;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<IDEACacheableResourceComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<IDEACacheableResourceComponent, "idea-cacheable-resource", never, { "resource": { "alias": "resource"; "required": false; }; }, {}, never, never, true, never>;
11
- }
@@ -1,39 +0,0 @@
1
- import { Observable, Subscription } from 'rxjs';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Utility to monitor the network connection.
5
- * Note: don't use it directly, if you're also using IDEAOfflineDataService.
6
- */
7
- export declare class IDEAOfflineService {
8
- /**
9
- * True/false if the platform is offline/online.
10
- */
11
- protected _isOffline: boolean;
12
- /**
13
- * The observable for subscribing to online/offline status changes.
14
- */
15
- protected observable: Observable<boolean>;
16
- /**
17
- * The handler for listenig to network changes.
18
- */
19
- protected listenerHandler: any;
20
- constructor();
21
- /**
22
- * Subscribe to be notified when the connection status changes.
23
- */
24
- subscribe(callback: (isOnline: boolean) => void): Subscription;
25
- /**
26
- * Quickly check the connection status.
27
- */
28
- isOnline(): boolean;
29
- /**
30
- * Quickly check the connection status.
31
- */
32
- isOffline(): boolean;
33
- /**
34
- * Quickly check for online connection.
35
- */
36
- check(): Promise<boolean>;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<IDEAOfflineService, never>;
38
- static ɵprov: i0.ɵɵInjectableDeclaration<IDEAOfflineService>;
39
- }
@@ -1,281 +0,0 @@
1
- import { Subscription } from 'rxjs';
2
- import { Delta, DeltaRecord, DeltaResources, epochDateTime } from 'idea-toolbox';
3
- import { IDEAStorageService, IDEATranslationsService } from '@idea-ionic/common';
4
- import { IDEAAWSAPIService } from '../AWSAPI.service';
5
- import { IDEAOfflineService } from './offline.service';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * After how much time we need to request a synchronisation to keep the contents up-to-date.
9
- */
10
- export declare const SYNC_EXPIRATION_INTERVAL: number;
11
- /**
12
- * Prefix for the key of the API requests queue info in the local storage.
13
- */
14
- export declare const QUEUE_API_REQUESTS_KEY = "IDEAOfflineService.queueAPIrequests";
15
- /**
16
- * Prefix for the key of the last sync time info in the local storage.
17
- */
18
- export declare const LAST_SYNC_KEY = "IDEAOfflineService.lastSyncAt";
19
- /**
20
- * The max number of elements per resource to synchronize during the first analysis of a synchronisation.
21
- * If the number of elements exceeds (there is more data after the 1st page), the operation require manual confirmation.
22
- */
23
- export declare const NUM_ELEMENTS_WITHOUT_MANUAL_SYNC = 100;
24
- /**
25
- * The max number of elements per resource to request at the same time during a normal synchronisation.
26
- */
27
- export declare const NUM_ELEMENTS_WITH_MANUAL_SYNC = 300;
28
- /**
29
- * Manage the offline functioning of the app's data (upload/download/synchronization).
30
- * Note: it includes all the methods of IDEAOfflineService.
31
- *
32
- * Download: it works through the **Delta** mechanism on back-end resources.
33
- * Practically, the service prepares each possible API GET requests for each of the involved resources.
34
- * In this way, if offline, the API service can hit an element by URL in the cache (storage offline).
35
- *
36
- * **How to use it**. Configure the sync mechanism in the main app.component as it follows:
37
- *
38
- * 1. Implement a CacheableResource class for each DeltaResource you want to cache offline.
39
- * 2. Set up the service (`setUpOfflineData`).
40
- * 3. Run a synchronization.
41
- * 4. Add the navigation to the Offline Manager (UI).
42
- * 5. Optionally, push offline API requests to the queue when offline.
43
- *
44
- * e.g. of CacheableResource classes:
45
- * ```
46
- * class CustomerCR extends CacheableResource {
47
- * constructor(description: string) {
48
- * super(DeltaResources.CUSTOMERS, description);
49
- * }
50
- * public listURL(element: any): string {
51
- * return `teams/${element.teamId}/customers`;
52
- * }
53
- * public elementURL(element: any): string {
54
- * return `teams/${element.teamId}/customers/${element.customerId}`;
55
- * }
56
- * public findIndexInList(list: Array<any>, element: any): number {
57
- * return list.findIndex(x => x.customerId === element.customerId);
58
- * }
59
- * public sort(a: any, b: any): number {
60
- * return a.name.localeCompare(b.name);
61
- * }
62
- * }
63
- */
64
- export declare class IDEAOfflineDataService {
65
- protected _storage: IDEAStorageService;
66
- protected _translate: IDEATranslationsService;
67
- protected _offline: IDEAOfflineService;
68
- protected _API: IDEAAWSAPIService;
69
- /**
70
- * True when running a synchronization.
71
- */
72
- synchronizing: boolean;
73
- /**
74
- * The timestamp of the last synchronization.
75
- */
76
- lastSyncAt: epochDateTime;
77
- /**
78
- * True if an error happened in the last synchronization.
79
- */
80
- errorInLastSync: boolean;
81
- /**
82
- * True if the synchronisation is too vast and so require a manual action of the user.
83
- */
84
- requiresManualConfirmation: boolean;
85
- /**
86
- * If false, ignore the entire upload scenario.
87
- */
88
- useQueueAPIRequests: boolean;
89
- /**
90
- * The array of the requests not executed because we are/were offline; they need to run once online.
91
- */
92
- queueAPIRequests: APIRequest[];
93
- /**
94
- * The id of the team of which to manage data offline.
95
- * If null, the project isn't teams-based.
96
- */
97
- protected teamId: string;
98
- /**
99
- * The array of DeltaResources to cache offline.
100
- */
101
- protected resources: (DeltaResources | string)[];
102
- /**
103
- * Helper structure to manage the CacheableResource for each DeltaResource.
104
- */
105
- protected cacheableResources: {
106
- [resource: string]: CacheableResource;
107
- };
108
- /**
109
- * Key to acquire from the storage the lastSyncAt information of the team.
110
- */
111
- protected lastSyncKey: string;
112
- /**
113
- * Key to acquire from the storage the lastSyncAt information of the team.
114
- */
115
- protected queueAPIRequestKey: string;
116
- constructor();
117
- /**
118
- * Quickly check the connection status.
119
- */
120
- isOnline(): boolean;
121
- /**
122
- * Quickly check the connection status.
123
- */
124
- isOffline(): boolean;
125
- /**
126
- * Subscribe to the service to be notified when the connection status changes.
127
- */
128
- subscribe(callback: (isOnline: boolean) => void): Subscription;
129
- /**
130
- * Quickly check for online connection.
131
- */
132
- check(): Promise<boolean>;
133
- /**
134
- * Whether the offline mode is allowed. You can customize this function, if needed.
135
- */
136
- isAllowed(): boolean;
137
- /**
138
- * Set up the service to use and sync offline data.
139
- */
140
- setUpOfflineData(teamId: string, useQueueAPIRequests: boolean, cacheableResources: CacheableResource[]): void;
141
- /**
142
- * Load from the local storage the last sync at information.
143
- */
144
- protected loadLastSyncAt(): Promise<number>;
145
- /**
146
- * Update last sync at info in the local storage.
147
- */
148
- protected saveLastSyncAt(lastSyncAt: number): Promise<void>;
149
- /**
150
- * Add a CacheableResource.
151
- */
152
- protected addCacheableResource(cacheableResource: CacheableResource): void;
153
- /**
154
- * Remove a CacheableResource by its DeltaResource.
155
- */
156
- protected removeCacheableResource(resource: DeltaResources | string): void;
157
- /**
158
- * Get the the DeltaResourced configured.
159
- */
160
- getResources(): (DeltaResources | string)[];
161
- /**
162
- * Get a CacheableResource by its DeltaResource.
163
- */
164
- getCacheableResource(resource: DeltaResources | string): CacheableResource;
165
- /**
166
- * Execute all the API requests in the queue; the requests terminated with an error will remain in the queue.
167
- */
168
- protected runQueueAPIRequests(): Promise<void>;
169
- /**
170
- * Load from the local storage the API requests queue.
171
- */
172
- protected loadQueueAPIRequest(): Promise<APIRequest[]>;
173
- /**
174
- * Update the queue in memory and also save the copy in the local storage.
175
- */
176
- saveQueueAPIRequest(queue?: APIRequest[]): Promise<void>;
177
- /**
178
- * Delete a request stuck in an error.
179
- */
180
- deleteRequest(request: APIRequest): Promise<never>;
181
- /**
182
- * Save the records of a delta and, if the latter has more pages, go recursive.
183
- */
184
- protected syncDeltaRecords(delta: Delta, done?: any): Promise<any>;
185
- /**
186
- * Save offline a list of DeltaRecords for this resource, creating a map of all the corresponding API GET requests.
187
- */
188
- protected syncResourceDeltaRecords(resource: string, records: DeltaRecord[]): Promise<boolean>;
189
- /**
190
- * Run a sync, but only if needed, i.e. the cached content expired or we have pending API requests in the queue.
191
- */
192
- synchronizeIfNeeded(): Promise<void>;
193
- /**
194
- * Synchronization of the whole set of resources (upload+download).
195
- * @param manualConfirmation if true, the request comes directly from a user action (not automatic procedures).
196
- */
197
- synchronize(manualConfirmation?: boolean): Promise<void>;
198
- /**
199
- * Force a full synchronisation.
200
- */
201
- forceFullSync(): void;
202
- static ɵfac: i0.ɵɵFactoryDeclaration<IDEAOfflineDataService, never>;
203
- static ɵprov: i0.ɵɵInjectableDeclaration<IDEAOfflineDataService>;
204
- }
205
- /**
206
- * The description of an API request to a resource, to use with `IDEAAWSAPI`.
207
- * Used for queues of requests (UPLOAD).
208
- */
209
- export interface APIRequest {
210
- /**
211
- * Resource path (e.g. `users` or `teams/${teamId}/users`).
212
- */
213
- resource: string;
214
- /**
215
- * The id to identify a specific element of the resource.
216
- */
217
- resourceId: string;
218
- /**
219
- * The API request method (e.g. POST, PUT, PATCH).
220
- */
221
- method: string;
222
- /**
223
- * The body of the request.
224
- */
225
- body: any;
226
- /**
227
- * A description to show for the request.
228
- */
229
- description?: string;
230
- /**
231
- * If not null, the request tried to run but it encountered the error.
232
- */
233
- error?: string;
234
- }
235
- /**
236
- * The abstract class to implement for each resource to cache offline from the back-end (DOWNLOAD).
237
- */
238
- export declare abstract class CacheableResource {
239
- /**
240
- * The team owning the resource.
241
- * If null, the project isn't teams-based.
242
- */
243
- teamId: string;
244
- /**
245
- * The identifier of the resource.
246
- */
247
- resource: DeltaResources | string;
248
- /**
249
- * The resource description (translated) for the UI.
250
- */
251
- description: string;
252
- /**
253
- * Runtime attribute to know if the resource is synchronizing.
254
- */
255
- synchronizing: boolean;
256
- /**
257
- * True if one of the elements failed the execution.
258
- */
259
- error: boolean;
260
- constructor(resource: string, description: string);
261
- /**
262
- * How to build the relative URL to the resource (list).
263
- * E.g. `teams/${element.teamId}/customers` or `customers`.
264
- */
265
- abstract listURL(element: any): string;
266
- /**
267
- * How to build the relative URL to the resource element (detail).
268
- * E.g. `teams/${element.teamId}/customers/${element.customerId}` or `customers/${element.customerId}`.
269
- */
270
- abstract elementURL(element: any): string;
271
- /**
272
- * How to uniquely identify an element in the list (by its ids).
273
- * E.g. `return list.findIndex(x => x.customerId === element.customerId);`
274
- */
275
- abstract findIndexInList(list: any[], element: any): number;
276
- /**
277
- * How to keep the list sorted.
278
- * E.g. `return a.name.localeCompare(b.name);`
279
- */
280
- abstract sort(a: any, b: any): number;
281
- }
@@ -1,25 +0,0 @@
1
- import { Platform } from '@ionic/angular/standalone';
2
- import { IDEAOfflineDataService } from './offlineData.service';
3
- import * as i0 from "@angular/core";
4
- export declare class IDEAOfflineIndicatorComponent {
5
- private _alert;
6
- private _modal;
7
- private _translate;
8
- _platform: Platform;
9
- _offline: IDEAOfflineDataService;
10
- /**
11
- * Vertical position.
12
- */
13
- vertical: string;
14
- /**
15
- * Horizontal position.
16
- */
17
- horizontal: string;
18
- /**
19
- * Whether it is positionated on an edge.
20
- */
21
- edge: boolean;
22
- showStatus(): Promise<void>;
23
- static ɵfac: i0.ɵɵFactoryDeclaration<IDEAOfflineIndicatorComponent, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<IDEAOfflineIndicatorComponent, "idea-offline-indicator", never, { "vertical": { "alias": "vertical"; "required": false; }; "horizontal": { "alias": "horizontal"; "required": false; }; "edge": { "alias": "edge"; "required": false; }; }, {}, never, never, true, never>;
25
- }
@@ -1,17 +0,0 @@
1
- import { IDEAOfflineDataService, APIRequest } from './offlineData.service';
2
- import * as i0 from "@angular/core";
3
- export declare class IDEAOfflineManagerComponent {
4
- private _modal;
5
- private _alert;
6
- private _actions;
7
- private _translate;
8
- _offline: IDEAOfflineDataService;
9
- sync(): Promise<void>;
10
- deleteRequest(request: APIRequest): Promise<void>;
11
- downloadRequestLog(request: APIRequest): void;
12
- actions(): Promise<void>;
13
- forceFullSync(): Promise<void>;
14
- close(): void;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<IDEAOfflineManagerComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<IDEAOfflineManagerComponent, "idea-offline-manager", never, {}, {}, never, never, true, never>;
17
- }
@@ -1,26 +0,0 @@
1
- import { PushNotificationSchema } from '@capacitor/push-notifications';
2
- import { Observable } from 'rxjs';
3
- import { PushNotificationsDevice } from 'idea-toolbox';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * To subscribe push notifications events.
7
- */
8
- export declare class IDEAPushNotificationsService {
9
- private _platform;
10
- private _errorReporting;
11
- registrations: Observable<PushNotificationsDevice>;
12
- notifications: Observable<PushNotificationSchema>;
13
- errors: Observable<Error>;
14
- constructor();
15
- /**
16
- * Return true if the device is supported.
17
- */
18
- isAvailable(): boolean;
19
- /**
20
- * To fire the registration of a new device: it will rewquest the permission to use Push Notification.
21
- * On iOS will prompt the request, on Android it's automatic.
22
- */
23
- registerDevice(): Promise<void>;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<IDEAPushNotificationsService, never>;
25
- static ɵprov: i0.ɵɵInjectableDeclaration<IDEAPushNotificationsService>;
26
- }