@phillips/seldon 1.118.2 → 1.120.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/dist/_virtual/_commonjsHelpers.js +1 -1
- package/dist/components/Accordion/Accordion.js +18 -18
- package/dist/components/Accordion/AccordionItem.js +67 -68
- package/dist/components/Carousel/Carousel.js +49 -51
- package/dist/components/Carousel/CarouselDots.js +46 -47
- package/dist/components/ContentPeek/ContentPeek.js +47 -47
- package/dist/components/ErrorBoundary/ErrorBoundary.js +11 -12
- package/dist/components/Filter/Filter.js +40 -41
- package/dist/components/Filter/FilterHeader.js +24 -24
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +21 -20
- package/dist/components/Input/Input.stories.d.ts +7 -0
- package/dist/components/Link/utils.js +2 -2
- package/dist/components/LinkBlock/LinkBlock.js +12 -13
- package/dist/components/LinkList/LinkList.js +8 -11
- package/dist/components/Navigation/Navigation.js +21 -22
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +49 -50
- package/dist/components/Navigation/NavigationList/NavigationList.js +33 -35
- package/dist/components/Pagination/Pagination.js +7 -7
- package/dist/components/Pagination/utils.js +1 -1
- package/dist/components/PinchZoom/PinchZoom.js +40 -43
- package/dist/components/Search/Search.js +93 -96
- package/dist/components/Search/SearchButton.js +19 -19
- package/dist/components/SeldonImage/SeldonImage.js +1 -1
- package/dist/components/Select/Select.js +22 -14
- package/dist/components/Select/Select.stories.d.ts +15 -0
- package/dist/components/Tabs/TabTrigger.js +13 -13
- package/dist/node_modules/@artsy/fresnel/dist/Breakpoints.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/DynamicResponsive.js +1 -1
- package/dist/node_modules/@artsy/fresnel/dist/Interactions.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/Media.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/MediaQueries.js +1 -1
- package/dist/node_modules/@artsy/fresnel/dist/Utils.js +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +2 -2
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +2 -2
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +63 -67
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +35 -35
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +80 -84
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +43 -45
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +10 -10
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +113 -115
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +33 -37
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +423 -440
- package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +28 -28
- package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +62 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +39 -41
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +7 -10
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +1 -1
- package/dist/node_modules/change-case/dist/index.js +41 -44
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
- package/dist/node_modules/date-fns/differenceInDays.js +9 -9
- package/dist/node_modules/date-fns/differenceInHours.js +11 -11
- package/dist/node_modules/date-fns/differenceInMinutes.js +8 -8
- package/dist/node_modules/date-fns/differenceInSeconds.js +7 -7
- package/dist/node_modules/date-fns/formatDuration.js +11 -12
- package/dist/node_modules/date-fns/isSameWeek.js +8 -8
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +5 -5
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/localize.js +10 -10
- package/dist/node_modules/date-fns/startOfDay.js +6 -6
- package/dist/node_modules/date-fns/startOfWeek.js +7 -8
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1 -1
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +1 -1
- package/dist/node_modules/exenv/index.js +2 -2
- package/dist/node_modules/get-nonce/dist/es2015/index.js +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js +2 -2
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +3 -3
- package/dist/node_modules/react-intersection-observer/dist/index.js +2 -2
- package/dist/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js +1 -1
- package/dist/node_modules/react-modal/lib/components/ModalPortal.js +1 -1
- package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +28 -28
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +34 -32
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +1 -1
- package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
- package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +14 -14
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -1
- package/dist/node_modules/usehooks-ts/dist/index.js +1 -1
- package/dist/node_modules/warning/warning.js +1 -1
- package/dist/node_modules/wheel-gestures/dist/wheel-gestures.esm.js +1 -1
- package/dist/patterns/BidSnapshot/BidSnapshot.js +58 -58
- package/dist/patterns/DetailList/DetailList.js +22 -22
- package/dist/patterns/FilterMenu/FilterMenu.js +15 -15
- package/dist/patterns/LanguageSelector/LanguageSelector.js +23 -23
- package/dist/patterns/LanguageSelector/utils.js +2 -5
- package/dist/patterns/ObjectTile/ObjectTile.js +46 -46
- package/dist/patterns/ViewingsList/StatefulViewingsList.js +16 -16
- package/dist/patterns/ViewingsList/ViewingsList.js +42 -42
- package/dist/patterns/ViewingsList/ViewingsListCard.js +122 -123
- package/dist/patterns/ViewingsList/ViewingsListCardForm.js +170 -170
- package/dist/scss/components/Search/SearchResults/_searchResults.scss +8 -0
- package/dist/site-furniture/Header/Header.js +32 -32
- package/package.json +3 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -64
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/tslib/tslib.es6.js +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsxs as s, jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import { getCommonProps as
|
|
1
|
+
import { jsxs as s, jsx as a, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { memo as O, forwardRef as z } from "react";
|
|
3
|
+
import B from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { getCommonProps as F } from "../../utils/index.js";
|
|
5
5
|
import { TextVariants as l } from "../../components/Text/types.js";
|
|
6
6
|
import i from "../../components/Text/Text.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
|
|
7
|
+
import I from "../DetailList/DetailList.js";
|
|
8
|
+
import L from "../../components/Detail/Detail.js";
|
|
9
|
+
import R from "../../components/SeldonImage/SeldonImage.js";
|
|
10
|
+
const V = O(
|
|
11
|
+
z(
|
|
12
12
|
({
|
|
13
|
-
badgeText:
|
|
14
|
-
className:
|
|
15
|
-
children:
|
|
16
|
-
element:
|
|
13
|
+
badgeText: p,
|
|
14
|
+
className: f,
|
|
15
|
+
children: $,
|
|
16
|
+
element: N,
|
|
17
17
|
estimate: n,
|
|
18
18
|
estimateLabelText: g = "Estimate",
|
|
19
19
|
estimateOnRequestText: m,
|
|
20
|
-
favoriteElement:
|
|
20
|
+
favoriteElement: r,
|
|
21
21
|
imageAlt: u = "Brought to you by Phillips",
|
|
22
22
|
imageUrl: b = "",
|
|
23
23
|
imageSrcSet: v,
|
|
@@ -25,21 +25,21 @@ const W = z(
|
|
|
25
25
|
imageLoading: k,
|
|
26
26
|
imageFetchPriority: y,
|
|
27
27
|
lotNumber: P,
|
|
28
|
-
makerText:
|
|
29
|
-
modelText:
|
|
30
|
-
referenceNumber:
|
|
31
|
-
titleText:
|
|
28
|
+
makerText: o,
|
|
29
|
+
modelText: c,
|
|
30
|
+
referenceNumber: _,
|
|
31
|
+
titleText: d,
|
|
32
32
|
withdrawnText: t,
|
|
33
|
-
...
|
|
33
|
+
...h
|
|
34
34
|
}, S) => {
|
|
35
|
-
const { className:
|
|
36
|
-
return /* @__PURE__ */ s(x, { ...C, className:
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
35
|
+
const { className: e, ...C } = F(h, "ObjectTile"), x = N ?? "a", D = n || m;
|
|
36
|
+
return /* @__PURE__ */ s(x, { ...C, className: B(e, f), ...h, ref: S, children: [
|
|
37
|
+
/* @__PURE__ */ a(
|
|
38
|
+
R,
|
|
39
39
|
{
|
|
40
40
|
alt: u,
|
|
41
41
|
aspectRatio: "1/1",
|
|
42
|
-
className: `${
|
|
42
|
+
className: `${e}__img`,
|
|
43
43
|
objectFit: "contain",
|
|
44
44
|
src: b,
|
|
45
45
|
srcSet: v,
|
|
@@ -48,58 +48,58 @@ const W = z(
|
|
|
48
48
|
fetchPriority: y
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
t ? null : /* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */ s("div", { className: `${
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
|
|
51
|
+
t ? null : /* @__PURE__ */ a(i, { className: `${e}__badge`, variant: l.badge, children: p }),
|
|
52
|
+
/* @__PURE__ */ s("div", { className: `${e}__lot-number-like`, children: [
|
|
53
|
+
/* @__PURE__ */ a(i, { className: `${e}__lot-number`, variant: l.heading3, element: "p", children: P }),
|
|
54
|
+
r && /* @__PURE__ */ a(r, {})
|
|
55
55
|
] }),
|
|
56
|
-
t ? /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */ s("div", { className: `${
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
t ? /* @__PURE__ */ a(i, { className: `${e}__withdrawn`, variant: l.heading4, children: t }) : /* @__PURE__ */ s(E, { children: [
|
|
57
|
+
/* @__PURE__ */ s("div", { className: `${e}__meta`, children: [
|
|
58
|
+
o ? /* @__PURE__ */ a(i, { className: `${e}__maker`, variant: l.heading3, children: o }) : null,
|
|
59
|
+
d ? /* @__PURE__ */ a(
|
|
60
60
|
i,
|
|
61
61
|
{
|
|
62
|
-
className: `${
|
|
62
|
+
className: `${e}__title ${e}__token-fix`,
|
|
63
63
|
variant: l.heading4,
|
|
64
64
|
element: "cite",
|
|
65
|
-
children:
|
|
65
|
+
children: d
|
|
66
66
|
}
|
|
67
67
|
) : null,
|
|
68
|
-
|
|
68
|
+
_ ? /* @__PURE__ */ a(
|
|
69
69
|
i,
|
|
70
70
|
{
|
|
71
|
-
className: `${
|
|
71
|
+
className: `${e}__reference-number ${e}__token-fix`,
|
|
72
72
|
variant: l.heading4,
|
|
73
73
|
element: "p",
|
|
74
|
-
children:
|
|
74
|
+
children: _
|
|
75
75
|
}
|
|
76
76
|
) : null,
|
|
77
|
-
|
|
77
|
+
c ? /* @__PURE__ */ a(
|
|
78
78
|
i,
|
|
79
79
|
{
|
|
80
|
-
className: `${
|
|
80
|
+
className: `${e}__model ${e}__token-fix`,
|
|
81
81
|
variant: l.heading4,
|
|
82
82
|
element: "p",
|
|
83
|
-
children:
|
|
83
|
+
children: c
|
|
84
84
|
}
|
|
85
85
|
) : null
|
|
86
86
|
] }),
|
|
87
|
-
D ? /* @__PURE__ */
|
|
88
|
-
|
|
87
|
+
D ? /* @__PURE__ */ a(I, { hasSeparators: !0, className: `${e}__estimate ${e}__section`, children: /* @__PURE__ */ a(
|
|
88
|
+
L,
|
|
89
89
|
{
|
|
90
|
-
className: `${
|
|
90
|
+
className: `${e}__estimate__label`,
|
|
91
91
|
label: g,
|
|
92
92
|
value: n || m,
|
|
93
93
|
hasWrap: !1
|
|
94
94
|
}
|
|
95
95
|
) }) : null,
|
|
96
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ a("div", { className: `${e}__section`, children: $ })
|
|
97
97
|
] })
|
|
98
98
|
] });
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
);
|
|
102
|
-
|
|
102
|
+
V.displayName = "ObjectTile";
|
|
103
103
|
export {
|
|
104
|
-
|
|
104
|
+
V as default
|
|
105
105
|
};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import * as u from "react";
|
|
3
3
|
import c from "./ViewingsList.js";
|
|
4
|
-
const
|
|
4
|
+
const v = ({
|
|
5
5
|
defaultViewing: o,
|
|
6
|
-
i18n:
|
|
7
|
-
validate:
|
|
6
|
+
i18n: i,
|
|
7
|
+
validate: s = () => {
|
|
8
8
|
},
|
|
9
|
-
onDelete:
|
|
9
|
+
onDelete: r = () => {
|
|
10
10
|
},
|
|
11
|
-
onSave:
|
|
12
|
-
...
|
|
11
|
+
onSave: d,
|
|
12
|
+
...a
|
|
13
13
|
}) => {
|
|
14
|
-
const [
|
|
14
|
+
const [l, n] = u.useState(o);
|
|
15
15
|
return /* @__PURE__ */ m(
|
|
16
16
|
c,
|
|
17
17
|
{
|
|
18
|
-
...
|
|
19
|
-
i18n:
|
|
20
|
-
viewings:
|
|
21
|
-
onDelete: (
|
|
22
|
-
n((
|
|
18
|
+
...a,
|
|
19
|
+
i18n: i,
|
|
20
|
+
viewings: l,
|
|
21
|
+
onDelete: (e) => {
|
|
22
|
+
n((t) => t?.filter((f) => f.id !== e)), r(e);
|
|
23
23
|
},
|
|
24
|
-
onAdd: (
|
|
25
|
-
n((
|
|
24
|
+
onAdd: (e) => {
|
|
25
|
+
n((t) => t ? [...t, { id: e }] : [{ id: e }]);
|
|
26
26
|
},
|
|
27
|
-
onSave: (
|
|
27
|
+
onSave: (e) => d(e, n, s)
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
v as default
|
|
33
33
|
};
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { createElement as
|
|
4
|
-
import
|
|
5
|
-
import { getCommonProps as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
cardTitle:
|
|
10
|
-
className:
|
|
11
|
-
i18n:
|
|
12
|
-
onAdd:
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { createElement as b } from "react";
|
|
4
|
+
import g from "../../node_modules/classnames/index.js";
|
|
5
|
+
import { getCommonProps as k } from "../../utils/index.js";
|
|
6
|
+
import x from "./ViewingsListCard.js";
|
|
7
|
+
import B from "../../components/Button/Button.js";
|
|
8
|
+
const S = () => Math.floor(Math.random() * 100) + Date.now(), A = ({
|
|
9
|
+
cardTitle: V = "Viewing Details",
|
|
10
|
+
className: $,
|
|
11
|
+
i18n: r = {},
|
|
12
|
+
onAdd: f,
|
|
13
13
|
onDelete: e,
|
|
14
|
-
onSave:
|
|
15
|
-
title:
|
|
16
|
-
viewings:
|
|
17
|
-
...
|
|
14
|
+
onSave: w,
|
|
15
|
+
title: C,
|
|
16
|
+
viewings: d,
|
|
17
|
+
...c
|
|
18
18
|
}) => {
|
|
19
|
-
const [
|
|
20
|
-
|
|
21
|
-
h(
|
|
22
|
-
}, [
|
|
23
|
-
const { addViewingsBtnLabel:
|
|
24
|
-
const t = `${
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
typeof
|
|
19
|
+
const [i, h] = o.useState(d), [l, n] = o.useState(""), [s, u] = o.useState(), { className: p, ...E } = k(c, "ViewingsList");
|
|
20
|
+
o.useEffect(() => {
|
|
21
|
+
h(d);
|
|
22
|
+
}, [d]);
|
|
23
|
+
const { addViewingsBtnLabel: L = "ADD VIEWINGS" } = r, N = () => {
|
|
24
|
+
const t = `${S()}${i ? "-" + i.length : ""}`;
|
|
25
|
+
n(t), u(t), f && f(t);
|
|
26
|
+
}, O = (t) => {
|
|
27
|
+
n(""), typeof e == "function" && e(t);
|
|
28
|
+
}, v = (t) => {
|
|
29
|
+
n(t), u(i?.find((a) => a.id === t));
|
|
30
|
+
}, D = (t) => {
|
|
31
|
+
w(t) && n("");
|
|
32
|
+
}, y = () => {
|
|
33
|
+
typeof s == "string" ? typeof e == "function" && e(s) : l === s?.id && h((t) => t?.map((a) => a.id === s.id ? s : a)), n("");
|
|
34
34
|
};
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
|
|
35
|
+
return /* @__PURE__ */ b("div", { ...E, className: g(p, $), key: l, ...c }, /* @__PURE__ */ m("h2", { className: g(`${p}__title`), children: C }), i?.map((t, a) => /* @__PURE__ */ m(
|
|
36
|
+
x,
|
|
37
37
|
{
|
|
38
38
|
...t,
|
|
39
|
-
...
|
|
40
|
-
cardTitle: t.location ? `${
|
|
41
|
-
isEditState:
|
|
42
|
-
onCancel:
|
|
43
|
-
onDelete:
|
|
44
|
-
onEdit: () =>
|
|
45
|
-
onSave:
|
|
39
|
+
...r,
|
|
40
|
+
cardTitle: t.location ? `${V} ${a + 1}` : void 0,
|
|
41
|
+
isEditState: l === t.id,
|
|
42
|
+
onCancel: y,
|
|
43
|
+
onDelete: O,
|
|
44
|
+
onEdit: () => v(t.id),
|
|
45
|
+
onSave: D
|
|
46
46
|
},
|
|
47
47
|
`${t.id}`
|
|
48
|
-
)), /* @__PURE__ */
|
|
48
|
+
)), /* @__PURE__ */ m(B, { id: `viewings-list-add-btn-${c.id || S()}`, onClick: N, children: L }));
|
|
49
49
|
};
|
|
50
50
|
export {
|
|
51
|
-
|
|
51
|
+
A as default
|
|
52
52
|
};
|
|
@@ -1,167 +1,166 @@
|
|
|
1
|
-
import { jsxs as f, jsx as t, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { px as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { ButtonVariants as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
address1:
|
|
11
|
-
address1Label:
|
|
12
|
-
addressUrl:
|
|
13
|
-
addressUrlLabel:
|
|
14
|
-
address2:
|
|
15
|
-
address2Label:
|
|
16
|
-
address3:
|
|
17
|
-
address3Label:
|
|
18
|
-
cancelBtnLabel:
|
|
19
|
-
cardTitle:
|
|
20
|
-
deleteBtnLabel:
|
|
21
|
-
editBtnLabel:
|
|
22
|
-
isEditState:
|
|
1
|
+
import { jsxs as f, jsx as t, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import ut from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { px as c } from "../../utils/index.js";
|
|
5
|
+
import v from "../../components/Input/Input.js";
|
|
6
|
+
import o from "../../components/Button/Button.js";
|
|
7
|
+
import { ButtonVariants as r } from "../../components/Button/types.js";
|
|
8
|
+
import ft from "./ViewingsListCardForm.js";
|
|
9
|
+
const s = `${c}-viewings-list-card`, Et = ({
|
|
10
|
+
address1: E,
|
|
11
|
+
address1Label: $,
|
|
12
|
+
addressUrl: y,
|
|
13
|
+
addressUrlLabel: C,
|
|
14
|
+
address2: O,
|
|
15
|
+
address2Label: w,
|
|
16
|
+
address3: x,
|
|
17
|
+
address3Label: A,
|
|
18
|
+
cancelBtnLabel: L = "CANCEL",
|
|
19
|
+
cardTitle: T = "Add New Viewing",
|
|
20
|
+
deleteBtnLabel: V = "DELETE",
|
|
21
|
+
editBtnLabel: _ = "EDIT",
|
|
22
|
+
isEditState: n,
|
|
23
23
|
enableOnSite: m = "false",
|
|
24
|
-
enableOnSiteToggleLabel:
|
|
25
|
-
email:
|
|
26
|
-
emailLabel:
|
|
27
|
-
emailLink:
|
|
28
|
-
emailLinkLabel:
|
|
29
|
-
emailOn:
|
|
30
|
-
emailToggleLabel:
|
|
24
|
+
enableOnSiteToggleLabel: k = "Enabled on website",
|
|
25
|
+
email: I,
|
|
26
|
+
emailLabel: N = "Email",
|
|
27
|
+
emailLink: S,
|
|
28
|
+
emailLinkLabel: j = "Email Address",
|
|
29
|
+
emailOn: z = "false",
|
|
30
|
+
emailToggleLabel: B = "Include Email Address",
|
|
31
31
|
id: e,
|
|
32
|
-
invalidFields:
|
|
33
|
-
location:
|
|
34
|
-
locationLabel:
|
|
35
|
-
onCancel:
|
|
36
|
-
onEdit:
|
|
37
|
-
onDelete:
|
|
38
|
-
onSave:
|
|
39
|
-
previewDates:
|
|
40
|
-
previewDatesLabel:
|
|
41
|
-
previewHours1:
|
|
42
|
-
previewHours1Label:
|
|
43
|
-
previewHours2:
|
|
44
|
-
previewHours2Label:
|
|
45
|
-
previewLabel:
|
|
46
|
-
previewLabelValue:
|
|
47
|
-
previewOn:
|
|
48
|
-
previewToggleLabel:
|
|
49
|
-
saveBtnLabel:
|
|
50
|
-
viewingLabel:
|
|
51
|
-
viewingLabelValue:
|
|
52
|
-
viewingDates:
|
|
53
|
-
viewingDatesLabel:
|
|
54
|
-
viewingHours1:
|
|
55
|
-
viewingHours1Label:
|
|
56
|
-
viewingHours2:
|
|
32
|
+
invalidFields: i,
|
|
33
|
+
location: D,
|
|
34
|
+
locationLabel: R = "Location",
|
|
35
|
+
onCancel: d,
|
|
36
|
+
onEdit: p,
|
|
37
|
+
onDelete: h,
|
|
38
|
+
onSave: b,
|
|
39
|
+
previewDates: q,
|
|
40
|
+
previewDatesLabel: G,
|
|
41
|
+
previewHours1: H,
|
|
42
|
+
previewHours1Label: J,
|
|
43
|
+
previewHours2: K,
|
|
44
|
+
previewHours2Label: M,
|
|
45
|
+
previewLabel: P,
|
|
46
|
+
previewLabelValue: Q,
|
|
47
|
+
previewOn: U,
|
|
48
|
+
previewToggleLabel: W,
|
|
49
|
+
saveBtnLabel: X = "SAVE DETAILS",
|
|
50
|
+
viewingLabel: Y,
|
|
51
|
+
viewingLabelValue: Z,
|
|
52
|
+
viewingDates: F,
|
|
53
|
+
viewingDatesLabel: tt,
|
|
54
|
+
viewingHours1: et,
|
|
55
|
+
viewingHours1Label: nt,
|
|
56
|
+
viewingHours2: it,
|
|
57
57
|
viewingHours2Label: at
|
|
58
58
|
}) => {
|
|
59
|
-
const [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}, [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
const [lt, ot] = l.useState(m === "true"), a = l.useRef(null);
|
|
60
|
+
l.useEffect(() => {
|
|
61
|
+
n && a.current && a.current.focus();
|
|
62
|
+
}, [n]), l.useEffect(() => {
|
|
63
|
+
i && a.current && a.current.closest(`.${c}-viewings-list-card`)?.querySelector(`.${c}-input--invalid input`)?.focus();
|
|
64
|
+
}, [i]);
|
|
65
|
+
const rt = () => {
|
|
66
|
+
typeof d == "function" && d();
|
|
67
|
+
}, st = () => {
|
|
67
68
|
typeof p == "function" && p();
|
|
68
|
-
},
|
|
69
|
-
typeof
|
|
70
|
-
}, it = (r) => {
|
|
71
|
-
typeof g == "function" && g(r);
|
|
69
|
+
}, ct = (u) => {
|
|
70
|
+
typeof b == "function" && b(u);
|
|
72
71
|
};
|
|
73
72
|
return /* @__PURE__ */ f(
|
|
74
73
|
"section",
|
|
75
74
|
{
|
|
76
75
|
"data-testid": `viewings-list-card-${e}`,
|
|
77
76
|
id: e,
|
|
78
|
-
className:
|
|
77
|
+
className: ut(`${s}`, { [`${s}--edit-state`]: n }),
|
|
79
78
|
children: [
|
|
80
|
-
/* @__PURE__ */ t("h3", { className: `${
|
|
79
|
+
/* @__PURE__ */ t("h3", { className: `${s}__title`, children: T }),
|
|
81
80
|
/* @__PURE__ */ t("input", { type: "hidden", name: "id", value: e }),
|
|
82
81
|
/* @__PURE__ */ t(
|
|
83
|
-
|
|
82
|
+
v,
|
|
84
83
|
{
|
|
85
84
|
ref: a,
|
|
86
85
|
id: `location-${e}`,
|
|
87
|
-
defaultValue:
|
|
88
|
-
labelText:
|
|
86
|
+
defaultValue: D,
|
|
87
|
+
labelText: R,
|
|
89
88
|
size: "sm",
|
|
90
89
|
name: "location",
|
|
91
|
-
invalid: !!
|
|
92
|
-
invalidText:
|
|
93
|
-
readOnly: !
|
|
90
|
+
invalid: !!i?.location,
|
|
91
|
+
invalidText: i?.location,
|
|
92
|
+
readOnly: !n
|
|
94
93
|
}
|
|
95
94
|
),
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
n ? /* @__PURE__ */ t(
|
|
96
|
+
ft,
|
|
98
97
|
{
|
|
99
|
-
address1:
|
|
100
|
-
address1Label:
|
|
101
|
-
addressUrl:
|
|
102
|
-
addressUrlLabel:
|
|
103
|
-
address2:
|
|
104
|
-
address2Label:
|
|
105
|
-
address3:
|
|
106
|
-
address3Label:
|
|
107
|
-
email:
|
|
108
|
-
emailLabel:
|
|
109
|
-
emailLink:
|
|
110
|
-
emailLinkLabel:
|
|
111
|
-
emailOn:
|
|
112
|
-
emailToggleLabel:
|
|
98
|
+
address1: E,
|
|
99
|
+
address1Label: $,
|
|
100
|
+
addressUrl: y,
|
|
101
|
+
addressUrlLabel: C,
|
|
102
|
+
address2: O,
|
|
103
|
+
address2Label: w,
|
|
104
|
+
address3: x,
|
|
105
|
+
address3Label: A,
|
|
106
|
+
email: I,
|
|
107
|
+
emailLabel: N,
|
|
108
|
+
emailLink: S,
|
|
109
|
+
emailLinkLabel: j,
|
|
110
|
+
emailOn: z,
|
|
111
|
+
emailToggleLabel: B,
|
|
113
112
|
id: e,
|
|
114
|
-
invalidFields:
|
|
115
|
-
previewDates:
|
|
116
|
-
previewDatesLabel:
|
|
117
|
-
previewHours1:
|
|
118
|
-
previewHours1Label:
|
|
119
|
-
previewHours2:
|
|
120
|
-
previewHours2Label:
|
|
121
|
-
previewLabel:
|
|
122
|
-
previewLabelValue:
|
|
123
|
-
previewOn:
|
|
124
|
-
previewToggleLabel:
|
|
125
|
-
viewingLabel:
|
|
126
|
-
viewingLabelValue:
|
|
127
|
-
viewingDates:
|
|
128
|
-
viewingDatesLabel:
|
|
129
|
-
viewingHours1:
|
|
130
|
-
viewingHours1Label:
|
|
131
|
-
viewingHours2:
|
|
113
|
+
invalidFields: i,
|
|
114
|
+
previewDates: q,
|
|
115
|
+
previewDatesLabel: G,
|
|
116
|
+
previewHours1: H,
|
|
117
|
+
previewHours1Label: J,
|
|
118
|
+
previewHours2: K,
|
|
119
|
+
previewHours2Label: M,
|
|
120
|
+
previewLabel: P,
|
|
121
|
+
previewLabelValue: Q,
|
|
122
|
+
previewOn: U,
|
|
123
|
+
previewToggleLabel: W,
|
|
124
|
+
viewingLabel: Y,
|
|
125
|
+
viewingLabelValue: Z,
|
|
126
|
+
viewingDates: F,
|
|
127
|
+
viewingDatesLabel: tt,
|
|
128
|
+
viewingHours1: et,
|
|
129
|
+
viewingHours1Label: nt,
|
|
130
|
+
viewingHours2: it,
|
|
132
131
|
viewingHours2Label: at
|
|
133
132
|
}
|
|
134
133
|
) : null,
|
|
135
134
|
/* @__PURE__ */ t(
|
|
136
|
-
|
|
135
|
+
v,
|
|
137
136
|
{
|
|
138
137
|
id: `enableOnSite-${e}`,
|
|
139
138
|
type: "toggle",
|
|
140
139
|
defaultChecked: m === "true",
|
|
141
|
-
labelText:
|
|
140
|
+
labelText: k,
|
|
142
141
|
size: "md",
|
|
143
142
|
inline: !0,
|
|
144
143
|
value: "true",
|
|
145
144
|
name: "enableOnSite",
|
|
146
|
-
onChange: () =>
|
|
147
|
-
readOnly: !
|
|
145
|
+
onChange: () => ot((u) => !u),
|
|
146
|
+
readOnly: !n
|
|
148
147
|
}
|
|
149
148
|
),
|
|
150
|
-
|
|
149
|
+
lt ? null : /* @__PURE__ */ t("input", { type: "hidden", name: "enableOnSite", value: "false" }),
|
|
151
150
|
/* @__PURE__ */ t("hr", {}),
|
|
152
|
-
/* @__PURE__ */ t("div", { className: `${
|
|
153
|
-
/* @__PURE__ */ t(
|
|
154
|
-
/* @__PURE__ */ t(
|
|
155
|
-
] }) : /* @__PURE__ */ f(
|
|
156
|
-
/* @__PURE__ */ t(
|
|
151
|
+
/* @__PURE__ */ t("div", { className: `${s}__btn-group ${c}-button__group`, children: n ? /* @__PURE__ */ f(g, { children: [
|
|
152
|
+
/* @__PURE__ */ t(o, { id: `vlc-save-btn-${e}`, variant: r.ghost, type: "submit", onClick: ct, children: X }),
|
|
153
|
+
/* @__PURE__ */ t(o, { id: `vlc-cancel-btn-${e}`, variant: r.ghost, type: "button", onClick: rt, children: L })
|
|
154
|
+
] }) : /* @__PURE__ */ f(g, { children: [
|
|
155
|
+
/* @__PURE__ */ t(o, { id: `vlc-edit-btn-${e}`, variant: r.ghost, type: "button", onClick: st, children: _ }),
|
|
157
156
|
/* @__PURE__ */ t(
|
|
158
|
-
|
|
157
|
+
o,
|
|
159
158
|
{
|
|
160
159
|
id: `vlc-delete-btn-${e}`,
|
|
161
|
-
variant:
|
|
160
|
+
variant: r.ghost,
|
|
162
161
|
type: "button",
|
|
163
|
-
onClick: () => typeof
|
|
164
|
-
children:
|
|
162
|
+
onClick: () => typeof h == "function" && h(e),
|
|
163
|
+
children: V
|
|
165
164
|
}
|
|
166
165
|
)
|
|
167
166
|
] }) })
|
|
@@ -170,5 +169,5 @@ const u = `${i}-viewings-list-card`, dt = ({
|
|
|
170
169
|
);
|
|
171
170
|
};
|
|
172
171
|
export {
|
|
173
|
-
|
|
172
|
+
Et as default
|
|
174
173
|
};
|