@phillips/seldon 1.98.0 → 1.98.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.
|
@@ -54,6 +54,10 @@ export interface BidSnapshotProps extends ComponentProps<'div'> {
|
|
|
54
54
|
* Starting bid text, a string for label of starting bid detail
|
|
55
55
|
*/
|
|
56
56
|
startingBidText?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Sold For amount
|
|
59
|
+
* */
|
|
60
|
+
soldPrice?: number;
|
|
57
61
|
/**
|
|
58
62
|
* Sold for label text, a string for label of sold for detail
|
|
59
63
|
*/
|
|
@@ -1,67 +1,76 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as u, jsx as t } 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 A } from "../../utils/index.js";
|
|
5
5
|
import F from "../DetailList/DetailList.js";
|
|
6
|
-
import
|
|
7
|
-
import { LotStatus as
|
|
8
|
-
import
|
|
9
|
-
import { CountdownVariants as
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
const K = (o) => o === 1 ? `${o} bid` : `${o} bids`, Q = V(
|
|
6
|
+
import p from "../../components/Detail/Detail.js";
|
|
7
|
+
import { LotStatus as m, SupportedLanguages as G } from "../../types/commonTypes.js";
|
|
8
|
+
import H from "../../components/Countdown/Countdown.js";
|
|
9
|
+
import { CountdownVariants as I } from "../../components/Countdown/types.js";
|
|
10
|
+
import C from "./BidMessage.js";
|
|
11
|
+
const J = (a) => a === 1 ? `${a} bid` : `${a} bids`, K = V(
|
|
13
12
|
({
|
|
14
|
-
lotStatus:
|
|
15
|
-
bidStatus:
|
|
16
|
-
bidsLabelText:
|
|
17
|
-
children:
|
|
18
|
-
className:
|
|
19
|
-
closingText:
|
|
20
|
-
currency:
|
|
21
|
-
currentBid:
|
|
22
|
-
currentBidText:
|
|
23
|
-
formatDurationStr:
|
|
24
|
-
lang:
|
|
13
|
+
lotStatus: a = m.ready,
|
|
14
|
+
bidStatus: f,
|
|
15
|
+
bidsLabelText: v = J,
|
|
16
|
+
children: c,
|
|
17
|
+
className: L,
|
|
18
|
+
closingText: S = "Closes in",
|
|
19
|
+
currency: i = "$",
|
|
20
|
+
currentBid: s,
|
|
21
|
+
currentBidText: g = "Current bid",
|
|
22
|
+
formatDurationStr: x = (o) => o.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
|
|
23
|
+
lang: N = "en",
|
|
25
24
|
lotCloseDate: d,
|
|
26
|
-
numberOfBids:
|
|
27
|
-
startingBid:
|
|
28
|
-
startingBidText:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
numberOfBids: h = 0,
|
|
26
|
+
startingBid: r,
|
|
27
|
+
startingBidText: T = "Starting bid",
|
|
28
|
+
soldPrice: e,
|
|
29
|
+
soldForText: w = "Sold for",
|
|
30
|
+
wonForText: y = "Won for",
|
|
31
|
+
...$
|
|
32
32
|
}, W) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
[`${
|
|
36
|
-
[`${s}--has-bids`]: n
|
|
33
|
+
const { className: o, ...j } = q($, "BidSnapshot"), l = s !== null && h > 0, b = a === m.ready, n = a === m.live, D = a === m.past, M = n && d, R = z(c, C), _ = A(c, [C]), E = k(o, L, {
|
|
34
|
+
[`${o}--live`]: n,
|
|
35
|
+
[`${o}--has-bids`]: l
|
|
37
36
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
return /* @__PURE__ */ u("div", { ...j, ...$, ref: W, className: E, children: [
|
|
38
|
+
/* @__PURE__ */ u(F, { hasSeparators: !0, className: `${o}__text`, children: [
|
|
39
|
+
D && l && e ? /* @__PURE__ */ t(
|
|
40
|
+
p,
|
|
41
|
+
{
|
|
42
|
+
label: f ? y : w,
|
|
43
|
+
value: `${i}${e == null ? void 0 : e.toLocaleString()}`,
|
|
44
|
+
hasWrap: !1
|
|
45
|
+
}
|
|
46
|
+
) : null,
|
|
47
|
+
n && l ? /* @__PURE__ */ t(
|
|
48
|
+
p,
|
|
49
|
+
{
|
|
50
|
+
label: g,
|
|
51
|
+
subLabel: `(${v(h)})`,
|
|
52
|
+
value: `${i}${s == null ? void 0 : s.toLocaleString()}`,
|
|
53
|
+
hasWrap: !1
|
|
54
|
+
}
|
|
55
|
+
) : null,
|
|
56
|
+
b || n && !l ? /* @__PURE__ */ t(p, { label: T, value: `${i}${r == null ? void 0 : r.toLocaleString()}`, hasWrap: !1 }) : null
|
|
57
|
+
] }),
|
|
58
|
+
f && !b ? R : null,
|
|
59
|
+
_,
|
|
60
|
+
M ? /* @__PURE__ */ t(
|
|
61
|
+
H,
|
|
53
62
|
{
|
|
54
63
|
endDateTime: d,
|
|
55
|
-
label:
|
|
56
|
-
variant:
|
|
57
|
-
locale:
|
|
58
|
-
formatDurationStr:
|
|
64
|
+
label: S,
|
|
65
|
+
variant: I.compact,
|
|
66
|
+
locale: G[N],
|
|
67
|
+
formatDurationStr: x
|
|
59
68
|
}
|
|
60
69
|
) : null
|
|
61
70
|
] });
|
|
62
71
|
}
|
|
63
72
|
);
|
|
64
|
-
|
|
73
|
+
K.displayName = "BidSnapshot";
|
|
65
74
|
export {
|
|
66
|
-
|
|
75
|
+
K as default
|
|
67
76
|
};
|
|
@@ -24,6 +24,7 @@ export declare const Playground: {
|
|
|
24
24
|
lotCloseDate: Date;
|
|
25
25
|
lang: import('date-fns').Locale;
|
|
26
26
|
startingBid: number;
|
|
27
|
+
soldPrice: number;
|
|
27
28
|
};
|
|
28
29
|
argTypes: {
|
|
29
30
|
bidStatus: {
|
|
@@ -32,5 +33,11 @@ export declare const Playground: {
|
|
|
32
33
|
type: string;
|
|
33
34
|
};
|
|
34
35
|
};
|
|
36
|
+
auctionStatus: {
|
|
37
|
+
options: typeof LotStatus;
|
|
38
|
+
control: {
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
35
42
|
};
|
|
36
43
|
};
|