@wallavi/widget 1.7.1 → 1.7.2

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/index.js CHANGED
@@ -3070,21 +3070,22 @@ function BubbleWidget({
3070
3070
  inboxToken ? "" : chatProps.agentId ?? "",
3071
3071
  !inboxToken && autoConfig
3072
3072
  );
3073
- const resolvedPosition = positionProp ?? remote.position;
3074
- const resolvedBubbleIcon = bubbleIconUrlProp ?? remote.bubbleIconUrl;
3075
- const resolvedAutoOpen = autoOpenProp || remote.autoOpen;
3076
- const resolvedKeyboardShortcut = keyboardShortcutProp || remote.keyboardShortcut;
3077
- const resolvedBubbleSize = bubbleSizeProp ?? remote.bubbleSize;
3078
- const resolvedWidth = widthProp ?? remote.panelWidth;
3079
- const resolvedHeight = heightProp ?? remote.panelHeight;
3073
+ const resolvedPosition = remote.position ?? positionProp;
3074
+ const resolvedBubbleIcon = remote.bubbleIconUrl ?? bubbleIconUrlProp;
3075
+ const resolvedAutoOpen = remote.autoOpen || autoOpenProp;
3076
+ const resolvedKeyboardShortcut = remote.keyboardShortcut || keyboardShortcutProp;
3077
+ const resolvedBubbleSize = remote.bubbleSize ?? bubbleSizeProp;
3078
+ const resolvedWidth = remote.panelWidth ?? widthProp;
3079
+ const resolvedHeight = remote.panelHeight ?? heightProp;
3080
3080
  const definedChatProps = Object.fromEntries(
3081
3081
  Object.entries(chatProps).filter(([, v]) => v !== void 0)
3082
3082
  );
3083
3083
  const mergedConfig = {
3084
- ...remote.remoteConfig,
3085
3084
  ...definedChatProps,
3085
+ ...remote.remoteConfig,
3086
3086
  agentId: chatProps.agentId ?? "",
3087
- agentName: chatProps.agentName ?? ""
3087
+ agentName: remote.remoteConfig.agentName ?? chatProps.agentName ?? "Asistente",
3088
+ source: chatProps.source ?? remote.remoteConfig.source ?? "web"
3088
3089
  };
3089
3090
  const setOpenRef = react.useRef(setOpen);
3090
3091
  react.useEffect(() => {
package/dist/index.mjs CHANGED
@@ -3044,21 +3044,22 @@ function BubbleWidget({
3044
3044
  inboxToken ? "" : chatProps.agentId ?? "",
3045
3045
  !inboxToken && autoConfig
3046
3046
  );
3047
- const resolvedPosition = positionProp ?? remote.position;
3048
- const resolvedBubbleIcon = bubbleIconUrlProp ?? remote.bubbleIconUrl;
3049
- const resolvedAutoOpen = autoOpenProp || remote.autoOpen;
3050
- const resolvedKeyboardShortcut = keyboardShortcutProp || remote.keyboardShortcut;
3051
- const resolvedBubbleSize = bubbleSizeProp ?? remote.bubbleSize;
3052
- const resolvedWidth = widthProp ?? remote.panelWidth;
3053
- const resolvedHeight = heightProp ?? remote.panelHeight;
3047
+ const resolvedPosition = remote.position ?? positionProp;
3048
+ const resolvedBubbleIcon = remote.bubbleIconUrl ?? bubbleIconUrlProp;
3049
+ const resolvedAutoOpen = remote.autoOpen || autoOpenProp;
3050
+ const resolvedKeyboardShortcut = remote.keyboardShortcut || keyboardShortcutProp;
3051
+ const resolvedBubbleSize = remote.bubbleSize ?? bubbleSizeProp;
3052
+ const resolvedWidth = remote.panelWidth ?? widthProp;
3053
+ const resolvedHeight = remote.panelHeight ?? heightProp;
3054
3054
  const definedChatProps = Object.fromEntries(
3055
3055
  Object.entries(chatProps).filter(([, v]) => v !== void 0)
3056
3056
  );
3057
3057
  const mergedConfig = {
3058
- ...remote.remoteConfig,
3059
3058
  ...definedChatProps,
3059
+ ...remote.remoteConfig,
3060
3060
  agentId: chatProps.agentId ?? "",
3061
- agentName: chatProps.agentName ?? ""
3061
+ agentName: remote.remoteConfig.agentName ?? chatProps.agentName ?? "Asistente",
3062
+ source: chatProps.source ?? remote.remoteConfig.source ?? "web"
3062
3063
  };
3063
3064
  const setOpenRef = useRef(setOpen);
3064
3065
  useEffect(() => {
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "private": false,
44
44
  "types": "./dist/index.d.ts",
45
- "version": "1.7.1",
45
+ "version": "1.7.2",
46
46
  "scripts": {
47
47
  "build": "tsup && pnpm build:css",
48
48
  "build:css": "tailwindcss -i ./src/styles.css -o ./dist/styles.css --config tailwind.config.cjs --minify",