@idea-ionic/uncommon 8.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +373 -0
- package/README.md +21 -0
- package/css/global.scss +15 -0
- package/esm2022/idea-ionic-uncommon.mjs +5 -0
- package/esm2022/public-api.mjs +35 -0
- package/esm2022/src/AWSAPI.service.mjs +430 -0
- package/esm2022/src/AWSAPISocket.service.mjs +187 -0
- package/esm2022/src/address/address.component.mjs +94 -0
- package/esm2022/src/address/address.module.mjs +21 -0
- package/esm2022/src/announcement/announcement.component.mjs +41 -0
- package/esm2022/src/announcement/announcement.module.mjs +21 -0
- package/esm2022/src/cachedResources.service.mjs +55 -0
- package/esm2022/src/colors/colorPicker.component.mjs +135 -0
- package/esm2022/src/colors/colorPicker.module.mjs +20 -0
- package/esm2022/src/contacts/contacts.component.mjs +64 -0
- package/esm2022/src/contacts/contacts.module.mjs +21 -0
- package/esm2022/src/dateTime/calendarPicker.component.mjs +196 -0
- package/esm2022/src/dateTime/dateTime.component.mjs +133 -0
- package/esm2022/src/dateTime/dateTime.module.mjs +22 -0
- package/esm2022/src/duration/duration.component.mjs +77 -0
- package/esm2022/src/duration/duration.module.mjs +21 -0
- package/esm2022/src/echo/echo.module.mjs +26 -0
- package/esm2022/src/echo/echo.page.mjs +165 -0
- package/esm2022/src/errorReporting.service.mjs +68 -0
- package/esm2022/src/mde/mde.component.mjs +44 -0
- package/esm2022/src/mde/mde.module.mjs +22 -0
- package/esm2022/src/mde/mdeToolbar.component.mjs +12 -0
- package/esm2022/src/offline/cacheableResource.component.mjs +18 -0
- package/esm2022/src/offline/offline.module.mjs +22 -0
- package/esm2022/src/offline/offline.service.mjs +62 -0
- package/esm2022/src/offline/offlineData.service.mjs +479 -0
- package/esm2022/src/offline/offlineIndicator.component.mjs +58 -0
- package/esm2022/src/offline/offlineManager.component.mjs +84 -0
- package/esm2022/src/pushNotifications.service.mjs +56 -0
- package/esm2022/src/sentiment/sentiment.component.mjs +71 -0
- package/esm2022/src/sentiment/sentiment.module.mjs +21 -0
- package/esm2022/src/timeInterval/fromTimeToTime.component.mjs +155 -0
- package/esm2022/src/timeInterval/timeInterval.component.mjs +122 -0
- package/esm2022/src/timeInterval/timeInterval.module.mjs +22 -0
- package/esm2022/src/tinCan.service.mjs +49 -0
- package/fesm2022/idea-ionic-uncommon.mjs +2891 -0
- package/fesm2022/idea-ionic-uncommon.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/package.json +51 -0
- package/public-api.d.ts +34 -0
- package/src/AWSAPI.service.d.ts +178 -0
- package/src/AWSAPISocket.service.d.ts +129 -0
- package/src/address/address.component.d.ts +64 -0
- package/src/address/address.module.d.ts +11 -0
- package/src/announcement/announcement.component.d.ts +23 -0
- package/src/announcement/announcement.module.d.ts +11 -0
- package/src/cachedResources.service.d.ts +34 -0
- package/src/colors/colorPicker.component.d.ts +78 -0
- package/src/colors/colorPicker.module.d.ts +10 -0
- package/src/contacts/contacts.component.d.ts +31 -0
- package/src/contacts/contacts.module.d.ts +11 -0
- package/src/dateTime/calendarPicker.component.d.ts +45 -0
- package/src/dateTime/dateTime.component.d.ts +81 -0
- package/src/dateTime/dateTime.module.d.ts +12 -0
- package/src/duration/duration.component.d.ts +68 -0
- package/src/duration/duration.module.d.ts +11 -0
- package/src/echo/echo.module.d.ts +12 -0
- package/src/echo/echo.page.d.ts +34 -0
- package/src/errorReporting.service.d.ts +26 -0
- package/src/mde/mde.component.d.ts +39 -0
- package/src/mde/mde.module.d.ts +12 -0
- package/src/mde/mdeToolbar.component.d.ts +5 -0
- package/src/offline/cacheableResource.component.d.ts +11 -0
- package/src/offline/offline.module.d.ts +12 -0
- package/src/offline/offline.service.d.ts +39 -0
- package/src/offline/offlineData.service.d.ts +281 -0
- package/src/offline/offlineIndicator.component.d.ts +25 -0
- package/src/offline/offlineManager.component.d.ts +17 -0
- package/src/pushNotifications.service.d.ts +26 -0
- package/src/sentiment/sentiment.component.d.ts +35 -0
- package/src/sentiment/sentiment.module.d.ts +11 -0
- package/src/timeInterval/fromTimeToTime.component.d.ts +61 -0
- package/src/timeInterval/timeInterval.component.d.ts +84 -0
- package/src/timeInterval/timeInterval.module.d.ts +12 -0
- package/src/tinCan.service.d.ts +31 -0
|
@@ -0,0 +1,281 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Platform } from '@ionic/angular';
|
|
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, false, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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, false, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { Sentiment } from 'idea-toolbox';
|
|
3
|
+
import { IDEAOfflineService } from '../offline/offline.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class IDEASentimentComponent implements OnChanges {
|
|
6
|
+
protected _env: any;
|
|
7
|
+
private _API;
|
|
8
|
+
private _translate;
|
|
9
|
+
_offline: IDEAOfflineService;
|
|
10
|
+
/**
|
|
11
|
+
* The sentiment detected from the input text.
|
|
12
|
+
*/
|
|
13
|
+
sentiment: Sentiment;
|
|
14
|
+
/**
|
|
15
|
+
* The input text.
|
|
16
|
+
*/
|
|
17
|
+
text: string;
|
|
18
|
+
/**
|
|
19
|
+
* Lines preferences for the item.
|
|
20
|
+
*/
|
|
21
|
+
lines: string;
|
|
22
|
+
/**
|
|
23
|
+
* The color for the component.
|
|
24
|
+
*/
|
|
25
|
+
color: string;
|
|
26
|
+
/**
|
|
27
|
+
* Triggers when the sentiment change.
|
|
28
|
+
*/
|
|
29
|
+
change: EventEmitter<Sentiment>;
|
|
30
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
31
|
+
private detectSentiment;
|
|
32
|
+
getColorBySentiment(sentiment?: Sentiment | string): string;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IDEASentimentComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IDEASentimentComponent, "idea-sentiment", never, { "text": { "alias": "text"; "required": false; }; "lines": { "alias": "lines"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, { "change": "change"; }, never, never, false, never>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./sentiment.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "@ionic/angular";
|
|
6
|
+
import * as i5 from "@idea-ionic/common";
|
|
7
|
+
export declare class IDEASentimentModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IDEASentimentModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IDEASentimentModule, [typeof i1.IDEASentimentComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.IonicModule, typeof i5.IDEATranslationsModule], [typeof i1.IDEASentimentComponent]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<IDEASentimentModule>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { TimeInterval } from 'idea-toolbox';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class IDEAFromTimeToTimeComponent implements OnInit {
|
|
5
|
+
private _modal;
|
|
6
|
+
private _translate;
|
|
7
|
+
/**
|
|
8
|
+
* The time interval to set.
|
|
9
|
+
*/
|
|
10
|
+
timeInterval: TimeInterval;
|
|
11
|
+
/**
|
|
12
|
+
* Whether we should start picking the time displaying the afternoon (PM) or the morning (AM, default).
|
|
13
|
+
*/
|
|
14
|
+
period: Periods;
|
|
15
|
+
/**
|
|
16
|
+
* A time to use as lower limit for the possible choices.
|
|
17
|
+
*/
|
|
18
|
+
notEarlierThan: number;
|
|
19
|
+
/**
|
|
20
|
+
* A time to use as upper limit for the possible choices.
|
|
21
|
+
*/
|
|
22
|
+
notLaterThan: number;
|
|
23
|
+
/**
|
|
24
|
+
* The title of the component.
|
|
25
|
+
*/
|
|
26
|
+
title: string;
|
|
27
|
+
segment: Segments;
|
|
28
|
+
Segments: typeof Segments;
|
|
29
|
+
Periods: typeof Periods;
|
|
30
|
+
timeIntervalWC: TimeInterval;
|
|
31
|
+
minutes: number;
|
|
32
|
+
ngOnInit(): void;
|
|
33
|
+
setInterval(hours: number, minutes?: number): void;
|
|
34
|
+
private timeToMs;
|
|
35
|
+
getClockButtonContent(hours: number, minutes?: number): string;
|
|
36
|
+
private contextualizeHour;
|
|
37
|
+
equalsFrom(hours: number, minutes?: number): boolean;
|
|
38
|
+
isAllowed(hours: number, minutes?: number): boolean;
|
|
39
|
+
isHourOfOppositeMeridian(hours: number, minutes?: number): boolean;
|
|
40
|
+
msToTimeString(time: number): string;
|
|
41
|
+
save(): void;
|
|
42
|
+
reset(): void;
|
|
43
|
+
close(): void;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IDEAFromTimeToTimeComponent, never>;
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IDEAFromTimeToTimeComponent, "idea-from-time-to-time", never, { "timeInterval": { "alias": "timeInterval"; "required": false; }; "period": { "alias": "period"; "required": false; }; "notEarlierThan": { "alias": "notEarlierThan"; "required": false; }; "notLaterThan": { "alias": "notLaterThan"; "required": false; }; "title": { "alias": "title"; "required": false; }; }, {}, never, never, false, never>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The two stages of the component, to pick the start and the end of the interval.
|
|
49
|
+
*/
|
|
50
|
+
declare enum Segments {
|
|
51
|
+
FROM = "FROM",
|
|
52
|
+
TO = "TO"
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The two possible periods of the component, to interpret the clock the right way.
|
|
56
|
+
*/
|
|
57
|
+
export declare enum Periods {
|
|
58
|
+
AM = "AM",
|
|
59
|
+
PM = "PM"
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { EventEmitter, SimpleChanges, OnInit, OnDestroy, OnChanges } from '@angular/core';
|
|
2
|
+
import { TimeInterval } from 'idea-toolbox';
|
|
3
|
+
import { Periods } from './fromTimeToTime.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class IDEATimeIntervalComponent implements OnInit, OnDestroy, OnChanges {
|
|
6
|
+
private _modal;
|
|
7
|
+
private _translate;
|
|
8
|
+
/**
|
|
9
|
+
* The time interval to set.
|
|
10
|
+
*/
|
|
11
|
+
timeInterval: TimeInterval;
|
|
12
|
+
/**
|
|
13
|
+
* Whether we should start picking the time displaying the afternoon (PM) or the morning (AM, default).
|
|
14
|
+
*/
|
|
15
|
+
period: Periods;
|
|
16
|
+
/**
|
|
17
|
+
* A time to use as lower limit for the possible choices.
|
|
18
|
+
*/
|
|
19
|
+
notEarlierThan: number;
|
|
20
|
+
/**
|
|
21
|
+
* A time to use as upper limit for the possible choices.
|
|
22
|
+
*/
|
|
23
|
+
notLaterThan: number;
|
|
24
|
+
/**
|
|
25
|
+
* The label for the field.
|
|
26
|
+
*/
|
|
27
|
+
label: string;
|
|
28
|
+
/**
|
|
29
|
+
* The icon for the field.
|
|
30
|
+
*/
|
|
31
|
+
icon: string;
|
|
32
|
+
/**
|
|
33
|
+
* The color of the icon.
|
|
34
|
+
*/
|
|
35
|
+
iconColor: string;
|
|
36
|
+
/**
|
|
37
|
+
* A placeholder for the field.
|
|
38
|
+
*/
|
|
39
|
+
placeholder: string;
|
|
40
|
+
/**
|
|
41
|
+
* If true, the component is disabled.
|
|
42
|
+
*/
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* If true, the field has a tappable effect when disabled.
|
|
46
|
+
*/
|
|
47
|
+
tappableWhenDisabled: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* If true, the obligatory dot is shown.
|
|
50
|
+
*/
|
|
51
|
+
obligatory: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Lines preferences for the item.
|
|
54
|
+
*/
|
|
55
|
+
lines: string;
|
|
56
|
+
/**
|
|
57
|
+
* The color for the component.
|
|
58
|
+
*/
|
|
59
|
+
color: string;
|
|
60
|
+
/**
|
|
61
|
+
* On select event.
|
|
62
|
+
*/
|
|
63
|
+
select: EventEmitter<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Icon select.
|
|
66
|
+
*/
|
|
67
|
+
iconSelect: EventEmitter<void>;
|
|
68
|
+
/**
|
|
69
|
+
* On select (with the field disabled) event.
|
|
70
|
+
*/
|
|
71
|
+
selectWhenDisabled: EventEmitter<void>;
|
|
72
|
+
valueToDisplay: string;
|
|
73
|
+
private langChangeSubscription;
|
|
74
|
+
isOpening: boolean;
|
|
75
|
+
ngOnInit(): void;
|
|
76
|
+
ngOnDestroy(): void;
|
|
77
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
78
|
+
private getValueToDisplay;
|
|
79
|
+
pickTimeInterval(): Promise<void>;
|
|
80
|
+
doSelectWhenDisabled(): void;
|
|
81
|
+
doIconSelect(event: any): void;
|
|
82
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IDEATimeIntervalComponent, never>;
|
|
83
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IDEATimeIntervalComponent, "idea-time-interval", never, { "timeInterval": { "alias": "timeInterval"; "required": false; }; "period": { "alias": "period"; "required": false; }; "notEarlierThan": { "alias": "notEarlierThan"; "required": false; }; "notLaterThan": { "alias": "notLaterThan"; "required": false; }; "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tappableWhenDisabled": { "alias": "tappableWhenDisabled"; "required": false; }; "obligatory": { "alias": "obligatory"; "required": false; }; "lines": { "alias": "lines"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, { "select": "select"; "iconSelect": "iconSelect"; "selectWhenDisabled": "selectWhenDisabled"; }, never, never, false, never>;
|
|
84
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./fromTimeToTime.component";
|
|
3
|
+
import * as i2 from "./timeInterval.component";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@angular/forms";
|
|
6
|
+
import * as i5 from "@ionic/angular";
|
|
7
|
+
import * as i6 from "@idea-ionic/common";
|
|
8
|
+
export declare class IDEATimeIntervalModule {
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IDEATimeIntervalModule, never>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IDEATimeIntervalModule, [typeof i1.IDEAFromTimeToTimeComponent, typeof i2.IDEATimeIntervalComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.IonicModule, typeof i6.IDEATranslationsModule], [typeof i1.IDEAFromTimeToTimeComponent, typeof i2.IDEATimeIntervalComponent]>;
|
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<IDEATimeIntervalModule>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated use a specific App service instead.
|
|
4
|
+
*/
|
|
5
|
+
export declare class IDEATinCanService {
|
|
6
|
+
protected data: any;
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Set a variable with the given value.
|
|
10
|
+
* @param variable variable to set
|
|
11
|
+
* @param value value to assign to the variable
|
|
12
|
+
*/
|
|
13
|
+
set(variable: string, value: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* Get the content of a variable.
|
|
16
|
+
* @param variable variable to acquire
|
|
17
|
+
* @param getAndDelete if set, delete the variable after the acquisition
|
|
18
|
+
*/
|
|
19
|
+
get(variable: string, getAndDelete?: boolean): any;
|
|
20
|
+
/**
|
|
21
|
+
* Remove a variable.
|
|
22
|
+
* @param variable variable to remove
|
|
23
|
+
*/
|
|
24
|
+
remove(variable: string): void;
|
|
25
|
+
/**
|
|
26
|
+
* Clear all the variables.
|
|
27
|
+
*/
|
|
28
|
+
clear(): void;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IDEATinCanService, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<IDEATinCanService>;
|
|
31
|
+
}
|