@forcecalendar/interface 1.0.30 → 1.0.31
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/dist/force-calendar-interface.esm.js +15 -11
- package/dist/force-calendar-interface.esm.js.map +1 -1
- package/dist/force-calendar-interface.umd.js +2 -2
- package/dist/force-calendar-interface.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/EventForm.js +4 -1
- package/src/core/StateManager.js +5 -1
|
@@ -5192,7 +5192,11 @@ class ie {
|
|
|
5192
5192
|
}
|
|
5193
5193
|
// State management
|
|
5194
5194
|
getState() {
|
|
5195
|
-
return {
|
|
5195
|
+
return {
|
|
5196
|
+
...this.state,
|
|
5197
|
+
config: { ...this.state.config },
|
|
5198
|
+
events: [...this.state.events]
|
|
5199
|
+
};
|
|
5196
5200
|
}
|
|
5197
5201
|
setState(e, t = {}) {
|
|
5198
5202
|
const { silent: s = !1 } = t, i = { ...this.state };
|
|
@@ -5492,7 +5496,7 @@ class E extends f {
|
|
|
5492
5496
|
return r && (r.toLowerCase() === "pm" && n < 12 ? o = n + 12 : r.toLowerCase() === "am" && n === 12 && (o = 0)), s.setHours(o, a || 0, 0, 0), s;
|
|
5493
5497
|
}
|
|
5494
5498
|
}
|
|
5495
|
-
class
|
|
5499
|
+
class F {
|
|
5496
5500
|
/**
|
|
5497
5501
|
* Create element with attributes and children
|
|
5498
5502
|
*/
|
|
@@ -6133,7 +6137,7 @@ I(D, "breakpoints", {
|
|
|
6133
6137
|
xl: "1200px",
|
|
6134
6138
|
"2xl": "1400px"
|
|
6135
6139
|
});
|
|
6136
|
-
class
|
|
6140
|
+
class H {
|
|
6137
6141
|
/**
|
|
6138
6142
|
* @param {HTMLElement} container - The DOM element to render into
|
|
6139
6143
|
* @param {StateManager} stateManager - The state manager instance
|
|
@@ -6172,7 +6176,7 @@ class F {
|
|
|
6172
6176
|
* @returns {string}
|
|
6173
6177
|
*/
|
|
6174
6178
|
escapeHTML(e) {
|
|
6175
|
-
return e == null ? "" :
|
|
6179
|
+
return e == null ? "" : F.escapeHTML(String(e));
|
|
6176
6180
|
}
|
|
6177
6181
|
/**
|
|
6178
6182
|
* Check if a date is today
|
|
@@ -6282,7 +6286,7 @@ class F {
|
|
|
6282
6286
|
});
|
|
6283
6287
|
}
|
|
6284
6288
|
}
|
|
6285
|
-
class S extends
|
|
6289
|
+
class S extends H {
|
|
6286
6290
|
constructor(e, t) {
|
|
6287
6291
|
super(e, t), this.maxEventsToShow = 3;
|
|
6288
6292
|
}
|
|
@@ -6357,7 +6361,7 @@ class S extends F {
|
|
|
6357
6361
|
}), this.attachCommonEventHandlers();
|
|
6358
6362
|
}
|
|
6359
6363
|
}
|
|
6360
|
-
class z extends
|
|
6364
|
+
class z extends H {
|
|
6361
6365
|
constructor(e, t) {
|
|
6362
6366
|
super(e, t), this.hourHeight = 60, this.totalHeight = 24 * this.hourHeight;
|
|
6363
6367
|
}
|
|
@@ -6493,7 +6497,7 @@ class z extends F {
|
|
|
6493
6497
|
e && (e.scrollTop = 8 * this.hourHeight - 50, this._scrolled = !0);
|
|
6494
6498
|
}
|
|
6495
6499
|
}
|
|
6496
|
-
class L extends
|
|
6500
|
+
class L extends H {
|
|
6497
6501
|
constructor(e, t) {
|
|
6498
6502
|
super(e, t), this.hourHeight = 60, this.totalHeight = 24 * this.hourHeight;
|
|
6499
6503
|
}
|
|
@@ -6912,7 +6916,7 @@ class re extends O {
|
|
|
6912
6916
|
});
|
|
6913
6917
|
}
|
|
6914
6918
|
open(e = /* @__PURE__ */ new Date()) {
|
|
6915
|
-
this.hasAttribute("open") || this.setAttribute("open", ""), this.titleGroup.classList.remove("has-error"), this.endGroup.classList.remove("has-error"), this._formData.start = e, this._formData.end = new Date(e.getTime() + this.config.defaultDuration * 60 * 1e3), this._formData.title = "", this._formData.color = this.config.colors[0].color, this.startInput && (this.titleInput.value = "", this.startInput.value = this.formatDateForInput(this._formData.start), this.endInput.value = this.formatDateForInput(this._formData.end), this.updateColorSelection(), this._cleanupFocusTrap =
|
|
6919
|
+
this.hasAttribute("open") || this.setAttribute("open", ""), this.titleGroup.classList.remove("has-error"), this.endGroup.classList.remove("has-error"), this._formData.start = e, this._formData.end = new Date(e.getTime() + this.config.defaultDuration * 60 * 1e3), this._formData.title = "", this._formData.color = this.config.colors[0].color, this.startInput && (this.titleInput.value = "", this.startInput.value = this.formatDateForInput(this._formData.start), this.endInput.value = this.formatDateForInput(this._formData.end), this.updateColorSelection(), this._cleanupFocusTrap && this._cleanupFocusTrap(), this._cleanupFocusTrap = F.trapFocus(this.modalContent));
|
|
6916
6920
|
}
|
|
6917
6921
|
close() {
|
|
6918
6922
|
this.removeAttribute("open"), this._cleanupFocusTrap && (this._cleanupFocusTrap(), this._cleanupFocusTrap = null);
|
|
@@ -7470,7 +7474,7 @@ class ne extends O {
|
|
|
7470
7474
|
return `
|
|
7471
7475
|
<div class="force-calendar">
|
|
7472
7476
|
<div class="fc-error">
|
|
7473
|
-
<p><strong>Error:</strong> ${
|
|
7477
|
+
<p><strong>Error:</strong> ${F.escapeHTML(r.message || "An error occurred")}</p>
|
|
7474
7478
|
</div>
|
|
7475
7479
|
</div>
|
|
7476
7480
|
`;
|
|
@@ -7661,8 +7665,8 @@ customElements.get("forcecal-main") || customElements.define("forcecal-main", ne
|
|
|
7661
7665
|
typeof window < "u" && typeof customElements < "u" && console.log("Force Calendar Interface loading...");
|
|
7662
7666
|
export {
|
|
7663
7667
|
O as BaseComponent,
|
|
7664
|
-
|
|
7665
|
-
|
|
7668
|
+
H as BaseViewRenderer,
|
|
7669
|
+
F as DOMUtils,
|
|
7666
7670
|
E as DateUtils,
|
|
7667
7671
|
L as DayViewRenderer,
|
|
7668
7672
|
se as EventBus,
|