@timpel/forumkit-sdk-web 0.2.0 → 0.2.1
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/{chunk-OZURCHWK.js → chunk-EJQY26NT.js} +18 -2
- package/dist/chunk-EJQY26NT.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/wrappers/react.d.ts +1 -1
- package/dist/wrappers/react.js +5 -3
- package/dist/wrappers/react.js.map +1 -1
- package/dist/wrappers/vue.d.ts +18 -0
- package/dist/wrappers/vue.js +9 -1
- package/dist/wrappers/vue.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-OZURCHWK.js.map +0 -1
|
@@ -7621,6 +7621,21 @@ var ForumKitElement = class extends HTMLElement {
|
|
|
7621
7621
|
_shadow;
|
|
7622
7622
|
_mountPoint;
|
|
7623
7623
|
_root = null;
|
|
7624
|
+
// A function can't be represented as an HTML attribute, so onLogout is set
|
|
7625
|
+
// as a JS property directly (el.onLogout = fn) rather than observed via
|
|
7626
|
+
// attributeChangedCallback — this is also why plain HTML usage has no way
|
|
7627
|
+
// to provide it, by design (see README's Customization section).
|
|
7628
|
+
_onLogout;
|
|
7629
|
+
get onLogout() {
|
|
7630
|
+
return this._onLogout;
|
|
7631
|
+
}
|
|
7632
|
+
set onLogout(fn) {
|
|
7633
|
+
this._onLogout = fn;
|
|
7634
|
+
if (this._config) {
|
|
7635
|
+
this._config = this._readConfig();
|
|
7636
|
+
this._render();
|
|
7637
|
+
}
|
|
7638
|
+
}
|
|
7624
7639
|
static get observedAttributes() {
|
|
7625
7640
|
return ["forum-id", "token", "theme", "api-url", "platform"];
|
|
7626
7641
|
}
|
|
@@ -7664,7 +7679,8 @@ var ForumKitElement = class extends HTMLElement {
|
|
|
7664
7679
|
token,
|
|
7665
7680
|
theme,
|
|
7666
7681
|
apiUrl: this.getAttribute("api-url") ?? DEFAULT_API_URL,
|
|
7667
|
-
platform
|
|
7682
|
+
platform,
|
|
7683
|
+
...this._onLogout ? { onLogout: this._onLogout } : {}
|
|
7668
7684
|
};
|
|
7669
7685
|
}
|
|
7670
7686
|
/**
|
|
@@ -7717,4 +7733,4 @@ if (!customElements.get("forum-kit")) {
|
|
|
7717
7733
|
export {
|
|
7718
7734
|
ForumKitElement
|
|
7719
7735
|
};
|
|
7720
|
-
//# sourceMappingURL=chunk-
|
|
7736
|
+
//# sourceMappingURL=chunk-EJQY26NT.js.map
|