@ebarooni/capacitor-calendar 8.2.0 → 8.3.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 +40 -22
- package/android/src/main/java/dev/barooni/capacitor/calendar/PluginError.kt +4 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/implementation/CapacitorCalendar.kt +29 -6
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/data/EventDeleteInfo.kt +8 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/enums/EventSpan.kt +13 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteEventInput.kt +4 -1
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteEventWithPromptInput.kt +4 -1
- package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteEventsByIdInput.kt +2 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/utils/ImplementationHelper.kt +272 -4
- package/dist/docs.json +177 -37
- package/dist/esm/schemas/enums/event-span.d.ts +4 -0
- package/dist/esm/schemas/enums/event-span.js +4 -0
- package/dist/esm/schemas/enums/event-span.js.map +1 -1
- package/dist/esm/schemas/interfaces/delete-event-options.d.ts +28 -3
- package/dist/esm/schemas/interfaces/delete-event-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/delete-event-with-prompt-options.d.ts +38 -13
- package/dist/esm/schemas/interfaces/delete-event-with-prompt-options.js.map +1 -1
- package/dist/esm/schemas/interfaces/delete-events-by-id-options.d.ts +15 -3
- package/dist/esm/schemas/interfaces/delete-events-by-id-options.js.map +1 -1
- package/dist/esm/sub-definitions/calendar-operations.d.ts +1 -1
- package/dist/esm/sub-definitions/calendar-operations.js.map +1 -1
- package/dist/plugin.cjs.js +4 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +4 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/Implementation/CapacitorCalendar.swift +3 -3
- package/ios/Plugin/Models/Enums/EventSpan.swift +8 -0
- package/ios/Plugin/Models/Inputs/DeleteEventInput.swift +9 -4
- package/ios/Plugin/Models/Inputs/DeleteEventWithPromptInput.swift +9 -4
- package/ios/Plugin/Models/Inputs/DeleteEventsByIdInput.swift +9 -4
- package/ios/Plugin/Utils/ImplementationHelper.swift +7 -2
- package/package.json +1 -1
package/dist/docs.json
CHANGED
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
"text": "7.1.0"
|
|
474
474
|
}
|
|
475
475
|
],
|
|
476
|
-
"docs": "
|
|
476
|
+
"docs": "Saves pending calendar changes.",
|
|
477
477
|
"complexTypes": [],
|
|
478
478
|
"slug": "commit"
|
|
479
479
|
},
|
|
@@ -2402,6 +2402,30 @@
|
|
|
2402
2402
|
],
|
|
2403
2403
|
"methods": [],
|
|
2404
2404
|
"properties": [
|
|
2405
|
+
{
|
|
2406
|
+
"name": "commit",
|
|
2407
|
+
"tags": [
|
|
2408
|
+
{
|
|
2409
|
+
"text": "false",
|
|
2410
|
+
"name": "example"
|
|
2411
|
+
},
|
|
2412
|
+
{
|
|
2413
|
+
"text": "true",
|
|
2414
|
+
"name": "default"
|
|
2415
|
+
},
|
|
2416
|
+
{
|
|
2417
|
+
"text": "iOS",
|
|
2418
|
+
"name": "platform"
|
|
2419
|
+
},
|
|
2420
|
+
{
|
|
2421
|
+
"text": "8.3.0",
|
|
2422
|
+
"name": "since"
|
|
2423
|
+
}
|
|
2424
|
+
],
|
|
2425
|
+
"docs": "Whether to save the deletion to the event store immediately.\nPass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually.",
|
|
2426
|
+
"complexTypes": [],
|
|
2427
|
+
"type": "boolean | undefined"
|
|
2428
|
+
},
|
|
2405
2429
|
{
|
|
2406
2430
|
"name": "ids",
|
|
2407
2431
|
"tags": [
|
|
@@ -2417,20 +2441,24 @@
|
|
|
2417
2441
|
{
|
|
2418
2442
|
"name": "span",
|
|
2419
2443
|
"tags": [
|
|
2444
|
+
{
|
|
2445
|
+
"text": "EventSpan.THIS_EVENT",
|
|
2446
|
+
"name": "example"
|
|
2447
|
+
},
|
|
2420
2448
|
{
|
|
2421
2449
|
"text": "EventSpan.THIS_EVENT",
|
|
2422
2450
|
"name": "default"
|
|
2423
2451
|
},
|
|
2424
2452
|
{
|
|
2425
|
-
"text": "iOS",
|
|
2453
|
+
"text": "Android, iOS",
|
|
2426
2454
|
"name": "platform"
|
|
2427
2455
|
},
|
|
2428
2456
|
{
|
|
2429
|
-
"text": "
|
|
2430
|
-
"name": "
|
|
2457
|
+
"text": "7.1.0",
|
|
2458
|
+
"name": "since"
|
|
2431
2459
|
}
|
|
2432
2460
|
],
|
|
2433
|
-
"docs": "
|
|
2461
|
+
"docs": "How much of a recurring series to delete.\nOn Android, `THIS_EVENT` cannot target a single recurring occurrence here — use `deleteEvent` with `instanceDate`. Those ids are reported in `failed`.",
|
|
2434
2462
|
"complexTypes": [
|
|
2435
2463
|
"EventSpan"
|
|
2436
2464
|
],
|
|
@@ -2450,35 +2478,91 @@
|
|
|
2450
2478
|
],
|
|
2451
2479
|
"methods": [],
|
|
2452
2480
|
"properties": [
|
|
2481
|
+
{
|
|
2482
|
+
"name": "commit",
|
|
2483
|
+
"tags": [
|
|
2484
|
+
{
|
|
2485
|
+
"text": "false",
|
|
2486
|
+
"name": "example"
|
|
2487
|
+
},
|
|
2488
|
+
{
|
|
2489
|
+
"text": "true",
|
|
2490
|
+
"name": "default"
|
|
2491
|
+
},
|
|
2492
|
+
{
|
|
2493
|
+
"text": "iOS",
|
|
2494
|
+
"name": "platform"
|
|
2495
|
+
},
|
|
2496
|
+
{
|
|
2497
|
+
"text": "8.3.0",
|
|
2498
|
+
"name": "since"
|
|
2499
|
+
}
|
|
2500
|
+
],
|
|
2501
|
+
"docs": "Whether to save the deletion to the event store immediately.\nPass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually.",
|
|
2502
|
+
"complexTypes": [],
|
|
2503
|
+
"type": "boolean | undefined"
|
|
2504
|
+
},
|
|
2453
2505
|
{
|
|
2454
2506
|
"name": "id",
|
|
2455
2507
|
"tags": [
|
|
2508
|
+
{
|
|
2509
|
+
"text": "'1234'",
|
|
2510
|
+
"name": "example"
|
|
2511
|
+
},
|
|
2512
|
+
{
|
|
2513
|
+
"text": "Android, iOS",
|
|
2514
|
+
"name": "platform"
|
|
2515
|
+
},
|
|
2456
2516
|
{
|
|
2457
2517
|
"text": "7.1.0",
|
|
2458
2518
|
"name": "since"
|
|
2459
2519
|
}
|
|
2460
2520
|
],
|
|
2461
|
-
"docs": "",
|
|
2521
|
+
"docs": "The ID of the event to delete.",
|
|
2462
2522
|
"complexTypes": [],
|
|
2463
2523
|
"type": "string"
|
|
2464
2524
|
},
|
|
2525
|
+
{
|
|
2526
|
+
"name": "instanceDate",
|
|
2527
|
+
"tags": [
|
|
2528
|
+
{
|
|
2529
|
+
"text": "1716153600000",
|
|
2530
|
+
"name": "example"
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
"text": "Android",
|
|
2534
|
+
"name": "platform"
|
|
2535
|
+
},
|
|
2536
|
+
{
|
|
2537
|
+
"text": "8.3.0",
|
|
2538
|
+
"name": "since"
|
|
2539
|
+
}
|
|
2540
|
+
],
|
|
2541
|
+
"docs": "The start time of the occurrence to delete, in milliseconds since the epoch.\nUse `startDate` from `listEventsInRange`.\nOn Android, required for `THIS_EVENT` on recurring events. If omitted with `THIS_AND_FUTURE_EVENTS`, the whole series is deleted.",
|
|
2542
|
+
"complexTypes": [],
|
|
2543
|
+
"type": "number | undefined"
|
|
2544
|
+
},
|
|
2465
2545
|
{
|
|
2466
2546
|
"name": "span",
|
|
2467
2547
|
"tags": [
|
|
2548
|
+
{
|
|
2549
|
+
"text": "EventSpan.THIS_EVENT",
|
|
2550
|
+
"name": "example"
|
|
2551
|
+
},
|
|
2468
2552
|
{
|
|
2469
2553
|
"text": "EventSpan.THIS_EVENT",
|
|
2470
2554
|
"name": "default"
|
|
2471
2555
|
},
|
|
2472
2556
|
{
|
|
2473
|
-
"text": "iOS",
|
|
2557
|
+
"text": "Android, iOS",
|
|
2474
2558
|
"name": "platform"
|
|
2475
2559
|
},
|
|
2476
2560
|
{
|
|
2477
|
-
"text": "
|
|
2478
|
-
"name": "
|
|
2561
|
+
"text": "7.1.0",
|
|
2562
|
+
"name": "since"
|
|
2479
2563
|
}
|
|
2480
2564
|
],
|
|
2481
|
-
"docs": "
|
|
2565
|
+
"docs": "How much of a recurring series to delete.",
|
|
2482
2566
|
"complexTypes": [
|
|
2483
2567
|
"EventSpan"
|
|
2484
2568
|
],
|
|
@@ -2499,22 +2583,34 @@
|
|
|
2499
2583
|
"methods": [],
|
|
2500
2584
|
"properties": [
|
|
2501
2585
|
{
|
|
2502
|
-
"name": "
|
|
2586
|
+
"name": "cancelButtonText",
|
|
2503
2587
|
"tags": [
|
|
2588
|
+
{
|
|
2589
|
+
"text": "'Cancel'",
|
|
2590
|
+
"name": "default"
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
"text": "Android, iOS",
|
|
2594
|
+
"name": "platform"
|
|
2595
|
+
},
|
|
2504
2596
|
{
|
|
2505
2597
|
"text": "7.1.0",
|
|
2506
2598
|
"name": "since"
|
|
2507
2599
|
}
|
|
2508
2600
|
],
|
|
2509
|
-
"docs": "",
|
|
2601
|
+
"docs": "Text to show on the cancel button.",
|
|
2510
2602
|
"complexTypes": [],
|
|
2511
|
-
"type": "string"
|
|
2603
|
+
"type": "string | undefined"
|
|
2512
2604
|
},
|
|
2513
2605
|
{
|
|
2514
|
-
"name": "
|
|
2606
|
+
"name": "commit",
|
|
2515
2607
|
"tags": [
|
|
2516
2608
|
{
|
|
2517
|
-
"text": "
|
|
2609
|
+
"text": "false",
|
|
2610
|
+
"name": "example"
|
|
2611
|
+
},
|
|
2612
|
+
{
|
|
2613
|
+
"text": "true",
|
|
2518
2614
|
"name": "default"
|
|
2519
2615
|
},
|
|
2520
2616
|
{
|
|
@@ -2522,19 +2618,41 @@
|
|
|
2522
2618
|
"name": "platform"
|
|
2523
2619
|
},
|
|
2524
2620
|
{
|
|
2525
|
-
"text": "
|
|
2526
|
-
"name": "
|
|
2621
|
+
"text": "8.3.0",
|
|
2622
|
+
"name": "since"
|
|
2527
2623
|
}
|
|
2528
2624
|
],
|
|
2529
|
-
"docs": "
|
|
2530
|
-
"complexTypes": [
|
|
2531
|
-
|
|
2625
|
+
"docs": "Whether to save the deletion to the event store immediately.\nPass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually.",
|
|
2626
|
+
"complexTypes": [],
|
|
2627
|
+
"type": "boolean | undefined"
|
|
2628
|
+
},
|
|
2629
|
+
{
|
|
2630
|
+
"name": "confirmButtonText",
|
|
2631
|
+
"tags": [
|
|
2632
|
+
{
|
|
2633
|
+
"text": "'Delete'",
|
|
2634
|
+
"name": "default"
|
|
2635
|
+
},
|
|
2636
|
+
{
|
|
2637
|
+
"text": "Android, iOS",
|
|
2638
|
+
"name": "platform"
|
|
2639
|
+
},
|
|
2640
|
+
{
|
|
2641
|
+
"text": "7.1.0",
|
|
2642
|
+
"name": "since"
|
|
2643
|
+
}
|
|
2532
2644
|
],
|
|
2533
|
-
"
|
|
2645
|
+
"docs": "Text to show on the confirm button.",
|
|
2646
|
+
"complexTypes": [],
|
|
2647
|
+
"type": "string | undefined"
|
|
2534
2648
|
},
|
|
2535
2649
|
{
|
|
2536
|
-
"name": "
|
|
2650
|
+
"name": "id",
|
|
2537
2651
|
"tags": [
|
|
2652
|
+
{
|
|
2653
|
+
"text": "'1234'",
|
|
2654
|
+
"name": "example"
|
|
2655
|
+
},
|
|
2538
2656
|
{
|
|
2539
2657
|
"text": "Android, iOS",
|
|
2540
2658
|
"name": "platform"
|
|
@@ -2544,10 +2662,30 @@
|
|
|
2544
2662
|
"name": "since"
|
|
2545
2663
|
}
|
|
2546
2664
|
],
|
|
2547
|
-
"docs": "
|
|
2665
|
+
"docs": "The ID of the event to delete.",
|
|
2548
2666
|
"complexTypes": [],
|
|
2549
2667
|
"type": "string"
|
|
2550
2668
|
},
|
|
2669
|
+
{
|
|
2670
|
+
"name": "instanceDate",
|
|
2671
|
+
"tags": [
|
|
2672
|
+
{
|
|
2673
|
+
"text": "1716153600000",
|
|
2674
|
+
"name": "example"
|
|
2675
|
+
},
|
|
2676
|
+
{
|
|
2677
|
+
"text": "Android",
|
|
2678
|
+
"name": "platform"
|
|
2679
|
+
},
|
|
2680
|
+
{
|
|
2681
|
+
"text": "8.3.0",
|
|
2682
|
+
"name": "since"
|
|
2683
|
+
}
|
|
2684
|
+
],
|
|
2685
|
+
"docs": "The start time of the occurrence to delete, in milliseconds since the epoch.\nUse `startDate` from `listEventsInRange`.\nOn Android, required for `THIS_EVENT` on recurring events. If omitted with `THIS_AND_FUTURE_EVENTS`, the whole series is deleted.",
|
|
2686
|
+
"complexTypes": [],
|
|
2687
|
+
"type": "number | undefined"
|
|
2688
|
+
},
|
|
2551
2689
|
{
|
|
2552
2690
|
"name": "message",
|
|
2553
2691
|
"tags": [
|
|
@@ -2565,10 +2703,14 @@
|
|
|
2565
2703
|
"type": "string"
|
|
2566
2704
|
},
|
|
2567
2705
|
{
|
|
2568
|
-
"name": "
|
|
2706
|
+
"name": "span",
|
|
2569
2707
|
"tags": [
|
|
2570
2708
|
{
|
|
2571
|
-
"text": "
|
|
2709
|
+
"text": "EventSpan.THIS_EVENT",
|
|
2710
|
+
"name": "example"
|
|
2711
|
+
},
|
|
2712
|
+
{
|
|
2713
|
+
"text": "EventSpan.THIS_EVENT",
|
|
2572
2714
|
"name": "default"
|
|
2573
2715
|
},
|
|
2574
2716
|
{
|
|
@@ -2580,17 +2722,15 @@
|
|
|
2580
2722
|
"name": "since"
|
|
2581
2723
|
}
|
|
2582
2724
|
],
|
|
2583
|
-
"docs": "
|
|
2584
|
-
"complexTypes": [
|
|
2585
|
-
|
|
2725
|
+
"docs": "How much of a recurring series to delete.",
|
|
2726
|
+
"complexTypes": [
|
|
2727
|
+
"EventSpan"
|
|
2728
|
+
],
|
|
2729
|
+
"type": "EventSpan"
|
|
2586
2730
|
},
|
|
2587
2731
|
{
|
|
2588
|
-
"name": "
|
|
2732
|
+
"name": "title",
|
|
2589
2733
|
"tags": [
|
|
2590
|
-
{
|
|
2591
|
-
"text": "'Cancel'",
|
|
2592
|
-
"name": "default"
|
|
2593
|
-
},
|
|
2594
2734
|
{
|
|
2595
2735
|
"text": "Android, iOS",
|
|
2596
2736
|
"name": "platform"
|
|
@@ -2600,9 +2740,9 @@
|
|
|
2600
2740
|
"name": "since"
|
|
2601
2741
|
}
|
|
2602
2742
|
],
|
|
2603
|
-
"docs": "
|
|
2743
|
+
"docs": "Title of the dialog.",
|
|
2604
2744
|
"complexTypes": [],
|
|
2605
|
-
"type": "string
|
|
2745
|
+
"type": "string"
|
|
2606
2746
|
}
|
|
2607
2747
|
]
|
|
2608
2748
|
},
|
|
@@ -4842,7 +4982,7 @@
|
|
|
4842
4982
|
"name": "since"
|
|
4843
4983
|
}
|
|
4844
4984
|
],
|
|
4845
|
-
"docs": ""
|
|
4985
|
+
"docs": "Only the identified event or occurrence."
|
|
4846
4986
|
},
|
|
4847
4987
|
{
|
|
4848
4988
|
"name": "THIS_AND_FUTURE_EVENTS",
|
|
@@ -4852,7 +4992,7 @@
|
|
|
4852
4992
|
"name": "since"
|
|
4853
4993
|
}
|
|
4854
4994
|
],
|
|
4855
|
-
"docs": ""
|
|
4995
|
+
"docs": "The identified occurrence and future occurrences in the series."
|
|
4856
4996
|
}
|
|
4857
4997
|
]
|
|
4858
4998
|
},
|
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare enum EventSpan {
|
|
5
5
|
/**
|
|
6
|
+
* Only the identified event or occurrence.
|
|
7
|
+
*
|
|
6
8
|
* @since 7.1.0
|
|
7
9
|
*/
|
|
8
10
|
THIS_EVENT = 0,
|
|
9
11
|
/**
|
|
12
|
+
* The identified occurrence and future occurrences in the series.
|
|
13
|
+
*
|
|
10
14
|
* @since 7.1.0
|
|
11
15
|
*/
|
|
12
16
|
THIS_AND_FUTURE_EVENTS = 1
|
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
export var EventSpan;
|
|
5
5
|
(function (EventSpan) {
|
|
6
6
|
/**
|
|
7
|
+
* Only the identified event or occurrence.
|
|
8
|
+
*
|
|
7
9
|
* @since 7.1.0
|
|
8
10
|
*/
|
|
9
11
|
EventSpan[EventSpan["THIS_EVENT"] = 0] = "THIS_EVENT";
|
|
10
12
|
/**
|
|
13
|
+
* The identified occurrence and future occurrences in the series.
|
|
14
|
+
*
|
|
11
15
|
* @since 7.1.0
|
|
12
16
|
*/
|
|
13
17
|
EventSpan[EventSpan["THIS_AND_FUTURE_EVENTS"] = 1] = "THIS_AND_FUTURE_EVENTS";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-span.js","sourceRoot":"","sources":["../../../../src/schemas/enums/event-span.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"event-span.js","sourceRoot":"","sources":["../../../../src/schemas/enums/event-span.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,SAaX;AAbD,WAAY,SAAS;IACnB;;;;OAIG;IACH,qDAAU,CAAA;IACV;;;;OAIG;IACH,6EAAsB,CAAA;AACxB,CAAC,EAbW,SAAS,KAAT,SAAS,QAapB","sourcesContent":["/**\n * @since 7.1.0\n */\nexport enum EventSpan {\n /**\n * Only the identified event or occurrence.\n *\n * @since 7.1.0\n */\n THIS_EVENT,\n /**\n * The identified occurrence and future occurrences in the series.\n *\n * @since 7.1.0\n */\n THIS_AND_FUTURE_EVENTS,\n}\n"]}
|
|
@@ -4,15 +4,40 @@ import type { EventSpan } from '../enums/event-span';
|
|
|
4
4
|
*/
|
|
5
5
|
export interface DeleteEventOptions {
|
|
6
6
|
/**
|
|
7
|
+
* Whether to save the deletion to the event store immediately.
|
|
8
|
+
* Pass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually.
|
|
9
|
+
*
|
|
10
|
+
* @example false
|
|
11
|
+
* @default true
|
|
12
|
+
* @platform iOS
|
|
13
|
+
* @since 8.3.0
|
|
14
|
+
*/
|
|
15
|
+
commit?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The ID of the event to delete.
|
|
18
|
+
*
|
|
19
|
+
* @example '1234'
|
|
20
|
+
* @platform Android, iOS
|
|
7
21
|
* @since 7.1.0
|
|
8
22
|
*/
|
|
9
23
|
id: string;
|
|
10
24
|
/**
|
|
11
|
-
* The
|
|
25
|
+
* The start time of the occurrence to delete, in milliseconds since the epoch.
|
|
26
|
+
* Use `startDate` from `listEventsInRange`.
|
|
27
|
+
* On Android, required for `THIS_EVENT` on recurring events. If omitted with `THIS_AND_FUTURE_EVENTS`, the whole series is deleted.
|
|
12
28
|
*
|
|
29
|
+
* @example 1716153600000
|
|
30
|
+
* @platform Android
|
|
31
|
+
* @since 8.3.0
|
|
32
|
+
*/
|
|
33
|
+
instanceDate?: number;
|
|
34
|
+
/**
|
|
35
|
+
* How much of a recurring series to delete.
|
|
36
|
+
*
|
|
37
|
+
* @example EventSpan.THIS_EVENT
|
|
13
38
|
* @default EventSpan.THIS_EVENT
|
|
14
|
-
* @platform iOS
|
|
15
|
-
* @
|
|
39
|
+
* @platform Android, iOS
|
|
40
|
+
* @since 7.1.0
|
|
16
41
|
*/
|
|
17
42
|
span?: EventSpan;
|
|
18
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-event-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/delete-event-options.ts"],"names":[],"mappings":"","sourcesContent":["import type { EventSpan } from '../enums/event-span';\n\n/**\n * @since 7.1.0\n */\nexport interface DeleteEventOptions {\n /**\n * @since 7.1.0\n */\n id: string;\n /**\n * The
|
|
1
|
+
{"version":3,"file":"delete-event-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/delete-event-options.ts"],"names":[],"mappings":"","sourcesContent":["import type { EventSpan } from '../enums/event-span';\n\n/**\n * @since 7.1.0\n */\nexport interface DeleteEventOptions {\n /**\n * Whether to save the deletion to the event store immediately.\n * Pass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually.\n *\n * @example false\n * @default true\n * @platform iOS\n * @since 8.3.0\n */\n commit?: boolean;\n /**\n * The ID of the event to delete.\n *\n * @example '1234'\n * @platform Android, iOS\n * @since 7.1.0\n */\n id: string;\n /**\n * The start time of the occurrence to delete, in milliseconds since the epoch.\n * Use `startDate` from `listEventsInRange`.\n * On Android, required for `THIS_EVENT` on recurring events. If omitted with `THIS_AND_FUTURE_EVENTS`, the whole series is deleted.\n *\n * @example 1716153600000\n * @platform Android\n * @since 8.3.0\n */\n instanceDate?: number;\n /**\n * How much of a recurring series to delete.\n *\n * @example EventSpan.THIS_EVENT\n * @default EventSpan.THIS_EVENT\n * @platform Android, iOS\n * @since 7.1.0\n */\n span?: EventSpan;\n}\n"]}
|
|
@@ -4,24 +4,49 @@ import type { EventSpan } from '../enums/event-span';
|
|
|
4
4
|
*/
|
|
5
5
|
export interface DeleteEventWithPromptOptions {
|
|
6
6
|
/**
|
|
7
|
+
* Text to show on the cancel button.
|
|
8
|
+
*
|
|
9
|
+
* @default 'Cancel'
|
|
10
|
+
* @platform Android, iOS
|
|
7
11
|
* @since 7.1.0
|
|
8
12
|
*/
|
|
9
|
-
|
|
13
|
+
cancelButtonText?: string;
|
|
10
14
|
/**
|
|
11
|
-
*
|
|
15
|
+
* Whether to save the deletion to the event store immediately.
|
|
16
|
+
* Pass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually.
|
|
12
17
|
*
|
|
13
|
-
* @
|
|
18
|
+
* @example false
|
|
19
|
+
* @default true
|
|
14
20
|
* @platform iOS
|
|
15
|
-
* @
|
|
21
|
+
* @since 8.3.0
|
|
16
22
|
*/
|
|
17
|
-
|
|
23
|
+
commit?: boolean;
|
|
18
24
|
/**
|
|
19
|
-
*
|
|
25
|
+
* Text to show on the confirm button.
|
|
20
26
|
*
|
|
27
|
+
* @default 'Delete'
|
|
21
28
|
* @platform Android, iOS
|
|
22
29
|
* @since 7.1.0
|
|
23
30
|
*/
|
|
24
|
-
|
|
31
|
+
confirmButtonText?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The ID of the event to delete.
|
|
34
|
+
*
|
|
35
|
+
* @example '1234'
|
|
36
|
+
* @platform Android, iOS
|
|
37
|
+
* @since 7.1.0
|
|
38
|
+
*/
|
|
39
|
+
id: string;
|
|
40
|
+
/**
|
|
41
|
+
* The start time of the occurrence to delete, in milliseconds since the epoch.
|
|
42
|
+
* Use `startDate` from `listEventsInRange`.
|
|
43
|
+
* On Android, required for `THIS_EVENT` on recurring events. If omitted with `THIS_AND_FUTURE_EVENTS`, the whole series is deleted.
|
|
44
|
+
*
|
|
45
|
+
* @example 1716153600000
|
|
46
|
+
* @platform Android
|
|
47
|
+
* @since 8.3.0
|
|
48
|
+
*/
|
|
49
|
+
instanceDate?: number;
|
|
25
50
|
/**
|
|
26
51
|
* Message of the dialog.
|
|
27
52
|
*
|
|
@@ -30,19 +55,19 @@ export interface DeleteEventWithPromptOptions {
|
|
|
30
55
|
*/
|
|
31
56
|
message: string;
|
|
32
57
|
/**
|
|
33
|
-
*
|
|
58
|
+
* How much of a recurring series to delete.
|
|
34
59
|
*
|
|
35
|
-
* @
|
|
60
|
+
* @example EventSpan.THIS_EVENT
|
|
61
|
+
* @default EventSpan.THIS_EVENT
|
|
36
62
|
* @platform Android, iOS
|
|
37
63
|
* @since 7.1.0
|
|
38
64
|
*/
|
|
39
|
-
|
|
65
|
+
span?: EventSpan;
|
|
40
66
|
/**
|
|
41
|
-
*
|
|
67
|
+
* Title of the dialog.
|
|
42
68
|
*
|
|
43
|
-
* @default 'Cancel'
|
|
44
69
|
* @platform Android, iOS
|
|
45
70
|
* @since 7.1.0
|
|
46
71
|
*/
|
|
47
|
-
|
|
72
|
+
title: string;
|
|
48
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-event-with-prompt-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/delete-event-with-prompt-options.ts"],"names":[],"mappings":"","sourcesContent":["import type { EventSpan } from '../enums/event-span';\n\n/**\n * @since 7.1.0\n */\nexport interface DeleteEventWithPromptOptions {\n /**\n * @since 7.1.0\n */\n
|
|
1
|
+
{"version":3,"file":"delete-event-with-prompt-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/delete-event-with-prompt-options.ts"],"names":[],"mappings":"","sourcesContent":["import type { EventSpan } from '../enums/event-span';\n\n/**\n * @since 7.1.0\n */\nexport interface DeleteEventWithPromptOptions {\n /**\n * Text to show on the cancel button.\n *\n * @default 'Cancel'\n * @platform Android, iOS\n * @since 7.1.0\n */\n cancelButtonText?: string;\n /**\n * Whether to save the deletion to the event store immediately.\n * Pass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually.\n *\n * @example false\n * @default true\n * @platform iOS\n * @since 8.3.0\n */\n commit?: boolean;\n /**\n * Text to show on the confirm button.\n *\n * @default 'Delete'\n * @platform Android, iOS\n * @since 7.1.0\n */\n confirmButtonText?: string;\n /**\n * The ID of the event to delete.\n *\n * @example '1234'\n * @platform Android, iOS\n * @since 7.1.0\n */\n id: string;\n /**\n * The start time of the occurrence to delete, in milliseconds since the epoch.\n * Use `startDate` from `listEventsInRange`.\n * On Android, required for `THIS_EVENT` on recurring events. If omitted with `THIS_AND_FUTURE_EVENTS`, the whole series is deleted.\n *\n * @example 1716153600000\n * @platform Android\n * @since 8.3.0\n */\n instanceDate?: number;\n /**\n * Message of the dialog.\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n message: string;\n /**\n * How much of a recurring series to delete.\n *\n * @example EventSpan.THIS_EVENT\n * @default EventSpan.THIS_EVENT\n * @platform Android, iOS\n * @since 7.1.0\n */\n span?: EventSpan;\n /**\n * Title of the dialog.\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n title: string;\n}\n"]}
|
|
@@ -3,16 +3,28 @@ import type { EventSpan } from '../enums/event-span';
|
|
|
3
3
|
* @since 7.1.0
|
|
4
4
|
*/
|
|
5
5
|
export interface DeleteEventsByIdOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Whether to save the deletion to the event store immediately.
|
|
8
|
+
* Pass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually.
|
|
9
|
+
*
|
|
10
|
+
* @example false
|
|
11
|
+
* @default true
|
|
12
|
+
* @platform iOS
|
|
13
|
+
* @since 8.3.0
|
|
14
|
+
*/
|
|
15
|
+
commit?: boolean;
|
|
6
16
|
/**
|
|
7
17
|
* @since 7.1.0
|
|
8
18
|
*/
|
|
9
19
|
ids: string[];
|
|
10
20
|
/**
|
|
11
|
-
*
|
|
21
|
+
* How much of a recurring series to delete.
|
|
22
|
+
* On Android, `THIS_EVENT` cannot target a single recurring occurrence here — use `deleteEvent` with `instanceDate`. Those ids are reported in `failed`.
|
|
12
23
|
*
|
|
24
|
+
* @example EventSpan.THIS_EVENT
|
|
13
25
|
* @default EventSpan.THIS_EVENT
|
|
14
|
-
* @platform iOS
|
|
15
|
-
* @
|
|
26
|
+
* @platform Android, iOS
|
|
27
|
+
* @since 7.1.0
|
|
16
28
|
*/
|
|
17
29
|
span?: EventSpan;
|
|
18
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-events-by-id-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/delete-events-by-id-options.ts"],"names":[],"mappings":"","sourcesContent":["import type { EventSpan } from '../enums/event-span';\n\n/**\n * @since 7.1.0\n */\nexport interface DeleteEventsByIdOptions {\n /**\n * @since 7.1.0\n */\n ids: string[];\n /**\n *
|
|
1
|
+
{"version":3,"file":"delete-events-by-id-options.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/delete-events-by-id-options.ts"],"names":[],"mappings":"","sourcesContent":["import type { EventSpan } from '../enums/event-span';\n\n/**\n * @since 7.1.0\n */\nexport interface DeleteEventsByIdOptions {\n /**\n * Whether to save the deletion to the event store immediately.\n * Pass `false` to batch multiple changes and commit them together using `CapacitorCalendar.commit()`, which is more efficient than committing each save individually.\n *\n * @example false\n * @default true\n * @platform iOS\n * @since 8.3.0\n */\n commit?: boolean;\n /**\n * @since 7.1.0\n */\n ids: string[];\n /**\n * How much of a recurring series to delete.\n * On Android, `THIS_EVENT` cannot target a single recurring occurrence here — use `deleteEvent` with `instanceDate`. Those ids are reported in `failed`.\n *\n * @example EventSpan.THIS_EVENT\n * @default EventSpan.THIS_EVENT\n * @platform Android, iOS\n * @since 7.1.0\n */\n span?: EventSpan;\n}\n"]}
|
|
@@ -7,7 +7,7 @@ import type { OpenCalendarOptions } from '../schemas/interfaces/open-calendar-op
|
|
|
7
7
|
import type { SelectCalendarsWithPromptOptions } from '../schemas/interfaces/select-calendars-with-prompt-options';
|
|
8
8
|
export interface CalendarOperations {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Saves pending calendar changes.
|
|
11
11
|
*
|
|
12
12
|
* @platform iOS
|
|
13
13
|
* @since 7.1.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-operations.js","sourceRoot":"","sources":["../../../src/sub-definitions/calendar-operations.ts"],"names":[],"mappings":"","sourcesContent":["import type { Calendar } from '../schemas/interfaces/calendar';\nimport type { CalendarSource } from '../schemas/interfaces/calendar-source';\nimport type { CreateCalendarOptions } from '../schemas/interfaces/create-calendar-options';\nimport type { DeleteCalendarOptions } from '../schemas/interfaces/delete-calendar-options';\nimport type { ModifyCalendarOptions } from '../schemas/interfaces/modify-calendar-options';\nimport type { OpenCalendarOptions } from '../schemas/interfaces/open-calendar-options';\nimport type { SelectCalendarsWithPromptOptions } from '../schemas/interfaces/select-calendars-with-prompt-options';\n\nexport interface CalendarOperations {\n /**\n *
|
|
1
|
+
{"version":3,"file":"calendar-operations.js","sourceRoot":"","sources":["../../../src/sub-definitions/calendar-operations.ts"],"names":[],"mappings":"","sourcesContent":["import type { Calendar } from '../schemas/interfaces/calendar';\nimport type { CalendarSource } from '../schemas/interfaces/calendar-source';\nimport type { CreateCalendarOptions } from '../schemas/interfaces/create-calendar-options';\nimport type { DeleteCalendarOptions } from '../schemas/interfaces/delete-calendar-options';\nimport type { ModifyCalendarOptions } from '../schemas/interfaces/modify-calendar-options';\nimport type { OpenCalendarOptions } from '../schemas/interfaces/open-calendar-options';\nimport type { SelectCalendarsWithPromptOptions } from '../schemas/interfaces/select-calendars-with-prompt-options';\n\nexport interface CalendarOperations {\n /**\n * Saves pending calendar changes.\n *\n * @platform iOS\n * @since 7.1.0\n */\n commit(): Promise<void>;\n /**\n * Opens a system interface to choose one or multiple calendars.\n *\n * @platform iOS\n * @since 0.2.0\n */\n selectCalendarsWithPrompt(options?: SelectCalendarsWithPromptOptions): Promise<{ result: Calendar[] }>;\n /**\n * Retrieves a list of calendar sources.\n *\n * @platform iOS\n * @since 6.6.0\n */\n fetchAllCalendarSources(): Promise<{ result: CalendarSource[] }>;\n /**\n * Retrieves a list of all available calendars.\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n listCalendars(): Promise<{ result: Calendar[] }>;\n /**\n * Retrieves the default calendar.\n *\n * @platform Android, iOS\n * @since 0.3.0\n */\n getDefaultCalendar(): Promise<{ result: Calendar | null }>;\n /**\n * Opens the calendar app.\n *\n * @example\n * CapacitorCalendar.openCalendar({ date: Date.now() });\n *\n * @platform Android, iOS\n * @since 7.1.0\n */\n openCalendar(options?: OpenCalendarOptions): Promise<void>;\n /**\n * Creates a calendar.\n *\n * @platform Android, iOS\n * @since 5.2.0\n */\n createCalendar(options: CreateCalendarOptions): Promise<{ id: string }>;\n /**\n * Deletes a calendar by id.\n *\n * @platform Android, iOS\n * @since 5.2.0\n */\n deleteCalendar(options: DeleteCalendarOptions): Promise<void>;\n /**\n * Modifies a calendar with options.\n *\n * @platform Android, iOS\n * @since 7.2.0\n */\n modifyCalendar(options: ModifyCalendarOptions): Promise<void>;\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -331,10 +331,14 @@ exports.EventAvailability = void 0;
|
|
|
331
331
|
exports.EventSpan = void 0;
|
|
332
332
|
(function (EventSpan) {
|
|
333
333
|
/**
|
|
334
|
+
* Only the identified event or occurrence.
|
|
335
|
+
*
|
|
334
336
|
* @since 7.1.0
|
|
335
337
|
*/
|
|
336
338
|
EventSpan[EventSpan["THIS_EVENT"] = 0] = "THIS_EVENT";
|
|
337
339
|
/**
|
|
340
|
+
* The identified occurrence and future occurrences in the series.
|
|
341
|
+
*
|
|
338
342
|
* @since 7.1.0
|
|
339
343
|
*/
|
|
340
344
|
EventSpan[EventSpan["THIS_AND_FUTURE_EVENTS"] = 1] = "THIS_AND_FUTURE_EVENTS";
|