Adam Shaw 3 лет назад
Родитель
Сommit
b99bb60ab8

+ 2 - 0
CHANGELOG.md

@@ -12,6 +12,8 @@ TODO: New instructions for angular, web-component API changed
 
 No more reliance on tslib. Dist output is es2015 (es6)
 
+web-component
+
 
 v6.0.0-beta.1
 -------------

+ 1 - 1
packages/web-component/package.json

@@ -32,7 +32,7 @@
       "./global": {}
     },
     "iifeGlobals": {
-      ".": "FullCalendar.WebComponent"
+      ".": ""
     }
   },
   "publishConfig": {

+ 8 - 0
packages/web-component/src/global.ts

@@ -1,9 +1,17 @@
 import { FullCalendarElement } from './FullCalendarElement.js'
 
+type FullCalendarElementType = typeof FullCalendarElement
+
 declare global {
+  // (extensions to globalThis must use `var`)
+  // eslint-disable-next-line no-var
+  var FullCalendarElement: FullCalendarElementType
+
   interface HTMLElementTagNameMap {
     'full-calendar': FullCalendarElement
   }
 }
 
+globalThis.FullCalendarElement = FullCalendarElement
+
 customElements.define('full-calendar', FullCalendarElement)

+ 0 - 2
packages/web-component/src/index.global.ts

@@ -1,3 +1 @@
 import './global.js'
-
-export { FullCalendarElement } from './FullCalendarElement.js'