@ebarooni/capacitor-calendar 6.7.1 → 7.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/EbarooniCapacitorCalendar.podspec +2 -2
- package/Package.swift +28 -0
- package/README.md +690 -98
- package/android/build.gradle +15 -11
- package/dist/docs.json +47 -22
- package/dist/esm/schemas/enums/plugin-permission.js.map +1 -1
- package/dist/esm/schemas/interfaces/plugin-permissions-map.d.ts +2 -4
- package/dist/esm/schemas/interfaces/plugin-permissions-map.js.map +1 -1
- package/dist/esm/schemas/interfaces/reminder-recurrence-rule.d.ts +1 -1
- package/dist/esm/schemas/interfaces/reminder-recurrence-rule.js.map +1 -1
- package/dist/esm/schemas/interfaces/reminder.d.ts +1 -1
- package/dist/esm/schemas/interfaces/reminder.js.map +1 -1
- package/dist/esm/schemas/interfaces/reminders-list.d.ts +2 -3
- package/dist/esm/schemas/interfaces/reminders-list.js.map +1 -1
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js.map +1 -1
- package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/CapacitorCalendarPlugin.swift +35 -6
- package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/CapacitorCalendarPluginError.swift +0 -8
- package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/CapacitorReminders.swift +0 -8
- package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/EventCreationParameters.swift +0 -8
- package/ios/Sources/CapacitorCalendarPlugin/EventDeleteResults.swift +6 -0
- package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/PermissionState.swift +0 -8
- package/ios/Sources/CapacitorCalendarPlugin/RecurrenceParameters.swift +7 -0
- package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/ReminderCreationParameters.swift +0 -8
- package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/UIColorExtensions.swift +0 -8
- package/ios/Tests/CapacitorCalendarPluginTests/CapacitorCalendarPluginTests.swift +15 -0
- package/package.json +23 -26
- package/assets/images/text-logo.png +0 -0
- package/ios/Plugin/CapacitorCalendarPlugin.h +0 -10
- package/ios/Plugin/CapacitorCalendarPlugin.m +0 -36
- package/ios/Plugin/EventDeleteResults.swift +0 -14
- package/ios/Plugin/Info.plist +0 -24
- package/ios/Plugin/RecurrenceParameters.swift +0 -15
- /package/ios/{Plugin → Sources/CapacitorCalendarPlugin}/CapacitorCalendar.swift +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import XCTest
|
|
2
|
+
@testable import CapacitorCalendarPlugin
|
|
3
|
+
|
|
4
|
+
class CapacitorCalendarTests: XCTestCase {
|
|
5
|
+
func testEcho() {
|
|
6
|
+
// This is an example of a functional test case for a plugin.
|
|
7
|
+
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
|
8
|
+
|
|
9
|
+
let implementation = CapacitorCalendar()
|
|
10
|
+
let value = "Hello, World!"
|
|
11
|
+
let result = implementation.echo(value)
|
|
12
|
+
|
|
13
|
+
XCTAssertEqual(value, result)
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebarooni/capacitor-calendar",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
|
+
"description": "A capacitor plugin for managing calendar events on iOS and Android, with reminder support on iOS.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/esm/index.d.ts",
|
|
@@ -10,13 +10,15 @@
|
|
|
10
10
|
"android/src/main/",
|
|
11
11
|
"android/build.gradle",
|
|
12
12
|
"dist/",
|
|
13
|
-
"ios/
|
|
13
|
+
"ios/Sources",
|
|
14
|
+
"ios/Tests",
|
|
15
|
+
"Package.swift",
|
|
14
16
|
"EbarooniCapacitorCalendar.podspec",
|
|
15
|
-
"LICENSE.txt"
|
|
16
|
-
"assets/images/text-logo.png"
|
|
17
|
+
"LICENSE.txt"
|
|
17
18
|
],
|
|
18
19
|
"author": "Ehsan Barooni",
|
|
19
20
|
"license": "MIT",
|
|
21
|
+
"homepage": "https://ebarooni.github.io/capacitor-calendar",
|
|
20
22
|
"repository": {
|
|
21
23
|
"type": "git",
|
|
22
24
|
"url": "git+https://github.com/ebarooni/capacitor-calendar.git"
|
|
@@ -31,19 +33,17 @@
|
|
|
31
33
|
"calendar",
|
|
32
34
|
"reminders",
|
|
33
35
|
"eventkit",
|
|
34
|
-
"eventkitui",
|
|
35
|
-
"angular",
|
|
36
36
|
"ionic"
|
|
37
37
|
],
|
|
38
|
-
"homepage": "https://capacitor-calendar.pages.dev",
|
|
39
38
|
"engines": {
|
|
40
|
-
"node": ">=
|
|
39
|
+
"node": ">=20.12.2"
|
|
41
40
|
},
|
|
42
41
|
"scripts": {
|
|
43
42
|
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
44
|
-
"verify:ios": "
|
|
43
|
+
"verify:ios": "xcodebuild build -scheme EbarooniCapacitorCalendar -destination generic/platform=iOS",
|
|
45
44
|
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
46
45
|
"verify:web": "npm run build",
|
|
46
|
+
"spm:install": "swift package resolve",
|
|
47
47
|
"prettier:check": "npx prettier . --check",
|
|
48
48
|
"prettier:fix": "npx prettier . --write",
|
|
49
49
|
"swiftlint": "node-swiftlint",
|
|
@@ -59,24 +59,20 @@
|
|
|
59
59
|
"fmt:md": "npx prettier --write \"**/*.md\"",
|
|
60
60
|
"fmt:kt": "npm run ktlint -- -F",
|
|
61
61
|
"fmt": "npm run fmt:ts-html && npm run fmt:css && npm run fmt:swift && npm run fmt:md && npm run fmt:kt",
|
|
62
|
-
"docgen
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"build": "npm run clean && npm run docgen:api-reference && npm run docgen:readme && tsc && rollup -c rollup.config.mjs",
|
|
62
|
+
"docgen": "docgen --api CapacitorCalendarPlugin --output-readme README.md --output-json dist/docs.json",
|
|
63
|
+
"typedoc": "npx typedoc",
|
|
64
|
+
"clean": "rimraf ./dist",
|
|
65
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
67
66
|
"prepublishOnly": "npm run build",
|
|
68
|
-
"serve": "cd example && npx ng serve",
|
|
69
67
|
"version:patch": "npm version patch --git-tag-version false",
|
|
70
68
|
"version:minor": "npm version minor --git-tag-version false",
|
|
71
69
|
"version:major": "npm version major --git-tag-version false"
|
|
72
70
|
},
|
|
73
71
|
"devDependencies": {
|
|
74
|
-
"@
|
|
75
|
-
"@capacitor/
|
|
76
|
-
"@capacitor/
|
|
77
|
-
"@capacitor/
|
|
78
|
-
"@capacitor/docgen": "^0.0.18",
|
|
79
|
-
"@capacitor/ios": "^6.0.0",
|
|
72
|
+
"@capacitor/android": "^7.0.0",
|
|
73
|
+
"@capacitor/core": "^7.0.0",
|
|
74
|
+
"@capacitor/docgen": "^0.3.0",
|
|
75
|
+
"@capacitor/ios": "^7.0.0",
|
|
80
76
|
"@ebarooni/eslint-config": "^1.0.1",
|
|
81
77
|
"@ebarooni/prettier-config": "^1.1.0",
|
|
82
78
|
"@ebarooni/stylelint-config": "^1.1.0",
|
|
@@ -89,18 +85,20 @@
|
|
|
89
85
|
"eslint-plugin-prettier": "^5.1.3",
|
|
90
86
|
"postcss": "^8.4.38",
|
|
91
87
|
"prettier": "^3.3.2",
|
|
92
|
-
"
|
|
88
|
+
"rimraf": "^6.0.1",
|
|
89
|
+
"rollup": "^4.30.1",
|
|
93
90
|
"stylelint": "^16.6.1",
|
|
94
91
|
"stylelint-config-standard-scss": "^13.1.0",
|
|
95
92
|
"stylelint-prettier": "^5.0.0",
|
|
96
93
|
"swiftlint": "^1.0.2",
|
|
97
94
|
"typedoc": "^0.26.5",
|
|
98
|
-
"typescript": "~
|
|
95
|
+
"typescript": "~4.7.4",
|
|
99
96
|
"typescript-eslint": "^8.0.1"
|
|
100
97
|
},
|
|
101
98
|
"peerDependencies": {
|
|
102
|
-
"@capacitor/core": "
|
|
99
|
+
"@capacitor/core": ">=7.0.0"
|
|
103
100
|
},
|
|
101
|
+
"prettier": "@ebarooni/prettier-config",
|
|
104
102
|
"capacitor": {
|
|
105
103
|
"ios": {
|
|
106
104
|
"src": "ios"
|
|
@@ -109,7 +107,6 @@
|
|
|
109
107
|
"src": "android"
|
|
110
108
|
}
|
|
111
109
|
},
|
|
112
|
-
"prettier": "@ebarooni/prettier-config",
|
|
113
110
|
"publishConfig": {
|
|
114
111
|
"access": "public"
|
|
115
112
|
}
|
|
Binary file
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#import <UIKit/UIKit.h>
|
|
2
|
-
|
|
3
|
-
//! Project version number for Plugin.
|
|
4
|
-
FOUNDATION_EXPORT double PluginVersionNumber;
|
|
5
|
-
|
|
6
|
-
//! Project version string for Plugin.
|
|
7
|
-
FOUNDATION_EXPORT const unsigned char PluginVersionString[];
|
|
8
|
-
|
|
9
|
-
// In this header, you should import all the public headers of your framework using statements like #import <Plugin/PublicHeader.h>
|
|
10
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
#import <Capacitor/Capacitor.h>
|
|
3
|
-
|
|
4
|
-
// Define the plugin using the CAP_PLUGIN Macro, and
|
|
5
|
-
// each method the plugin supports using the CAP_PLUGIN_METHOD macro.
|
|
6
|
-
CAP_PLUGIN(CapacitorCalendarPlugin, "CapacitorCalendar",
|
|
7
|
-
CAP_PLUGIN_METHOD(createEventWithPrompt, CAPPluginReturnPromise);
|
|
8
|
-
CAP_PLUGIN_METHOD(checkPermission, CAPPluginReturnPromise);
|
|
9
|
-
CAP_PLUGIN_METHOD(checkAllPermissions, CAPPluginReturnPromise);
|
|
10
|
-
CAP_PLUGIN_METHOD(requestPermission, CAPPluginReturnPromise);
|
|
11
|
-
CAP_PLUGIN_METHOD(requestAllPermissions, CAPPluginReturnPromise);
|
|
12
|
-
CAP_PLUGIN_METHOD(selectCalendarsWithPrompt, CAPPluginReturnPromise);
|
|
13
|
-
CAP_PLUGIN_METHOD(listCalendars, CAPPluginReturnPromise);
|
|
14
|
-
CAP_PLUGIN_METHOD(getDefaultCalendar, CAPPluginReturnPromise);
|
|
15
|
-
CAP_PLUGIN_METHOD(createEvent, CAPPluginReturnPromise);
|
|
16
|
-
CAP_PLUGIN_METHOD(getDefaultRemindersList, CAPPluginReturnPromise);
|
|
17
|
-
CAP_PLUGIN_METHOD(getRemindersLists, CAPPluginReturnPromise);
|
|
18
|
-
CAP_PLUGIN_METHOD(createReminder, CAPPluginReturnPromise);
|
|
19
|
-
CAP_PLUGIN_METHOD(openCalendar, CAPPluginReturnNone);
|
|
20
|
-
CAP_PLUGIN_METHOD(openReminders, CAPPluginReturnNone);
|
|
21
|
-
CAP_PLUGIN_METHOD(listEventsInRange, CAPPluginReturnPromise);
|
|
22
|
-
CAP_PLUGIN_METHOD(deleteEventsById, CAPPluginReturnPromise);
|
|
23
|
-
CAP_PLUGIN_METHOD(createCalendar, CAPPluginReturnPromise);
|
|
24
|
-
CAP_PLUGIN_METHOD(deleteCalendar, CAPPluginReturnNone);
|
|
25
|
-
CAP_PLUGIN_METHOD(getRemindersFromLists, CAPPluginReturnPromise);
|
|
26
|
-
CAP_PLUGIN_METHOD(deleteRemindersById, CAPPluginReturnPromise);
|
|
27
|
-
CAP_PLUGIN_METHOD(requestWriteOnlyCalendarAccess, CAPPluginReturnPromise);
|
|
28
|
-
CAP_PLUGIN_METHOD(requestFullCalendarAccess, CAPPluginReturnPromise);
|
|
29
|
-
CAP_PLUGIN_METHOD(requestFullRemindersAccess, CAPPluginReturnPromise);
|
|
30
|
-
CAP_PLUGIN_METHOD(requestReadOnlyCalendarAccess, CAPPluginReturnPromise);
|
|
31
|
-
CAP_PLUGIN_METHOD(modifyEventWithPrompt, CAPPluginReturnPromise);
|
|
32
|
-
CAP_PLUGIN_METHOD(modifyEvent, CAPPluginReturnNone);
|
|
33
|
-
CAP_PLUGIN_METHOD(fetchAllCalendarSources, CAPPluginReturnPromise);
|
|
34
|
-
CAP_PLUGIN_METHOD(fetchAllRemindersSources, CAPPluginReturnPromise);
|
|
35
|
-
CAP_PLUGIN_METHOD(modifyReminder, CAPPluginReturnNone);
|
|
36
|
-
)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// EventDeleteResults.swift
|
|
3
|
-
// Plugin
|
|
4
|
-
//
|
|
5
|
-
// Created by Ehsan Barooni on 13.04.24.
|
|
6
|
-
// Copyright © 2024 Max Lynch. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
import Foundation
|
|
10
|
-
|
|
11
|
-
public struct EventDeleteResults {
|
|
12
|
-
var deleted: [String]
|
|
13
|
-
var failed: [String]
|
|
14
|
-
}
|
package/ios/Plugin/Info.plist
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
-
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
7
|
-
<key>CFBundleExecutable</key>
|
|
8
|
-
<string>$(EXECUTABLE_NAME)</string>
|
|
9
|
-
<key>CFBundleIdentifier</key>
|
|
10
|
-
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
11
|
-
<key>CFBundleInfoDictionaryVersion</key>
|
|
12
|
-
<string>6.0</string>
|
|
13
|
-
<key>CFBundleName</key>
|
|
14
|
-
<string>$(PRODUCT_NAME)</string>
|
|
15
|
-
<key>CFBundlePackageType</key>
|
|
16
|
-
<string>FMWK</string>
|
|
17
|
-
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>1.0</string>
|
|
19
|
-
<key>CFBundleVersion</key>
|
|
20
|
-
<string>$(CURRENT_PROJECT_VERSION)</string>
|
|
21
|
-
<key>NSPrincipalClass</key>
|
|
22
|
-
<string></string>
|
|
23
|
-
</dict>
|
|
24
|
-
</plist>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// RecurrenceParameters.swift
|
|
3
|
-
// Plugin
|
|
4
|
-
//
|
|
5
|
-
// Created by Ehsan Barooni on 22.03.24.
|
|
6
|
-
// Copyright © 2024 Max Lynch. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
import Foundation
|
|
10
|
-
|
|
11
|
-
struct RecurrenceParameters {
|
|
12
|
-
let frequency: Int
|
|
13
|
-
let interval: Int
|
|
14
|
-
let end: Double?
|
|
15
|
-
}
|
|
File without changes
|