@helpai/elements 0.41.1 → 0.42.0

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.mjs CHANGED
@@ -5508,6 +5508,7 @@ function rowTime(lastMessageAt, nowMs, locale) {
5508
5508
  function ConversationList({
5509
5509
  transport,
5510
5510
  strings,
5511
+ locale,
5511
5512
  visitorId,
5512
5513
  onSelect,
5513
5514
  onNewConversation
@@ -5566,7 +5567,6 @@ function ConversationList({
5566
5567
  ] });
5567
5568
  }
5568
5569
  const now = Date.now();
5569
- const locale = typeof navigator !== "undefined" ? navigator.language : "en";
5570
5570
  const groups = groupByBucket(now, conversations);
5571
5571
  return /* @__PURE__ */ jsxs15(Fragment3, { children: [
5572
5572
  /* @__PURE__ */ jsx18("div", { class: `${p33}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs15("div", { class: `${p33}-history-group`, children: [
@@ -5760,6 +5760,7 @@ function PanelContent(props2) {
5760
5760
  {
5761
5761
  transport,
5762
5762
  strings: s,
5763
+ locale: options.locale,
5763
5764
  visitorId,
5764
5765
  onSelect: (conversation) => onSelectHistoryConversation(conversation.conversationId),
5765
5766
  onNewConversation
@@ -5971,6 +5972,7 @@ function Sidebar(props2) {
5971
5972
  {
5972
5973
  transport: props2.transport,
5973
5974
  strings: props2.strings,
5975
+ locale: props2.locale,
5974
5976
  visitorId: props2.visitorId,
5975
5977
  onSelect: props2.onSelectConversation,
5976
5978
  onNewConversation: props2.onNewConversation
@@ -6051,6 +6053,7 @@ function PageShell(props2) {
6051
6053
  blocks: props2.blocks,
6052
6054
  transport: props2.transport,
6053
6055
  strings: props2.strings,
6056
+ locale: props2.locale,
6054
6057
  visitorId: props2.visitorId,
6055
6058
  showConversations: props2.showConversations,
6056
6059
  onSelectConversation: props2.onSelectConversation,
@@ -7703,6 +7706,7 @@ function App({ options, hostElement, bus }) {
7703
7706
  blocks: parsedBlocks,
7704
7707
  transport,
7705
7708
  strings: effectiveOptions.strings,
7709
+ locale: effectiveOptions.locale,
7706
7710
  visitorId,
7707
7711
  showConversations: conversationsEnabled,
7708
7712
  onSelectConversation: onSelectConversationFromSidebar,
package/package.json CHANGED
@@ -80,5 +80,5 @@
80
80
  ],
81
81
  "type": "module",
82
82
  "types": "./index.d.ts",
83
- "version": "0.41.1"
83
+ "version": "0.42.0"
84
84
  }
package/web-component.mjs CHANGED
@@ -5467,6 +5467,7 @@ function rowTime(lastMessageAt, nowMs, locale) {
5467
5467
  function ConversationList({
5468
5468
  transport,
5469
5469
  strings,
5470
+ locale,
5470
5471
  visitorId,
5471
5472
  onSelect,
5472
5473
  onNewConversation
@@ -5525,7 +5526,6 @@ function ConversationList({
5525
5526
  ] });
5526
5527
  }
5527
5528
  const now = Date.now();
5528
- const locale = typeof navigator !== "undefined" ? navigator.language : "en";
5529
5529
  const groups = groupByBucket(now, conversations);
5530
5530
  return /* @__PURE__ */ jsxs15(Fragment3, { children: [
5531
5531
  /* @__PURE__ */ jsx18("div", { class: `${p33}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs15("div", { class: `${p33}-history-group`, children: [
@@ -5719,6 +5719,7 @@ function PanelContent(props2) {
5719
5719
  {
5720
5720
  transport,
5721
5721
  strings: s,
5722
+ locale: options.locale,
5722
5723
  visitorId,
5723
5724
  onSelect: (conversation) => onSelectHistoryConversation(conversation.conversationId),
5724
5725
  onNewConversation
@@ -5930,6 +5931,7 @@ function Sidebar(props2) {
5930
5931
  {
5931
5932
  transport: props2.transport,
5932
5933
  strings: props2.strings,
5934
+ locale: props2.locale,
5933
5935
  visitorId: props2.visitorId,
5934
5936
  onSelect: props2.onSelectConversation,
5935
5937
  onNewConversation: props2.onNewConversation
@@ -6010,6 +6012,7 @@ function PageShell(props2) {
6010
6012
  blocks: props2.blocks,
6011
6013
  transport: props2.transport,
6012
6014
  strings: props2.strings,
6015
+ locale: props2.locale,
6013
6016
  visitorId: props2.visitorId,
6014
6017
  showConversations: props2.showConversations,
6015
6018
  onSelectConversation: props2.onSelectConversation,
@@ -7662,6 +7665,7 @@ function App({ options, hostElement, bus }) {
7662
7665
  blocks: parsedBlocks,
7663
7666
  transport,
7664
7667
  strings: effectiveOptions.strings,
7668
+ locale: effectiveOptions.locale,
7665
7669
  visitorId,
7666
7670
  showConversations: conversationsEnabled,
7667
7671
  onSelectConversation: onSelectConversationFromSidebar,