@archbee/app-widget 1.1.27 → 1.1.28

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/index.esm.js CHANGED
@@ -1212,7 +1212,7 @@ const initJsScripts = loadingStrategy => {
1212
1212
  const script = document.getElementsByTagName('script')[0];
1213
1213
  (_a = script === null || script === void 0 ? void 0 : script.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(scripttag, script);
1214
1214
  };
1215
- const createArchbeeWidget = (spaceId, jwt, shareableToken, loadingStrategy = 'lazy', bubble = 'invisible', bubblePlaceholder, anchor) => {
1215
+ const createArchbeeWidget = (spaceId, jwt, shareableToken, loadingStrategy = 'lazy', bubble = 'invisible', bubblePlaceholder, anchor, showNavbar = true) => {
1216
1216
  if (!window._archbee) {
1217
1217
  window._archbee = window._archbee || {
1218
1218
  queue: [],
@@ -1227,7 +1227,8 @@ const createArchbeeWidget = (spaceId, jwt, shareableToken, loadingStrategy = 'la
1227
1227
  shareableToken,
1228
1228
  bubble,
1229
1229
  bubblePlaceholder,
1230
- anchor
1230
+ anchor,
1231
+ showNavbar
1231
1232
  });
1232
1233
  initJsScripts(loadingStrategy);
1233
1234
  }
@@ -1712,6 +1713,9 @@ const iterateProxy = (proxy, component) => {
1712
1713
  } else {
1713
1714
  window._archbee.widget.widgetType = 'docs';
1714
1715
  }
1716
+ if (Object.keys(event).includes('showNavbar')) {
1717
+ window._archbee.widget.showNavbar = event.showNavbar;
1718
+ }
1715
1719
  window.dispatchEvent(showWidgetEvent());
1716
1720
  }
1717
1721
  if (event.eventType === EVENT_TYPE_ENUM.hideWidget) {
@@ -1735,6 +1739,7 @@ const ArchbeeAppWidget = /*#__PURE__*/forwardRef((_a, ref) => {
1735
1739
  blockId,
1736
1740
  widgetType = 'docs',
1737
1741
  loadingStrategy = 'lazy',
1742
+ showNavbar = true,
1738
1743
  onWidgetOpen,
1739
1744
  onWidgetClose,
1740
1745
  bubble,
@@ -1742,12 +1747,12 @@ const ArchbeeAppWidget = /*#__PURE__*/forwardRef((_a, ref) => {
1742
1747
  anchor,
1743
1748
  children
1744
1749
  } = _a,
1745
- rest = __rest(_a, ["className", "spaceId", "jwt", "shareableToken", "docId", "blockId", "widgetType", "loadingStrategy", "onWidgetOpen", "onWidgetClose", "bubble", "bubblePlaceholder", "anchor", "children"]);
1750
+ rest = __rest(_a, ["className", "spaceId", "jwt", "shareableToken", "docId", "blockId", "widgetType", "loadingStrategy", "showNavbar", "onWidgetOpen", "onWidgetClose", "bubble", "bubblePlaceholder", "anchor", "children"]);
1746
1751
  const elementRef = useRef(null);
1747
1752
  const widgetInstance = useMemo(() => {
1748
1753
  if (typeof window === 'undefined') return;
1749
- return createArchbeeWidget(spaceId, jwt, shareableToken, loadingStrategy, bubble, bubblePlaceholder, anchor);
1750
- }, [spaceId, jwt, shareableToken, loadingStrategy, bubble, bubblePlaceholder, anchor]);
1754
+ return createArchbeeWidget(spaceId, jwt, shareableToken, loadingStrategy, bubble, bubblePlaceholder, anchor, showNavbar);
1755
+ }, [spaceId, jwt, shareableToken, loadingStrategy, bubble, bubblePlaceholder, anchor, showNavbar]);
1751
1756
  useImperativeHandle(ref, () => {
1752
1757
  return {
1753
1758
  open: onOpenWidget,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archbee/app-widget",
3
- "version": "1.1.27",
3
+ "version": "1.1.28",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "author": {
@@ -1,4 +1,4 @@
1
1
  import type { BubbleType, LoadingStrategy } from '../types';
2
2
  export declare const initScripts: () => void;
3
3
  export declare const initJsScripts: (loadingStrategy: LoadingStrategy) => void;
4
- export declare const createArchbeeWidget: (spaceId: string, jwt?: string, shareableToken?: string, loadingStrategy?: LoadingStrategy, bubble?: BubbleType, bubblePlaceholder?: string, anchor?: string) => any;
4
+ export declare const createArchbeeWidget: (spaceId: string, jwt?: string, shareableToken?: string, loadingStrategy?: LoadingStrategy, bubble?: BubbleType, bubblePlaceholder?: string, anchor?: string, showNavbar?: boolean) => any;
@@ -24,6 +24,7 @@ export interface AbWidgetData {
24
24
  shareableToken?: string;
25
25
  widgetType?: WidgetType;
26
26
  bubble?: BubbleType;
27
+ showNavbar?: boolean;
27
28
  bubblePlaceholder?: string;
28
29
  anchor?: string;
29
30
  loadingStrategy?: LoadingStrategy;