@greatdayhr/capacitor-datetime-setting 1.2.0 → 2.0.0
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/README.md +283 -75
- package/android/src/main/java/com/datetimesetting/DateTimeSettingPlugin.java +9 -90
- package/dist/esm/definitions.d.ts +185 -19
- package/dist/esm/definitions.d.ts.map +1 -1
- package/dist/esm/web.d.ts +25 -6
- package/dist/esm/web.d.ts.map +1 -1
- package/dist/esm/web.js +27 -3
- package/dist/plugin.cjs.js +27 -3
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +27 -3
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/AutoDateTimeDetector.swift +530 -36
- package/ios/Plugin/DateTimeSettingPlugin.m +17 -3
- package/ios/Plugin/DateTimeSettingPlugin.swift +168 -35
- package/ios/Plugin/NotificationManager.swift +259 -0
- package/package.json +8 -5
|
@@ -1,45 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result from comprehensive date/time change detection
|
|
3
|
+
*/
|
|
4
|
+
export interface DateTimeChangeResult {
|
|
5
|
+
/**
|
|
6
|
+
* Type of change detected
|
|
7
|
+
*/
|
|
8
|
+
changeType: 'noChange' | 'timeOnly' | 'dateOnly' | 'dateAndTime';
|
|
9
|
+
/**
|
|
10
|
+
* Time difference in seconds
|
|
11
|
+
*/
|
|
12
|
+
timeDifference: number;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the date component changed
|
|
15
|
+
*/
|
|
16
|
+
dateChanged: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the time component changed
|
|
19
|
+
*/
|
|
20
|
+
timeChanged: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether automatic date/time is enabled
|
|
23
|
+
*/
|
|
24
|
+
isAutoDateTimeEnabled: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Previous date timestamp (Unix epoch, may be null on first check)
|
|
27
|
+
*/
|
|
28
|
+
previousDate?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Current date timestamp (Unix epoch)
|
|
31
|
+
*/
|
|
32
|
+
currentDate: number;
|
|
33
|
+
}
|
|
1
34
|
export interface DateTimeSettingPlugin {
|
|
2
35
|
/**
|
|
3
|
-
*
|
|
36
|
+
* Detects if the device's date/time has been manually changed.
|
|
37
|
+
* Uses network time comparison for accuracy when available.
|
|
38
|
+
*
|
|
39
|
+
* @returns Promise with boolean indicating if change was detected
|
|
40
|
+
* @since 2.0.0
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const result = await DateTimeSetting.detectDateTimeChange();
|
|
45
|
+
* if (result.changed) {
|
|
46
|
+
* console.log('Date/time has been changed!');
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
detectDateTimeChange(): Promise<{
|
|
51
|
+
changed: boolean;
|
|
52
|
+
}>;
|
|
53
|
+
/**
|
|
54
|
+
* Comprehensive date and time change detection with detailed analysis.
|
|
55
|
+
* Distinguishes between date-only, time-only, and combined changes.
|
|
56
|
+
*
|
|
57
|
+
* @returns Promise with detailed change result
|
|
58
|
+
* @since 2.0.0
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* const result = await DateTimeSetting.detectComprehensiveDateTimeChange();
|
|
63
|
+
* console.log('Change type:', result.changeType);
|
|
64
|
+
* console.log('Date changed:', result.dateChanged);
|
|
65
|
+
* console.log('Time changed:', result.timeChanged);
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
detectComprehensiveDateTimeChange(): Promise<DateTimeChangeResult>;
|
|
69
|
+
/**
|
|
70
|
+
* Detects specifically if only the date has been changed while time remains similar.
|
|
71
|
+
* Useful for detecting manual date changes when auto date/time is disabled.
|
|
72
|
+
*
|
|
73
|
+
* @returns Promise with boolean indicating if date-only change was detected
|
|
74
|
+
* @since 2.0.0
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```typescript
|
|
78
|
+
* const result = await DateTimeSetting.detectDateOnlyChange();
|
|
79
|
+
* if (result.changed) {
|
|
80
|
+
* console.log('Only the date was changed!');
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
detectDateOnlyChange(): Promise<{
|
|
85
|
+
changed: boolean;
|
|
86
|
+
}>;
|
|
87
|
+
/**
|
|
88
|
+
* Comprehensive date and time change detection with automatic notifications.
|
|
89
|
+
* Shows user notifications when changes are detected.
|
|
90
|
+
*
|
|
91
|
+
* @returns Promise with detailed change result
|
|
92
|
+
* @since 2.0.0
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```typescript
|
|
96
|
+
* const result = await DateTimeSetting.detectAndNotifyDateTimeChanges();
|
|
97
|
+
* // User will see notification if changes detected
|
|
98
|
+
* console.log('Change type:', result.changeType);
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
detectAndNotifyDateTimeChanges(): Promise<DateTimeChangeResult>;
|
|
102
|
+
/**
|
|
103
|
+
* Get the device's current local time.
|
|
104
|
+
*
|
|
105
|
+
* @returns Promise with Unix timestamp
|
|
106
|
+
* @since 2.0.0
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```typescript
|
|
110
|
+
* const result = await DateTimeSetting.getLocalTime();
|
|
111
|
+
* const date = new Date(result.timestamp * 1000);
|
|
112
|
+
* console.log('Current local time:', date);
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
getLocalTime(): Promise<{
|
|
116
|
+
timestamp: number;
|
|
117
|
+
}>;
|
|
118
|
+
/**
|
|
119
|
+
* Fetch accurate UTC time from internet time server.
|
|
4
120
|
*
|
|
5
|
-
* @returns Promise with
|
|
6
|
-
* @since
|
|
121
|
+
* @returns Promise with Unix timestamp from internet
|
|
122
|
+
* @since 2.0.0
|
|
7
123
|
*
|
|
8
124
|
* @example
|
|
9
125
|
* ```typescript
|
|
10
|
-
*
|
|
11
|
-
*
|
|
126
|
+
* try {
|
|
127
|
+
* const result = await DateTimeSetting.getInternetUTCTime();
|
|
128
|
+
* const date = new Date(result.timestamp * 1000);
|
|
129
|
+
* console.log('Internet UTC time:', date);
|
|
130
|
+
* } catch (error) {
|
|
131
|
+
* console.error('Failed to fetch internet time:', error);
|
|
132
|
+
* }
|
|
12
133
|
* ```
|
|
13
134
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
135
|
+
getInternetUTCTime(): Promise<{
|
|
136
|
+
timestamp: number;
|
|
16
137
|
}>;
|
|
17
138
|
/**
|
|
18
|
-
*
|
|
139
|
+
* Convert local time to UTC.
|
|
140
|
+
*
|
|
141
|
+
* @param options - Object containing the timestamp to convert
|
|
142
|
+
* @returns Promise with UTC timestamp
|
|
143
|
+
* @since 2.0.0
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```typescript
|
|
147
|
+
* const localTimestamp = Date.now() / 1000;
|
|
148
|
+
* const result = await DateTimeSetting.convertToLocalTime({
|
|
149
|
+
* timestamp: localTimestamp
|
|
150
|
+
* });
|
|
151
|
+
* console.log('UTC timestamp:', result.timestamp);
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
convertToLocalTime(options: {
|
|
155
|
+
timestamp: number;
|
|
156
|
+
}): Promise<{
|
|
157
|
+
timestamp: number;
|
|
158
|
+
}>;
|
|
159
|
+
/**
|
|
160
|
+
* Set the stored timestamp for future change detection.
|
|
161
|
+
*
|
|
162
|
+
* @param options - Object containing the timestamp to store
|
|
163
|
+
* @returns Promise that resolves when timestamp is stored
|
|
164
|
+
* @since 2.0.0
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```typescript
|
|
168
|
+
* const currentTimestamp = Date.now() / 1000;
|
|
169
|
+
* await DateTimeSetting.setStoredTimestamp({
|
|
170
|
+
* timestamp: currentTimestamp
|
|
171
|
+
* });
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
setStoredTimestamp(options: {
|
|
175
|
+
timestamp: number;
|
|
176
|
+
}): Promise<void>;
|
|
177
|
+
/**
|
|
178
|
+
* Get the currently stored timestamp.
|
|
19
179
|
*
|
|
20
|
-
* @returns Promise with
|
|
21
|
-
* @since
|
|
180
|
+
* @returns Promise with stored timestamp (null if not set)
|
|
181
|
+
* @since 2.0.0
|
|
22
182
|
*
|
|
23
183
|
* @example
|
|
24
184
|
* ```typescript
|
|
25
|
-
* const result = await DateTimeSetting.
|
|
26
|
-
*
|
|
185
|
+
* const result = await DateTimeSetting.getStoredTimestamp();
|
|
186
|
+
* if (result.timestamp) {
|
|
187
|
+
* const date = new Date(result.timestamp * 1000);
|
|
188
|
+
* console.log('Stored timestamp:', date);
|
|
189
|
+
* } else {
|
|
190
|
+
* console.log('No timestamp stored');
|
|
191
|
+
* }
|
|
27
192
|
* ```
|
|
28
193
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
194
|
+
getStoredTimestamp(): Promise<{
|
|
195
|
+
timestamp: number | null;
|
|
31
196
|
}>;
|
|
32
197
|
/**
|
|
33
|
-
*
|
|
198
|
+
* Reset the detector (clears all stored data and cache).
|
|
34
199
|
*
|
|
35
|
-
* @returns Promise that resolves when
|
|
36
|
-
* @since
|
|
200
|
+
* @returns Promise that resolves when reset is complete
|
|
201
|
+
* @since 2.0.0
|
|
37
202
|
*
|
|
38
203
|
* @example
|
|
39
204
|
* ```typescript
|
|
40
|
-
* await DateTimeSetting.
|
|
205
|
+
* await DateTimeSetting.resetDetector();
|
|
206
|
+
* console.log('Detector has been reset');
|
|
41
207
|
* ```
|
|
42
208
|
*/
|
|
43
|
-
|
|
209
|
+
resetDetector(): Promise<void>;
|
|
44
210
|
}
|
|
45
211
|
//# sourceMappingURL=definitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,
|
|
1
|
+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AC;IAInF;;;;;;;;;;;;;;OAcG;IACH,kBAAkB,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElE;;;;;;;;;;;;;;;;OAgBG;IACH,kBAAkB,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IAE5D;;;;;;;;;;;OAWG;IACH,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC"}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
|
-
import type { DateTimeSettingPlugin } from './definitions';
|
|
2
|
+
import type { DateTimeSettingPlugin, DateTimeChangeResult } from './definitions';
|
|
3
3
|
export declare class DateTimeSettingWeb extends WebPlugin implements DateTimeSettingPlugin {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
detectDateTimeChange(): Promise<{
|
|
5
|
+
changed: boolean;
|
|
6
6
|
}>;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
detectComprehensiveDateTimeChange(): Promise<DateTimeChangeResult>;
|
|
8
|
+
detectDateOnlyChange(): Promise<{
|
|
9
|
+
changed: boolean;
|
|
9
10
|
}>;
|
|
10
|
-
|
|
11
|
+
detectAndNotifyDateTimeChanges(): Promise<DateTimeChangeResult>;
|
|
12
|
+
getLocalTime(): Promise<{
|
|
13
|
+
timestamp: number;
|
|
14
|
+
}>;
|
|
15
|
+
getInternetUTCTime(): Promise<{
|
|
16
|
+
timestamp: number;
|
|
17
|
+
}>;
|
|
18
|
+
convertToLocalTime(options: {
|
|
19
|
+
timestamp: number;
|
|
20
|
+
}): Promise<{
|
|
21
|
+
timestamp: number;
|
|
22
|
+
}>;
|
|
23
|
+
setStoredTimestamp(options: {
|
|
24
|
+
timestamp: number;
|
|
25
|
+
}): Promise<void>;
|
|
26
|
+
getStoredTimestamp(): Promise<{
|
|
27
|
+
timestamp: number | null;
|
|
28
|
+
}>;
|
|
29
|
+
resetDetector(): Promise<void>;
|
|
11
30
|
}
|
|
12
31
|
//# sourceMappingURL=web.d.ts.map
|
package/dist/esm/web.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEjF,qBAAa,kBAAmB,SAAQ,SAAU,YAAW,qBAAqB;IAExE,oBAAoB,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAIrD,iCAAiC,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAIlE,oBAAoB,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAIrD,8BAA8B,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAK/D,YAAY,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAI9C,kBAAkB,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAIpD,kBAAkB,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAKlF,kBAAkB,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjE,kBAAkB,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAI3D,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;CAGvC"}
|
package/dist/esm/web.js
CHANGED
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
2
|
export class DateTimeSettingWeb extends WebPlugin {
|
|
3
|
-
|
|
3
|
+
// Date/Time Change Detection
|
|
4
|
+
async detectDateTimeChange() {
|
|
4
5
|
throw this.unimplemented('Not implemented on web.');
|
|
5
6
|
}
|
|
6
|
-
async
|
|
7
|
+
async detectComprehensiveDateTimeChange() {
|
|
7
8
|
throw this.unimplemented('Not implemented on web.');
|
|
8
9
|
}
|
|
9
|
-
async
|
|
10
|
+
async detectDateOnlyChange() {
|
|
11
|
+
throw this.unimplemented('Not implemented on web.');
|
|
12
|
+
}
|
|
13
|
+
async detectAndNotifyDateTimeChanges() {
|
|
14
|
+
throw this.unimplemented('Not implemented on web.');
|
|
15
|
+
}
|
|
16
|
+
// Time Utilities
|
|
17
|
+
async getLocalTime() {
|
|
18
|
+
throw this.unimplemented('Not implemented on web.');
|
|
19
|
+
}
|
|
20
|
+
async getInternetUTCTime() {
|
|
21
|
+
throw this.unimplemented('Not implemented on web.');
|
|
22
|
+
}
|
|
23
|
+
async convertToLocalTime(options) {
|
|
24
|
+
throw this.unimplemented('Not implemented on web.');
|
|
25
|
+
}
|
|
26
|
+
// Timestamp Management
|
|
27
|
+
async setStoredTimestamp(options) {
|
|
28
|
+
throw this.unimplemented('Not implemented on web.');
|
|
29
|
+
}
|
|
30
|
+
async getStoredTimestamp() {
|
|
31
|
+
throw this.unimplemented('Not implemented on web.');
|
|
32
|
+
}
|
|
33
|
+
async resetDetector() {
|
|
10
34
|
throw this.unimplemented('Not implemented on web.');
|
|
11
35
|
}
|
|
12
36
|
}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -7,13 +7,37 @@ const DateTimeSetting = core.registerPlugin('DateTimeSetting', {
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
class DateTimeSettingWeb extends core.WebPlugin {
|
|
10
|
-
|
|
10
|
+
// Date/Time Change Detection
|
|
11
|
+
async detectDateTimeChange() {
|
|
11
12
|
throw this.unimplemented('Not implemented on web.');
|
|
12
13
|
}
|
|
13
|
-
async
|
|
14
|
+
async detectComprehensiveDateTimeChange() {
|
|
14
15
|
throw this.unimplemented('Not implemented on web.');
|
|
15
16
|
}
|
|
16
|
-
async
|
|
17
|
+
async detectDateOnlyChange() {
|
|
18
|
+
throw this.unimplemented('Not implemented on web.');
|
|
19
|
+
}
|
|
20
|
+
async detectAndNotifyDateTimeChanges() {
|
|
21
|
+
throw this.unimplemented('Not implemented on web.');
|
|
22
|
+
}
|
|
23
|
+
// Time Utilities
|
|
24
|
+
async getLocalTime() {
|
|
25
|
+
throw this.unimplemented('Not implemented on web.');
|
|
26
|
+
}
|
|
27
|
+
async getInternetUTCTime() {
|
|
28
|
+
throw this.unimplemented('Not implemented on web.');
|
|
29
|
+
}
|
|
30
|
+
async convertToLocalTime(options) {
|
|
31
|
+
throw this.unimplemented('Not implemented on web.');
|
|
32
|
+
}
|
|
33
|
+
// Timestamp Management
|
|
34
|
+
async setStoredTimestamp(options) {
|
|
35
|
+
throw this.unimplemented('Not implemented on web.');
|
|
36
|
+
}
|
|
37
|
+
async getStoredTimestamp() {
|
|
38
|
+
throw this.unimplemented('Not implemented on web.');
|
|
39
|
+
}
|
|
40
|
+
async resetDetector() {
|
|
17
41
|
throw this.unimplemented('Not implemented on web.');
|
|
18
42
|
}
|
|
19
43
|
}
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DateTimeSetting = registerPlugin('DateTimeSetting', {\n web: () => import('./web').then(m => new m.DateTimeSettingWeb()),\n});\nexport * from './definitions';\nexport { DateTimeSetting };\n","import { WebPlugin } from '@capacitor/core';\nexport class DateTimeSettingWeb extends WebPlugin {\n async
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DateTimeSetting = registerPlugin('DateTimeSetting', {\n web: () => import('./web').then(m => new m.DateTimeSettingWeb()),\n});\nexport * from './definitions';\nexport { DateTimeSetting };\n","import { WebPlugin } from '@capacitor/core';\nexport class DateTimeSettingWeb extends WebPlugin {\n // Date/Time Change Detection\n async detectDateTimeChange() {\n throw this.unimplemented('Not implemented on web.');\n }\n async detectComprehensiveDateTimeChange() {\n throw this.unimplemented('Not implemented on web.');\n }\n async detectDateOnlyChange() {\n throw this.unimplemented('Not implemented on web.');\n }\n async detectAndNotifyDateTimeChanges() {\n throw this.unimplemented('Not implemented on web.');\n }\n // Time Utilities\n async getLocalTime() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getInternetUTCTime() {\n throw this.unimplemented('Not implemented on web.');\n }\n async convertToLocalTime(options) {\n throw this.unimplemented('Not implemented on web.');\n }\n // Timestamp Management\n async setStoredTimestamp(options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async getStoredTimestamp() {\n throw this.unimplemented('Not implemented on web.');\n }\n async resetDetector() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACpE,CAAC;;ACFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD;AACA,IAAI,MAAM,oBAAoB,GAAG;AACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,iCAAiC,GAAG;AAC9C,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,oBAAoB,GAAG;AACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,8BAA8B,GAAG;AAC3C,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;AACA,IAAI,MAAM,YAAY,GAAG;AACzB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,kBAAkB,CAAC,OAAO,EAAE;AACtC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;AACA,IAAI,MAAM,kBAAkB,CAAC,OAAO,EAAE;AACtC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,aAAa,GAAG;AAC1B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -6,13 +6,37 @@ var capacitorDatetimeSetting = (function (exports, core) {
|
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
class DateTimeSettingWeb extends core.WebPlugin {
|
|
9
|
-
|
|
9
|
+
// Date/Time Change Detection
|
|
10
|
+
async detectDateTimeChange() {
|
|
10
11
|
throw this.unimplemented('Not implemented on web.');
|
|
11
12
|
}
|
|
12
|
-
async
|
|
13
|
+
async detectComprehensiveDateTimeChange() {
|
|
13
14
|
throw this.unimplemented('Not implemented on web.');
|
|
14
15
|
}
|
|
15
|
-
async
|
|
16
|
+
async detectDateOnlyChange() {
|
|
17
|
+
throw this.unimplemented('Not implemented on web.');
|
|
18
|
+
}
|
|
19
|
+
async detectAndNotifyDateTimeChanges() {
|
|
20
|
+
throw this.unimplemented('Not implemented on web.');
|
|
21
|
+
}
|
|
22
|
+
// Time Utilities
|
|
23
|
+
async getLocalTime() {
|
|
24
|
+
throw this.unimplemented('Not implemented on web.');
|
|
25
|
+
}
|
|
26
|
+
async getInternetUTCTime() {
|
|
27
|
+
throw this.unimplemented('Not implemented on web.');
|
|
28
|
+
}
|
|
29
|
+
async convertToLocalTime(options) {
|
|
30
|
+
throw this.unimplemented('Not implemented on web.');
|
|
31
|
+
}
|
|
32
|
+
// Timestamp Management
|
|
33
|
+
async setStoredTimestamp(options) {
|
|
34
|
+
throw this.unimplemented('Not implemented on web.');
|
|
35
|
+
}
|
|
36
|
+
async getStoredTimestamp() {
|
|
37
|
+
throw this.unimplemented('Not implemented on web.');
|
|
38
|
+
}
|
|
39
|
+
async resetDetector() {
|
|
16
40
|
throw this.unimplemented('Not implemented on web.');
|
|
17
41
|
}
|
|
18
42
|
}
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DateTimeSetting = registerPlugin('DateTimeSetting', {\n web: () => import('./web').then(m => new m.DateTimeSettingWeb()),\n});\nexport * from './definitions';\nexport { DateTimeSetting };\n","import { WebPlugin } from '@capacitor/core';\nexport class DateTimeSettingWeb extends WebPlugin {\n async
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DateTimeSetting = registerPlugin('DateTimeSetting', {\n web: () => import('./web').then(m => new m.DateTimeSettingWeb()),\n});\nexport * from './definitions';\nexport { DateTimeSetting };\n","import { WebPlugin } from '@capacitor/core';\nexport class DateTimeSettingWeb extends WebPlugin {\n // Date/Time Change Detection\n async detectDateTimeChange() {\n throw this.unimplemented('Not implemented on web.');\n }\n async detectComprehensiveDateTimeChange() {\n throw this.unimplemented('Not implemented on web.');\n }\n async detectDateOnlyChange() {\n throw this.unimplemented('Not implemented on web.');\n }\n async detectAndNotifyDateTimeChanges() {\n throw this.unimplemented('Not implemented on web.');\n }\n // Time Utilities\n async getLocalTime() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getInternetUTCTime() {\n throw this.unimplemented('Not implemented on web.');\n }\n async convertToLocalTime(options) {\n throw this.unimplemented('Not implemented on web.');\n }\n // Timestamp Management\n async setStoredTimestamp(options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async getStoredTimestamp() {\n throw this.unimplemented('Not implemented on web.');\n }\n async resetDetector() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;IAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpE,CAAC;;ICFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD;IACA,IAAI,MAAM,oBAAoB,GAAG;IACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,iCAAiC,GAAG;IAC9C,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,oBAAoB,GAAG;IACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MA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