@goodhood-web/nebenan-base 1.3.0-development.54 → 1.3.0-development.55

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
@@ -7114,7 +7114,7 @@ const sg = "_sheet_q0ucw_106", rg = "_sheetWrapper_q0ucw_114", og = "_sheetHeade
7114
7114
  ), lg = "_root_16dcy_106", cg = "_textButton_16dcy_113", Za = {
7115
7115
  root: lg,
7116
7116
  textButton: cg
7117
- }, Qv = ({
7117
+ }, Xv = ({
7118
7118
  alt: n,
7119
7119
  ariaLabel: e,
7120
7120
  onClick: i,
@@ -7139,7 +7139,7 @@ const sg = "_sheet_q0ucw_106", rg = "_sheetWrapper_q0ucw_114", og = "_sheetHeade
7139
7139
  navBar: gg,
7140
7140
  mainContent: mg,
7141
7141
  sidebarRight: vg
7142
- }, Xv = ({ children: n, left: e, navbar: i, right: t }) => /* @__PURE__ */ _.jsxs("div", { className: Rn.container, children: [
7142
+ }, e3 = ({ children: n, left: e, navbar: i, right: t }) => /* @__PURE__ */ _.jsxs("div", { className: Rn.container, children: [
7143
7143
  /* @__PURE__ */ _.jsx("nav", { className: Rn.navBar, children: i }),
7144
7144
  e && /* @__PURE__ */ _.jsx("aside", { className: Rn.sidebarLeft, children: e }),
7145
7145
  /* @__PURE__ */ _.jsx("main", { className: Rn.mainContent, children: n }),
@@ -7149,7 +7149,7 @@ const sg = "_sheet_q0ucw_106", rg = "_sheetWrapper_q0ucw_114", og = "_sheetHeade
7149
7149
  "inputContainer--invalid": "_inputContainer--invalid_br99j_118",
7150
7150
  searchInput: pg,
7151
7151
  searchButton: wg
7152
- }, e3 = ({
7152
+ }, n3 = ({
7153
7153
  name: n,
7154
7154
  onSearchSubmit: e,
7155
7155
  placeholder: i,
@@ -7203,7 +7203,7 @@ const sg = "_sheet_q0ucw_106", rg = "_sheetWrapper_q0ucw_114", og = "_sheetHeade
7203
7203
  navbarWrapper: bg,
7204
7204
  navbar: _g,
7205
7205
  right: yg
7206
- }, n3 = ({ left: n, right: e }) => /* @__PURE__ */ _.jsx("div", { className: si.navbarWrapper, children: /* @__PURE__ */ _.jsxs("div", { className: si.navbar, children: [
7206
+ }, i3 = ({ left: n, right: e }) => /* @__PURE__ */ _.jsx("div", { className: si.navbarWrapper, children: /* @__PURE__ */ _.jsxs("div", { className: si.navbar, children: [
7207
7207
  /* @__PURE__ */ _.jsx("div", { className: si.left, children: n }),
7208
7208
  /* @__PURE__ */ _.jsx("div", { className: si.right, children: e })
7209
7209
  ] }) }), Fg = "Suchen", Sg = "Oh nein!", xg = "Das Emoji konnte nicht gefunden werden", Mg = "Wähle ein Emoji…", Cg = "Füge ein benutzerdefiniertes Emoji hinzu", Eg = {
@@ -49137,7 +49137,7 @@ const pm = "_emojiPopup_gz0mo_106", wm = "_emojiPopupHeader_gz0mo_116", vs = {
49137
49137
  emojis: _m,
49138
49138
  aliases: ym,
49139
49139
  sheet: Fm
49140
- }, i3 = ({ children: n, className: e, onSelect: i }) => {
49140
+ }, t3 = ({ children: n, className: e, onSelect: i }) => {
49141
49141
  const [t, a] = Te(null), s = (l) => {
49142
49142
  a(t ? null : l.currentTarget);
49143
49143
  }, r = !!t, f = r ? "emoji-cloud" : "", d = (l) => {
@@ -49171,7 +49171,7 @@ const pm = "_emojiPopup_gz0mo_106", wm = "_emojiPopupHeader_gz0mo_116", vs = {
49171
49171
  )
49172
49172
  ] }) }) })
49173
49173
  ] }) });
49174
- }, t3 = {
49174
+ }, a3 = {
49175
49175
  async initIfNeeded() {
49176
49176
  this.initialized || (await Un({ data: io }), this.initialized = !0);
49177
49177
  },
@@ -49215,7 +49215,7 @@ const pm = "_emojiPopup_gz0mo_106", wm = "_emojiPopupHeader_gz0mo_116", vs = {
49215
49215
  ] })
49216
49216
  ] }), Wm = "_loadingSpinnerContainer_17790_106", Km = {
49217
49217
  loadingSpinnerContainer: Wm
49218
- }, a3 = ({
49218
+ }, s3 = ({
49219
49219
  children: n,
49220
49220
  desktop: e,
49221
49221
  keepLoading: i,
@@ -49231,7 +49231,7 @@ const pm = "_emojiPopup_gz0mo_106", wm = "_emojiPopupHeader_gz0mo_116", vs = {
49231
49231
  menuLinkList: Om,
49232
49232
  menuLinkListItem: Nm
49233
49233
  };
49234
- function s3({
49234
+ function r3({
49235
49235
  className: n,
49236
49236
  items: e,
49237
49237
  type: i = "detail-medium"
@@ -49243,7 +49243,7 @@ const Im = "_mobileHeaderBar_1xzfq_106", Zm = "_typography_1xzfq_117", Um = "_ti
49243
49243
  typography: Zm,
49244
49244
  titleElement: Um,
49245
49245
  mobileHeaderBarIcon: qm
49246
- }, r3 = ({
49246
+ }, o3 = ({
49247
49247
  as: n,
49248
49248
  className: e,
49249
49249
  left: i,
@@ -49531,7 +49531,10 @@ const tv = "_reactionStack_1e1nt_106", av = "_multiline_1e1nt_110", sv = "_multi
49531
49531
  ]
49532
49532
  }
49533
49533
  );
49534
- }, Lv = ({
49534
+ }, Lv = (n) => n.slice().sort((e, i) => {
49535
+ const t = e.count ?? 0, a = i.count ?? 0;
49536
+ return t !== a ? a - t : e.reaction.localeCompare(i.reaction);
49537
+ }), $v = ({
49535
49538
  activeReaction: n,
49536
49539
  expanded: e = !1,
49537
49540
  onClick: i,
@@ -49539,9 +49542,9 @@ const tv = "_reactionStack_1e1nt_106", av = "_multiline_1e1nt_110", sv = "_multi
49539
49542
  size: a = "small",
49540
49543
  stack: s = !1
49541
49544
  }) => {
49542
- const r = (f) => {
49543
- i && i(f);
49544
- };
49545
+ const r = (d) => {
49546
+ i && i(d);
49547
+ }, f = s ? Lv(t) : t;
49545
49548
  return /* @__PURE__ */ _.jsx(
49546
49549
  "ul",
49547
49550
  {
@@ -49550,28 +49553,28 @@ const tv = "_reactionStack_1e1nt_106", av = "_multiline_1e1nt_110", sv = "_multi
49550
49553
  [di.multiline]: !s && t.length === 7,
49551
49554
  [di.multilineFull]: !s && t.length > 7
49552
49555
  }),
49553
- children: t.map(({ count: f, reaction: d, selected: c, tooltip: l }) => /* @__PURE__ */ _.jsx(
49556
+ children: f.map(({ count: d, reaction: c, selected: l, tooltip: h }) => /* @__PURE__ */ _.jsx(
49554
49557
  Bv,
49555
49558
  {
49556
- count: f,
49557
- reaction: d,
49558
- selected: c,
49559
+ count: d,
49560
+ reaction: c,
49561
+ selected: l,
49559
49562
  stack: s,
49560
49563
  size: a,
49561
49564
  expanded: e,
49562
49565
  onSelect: r,
49563
49566
  activeReaction: n,
49564
- tooltip: l
49567
+ tooltip: h
49565
49568
  },
49566
- d
49569
+ c
49567
49570
  ))
49568
49571
  }
49569
49572
  );
49570
- }, $v = "_wrapper_1aeus_106", Hv = "_button_1aeus_113", Av = "_hoveredItem_1aeus_118", li = {
49571
- wrapper: $v,
49572
- button: Hv,
49573
- hoveredItem: Av
49574
- }, o3 = ({
49573
+ }, Hv = "_wrapper_1aeus_106", Av = "_button_1aeus_113", Gv = "_hoveredItem_1aeus_118", li = {
49574
+ wrapper: Hv,
49575
+ button: Av,
49576
+ hoveredItem: Gv
49577
+ }, f3 = ({
49575
49578
  buttonContent: n,
49576
49579
  className: e = "",
49577
49580
  disabled: i = !1,
@@ -49658,7 +49661,7 @@ const tv = "_reactionStack_1e1nt_106", av = "_multiline_1e1nt_110", sv = "_multi
49658
49661
  onMouseOver: C,
49659
49662
  onMouseLeave: y,
49660
49663
  children: /* @__PURE__ */ _.jsx(
49661
- Lv,
49664
+ $v,
49662
49665
  {
49663
49666
  reactions: f,
49664
49667
  stack: !1,
@@ -49697,7 +49700,7 @@ var Tt = function(n, e) {
49697
49700
  t.hasOwnProperty(a) && (i[a] = t[a]);
49698
49701
  }, Tt(n, e);
49699
49702
  };
49700
- function Gv(n, e) {
49703
+ function jv(n, e) {
49701
49704
  Tt(n, e);
49702
49705
  function i() {
49703
49706
  this.constructor = n;
@@ -49714,7 +49717,7 @@ var Dn = function() {
49714
49717
  return e;
49715
49718
  }, Dn.apply(this, arguments);
49716
49719
  };
49717
- function jv(n, e, i, t) {
49720
+ function Vv(n, e, i, t) {
49718
49721
  var a, s = !1, r = 0;
49719
49722
  function f() {
49720
49723
  a && clearTimeout(a);
@@ -49756,10 +49759,10 @@ function _s(n) {
49756
49759
  value: parseFloat(n)
49757
49760
  } : (console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'), bs) : (console.warn("scrollThreshold should be string or number"), bs);
49758
49761
  }
49759
- var Vv = (
49762
+ var Dv = (
49760
49763
  /** @class */
49761
49764
  function(n) {
49762
- Gv(e, n);
49765
+ jv(e, n);
49763
49766
  function e(i) {
49764
49767
  var t = n.call(this, i) || this;
49765
49768
  return t.lastScrollTop = 0, t.actionTriggered = !1, t.startY = 0, t.currentY = 0, t.dragging = !1, t.maxPullDownDistance = 0, t.getScrollableTarget = function() {
@@ -49792,7 +49795,7 @@ var Vv = (
49792
49795
  showLoader: !1,
49793
49796
  pullToRefreshThresholdBreached: !1,
49794
49797
  prevDataLength: i.dataLength
49795
- }, t.throttledOnScrollListener = jv(150, t.onScrollListener).bind(t), t.onStart = t.onStart.bind(t), t.onMove = t.onMove.bind(t), t.onEnd = t.onEnd.bind(t), t;
49798
+ }, t.throttledOnScrollListener = Vv(150, t.onScrollListener).bind(t), t.onStart = t.onStart.bind(t), t.onMove = t.onMove.bind(t), t.onEnd = t.onEnd.bind(t), t;
49796
49799
  }
49797
49800
  return e.prototype.componentDidMount = function() {
49798
49801
  if (typeof this.props.dataLength > "u")
@@ -49849,20 +49852,20 @@ var Vv = (
49849
49852
  }, e;
49850
49853
  }(Ao)
49851
49854
  );
49852
- const Dv = () => "ontouchstart" in window, Wv = "_cardHeader_1x2jw_106", Kv = "_cardBody_1x2jw_117", Ov = "_tabsList_1x2jw_126", Nv = "_tab_1x2jw_126", Iv = "_selectedTab_1x2jw_164", Zv = "_tabPanel_1x2jw_173", Uv = "_profile_1x2jw_185", Ie = {
49853
- cardHeader: Wv,
49854
- cardBody: Kv,
49855
- tabsList: Ov,
49856
- tab: Nv,
49857
- selectedTab: Iv,
49858
- tabPanel: Zv,
49859
- profile: Uv
49860
- }, qv = (n, e, i) => ({
49855
+ const Wv = () => "ontouchstart" in window, Kv = "_cardHeader_1x2jw_106", Ov = "_cardBody_1x2jw_117", Nv = "_tabsList_1x2jw_126", Iv = "_tab_1x2jw_126", Zv = "_selectedTab_1x2jw_164", Uv = "_tabPanel_1x2jw_173", qv = "_profile_1x2jw_185", Ie = {
49856
+ cardHeader: Kv,
49857
+ cardBody: Ov,
49858
+ tabsList: Nv,
49859
+ tab: Iv,
49860
+ selectedTab: Zv,
49861
+ tabPanel: Uv,
49862
+ profile: qv
49863
+ }, Jv = (n, e, i) => ({
49861
49864
  id: n,
49862
49865
  object_type: "hood_message",
49863
49866
  page: e,
49864
49867
  reaction_type: i === "all" ? void 0 : i
49865
- }), f3 = ({
49868
+ }), d3 = ({
49866
49869
  closeText: n = "Schließen",
49867
49870
  getPicturePlaceholder: e,
49868
49871
  getReactions: i,
@@ -49873,7 +49876,7 @@ const Dv = () => "ontouchstart" in window, Wv = "_cardHeader_1x2jw_106", Kv = "_
49873
49876
  }) => {
49874
49877
  const [f, d] = Te(null), [c, l] = Te("all"), [h, u] = Te(1), [g, m] = Te([]), p = !f || !!f.next_page, b = vn(async () => {
49875
49878
  try {
49876
- const L = qv(s, h, c), G = await i(L);
49879
+ const L = Jv(s, h, c), G = await i(L);
49877
49880
  u(G.next_page || h), d(G), m((X) => [...X, ...G.users]);
49878
49881
  } catch (L) {
49879
49882
  console.error("Error fetching reactions:", L);
@@ -49893,7 +49896,7 @@ const Dv = () => "ontouchstart" in window, Wv = "_cardHeader_1x2jw_106", Kv = "_
49893
49896
  rh,
49894
49897
  {
49895
49898
  headline: t,
49896
- type: Dv() ? "h4" : "h3",
49899
+ type: Wv() ? "h4" : "h3",
49897
49900
  leftElement: /* @__PURE__ */ _.jsx(
49898
49901
  on,
49899
49902
  {
@@ -49934,7 +49937,7 @@ const Dv = () => "ontouchstart" in window, Wv = "_cardHeader_1x2jw_106", Kv = "_
49934
49937
  className: Ie.tabPanel,
49935
49938
  id: "reactionTabPanel",
49936
49939
  children: /* @__PURE__ */ _.jsx(
49937
- Vv,
49940
+ Dv,
49938
49941
  {
49939
49942
  dataLength: g.length,
49940
49943
  next: b,
@@ -49970,20 +49973,20 @@ const Dv = () => "ontouchstart" in window, Wv = "_cardHeader_1x2jw_106", Kv = "_
49970
49973
  );
49971
49974
  };
49972
49975
  export {
49973
- Qv as ContentCreatorTrigger,
49974
- Xv as DesktopLayout,
49975
- e3 as DesktopNavbarSearchField,
49976
- n3 as DesktopNavigationBar,
49977
- i3 as EmojiPicker,
49978
- t3 as EmojiSearch,
49976
+ Xv as ContentCreatorTrigger,
49977
+ e3 as DesktopLayout,
49978
+ n3 as DesktopNavbarSearchField,
49979
+ i3 as DesktopNavigationBar,
49980
+ t3 as EmojiPicker,
49981
+ a3 as EmojiSearch,
49979
49982
  Tm as LayoutLoadingSpinner,
49980
- a3 as MainLayout,
49981
- s3 as MenuLinkList,
49982
- r3 as MobileHeaderBar,
49983
+ s3 as MainLayout,
49984
+ r3 as MenuLinkList,
49985
+ o3 as MobileHeaderBar,
49983
49986
  Dm as MobileLayout,
49984
49987
  Xm as Profile,
49985
49988
  zv as ReactionPill,
49986
- o3 as ReactionSelection,
49987
- Lv as ReactionStack,
49988
- f3 as ReactionTabList
49989
+ f3 as ReactionSelection,
49990
+ $v as ReactionStack,
49991
+ d3 as ReactionTabList
49989
49992
  };
@@ -0,0 +1,3 @@
1
+ import { Reaction } from '../../index';
2
+
3
+ export declare const sortReactionsByCount: (reactions: Reaction[]) => Reaction[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/nebenan-base",
3
- "version": "1.3.0-development.54",
3
+ "version": "1.3.0-development.55",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "publishConfig": {