@xapp/chat-widget 1.85.0 → 1.85.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/index.es.js CHANGED
@@ -155,15 +155,20 @@ var LinkIcon = function () { return (jsx("svg", { width: "24", height: "24", vie
155
155
  var EmailIcon = function () { return (jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", children: jsx("path", { d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z" }) })); };
156
156
  var HelpIcon = function () { return (jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", children: jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z" }) })); };
157
157
  var PaymentIcon = function () { return (jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", children: jsx("path", { d: "M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" }) })); };
158
+ // Default fallback icon for unsupported types
159
+ var DefaultIcon = function () { return (jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", children: jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" }) })); };
158
160
  var iconComponents = {
159
161
  chat: ChatIcon,
160
162
  form: FormIcon,
161
- schedule: ScheduleIcon,
163
+ calendar: ScheduleIcon, // GraphQL schema uses "calendar"
164
+ schedule: ScheduleIcon, // Keep "schedule" for backwards compatibility
162
165
  phone: PhoneIcon,
163
- url: LinkIcon,
166
+ link: LinkIcon, // GraphQL schema uses "link"
167
+ url: LinkIcon, // Keep "url" for backwards compatibility
164
168
  email: EmailIcon,
165
169
  help: HelpIcon,
166
170
  payment: PaymentIcon,
171
+ // "custom" type is handled via iconUrl, no need for a component
167
172
  };
168
173
  var ActionBarIcon = function (_a) {
169
174
  var type = _a.type, icon = _a.icon, iconUrl = _a.iconUrl, className = _a.className;
@@ -172,7 +177,7 @@ var ActionBarIcon = function (_a) {
172
177
  }
173
178
  // Use explicit icon override if provided, otherwise fall back to type
174
179
  var iconType = icon || type;
175
- var IconComponent = iconComponents[iconType];
180
+ var IconComponent = iconComponents[iconType] || DefaultIcon;
176
181
  return (jsx("div", { className: className, children: jsx(IconComponent, {}) }));
177
182
  };
178
183