aboutsummaryrefslogtreecommitdiffstats
path: root/library/fullcalendar/packages/web-component
diff options
context:
space:
mode:
Diffstat (limited to 'library/fullcalendar/packages/web-component')
-rw-r--r--library/fullcalendar/packages/web-component/index.global.js19
-rw-r--r--library/fullcalendar/packages/web-component/index.global.min.js8
2 files changed, 18 insertions, 9 deletions
diff --git a/library/fullcalendar/packages/web-component/index.global.js b/library/fullcalendar/packages/web-component/index.global.js
index aa22a52a3..8f6a13c0b 100644
--- a/library/fullcalendar/packages/web-component/index.global.js
+++ b/library/fullcalendar/packages/web-component/index.global.js
@@ -1,7 +1,7 @@
/*!
-FullCalendar Web Component v6.0.3
-Docs & License: https://fullcalendar.io
-(c) 2022 Adam Shaw
+FullCalendar Web Component v6.1.8
+Docs & License: https://fullcalendar.io/docs/web-component
+(c) 2023 Adam Shaw
*/
(function (core) {
'use strict';
@@ -43,8 +43,17 @@ Docs & License: https://fullcalendar.io
this._calendar.resetOptions(options);
}
else {
- this.innerHTML = '<div></div>';
- let calendarEl = this.querySelector('div');
+ let root;
+ if (this.hasAttribute('shadow')) {
+ this.attachShadow({ mode: 'open' });
+ root = this.shadowRoot;
+ }
+ else {
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
+ root = this;
+ }
+ root.innerHTML = '<div></div>';
+ let calendarEl = root.querySelector('div');
let calendar = new core.Calendar(calendarEl, options);
calendar.render();
this._calendar = calendar;
diff --git a/library/fullcalendar/packages/web-component/index.global.min.js b/library/fullcalendar/packages/web-component/index.global.min.js
index 9a3a78173..407d4c1c7 100644
--- a/library/fullcalendar/packages/web-component/index.global.min.js
+++ b/library/fullcalendar/packages/web-component/index.global.min.js
@@ -1,6 +1,6 @@
/*!
-FullCalendar Web Component v6.0.3
-Docs & License: https://fullcalendar.io
-(c) 2022 Adam Shaw
+FullCalendar Web Component v6.1.8
+Docs & License: https://fullcalendar.io/docs/web-component
+(c) 2023 Adam Shaw
*/
-!function(t){"use strict";class e extends HTMLElement{constructor(){super(...arguments),this._calendar=null,this._options=null}connectedCallback(){this._handleOptionsStr(this.getAttribute("options"))}disconnectedCallback(){this._handleOptionsStr(null)}attributeChangedCallback(t,e,n){"options"===t&&this._calendar&&this._handleOptionsStr(n)}get options(){return this._options}set options(t){this._handleOptions(t)}getApi(){return this._calendar}_handleOptionsStr(t){this._handleOptions(t?JSON.parse(t):null)}_handleOptions(e){if(e){if(this._calendar)this._calendar.resetOptions(e);else{this.innerHTML="<div></div>";let n=this.querySelector("div"),s=new t.Calendar(n,e);s.render(),this._calendar=s}this._options=e}else this._calendar&&(this._calendar.destroy(),this._calendar=null),this._options=null}static get observedAttributes(){return["options"]}}globalThis.FullCalendarElement=e,customElements.define("full-calendar",e)}(FullCalendar); \ No newline at end of file
+!function(t){"use strict";class e extends HTMLElement{constructor(){super(...arguments),this._calendar=null,this._options=null}connectedCallback(){this._handleOptionsStr(this.getAttribute("options"))}disconnectedCallback(){this._handleOptionsStr(null)}attributeChangedCallback(t,e,n){"options"===t&&this._calendar&&this._handleOptionsStr(n)}get options(){return this._options}set options(t){this._handleOptions(t)}getApi(){return this._calendar}_handleOptionsStr(t){this._handleOptions(t?JSON.parse(t):null)}_handleOptions(e){if(e){if(this._calendar)this._calendar.resetOptions(e);else{let n;this.hasAttribute("shadow")?(this.attachShadow({mode:"open"}),n=this.shadowRoot):n=this,n.innerHTML="<div></div>";let s=n.querySelector("div"),i=new t.Calendar(s,e);i.render(),this._calendar=i}this._options=e}else this._calendar&&(this._calendar.destroy(),this._calendar=null),this._options=null}static get observedAttributes(){return["options"]}}globalThis.FullCalendarElement=e,customElements.define("full-calendar",e)}(FullCalendar); \ No newline at end of file