@bimetal/calendar-angular-components 1.0.0-rc.1 → 1.0.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/LICENSE +57 -129
  2. package/dist/binding/index.d.ts +1 -1
  3. package/dist/binding/index.d.ts.map +1 -1
  4. package/dist/binding/index.js.map +1 -1
  5. package/dist/binding/services/event-render.service.d.ts +9 -0
  6. package/dist/binding/services/event-render.service.d.ts.map +1 -1
  7. package/dist/binding/services/event-render.service.js +11 -0
  8. package/dist/binding/services/event-render.service.js.map +1 -1
  9. package/dist/components/Calendar.d.ts +12 -3
  10. package/dist/components/Calendar.d.ts.map +1 -1
  11. package/dist/components/Calendar.js +33 -12
  12. package/dist/components/Calendar.js.map +1 -1
  13. package/dist/components/CalendarHeader.d.ts +8 -1
  14. package/dist/components/CalendarHeader.d.ts.map +1 -1
  15. package/dist/components/CalendarHeader.js +57 -12
  16. package/dist/components/CalendarHeader.js.map +1 -1
  17. package/dist/components/EventBar.d.ts +4 -0
  18. package/dist/components/EventBar.d.ts.map +1 -1
  19. package/dist/components/EventBar.js +27 -12
  20. package/dist/components/EventBar.js.map +1 -1
  21. package/dist/components/UndoToast.d.ts +9 -6
  22. package/dist/components/UndoToast.d.ts.map +1 -1
  23. package/dist/components/UndoToast.js +16 -28
  24. package/dist/components/UndoToast.js.map +1 -1
  25. package/dist/views/agenda/AgendaView.d.ts +1 -0
  26. package/dist/views/agenda/AgendaView.d.ts.map +1 -1
  27. package/dist/views/agenda/AgendaView.js +9 -2
  28. package/dist/views/agenda/AgendaView.js.map +1 -1
  29. package/dist/views/month/MonthView.d.ts +3 -1
  30. package/dist/views/month/MonthView.d.ts.map +1 -1
  31. package/dist/views/month/MonthView.js +6 -5
  32. package/dist/views/month/MonthView.js.map +1 -1
  33. package/dist/views/month/WeekRow.d.ts +4 -0
  34. package/dist/views/month/WeekRow.d.ts.map +1 -1
  35. package/dist/views/month/WeekRow.js +38 -11
  36. package/dist/views/month/WeekRow.js.map +1 -1
  37. package/dist/views/week/AllDayRow.d.ts +1 -0
  38. package/dist/views/week/AllDayRow.d.ts.map +1 -1
  39. package/dist/views/week/AllDayRow.js +10 -4
  40. package/dist/views/week/AllDayRow.js.map +1 -1
  41. package/dist/views/week/TimeEvent.d.ts +4 -0
  42. package/dist/views/week/TimeEvent.d.ts.map +1 -1
  43. package/dist/views/week/TimeEvent.js +22 -8
  44. package/dist/views/week/TimeEvent.js.map +1 -1
  45. package/dist/views/week/WeekView.d.ts +4 -0
  46. package/dist/views/week/WeekView.d.ts.map +1 -1
  47. package/dist/views/week/WeekView.js +11 -3
  48. package/dist/views/week/WeekView.js.map +1 -1
  49. package/dist/views/year/YearView.d.ts +4 -4
  50. package/dist/views/year/YearView.d.ts.map +1 -1
  51. package/dist/views/year/YearView.js +3 -3
  52. package/dist/views/year/YearView.js.map +1 -1
  53. package/package.json +10 -10
package/LICENSE CHANGED
@@ -1,129 +1,57 @@
1
- # PolyForm Noncommercial License 1.0.0
2
-
3
- <https://polyformproject.org/licenses/noncommercial/1.0.0>
4
-
5
- ## Acceptance
6
-
7
- In order to get any license under these terms, you must agree
8
- to them as both strict obligations and conditions to all
9
- your licenses.
10
-
11
- ## Copyright License
12
-
13
- The licensor grants you a copyright license for the
14
- software to do everything you might do with the software
15
- that would otherwise infringe the licensor's copyright
16
- in it for any permitted purpose. However, you may
17
- only distribute the software according to [Distribution
18
- License](#distribution-license) and make changes or new works
19
- based on the software according to [Changes and New Works
20
- License](#changes-and-new-works-license).
21
-
22
- ## Distribution License
23
-
24
- The licensor grants you an additional copyright license
25
- to distribute copies of the software. Your license
26
- to distribute covers distributing the software with
27
- changes and new works permitted by [Changes and New Works
28
- License](#changes-and-new-works-license).
29
-
30
- ## Notices
31
-
32
- You must ensure that anyone who gets a copy of any part of
33
- the software from you also gets a copy of these terms or the
34
- URL for them above, as well as copies of any plain-text lines
35
- beginning with `Required Notice:` that the licensor provided
36
- with the software. For example:
37
-
38
- > Required Notice: Copyright Andreas Biederbeck (https://bimetal.dev)
39
-
40
- ## Changes and New Works License
41
-
42
- The licensor grants you an additional copyright license to
43
- make changes and new works based on the software for any
44
- permitted purpose.
45
-
46
- ## Patent License
47
-
48
- The licensor grants you a patent license for the software that
49
- covers patent claims the licensor can license, or becomes able
50
- to license, that you would infringe by using the software.
51
-
52
- ## Noncommercial Purposes
53
-
54
- Any noncommercial purpose is a permitted purpose.
55
-
56
- ## Personal Uses
57
-
58
- Personal use for research, experiment, and testing for
59
- the benefit of public knowledge, personal study, private
60
- entertainment, hobby projects, amateur pursuits, or religious
61
- observance, without any anticipated commercial application,
62
- is use for a permitted purpose.
63
-
64
- ## Noncommercial Organizations
65
-
66
- Use by any charitable organization, educational institution,
67
- public research organization, public safety or health
68
- organization, environmental protection organization,
69
- or government institution is use for a permitted purpose
70
- regardless of the source of funding or obligations resulting
71
- from the funding.
72
-
73
- ## Fair Use
74
-
75
- You may have "fair use" rights for the software under the
76
- law. These terms do not limit them.
77
-
78
- ## No Other Rights
79
-
80
- These terms do not allow you to sublicense or transfer any of
81
- your licenses to anyone else, or prevent the licensor from
82
- granting licenses to anyone else. These terms do not imply
83
- any other licenses.
84
-
85
- ## Patent Defense
86
-
87
- If you make any written claim that the software infringes or
88
- contributes to infringement of any patent, your patent license
89
- for the software granted under these terms ends immediately. If
90
- your company makes such a claim, your patent license ends
91
- immediately for work on behalf of your company.
92
-
93
- ## Violations
94
-
95
- The first time you are notified in writing that you have
96
- violated any of these terms, or any agreement made under them,
97
- you have 32 calendar days to come into compliance. If you come
98
- into compliance, your licenses revive and continue as if you had
99
- never violated.
100
-
101
- ## No Liability
102
-
103
- ***As far as the law allows, the software comes as is, without
104
- any warranty or condition, and the licensor will not be liable
105
- to you for any damages arising out of these terms or the use
106
- or nature of the software, under any kind of legal claim.***
107
-
108
- ## Definitions
109
-
110
- The **licensor** is the individual or entity offering these
111
- terms, and the **software** is the software the licensor makes
112
- available under these terms.
113
-
114
- **You** refers to the individual or entity agreeing to these
115
- terms.
116
-
117
- **Your company** is any legal entity, sole proprietorship,
118
- or other kind of organization that you work for, plus all
119
- organizations that have control over, are under the control of,
120
- or are under common control with that organization. **Control**
121
- means ownership of substantially all the assets of an entity,
122
- or the power to direct its management and policies by vote,
123
- contract, or otherwise. Control can be direct or indirect.
124
-
125
- **Your licenses** are all the licenses granted to you for the
126
- software under these terms.
127
-
128
- **Use** means anything you do with the software requiring one
129
- of your licenses.
1
+ Copyright 2026 Andreas Biederbeck
2
+
3
+ Apache License
4
+
5
+ Version 2.0, January 2004
6
+
7
+ http://www.apache.org/licenses/
8
+
9
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10
+
11
+ 1. Definitions.
12
+
13
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
14
+
15
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
18
+
19
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
20
+
21
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
22
+
23
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
24
+
25
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
26
+
27
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
28
+
29
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
30
+
31
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
32
+
33
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
34
+
35
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
36
+
37
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
38
+
39
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
40
+
41
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
42
+
43
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
44
+
45
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
46
+
47
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
48
+
49
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
50
+
51
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
52
+
53
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
54
+
55
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
56
+
57
+ END OF TERMS AND CONDITIONS
@@ -10,7 +10,7 @@
10
10
  export { createCalendarControllerBinding } from './controller.js';
11
11
  export type { CalendarControllerBinding } from './controller.js';
12
12
  export { createCalendarController } from '@bimetal/calendar-headless';
13
- export type { CalendarController, CalendarControllerOptions, CalendarControllerSnapshot, CustomViewSpec, SelectionState, } from '@bimetal/calendar-headless';
13
+ export type { CalendarController, CalendarControllerOptions, EventInteractionPolicy, ResolvedEventInteraction, CalendarControllerSnapshot, CustomViewSpec, SelectionState, } from '@bimetal/calendar-headless';
14
14
  export { EventRenderService } from './services/event-render.service.js';
15
15
  export type { CalendarConfig, CalendarConfigInput, CalendarLocale, Category, ViewConfig, AnchorRect, CustomViewDefinition, CustomViewInputs, EventDialogInputs, EventDialogMode, EventRenderContext, EventRenderTemplateContext, EventRenderTemplate, EventClassNameFn, EventStyleFn, EventTitleFn, } from './types.js';
16
16
  export type { DragPreview, DragInfo } from '@bimetal/calendar-headless';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/binding/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAClE,YAAY,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAGjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EACV,kBAAkB,EAClB,yBAAyB,EACzB,0BAA0B,EAC1B,cAAc,EACd,c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AAE,WAAW,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAExF,mEAAmE;AACnE,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,mEAAmE;AACnE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/binding/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,kEAAkE;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAGlE,mEAAmE;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAWtE,kEAAkE;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAsBxE,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAChL,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAExF,mEAAmE;AACnE,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,mEAAmE;AACnE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { type TemplateRef } from '@angular/core';
2
2
  import type { CalendarEvent, ViewType } from '@bimetal/calendar-core';
3
+ import type { ResolvedEventInteraction } from '@bimetal/calendar-headless';
3
4
  import type { EventClassNameFn, EventRenderContext, EventRenderTemplateContext, EventStyleFn, EventTitleFn } from '../types.js';
4
5
  import * as i0 from "@angular/core";
5
6
  /**
@@ -21,6 +22,14 @@ export declare class EventRenderService {
21
22
  eventClassName?: EventClassNameFn;
22
23
  eventStyle?: EventStyleFn;
23
24
  eventTitle?: EventTitleFn;
25
+ /**
26
+ * Per-event interaction resolver (ticket-19) — the controller's memoized
27
+ * `getEventInteraction`, written by Calendar. Leaf render sites read it so the
28
+ * affordance reflects the SAME source the controller enforces on.
29
+ */
30
+ getEventInteraction?: (event: CalendarEvent) => ResolvedEventInteraction;
31
+ /** Resolve the interaction policy; fully interactive when no resolver is set. */
32
+ resolveInteraction(event: CalendarEvent): ResolvedEventInteraction;
24
33
  /**
25
34
  * Compute the render context for an event: which view, and which instance
26
35
  * (for recurring events).
@@ -1 +1 @@
1
- {"version":3,"file":"event-render.service.d.ts","sourceRoot":"","sources":["../../../src/binding/services/event-render.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAoB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAExF,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACZ,YAAY,EACb,MAAM,aAAa,CAAC;;AAErB;;;;;;;;;;GAUG;AACH,qBACa,kBAAkB;IAC7B,mFAAmF;IACnF,IAAI,EAAE,QAAQ,CAAW;IAEzB,cAAc,CAAC,EAAE,WAAW,CAAC,0BAA0B,CAAC,CAAC;IACzD,eAAe,CAAC,EAAE,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAC1D,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,UAAU,CAAC,EAAE,YAAY,CAAC;IAE1B;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,kBAAkB;IAStD,+DAA+D;IAC/D,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM;IAK1C,qEAAqE;IACrE,gBAAgB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM;IAI9C,sDAAsD;IACtD,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS;IAI/E,kEAAkE;IAClE,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,0BAA0B;yCAxC3D,kBAAkB;6CAAlB,kBAAkB;CA4C9B"}
1
+ {"version":3,"file":"event-render.service.d.ts","sourceRoot":"","sources":["../../../src/binding/services/event-render.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAoB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAExF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACZ,YAAY,EACb,MAAM,aAAa,CAAC;;AAErB;;;;;;;;;;GAUG;AACH,qBACa,kBAAkB;IAC7B,mFAAmF;IACnF,IAAI,EAAE,QAAQ,CAAW;IAEzB,cAAc,CAAC,EAAE,WAAW,CAAC,0BAA0B,CAAC,CAAC;IACzD,eAAe,CAAC,EAAE,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAC1D,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,UAAU,CAAC,EAAE,YAAY,CAAC;IAE1B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,wBAAwB,CAAC;IAEzE,iFAAiF;IACjF,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,wBAAwB;IAKlE;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,kBAAkB;IAStD,+DAA+D;IAC/D,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM;IAK1C,qEAAqE;IACrE,gBAAgB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM;IAI9C,sDAAsD;IACtD,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS;IAI/E,kEAAkE;IAClE,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,0BAA0B;yCArD3D,kBAAkB;6CAAlB,kBAAkB;CAyD9B"}
@@ -20,6 +20,17 @@ export class EventRenderService {
20
20
  eventClassName;
21
21
  eventStyle;
22
22
  eventTitle;
23
+ /**
24
+ * Per-event interaction resolver (ticket-19) — the controller's memoized
25
+ * `getEventInteraction`, written by Calendar. Leaf render sites read it so the
26
+ * affordance reflects the SAME source the controller enforces on.
27
+ */
28
+ getEventInteraction;
29
+ /** Resolve the interaction policy; fully interactive when no resolver is set. */
30
+ resolveInteraction(event) {
31
+ return this.getEventInteraction?.(event)
32
+ ?? { draggable: true, resizable: true, editable: true, deletable: true };
33
+ }
23
34
  /**
24
35
  * Compute the render context for an event: which view, and which instance
25
36
  * (for recurring events).
@@ -1 +1 @@
1
- {"version":3,"file":"event-render.service.js","sourceRoot":"","sources":["../../../src/binding/services/event-render.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;;AASvE;;;;;;;;;;GAUG;AAEH,MAAM,OAAO,kBAAkB;IAC7B,mFAAmF;IACnF,IAAI,GAAa,OAAO,CAAC;IAEzB,cAAc,CAA2C;IACzD,eAAe,CAA2C;IAC1D,cAAc,CAAoB;IAClC,UAAU,CAAgB;IAC1B,UAAU,CAAgB;IAE1B;;;OAGG;IACH,YAAY,CAAC,KAAoB;QAC/B,MAAM,OAAO,GAAG,6BAA6B,CAAC,KAAK,CAAC,CAAC;QACrD,MAAM,YAAY,GAChB,OAAO,KAAK,IAAI;YACd,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC7E,CAAC,CAAC,SAAS,CAAC;QAChB,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC;IAC3C,CAAC;IAED,+DAA+D;IAC/D,YAAY,CAAC,KAAoB;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;QACpE,OAAO,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC;IACjC,CAAC;IAED,qEAAqE;IACrE,gBAAgB,CAAC,KAAoB;QACnC,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;IACtE,CAAC;IAED,sDAAsD;IACtD,YAAY,CAAC,KAAoB;QAC/B,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,kEAAkE;IAClE,oBAAoB,CAAC,KAAoB;QACvC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACrC,OAAO,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IACnD,CAAC;4GA3CU,kBAAkB;gEAAlB,kBAAkB,WAAlB,kBAAkB;;iFAAlB,kBAAkB;cAD9B,UAAU"}
1
+ {"version":3,"file":"event-render.service.js","sourceRoot":"","sources":["../../../src/binding/services/event-render.service.ts"],"names":[],"mappings":"AAAA,OAAO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KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;IACtE,CAAC;IAED,sDAAsD;IACtD,YAAY,CAAC,KAAoB;QAC/B,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,kEAAkE;IAClE,oBAAoB,CAAC,KAAoB;QACvC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACrC,OAAO,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IACnD,CAAC;4GAxDU,kBAAkB;gEAAlB,kBAAkB,WAAlB,kBAAkB;;iFAAlB,kBAAkB;cAD9B,UAAU"}
@@ -1,11 +1,11 @@
1
1
  import { OnInit, OnDestroy, OnChanges, SimpleChanges, NgZone, TemplateRef, type Type } from '@angular/core';
2
2
  import type { CalendarEvent, CalendarDateTime, ViewType, Resource } from '@bimetal/calendar-core';
3
- import { getYear, getMonth } from '@bimetal/calendar-core';
3
+ import { getYear, getMonth, monthIndex } from '@bimetal/calendar-core';
4
4
  import type { CalendarStore } from '@bimetal/calendar-data';
5
5
  import type { CalendarRule } from '@bimetal/calendar-rules';
6
6
  import { type CalendarController, EventRenderService } from '../binding/index.js';
7
7
  import type { CalendarConfig, CalendarConfigInput, ViewConfig, CustomViewDefinition, CustomViewInputs, EventDialogMode, EventDialogInputs, AnchorRect, EventClassNameFn, EventStyleFn, EventTitleFn, EventRenderTemplateContext } from '../binding/index.js';
8
- import type { CalendarControllerSnapshot } from '@bimetal/calendar-headless';
8
+ import type { CalendarControllerSnapshot, EventInteractionPolicy } from '@bimetal/calendar-headless';
9
9
  import * as i0 from "@angular/core";
10
10
  /**
11
11
  * Root calendar component: renders header, filters, the active view, the event
@@ -31,6 +31,9 @@ export declare class CalendarComponent implements OnInit, OnDestroy, OnChanges {
31
31
  dir?: 'ltr' | 'rtl';
32
32
  showCategoryFilter: boolean;
33
33
  showResourceFilter: boolean;
34
+ /** Show the undo/redo button pair in the header (default true). UI-only — the
35
+ * controller's undo()/redo() and the keyboard shortcuts stay active when hidden. */
36
+ showUndoRedo: boolean;
34
37
  customViews?: readonly CustomViewDefinition[];
35
38
  eventDialog: EventDialogMode;
36
39
  onEventClick?: (eventId: string, anchorRect: AnchorRect, instanceDate?: number) => void;
@@ -54,6 +57,11 @@ export declare class CalendarComponent implements OnInit, OnDestroy, OnChanges {
54
57
  eventStyle?: EventStyleFn;
55
58
  /** Per-event title override. Return undefined to keep event.title. */
56
59
  eventTitle?: EventTitleFn;
60
+ /** Per-event interaction policy (ticket-19): a PURE function of the event returning
61
+ * which interactions it allows (`draggable`/`resizable`/`editable`/`deletable`, or
62
+ * `locked` for all-off). The controller enforces it AND exposes it so the views drop
63
+ * the matching affordance. Read at controller creation — pass a stable function. */
64
+ eventInteraction?: (event: CalendarEvent) => EventInteractionPolicy;
57
65
  /** STANDALONE only — the bound path leaves the owned controller untouched. */
58
66
  private binding?;
59
67
  private bound;
@@ -66,6 +74,7 @@ export declare class CalendarComponent implements OnInit, OnDestroy, OnChanges {
66
74
  get snapshot(): CalendarControllerSnapshot;
67
75
  getYear: typeof getYear;
68
76
  getMonth: typeof getMonth;
77
+ monthIndex: typeof monthIndex;
69
78
  /** v0.29 Tastatur: root-scoped keydown → controller (Ctrl/Cmd+Z undo, Escape clears).
70
79
  * Bound via the `.bm-cal` root's `(keydown)` in the template — NOT a window listener
71
80
  * (no document-level routing). Public so the template can call it. */
@@ -137,6 +146,6 @@ export declare class CalendarComponent implements OnInit, OnDestroy, OnChanges {
137
146
  resourceId: string;
138
147
  }): void;
139
148
  static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, [{ optional: true; }, null]>;
140
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "cal-calendar", never, { "controller": { "alias": "controller"; "required": false; }; "store": { "alias": "store"; "required": false; }; "rules": { "alias": "rules"; "required": false; }; "config": { "alias": "config"; "required": false; }; "darkMode": { "alias": "darkMode"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; "showCategoryFilter": { "alias": "showCategoryFilter"; "required": false; }; "showResourceFilter": { "alias": "showResourceFilter"; "required": false; }; "customViews": { "alias": "customViews"; "required": false; }; "eventDialog": { "alias": "eventDialog"; "required": false; }; "onEventClick": { "alias": "onEventClick"; "required": false; }; "onNewEventRequested": { "alias": "onNewEventRequested"; "required": false; }; "onSelectionChange": { "alias": "onSelectionChange"; "required": false; }; "onError": { "alias": "onError"; "required": false; }; "eventBadgesTpl": { "alias": "eventBadgesTpl"; "required": false; }; "eventContentTpl": { "alias": "eventContentTpl"; "required": false; }; "eventClassName": { "alias": "eventClassName"; "required": false; }; "eventStyle": { "alias": "eventStyle"; "required": false; }; "eventTitle": { "alias": "eventTitle"; "required": false; }; }, {}, never, never, true, never>;
149
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "cal-calendar", never, { "controller": { "alias": "controller"; "required": false; }; "store": { "alias": "store"; "required": false; }; "rules": { "alias": "rules"; "required": false; }; "config": { "alias": "config"; "required": false; }; "darkMode": { "alias": "darkMode"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; "showCategoryFilter": { "alias": "showCategoryFilter"; "required": false; }; "showResourceFilter": { "alias": "showResourceFilter"; "required": false; }; "showUndoRedo": { "alias": "showUndoRedo"; "required": false; }; "customViews": { "alias": "customViews"; "required": false; }; "eventDialog": { "alias": "eventDialog"; "required": false; }; "onEventClick": { "alias": "onEventClick"; "required": false; }; "onNewEventRequested": { "alias": "onNewEventRequested"; "required": false; }; "onSelectionChange": { "alias": "onSelectionChange"; "required": false; }; "onError": { "alias": "onError"; "required": false; }; "eventBadgesTpl": { "alias": "eventBadgesTpl"; "required": false; }; "eventContentTpl": { "alias": "eventContentTpl"; "required": false; }; "eventClassName": { "alias": "eventClassName"; "required": false; }; "eventStyle": { "alias": "eventStyle"; "required": false; }; "eventTitle": { "alias": "eventTitle"; "required": false; }; "eventInteraction": { "alias": "eventInteraction"; "required": false; }; }, {}, never, never, true, never>;
141
150
  }
142
151
  //# sourceMappingURL=Calendar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/components/Calendar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAiC,KAAK,IAAI,EAAE,MAAM,eAAe,CAAC;AAE7J,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D,OAAO,EAEL,KAAK,kBAAkB,EACvB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,cAAc,EAAE,mBAAmB,EAAE,UAAU,EAAE,oBAAoB,EAAE,gBAAgB,EACvF,eAAe,EAAE,iBAAiB,EAAE,UAAU,EAC9C,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,0BAA0B,EACzE,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;;AAc7E;;;;;;GAMG;AACH,qBA+Ja,iBAAkB,YAAW,MAAM,EAAE,SAAS,EAAE,SAAS;IAyDrC,kBAAkB,CAAC,EAAE,kBAAkB;IAAE,OAAO,CAAC,IAAI,CAAC;IAxDrF;;;;sFAIkF;IACzE,UAAU,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAChD,wEAAwE;IAC/D,K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AC;QAAC,IAAI,EAAE,UAAU,CAAA;KAAE;IAI1G,uBAAuB,CAAC,EAAE,EAAE;QAAE,IAAI,EAAE,gBAAgB,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,UAAU,CAAA;KAAE;IAI5F,eAAe,CAAC,EAAE,EAAE;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,gBAAgB,CAAA;KAAE;IAKhE,oBAAoB,CAAC,EAAE,EAAE;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;IAKnF,kBAAkB,CAAC,EAAE,EAAE;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;IAKrG,kBAAkB,CAAC,EAAE,EAAE;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,gBAAgB,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;yCA3P5E,iBAAiB;2CAAjB,iBAAiB;CA+P7B"}
@@ -1,6 +1,6 @@
1
1
  import { Component, Input, NgZone, TemplateRef, Optional, signal } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
- import { getYear, getMonth } from '@bimetal/calendar-core';
3
+ import { getYear, getMonth, monthIndex } from '@bimetal/calendar-core';
4
4
  import { parseDragInfo } from '@bimetal/calendar-headless';
5
5
  import { isEditableTarget } from '@bimetal/a11y-dom';
6
6
  import { createCalendarControllerBinding, EventRenderService, ZERO_RECT, } from '../binding/index.js';
@@ -53,7 +53,7 @@ function CalendarComponent_cal_month_view_5_Template(rf, ctx) { if (rf & 1) {
53
53
  i0.ɵɵelementEnd();
54
54
  } if (rf & 2) {
55
55
  const ctx_r1 = i0.ɵɵnextContext();
56
- i0.ɵɵproperty("year", ctx_r1.getYear(ctx_r1.snapshot.currentDate))("month", ctx_r1.getMonth(ctx_r1.snapshot.currentDate))("events", ctx_r1.filteredEvents)("config", ctx_r1.mergedConfig)("previewEvent", ctx_r1.snapshot.previewEvent)("expandedMonthDay", ctx_r1.snapshot.expandedMonthDay)("selectedEventId", ctx_r1.selectedEventId)("selectedInstanceDate", ctx_r1.selectedInstanceDate);
56
+ i0.ɵɵproperty("year", ctx_r1.getYear(ctx_r1.snapshot.currentDate))("month", ctx_r1.monthIndex(ctx_r1.getMonth(ctx_r1.snapshot.currentDate)))("events", ctx_r1.filteredEvents)("config", ctx_r1.mergedConfig)("previewEvent", ctx_r1.snapshot.previewEvent)("expandedMonthDay", ctx_r1.snapshot.expandedMonthDay)("selectedEventId", ctx_r1.selectedEventId)("selectedInstanceDate", ctx_r1.selectedInstanceDate);
57
57
  } }
58
58
  function CalendarComponent_cal_week_view_6_Template(rf, ctx) { if (rf & 1) {
59
59
  const _r6 = i0.ɵɵgetCurrentView();
@@ -158,6 +158,9 @@ export class CalendarComponent {
158
158
  dir;
159
159
  showCategoryFilter = false;
160
160
  showResourceFilter = false;
161
+ /** Show the undo/redo button pair in the header (default true). UI-only — the
162
+ * controller's undo()/redo() and the keyboard shortcuts stay active when hidden. */
163
+ showUndoRedo = true;
161
164
  customViews;
162
165
  eventDialog = { kind: 'builtin' };
163
166
  onEventClick;
@@ -178,6 +181,11 @@ export class CalendarComponent {
178
181
  eventStyle;
179
182
  /** Per-event title override. Return undefined to keep event.title. */
180
183
  eventTitle;
184
+ /** Per-event interaction policy (ticket-19): a PURE function of the event returning
185
+ * which interactions it allows (`draggable`/`resizable`/`editable`/`deletable`, or
186
+ * `locked` for all-off). The controller enforces it AND exposes it so the views drop
187
+ * the matching affordance. Read at controller creation — pass a stable function. */
188
+ eventInteraction;
181
189
  /** STANDALONE only — the bound path leaves the owned controller untouched. */
182
190
  binding;
183
191
  bound = false;
@@ -190,6 +198,7 @@ export class CalendarComponent {
190
198
  get snapshot() { return this.snapshotSig(); }
191
199
  getYear = getYear;
192
200
  getMonth = getMonth;
201
+ monthIndex = monthIndex;
193
202
  /** v0.29 Tastatur: root-scoped keydown → controller (Ctrl/Cmd+Z undo, Escape clears).
194
203
  * Bound via the `.bm-cal` root's `(keydown)` in the template — NOT a window listener
195
204
  * (no document-level routing). Public so the template can call it. */
@@ -230,6 +239,9 @@ export class CalendarComponent {
230
239
  this.eventRenderService.eventClassName = this.eventClassName;
231
240
  this.eventRenderService.eventStyle = this.eventStyle;
232
241
  this.eventRenderService.eventTitle = this.eventTitle;
242
+ // ticket-19: the controller's memoized policy resolver — the leaves' affordance
243
+ // then reads the SAME source the controller enforces on.
244
+ this.eventRenderService.getEventInteraction = this.ctrl.getEventInteraction;
233
245
  }
234
246
  ngOnInit() {
235
247
  // Dual-API (composition contract, F1): a passed `controller` selects the BOUND
@@ -256,6 +268,7 @@ export class CalendarComponent {
256
268
  config: this.config,
257
269
  rules: this.rules,
258
270
  customViews: this.customViews,
271
+ eventInteraction: this.eventInteraction,
259
272
  eventDialogKind: this.eventDialog.kind,
260
273
  onEventClickExternal: (id, rect, inst) => this.onEventClick?.(id, rect, inst),
261
274
  onNewEventRequestedExternal: (date, rect, rid) => this.onNewEventRequested?.(date, rect, rid),
@@ -371,21 +384,21 @@ export class CalendarComponent {
371
384
  void this.ctrl.dropTimeline(info, ev.date, ev.resourceId);
372
385
  }
373
386
  static ɵfac = function CalendarComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CalendarComponent)(i0.ɵɵdirectiveInject(i1.EventRenderService, 8), i0.ɵɵdirectiveInject(i0.NgZone)); };
374
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CalendarComponent, selectors: [["cal-calendar"]], inputs: { controller: "controller", store: "store", rules: "rules", config: "config", darkMode: "darkMode", dir: "dir", showCategoryFilter: "showCategoryFilter", showResourceFilter: "showResourceFilter", customViews: "customViews", eventDialog: "eventDialog", onEventClick: "onEventClick", onNewEventRequested: "onNewEventRequested", onSelectionChange: "onSelectionChange", onError: "onError", eventBadgesTpl: "eventBadgesTpl", eventContentTpl: "eventContentTpl", eventClassName: "eventClassName", eventStyle: "eventStyle", eventTitle: "eventTitle" }, features: [i0.ɵɵProvidersFeature([EventRenderService]), i0.ɵɵNgOnChangesFeature], decls: 15, vars: 20, consts: [[1, "bm-cal", 3, "keydown"], [3, "prev", "next", "today", "viewChange", "title", "currentView", "viewConfigs", "locale"], [3, "categories", "hiddenCategories", "toggle", 4, "ngIf"], [3, "resources", "hiddenResources", "toggle", 4, "ngIf"], [3, "year", "events", "config", "monthClick", "dayCellClick", 4, "ngIf"], [3, "year", "month", "events", "config", "previewEvent", "expandedMonthDay", "selectedEventId", "selectedInstanceDate", "eventClick", "selectEvent", "clearSelection", "dayCellClick", "dropEvent", "dragOverDate", "hidePreviewEv", "dragEnd", "dragStartEv", "expandMonthCell", "collapseMonthCell", 4, "ngIf"], [3, "currentDate", "events", "config", "previewEvent", "selectedEventId", "selectedInstanceDate", "eventClick", "selectEvent", "clearSelection", "dayCellClick", "dropEvent", "dropTimedEvent", "dragOverDate", "dragOverDateTime", "hidePreviewEv", "dragEnd", "dragStartEv", 4, "ngIf"], [3, "currentDate", "events", "config", "previewEvent", "selectedEventId", "selectedInstanceDate", "eventClick", "selectEvent", "clearSelection", "dayCellClick", "dropTimedEvent", "dragOverDateTime", "hidePreviewEv", "dragEnd", "dragStartEv", 4, "ngIf"], [3, "currentDate", "days", "events", "visibleResources", "config", "previewEvent", "selectedEventId", "selectedInstanceDate", "eventClick", "selectEvent", "clearSelection", "timelineCellClick", "timelineDrop", "dragOverDate", "hidePreviewEv", "dragEnd", "dragStartEv", 4, "ngIf"], [3, "currentDate", "events", "visibleResources", "config", "previewEvent", "selectedEventId", "selectedInstanceDate", "eventClick", "selectEvent", "clearSelection", "resourceCellClick", "resourceDrop", "dragOverDateTime", "hidePreviewEv", "dragEnd", "dragStartEv", 4, "ngIf"], [3, "agenda", "config", "setViewport", "eventClick", "selectEvent", 4, "ngIf"], [4, "ngIf"], [3, "dialog", "config", "history", "setDraft", "save", "deleteEvent", "close", 4, "ngIf"], [3, "undoAction", "dismiss", "lastAction", "locale"], [3, "toggle", "categories", "hiddenCategories"], [3, "toggle", "resources", "hiddenResources"], [3, "monthClick", "dayCellClick", "year", "events", "config"], [3, "eventClick", "selectEvent", "clearSelection", "dayCellClick", "dropEvent", "dragOverDate", "hidePreviewEv", "dragEnd", "dragStartEv", "expandMonthCell", "collapseMonthCell", "year", "month", "events", "config", "previewEvent", "expandedMonthDay", "selectedEventId", "selectedInstanceDate"], [3, "eventClick", "selectEvent", "clearSelection", "dayCellClick", "dropEvent", "dropTimedEvent", "dragOverDate", "dragOverDateTime", "hidePreviewEv", "dragEnd", "dragStartEv", "currentDate", "events", "config", "previewEvent", "selectedEventId", "selectedInstanceDate"], [3, "eventClick", "selectEvent", "clearSelection", "dayCellClick", "dropTimedEvent", "dragOverDateTime", "hidePreviewEv", "dragEnd", "dragStartEv", "currentDate", "events", "config", "previewEvent", "selectedEventId", "selectedInstanceDate"], [3, "eventClick", "selectEvent", "clearSelection", "timelineCellClick", "timelineDrop", "dragOverDate", "hidePreviewEv", "dragEnd", "dragStartEv", "currentDate", "days", "events", "visibleResources", "config", "previewEvent", "selectedEventId", "selectedInstanceDate"], [3, "eventClick", "selectEvent", "clearSelection", "resourceCellClick", "resourceDrop", "dragOverDateTime", "hidePreviewEv", "dragEnd", "dragStartEv", "currentDate", "events", "visibleResources", "config", "previewEvent", "selectedEventId", "selectedInstanceDate"], [3, "eventClick", "selectEvent", "agenda", "config", "setViewport"], [4, "ngComponentOutlet", "ngComponentOutletInputs"], [3, "setDraft", "save", "deleteEvent", "close", "dialog", "config", "history"]], template: function CalendarComponent_Template(rf, ctx) { if (rf & 1) {
387
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CalendarComponent, selectors: [["cal-calendar"]], inputs: { controller: "controller", store: "store", rules: "rules", config: "config", darkMode: "darkMode", dir: "dir", showCategoryFilter: "showCategoryFilter", showResourceFilter: "showResourceFilter", showUndoRedo: "showUndoRedo", customViews: "customViews", eventDialog: "eventDialog", onEventClick: "onEventClick", onNewEventRequested: "onNewEventRequested", onSelectionChange: "onSelectionChange", onError: "onError", eventBadgesTpl: "eventBadgesTpl", eventContentTpl: "eventContentTpl", eventClassName: "eventClassName", eventStyle: "eventStyle", eventTitle: "eventTitle", eventInteraction: "eventInteraction" }, features: [i0.ɵɵProvidersFeature([EventRenderService]), i0.ɵɵNgOnChangesFeature], decls: 15, vars: 23, consts: [[1, "bm-cal", 3, "keydown"], [3, "prev", "next", "today", "viewChange", "undo", "redo", "title", "currentView", "viewConfigs", "locale", "showUndoRedo", "canUndo", "canRedo"], [3, "categories", "hiddenCategories", "toggle", 4, "ngIf"], [3, "resources", "hiddenResources", "toggle", 4, "ngIf"], [3, "year", "events", "config", "monthClick", "dayCellClick", 4, "ngIf"], [3, "year", "month", "events", "config", "previewEvent", "expandedMonthDay", "selectedEventId", "selectedInstanceDate", "eventClick", "selectEvent", "clearSelection", "dayCellClick", "dropEvent", "dragOverDate", "hidePreviewEv", "dragEnd", "dragStartEv", "expandMonthCell", "collapseMonthCell", 4, "ngIf"], [3, "currentDate", "events", "config", "previewEvent", "selectedEventId", "selectedInstanceDate", "eventClick", "selectEvent", "clearSelection", "dayCellClick", "dropEvent", "dropTimedEvent", "dragOverDate", "dragOverDateTime", "hidePreviewEv", "dragEnd", "dragStartEv", 4, "ngIf"], [3, "currentDate", "events", "config", "previewEvent", "selectedEventId", "selectedInstanceDate", "eventClick", "selectEvent", "clearSelection", "dayCellClick", "dropTimedEvent", "dragOverDateTime", "hidePreviewEv", "dragEnd", "dragStartEv", 4, "ngIf"], [3, "currentDate", "days", "events", "visibleResources", "config", "previewEvent", "selectedEventId", "selectedInstanceDate", "eventClick", "selectEvent", "clearSelection", "timelineCellClick", "timelineDrop", "dragOverDate", "hidePreviewEv", "dragEnd", "dragStartEv", 4, "ngIf"], [3, "currentDate", "events", "visibleResources", "config", "previewEvent", "selectedEventId", "selectedInstanceDate", "eventClick", "selectEvent", "clearSelection", "resourceCellClick", "resourceDrop", "dragOverDateTime", "hidePreviewEv", "dragEnd", "dragStartEv", 4, "ngIf"], [3, "agenda", "config", "setViewport", "eventClick", "selectEvent", 4, "ngIf"], [4, "ngIf"], [3, "dialog", "config", "history", "setDraft", "save", "deleteEvent", "close", 4, "ngIf"], [3, "dismiss", "lastAction", "undoToastMs"], [3, "toggle", "categories", "hiddenCategories"], [3, "toggle", "resources", "hiddenResources"], [3, "monthClick", "dayCellClick", "year", "events", "config"], [3, "eventClick", "selectEvent", "clearSelection", "dayCellClick", "dropEvent", "dragOverDate", "hidePreviewEv", "dragEnd", "dragStartEv", "expandMonthCell", "collapseMonthCell", "year", "month", "events", "config", "previewEvent", "expandedMonthDay", "selectedEventId", "selectedInstanceDate"], [3, "eventClick", "selectEvent", "clearSelection", "dayCellClick", "dropEvent", "dropTimedEvent", "dragOverDate", "dragOverDateTime", "hidePreviewEv", "dragEnd", "dragStartEv", "currentDate", "events", "config", "previewEvent", "selectedEventId", "selectedInstanceDate"], [3, "eventClick", "selectEvent", "clearSelection", "dayCellClick", "dropTimedEvent", "dragOverDateTime", "hidePreviewEv", "dragEnd", "dragStartEv", "currentDate", "events", "config", "previewEvent", "selectedEventId", "selectedInstanceDate"], [3, "eventClick", "selectEvent", "clearSelection", "timelineCellClick", "timelineDrop", "dragOverDate", "hidePreviewEv", "dragEnd", "dragStartEv", "currentDate", "days", "events", "visibleResources", "config", "previewEvent", "selectedEventId", "selectedInstanceDate"], [3, "eventClick", "selectEvent", "clearSelection", "resourceCellClick", "resourceDrop", "dragOverDateTime", "hidePreviewEv", "dragEnd", "dragStartEv", "currentDate", "events", "visibleResources", "config", "previewEvent", "selectedEventId", "selectedInstanceDate"], [3, "eventClick", "selectEvent", "agenda", "config", "setViewport"], [4, "ngComponentOutlet", "ngComponentOutletInputs"], [3, "setDraft", "save", "deleteEvent", "close", "dialog", "config", "history"]], template: function CalendarComponent_Template(rf, ctx) { if (rf & 1) {
375
388
  i0.ɵɵelementStart(0, "div", 0);
376
389
  i0.ɵɵlistener("keydown", function CalendarComponent_Template_div_keydown_0_listener($event) { return ctx.keyHandler($event); });
377
390
  i0.ɵɵelementStart(1, "cal-header", 1);
378
- i0.ɵɵlistener("prev", function CalendarComponent_Template_cal_header_prev_1_listener() { return ctx.ctrl.prev(); })("next", function CalendarComponent_Template_cal_header_next_1_listener() { return ctx.ctrl.next(); })("today", function CalendarComponent_Template_cal_header_today_1_listener() { return ctx.ctrl.today(); })("viewChange", function CalendarComponent_Template_cal_header_viewChange_1_listener($event) { return ctx.handleViewChange($event); });
391
+ i0.ɵɵlistener("prev", function CalendarComponent_Template_cal_header_prev_1_listener() { return ctx.ctrl.prev(); })("next", function CalendarComponent_Template_cal_header_next_1_listener() { return ctx.ctrl.next(); })("today", function CalendarComponent_Template_cal_header_today_1_listener() { return ctx.ctrl.today(); })("viewChange", function CalendarComponent_Template_cal_header_viewChange_1_listener($event) { return ctx.handleViewChange($event); })("undo", function CalendarComponent_Template_cal_header_undo_1_listener() { return ctx.ctrl.voidUndo(); })("redo", function CalendarComponent_Template_cal_header_redo_1_listener() { return ctx.ctrl.voidRedo(); });
379
392
  i0.ɵɵelementEnd();
380
393
  i0.ɵɵtemplate(2, CalendarComponent_cal_category_filter_2_Template, 1, 2, "cal-category-filter", 2)(3, CalendarComponent_cal_resource_filter_3_Template, 1, 2, "cal-resource-filter", 3)(4, CalendarComponent_cal_year_view_4_Template, 1, 3, "cal-year-view", 4)(5, CalendarComponent_cal_month_view_5_Template, 1, 8, "cal-month-view", 5)(6, CalendarComponent_cal_week_view_6_Template, 1, 6, "cal-week-view", 6)(7, CalendarComponent_cal_day_view_7_Template, 1, 6, "cal-day-view", 7)(8, CalendarComponent_cal_timeline_view_8_Template, 1, 8, "cal-timeline-view", 8)(9, CalendarComponent_cal_resource_view_9_Template, 1, 7, "cal-resource-view", 9)(10, CalendarComponent_cal_agenda_view_10_Template, 1, 3, "cal-agenda-view", 10)(11, CalendarComponent_ng_container_11_Template, 2, 2, "ng-container", 11)(12, CalendarComponent_cal_event_dialog_12_Template, 1, 3, "cal-event-dialog", 12)(13, CalendarComponent_ng_container_13_Template, 2, 2, "ng-container", 11);
381
394
  i0.ɵɵelementStart(14, "cal-undo-toast", 13);
382
- i0.ɵɵlistener("undoAction", function CalendarComponent_Template_cal_undo_toast_undoAction_14_listener($event) { return ctx.ctrl.undo($event); })("dismiss", function CalendarComponent_Template_cal_undo_toast_dismiss_14_listener() { return ctx.ctrl.dismissUndo(); });
395
+ i0.ɵɵlistener("dismiss", function CalendarComponent_Template_cal_undo_toast_dismiss_14_listener() { return ctx.ctrl.dismissUndo(); });
383
396
  i0.ɵɵelementEnd()();
384
397
  } if (rf & 2) {
385
398
  let tmp_1_0;
386
399
  i0.ɵɵattribute("data-theme", ctx.darkMode ? "dark" : null)("dir", (tmp_1_0 = ctx.dir) !== null && tmp_1_0 !== undefined ? tmp_1_0 : null);
387
400
  i0.ɵɵadvance();
388
- i0.ɵɵproperty("title", ctx.snapshot.title)("currentView", ctx.snapshot.currentView)("viewConfigs", ctx.viewConfigList)("locale", ctx.mergedConfig.locale);
401
+ i0.ɵɵproperty("title", ctx.snapshot.title)("currentView", ctx.snapshot.currentView)("viewConfigs", ctx.viewConfigList)("locale", ctx.mergedConfig.locale)("showUndoRedo", ctx.showUndoRedo)("canUndo", ctx.snapshot.canUndo)("canRedo", ctx.snapshot.canRedo);
389
402
  i0.ɵɵadvance();
390
403
  i0.ɵɵproperty("ngIf", ctx.showCategoryFilter && ctx.mergedConfig.categories.length > 0);
391
404
  i0.ɵɵadvance();
@@ -411,7 +424,7 @@ export class CalendarComponent {
411
424
  i0.ɵɵadvance();
412
425
  i0.ɵɵproperty("ngIf", ctx.snapshot.dialog && ctx.eventDialog.kind === "custom");
413
426
  i0.ɵɵadvance();
414
- i0.ɵɵproperty("lastAction", ctx.snapshot.lastAction)("locale", ctx.mergedConfig.locale);
427
+ i0.ɵɵproperty("lastAction", ctx.snapshot.lastAction)("undoToastMs", ctx.mergedConfig.undoToastMs);
415
428
  } }, dependencies: [CommonModule, i2.NgComponentOutlet, i2.NgIf, CalendarHeaderComponent, CategoryFilterComponent, ResourceFilterComponent,
416
429
  EventDialogComponent, UndoToastComponent,
417
430
  MonthViewComponent, WeekViewComponent, DayViewComponent, AgendaViewComponent,
@@ -436,10 +449,15 @@ export class CalendarComponent {
436
449
  [currentView]="snapshot.currentView"
437
450
  [viewConfigs]="viewConfigList"
438
451
  [locale]="mergedConfig.locale"
452
+ [showUndoRedo]="showUndoRedo"
453
+ [canUndo]="snapshot.canUndo"
454
+ [canRedo]="snapshot.canRedo"
439
455
  (prev)="ctrl.prev()"
440
456
  (next)="ctrl.next()"
441
457
  (today)="ctrl.today()"
442
- (viewChange)="handleViewChange($event)">
458
+ (viewChange)="handleViewChange($event)"
459
+ (undo)="ctrl.voidUndo()"
460
+ (redo)="ctrl.voidRedo()">
443
461
  </cal-header>
444
462
 
445
463
  <cal-category-filter *ngIf="showCategoryFilter && mergedConfig.categories.length > 0"
@@ -461,7 +479,7 @@ export class CalendarComponent {
461
479
  </cal-year-view>
462
480
 
463
481
  <cal-month-view *ngIf="snapshot.currentView === 'month'"
464
- [year]="getYear(snapshot.currentDate)" [month]="getMonth(snapshot.currentDate)"
482
+ [year]="getYear(snapshot.currentDate)" [month]="monthIndex(getMonth(snapshot.currentDate))"
465
483
  [events]="filteredEvents" [config]="mergedConfig" [previewEvent]="snapshot.previewEvent"
466
484
  [expandedMonthDay]="snapshot.expandedMonthDay"
467
485
  [selectedEventId]="selectedEventId" [selectedInstanceDate]="selectedInstanceDate"
@@ -570,8 +588,7 @@ export class CalendarComponent {
570
588
 
571
589
  <cal-undo-toast
572
590
  [lastAction]="snapshot.lastAction"
573
- [locale]="mergedConfig.locale"
574
- (undoAction)="ctrl.undo($event)"
591
+ [undoToastMs]="mergedConfig.undoToastMs"
575
592
  (dismiss)="ctrl.dismissUndo()">
576
593
  </cal-undo-toast>
577
594
  </div>
@@ -596,6 +613,8 @@ export class CalendarComponent {
596
613
  type: Input
597
614
  }], showResourceFilter: [{
598
615
  type: Input
616
+ }], showUndoRedo: [{
617
+ type: Input
599
618
  }], customViews: [{
600
619
  type: Input
601
620
  }], eventDialog: [{
@@ -618,6 +637,8 @@ export class CalendarComponent {
618
637
  type: Input
619
638
  }], eventTitle: [{
620
639
  type: Input
640
+ }], eventInteraction: [{
641
+ type: Input
621
642
  }] }); })();
622
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CalendarComponent, { className: "CalendarComponent", filePath: "components/calendar.ts", lineNumber: 199 }); })();
643
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CalendarComponent, { className: "CalendarComponent", filePath: "components/calendar.ts", lineNumber: 203 }); })();
623
644
  //# sourceMappingURL=Calendar.js.map