@phillips/seldon 1.146.2 → 1.147.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.
@@ -1,75 +1,75 @@
1
- import { jsxs as S, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as v, jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as V } from "react";
3
3
  import k from "../../node_modules/classnames/index.js";
4
4
  import { getCommonProps as q, findChildrenOfType as z, findChildrenExcludingTypes as F } from "../../utils/index.js";
5
5
  import G from "../DetailList/DetailList.js";
6
- import d from "../../components/Detail/Detail.js";
7
- import { LotStatus as n, SupportedLanguages as H } from "../../types/commonTypes.js";
6
+ import p from "../../components/Detail/Detail.js";
7
+ import { LotStatus as t, SupportedLanguages as H } from "../../types/commonTypes.js";
8
8
  import J from "../../components/Countdown/Countdown.js";
9
9
  import { CountdownVariants as K } from "../../components/Countdown/types.js";
10
10
  import { BidStatusEnum as Q } from "./types.js";
11
- import v from "./BidMessage.js";
12
- import { isAfter as L } from "../../node_modules/date-fns/isAfter.js";
11
+ import L from "./BidMessage.js";
12
+ import { isAfter as w } from "../../node_modules/date-fns/isAfter.js";
13
13
  import { differenceInMinutes as U } from "../../node_modules/date-fns/differenceInMinutes.js";
14
14
  const X = (o) => o === 1 ? `${o} bid` : `${o} bids`, Y = V(
15
15
  ({
16
- lotStatus: o = n.ready,
17
- bidStatus: p,
18
- bidsLabelText: w = X,
16
+ lotStatus: o = t.ready,
17
+ bidStatus: d,
18
+ bidsLabelText: C = X,
19
19
  children: c,
20
- className: C,
21
- closingText: T = "Closes in",
20
+ className: T,
21
+ closingText: x = "Closes in",
22
22
  currency: r = "$",
23
23
  currentBid: f,
24
- currentBidText: x = "Current bid",
25
- formatDurationStr: N = (a) => a.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
26
- lang: W = "en",
24
+ currentBidText: N = "Current bid",
25
+ formatDurationStr: W = (a) => a.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
26
+ lang: y = "en",
27
27
  saleCloseDate: i,
28
28
  lotCloseDate: l,
29
29
  numberOfBids: u = 0,
30
- startingBid: y,
30
+ startingBid: h,
31
31
  startingBidText: B = "Starting bid",
32
- soldPrice: h,
32
+ soldPrice: $,
33
33
  soldForText: M = "Sold for",
34
34
  wonForText: j = "Won for",
35
35
  currentDateTime: E = /* @__PURE__ */ new Date(),
36
- ...$
36
+ ...b
37
37
  }, P) => {
38
- const { className: a, ...R } = q($, "BidSnapshot"), m = f !== null && u > 0, b = o === n.ready, s = o === n.live, g = o === n.past, e = E, _ = s && l && L(l, e) && i && (U(i, e) < 60 || L(e, i)), A = z(c, v), D = F(c, [v]), I = k(a, C, {
38
+ const { className: a, ...R } = q(b, "BidSnapshot"), m = f !== null && u > 0, g = o === t.ready, s = o === t.live, S = o === t.past, e = E, _ = s && l && w(l, e) && i && (U(i, e) < 60 || w(e, i)), A = z(c, L), D = F(c, [L]), I = k(a, T, {
39
39
  [`${a}--live`]: s,
40
- [`${a}--has-bids`]: m || g
40
+ [`${a}--has-bids`]: m || S
41
41
  });
42
- return /* @__PURE__ */ S("div", { ...R, ...$, ref: P, className: I, children: [
43
- /* @__PURE__ */ S(G, { hasSeparators: !0, className: `${a}__text`, children: [
44
- g ? /* @__PURE__ */ t(
45
- d,
42
+ return /* @__PURE__ */ v("div", { ...R, ...b, ref: P, className: I, children: [
43
+ /* @__PURE__ */ v(G, { hasSeparators: !0, className: `${a}__text`, children: [
44
+ S ? /* @__PURE__ */ n(
45
+ p,
46
46
  {
47
- label: p === Q.Won ? j : M,
48
- value: h ? `${r}${h?.toLocaleString()}` : "",
47
+ label: d === Q.Won ? j : M,
48
+ value: $ ? `${r}${$?.toLocaleString()}` : "",
49
49
  hasWrap: !1
50
50
  }
51
51
  ) : null,
52
- s && m ? /* @__PURE__ */ t(
53
- d,
52
+ s && m ? /* @__PURE__ */ n(
53
+ p,
54
54
  {
55
- label: x,
56
- subLabel: `(${w(u)})`,
55
+ label: N,
56
+ subLabel: `(${C(u)})`,
57
57
  value: `${r}${f?.toLocaleString()}`,
58
58
  hasWrap: !1
59
59
  }
60
60
  ) : null,
61
- b || s && !m ? /* @__PURE__ */ t(d, { label: B, value: `${r}${y?.toLocaleString()}`, hasWrap: !1 }) : null
61
+ h && (g || s && !m) ? /* @__PURE__ */ n(p, { label: B, value: `${r}${h?.toLocaleString()}`, hasWrap: !1 }) : null
62
62
  ] }),
63
- p && !b ? A : null,
63
+ d && !g ? A : null,
64
64
  D,
65
- _ ? /* @__PURE__ */ t(
65
+ _ ? /* @__PURE__ */ n(
66
66
  J,
67
67
  {
68
68
  endDateTime: l,
69
- label: T,
69
+ label: x,
70
70
  variant: K.compact,
71
- locale: H[W],
72
- formatDurationStr: N,
71
+ locale: H[y],
72
+ formatDurationStr: W,
73
73
  showBottomBorder: !1,
74
74
  currentDateTime: e
75
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.146.2",
3
+ "version": "1.147.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"