@adyen/adyen-platform-experience-web 1.8.0 → 1.9.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/adyen-platform-experience-web.css +1 -1
- package/dist/{angle-right-DYQ6toZV.cjs → angle-right-BWzcy0ip.cjs} +2 -2
- package/dist/{angle-right-DYQ6toZV.cjs.map → angle-right-BWzcy0ip.cjs.map} +1 -1
- package/dist/{checkmark-BvHe3XDD.cjs → checkmark-DfFWWmc9.cjs} +2 -2
- package/dist/{checkmark-BvHe3XDD.cjs.map → checkmark-DfFWWmc9.cjs.map} +1 -1
- package/dist/{checkmark-circle-fill-BBm-SExF.cjs → checkmark-circle-fill-6Nbm2YQh.cjs} +2 -2
- package/dist/{checkmark-circle-fill-BBm-SExF.cjs.map → checkmark-circle-fill-6Nbm2YQh.cjs.map} +1 -1
- package/dist/{checkmark-square-fill-GaJYfE7I.cjs → checkmark-square-fill-U1_7-7K9.cjs} +2 -2
- package/dist/{checkmark-square-fill-GaJYfE7I.cjs.map → checkmark-square-fill-U1_7-7K9.cjs.map} +1 -1
- package/dist/{chevron-down-DiKqNmGu.cjs → chevron-down-BSR5ajTW.cjs} +2 -2
- package/dist/{chevron-down-DiKqNmGu.cjs.map → chevron-down-BSR5ajTW.cjs.map} +1 -1
- package/dist/{chevron-left-D2wsIWaC.cjs → chevron-left-C1QqpQ4S.cjs} +2 -2
- package/dist/{chevron-left-D2wsIWaC.cjs.map → chevron-left-C1QqpQ4S.cjs.map} +1 -1
- package/dist/{chevron-right-ClwwBk5G.cjs → chevron-right-C9cu2vQN.cjs} +2 -2
- package/dist/{chevron-right-ClwwBk5G.cjs.map → chevron-right-C9cu2vQN.cjs.map} +1 -1
- package/dist/{chevron-up-CjIuhiba.cjs → chevron-up-QJhPvS-j.cjs} +2 -2
- package/dist/{chevron-up-CjIuhiba.cjs.map → chevron-up-QJhPvS-j.cjs.map} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/{copy-DWaCTvhj.cjs → copy-CvOYWx2Z.cjs} +2 -2
- package/dist/{copy-DWaCTvhj.cjs.map → copy-CvOYWx2Z.cjs.map} +1 -1
- package/dist/{cross-BaBGJ7V7.cjs → cross-C1NPFb0O.cjs} +2 -2
- package/dist/{cross-BaBGJ7V7.cjs.map → cross-C1NPFb0O.cjs.map} +1 -1
- package/dist/{cross-circle-fill-D1r6vt_G.cjs → cross-circle-fill-BIL8DKBy.cjs} +2 -2
- package/dist/{cross-circle-fill-D1r6vt_G.cjs.map → cross-circle-fill-BIL8DKBy.cjs.map} +1 -1
- package/dist/{download-BwlYYru1.cjs → download-B0HG76gQ.cjs} +2 -2
- package/dist/{download-BwlYYru1.cjs.map → download-B0HG76gQ.cjs.map} +1 -1
- package/dist/es/assets/translations/en-US.json.js +4 -0
- package/dist/es/components/external/CapitalOffer/components/CapitalOfferSummary/CapitalOfferSummary.js +21 -21
- package/dist/es/components/external/CapitalOverview/components/GrantDetails/GrantDetails.js +24 -24
- package/dist/es/components/external/CapitalOverview/components/GrantItem/GrantItem.js +6 -6
- package/dist/es/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeFlow.js +21 -17
- package/dist/es/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeReason.js +93 -90
- package/dist/es/components/external/DisputeManagement/components/DisputesData/DisputeData.js +113 -113
- package/dist/es/components/external/DisputesOverview/components/DisputesOverview/DisputesOverview.js +1 -1
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +18 -18
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotalItem/TransactionTotalItem.js +2 -2
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.js +17 -17
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +26 -26
- package/dist/es/components/external/TransactionsOverview/components/utils.js +6 -5
- package/dist/es/components/internal/Calendar/hooks/useTimezone.js +20 -20
- package/dist/es/components/internal/CopyText/CopyText.js +49 -68
- package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js +17 -16
- package/dist/es/components/internal/FormFields/InputBase.js +59 -52
- package/dist/es/components/internal/FormFields/utils.js +20 -0
- package/dist/es/components/internal/Tooltip/Tooltip.js +14 -14
- package/dist/es/components/types.js +1 -1
- package/dist/es/components/utils/capital/getCapitalErrorMessage.js +6 -6
- package/dist/es/components/utils/disputes/getDisputesErrorMessage.js +3 -3
- package/dist/es/core/Analytics/analytics/customTranslations.js +6 -6
- package/dist/es/core/Http/utils.js +1 -1
- package/dist/es/core/Localization/datetime/restamper/restamper.js +1 -1
- package/dist/es/core/Localization/datetime/restamper/utils.js +21 -21
- package/dist/es/core/core.js +1 -1
- package/dist/es/hooks/useAnalytics/useAnalytics.js +1 -1
- package/dist/es/hooks/useDefaultOverviewFilterParams.js +12 -12
- package/dist/es/primitives/async/abortable/main.js +22 -21
- package/dist/{external-link-C2HjWZuO.cjs → external-link-BpOC7Iux.cjs} +2 -2
- package/dist/{external-link-C2HjWZuO.cjs.map → external-link-BpOC7Iux.cjs.map} +1 -1
- package/dist/{filter-BIRwG0Vl.cjs → filter-D2r4Jsb0.cjs} +2 -2
- package/dist/{filter-BIRwG0Vl.cjs.map → filter-D2r4Jsb0.cjs.map} +1 -1
- package/dist/index-C2bfolFC.cjs +12 -0
- package/dist/index-C2bfolFC.cjs.map +1 -0
- package/dist/{info-filled-vKjjns_Y.cjs → info-filled-BnyHuXP-.cjs} +2 -2
- package/dist/{info-filled-vKjjns_Y.cjs.map → info-filled-BnyHuXP-.cjs.map} +1 -1
- package/dist/{minus-circle-outline-eV-2HTVp.cjs → minus-circle-outline-BCQ8qMpL.cjs} +2 -2
- package/dist/{minus-circle-outline-eV-2HTVp.cjs.map → minus-circle-outline-BCQ8qMpL.cjs.map} +1 -1
- package/dist/{plus-BBN-BevV.cjs → plus-C4IhUDjd.cjs} +2 -2
- package/dist/{plus-BBN-BevV.cjs.map → plus-C4IhUDjd.cjs.map} +1 -1
- package/dist/{plus-circle-outline-D9hOKkhU.cjs → plus-circle-outline-Di_cvYHz.cjs} +2 -2
- package/dist/{plus-circle-outline-D9hOKkhU.cjs.map → plus-circle-outline-Di_cvYHz.cjs.map} +1 -1
- package/dist/{square-CTh_Pt6M.cjs → square-CxVyMMY-.cjs} +2 -2
- package/dist/{square-CTh_Pt6M.cjs.map → square-CxVyMMY-.cjs.map} +1 -1
- package/dist/{trash-can-DLq5jE_J.cjs → trash-can-DJheGbfF.cjs} +2 -2
- package/dist/{trash-can-DLq5jE_J.cjs.map → trash-can-DJheGbfF.cjs.map} +1 -1
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeFlow.d.ts.map +1 -1
- package/dist/types/components/external/DisputeManagement/components/DefendDisputeFlow/DefendDisputeReason.d.ts.map +1 -1
- package/dist/types/components/external/DisputeManagement/components/DisputesData/DisputeData.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/types.d.ts +2 -2
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotalItem/TransactionTotalItem.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotalItem/TransactionTotalItem.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotalItem/types.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotalItem/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/utils.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/hooks/useTimezone.d.ts.map +1 -1
- package/dist/types/components/internal/CopyText/CopyText.d.ts +3 -3
- package/dist/types/components/internal/CopyText/CopyText.d.ts.map +1 -1
- package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.d.ts +3 -19
- package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/InputBase.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/types.d.ts +1 -2
- package/dist/types/components/internal/FormFields/types.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/utils.d.ts +9 -0
- package/dist/types/components/internal/FormFields/utils.d.ts.map +1 -0
- package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts +1 -1
- package/dist/types/components/internal/Tooltip/Tooltip.d.ts +1 -1
- package/dist/types/components/internal/Tooltip/types.d.ts +1 -1
- package/dist/types/components/types.d.ts +2 -1
- package/dist/types/components/types.d.ts.map +1 -1
- package/dist/types/core/Analytics/analytics/customTranslations.d.ts.map +1 -1
- package/dist/types/core/Localization/datetime/restamper/utils.d.ts.map +1 -1
- package/dist/types/core/utils.d.ts.map +1 -1
- package/dist/types/hooks/useDefaultOverviewFilterParams.d.ts +14 -20
- package/dist/types/hooks/useDefaultOverviewFilterParams.d.ts.map +1 -1
- package/dist/types/primitives/async/abortable/main.d.ts.map +1 -1
- package/dist/types/primitives/async/abortable/types.d.ts +1 -1
- package/dist/types/primitives/async/abortable/types.d.ts.map +1 -1
- package/dist/types/translations/index.d.ts +4 -0
- package/dist/types/translations/index.d.ts.map +1 -1
- package/dist/{upload-Cbt8Rwse.cjs → upload-CTy5JC9H.cjs} +2 -2
- package/dist/{upload-Cbt8Rwse.cjs.map → upload-CTy5JC9H.cjs.map} +1 -1
- package/dist/{warning-DB0fHdXY.cjs → warning-CUSU9so2.cjs} +2 -2
- package/dist/{warning-DB0fHdXY.cjs.map → warning-CUSU9so2.cjs.map} +1 -1
- package/dist/{warning-filled-B14QLF2h.cjs → warning-filled-OlZVURzS.cjs} +2 -2
- package/dist/{warning-filled-B14QLF2h.cjs.map → warning-filled-OlZVURzS.cjs.map} +1 -1
- package/package.json +2 -2
- package/dist/index-COVW71Qe.cjs +0 -12
- package/dist/index-COVW71Qe.cjs.map +0 -1
package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import { jsx as t } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
-
import { AmountSkeleton as
|
|
3
|
-
import { BASE_CLASS as S, PLACEHOLDER_CLASS as
|
|
2
|
+
import { AmountSkeleton as b } from "../AmountSkeleton/AmountSkeleton.js";
|
|
3
|
+
import { BASE_CLASS as S, PLACEHOLDER_CLASS as f, AMOUNT_CLASS as T, LABEL_CLASS as E, BODY_CLASS as N } from "./constants.js";
|
|
4
4
|
import { SummaryItemLabel as h } from "./SummaryItemLabel.js";
|
|
5
5
|
import { Tooltip as B } from "../../../../internal/Tooltip/Tooltip.js";
|
|
6
|
-
import { TypographyVariant as
|
|
6
|
+
import { TypographyVariant as n, TypographyElement as I } from "../../../../internal/Typography/types.js";
|
|
7
7
|
import O from "../../../../internal/Typography/Typography.js";
|
|
8
8
|
import _ from "../../../../../core/Context/useCoreContext.js";
|
|
9
9
|
import p from "classnames";
|
|
10
|
-
import { useEffect as x, useCallback as
|
|
10
|
+
import { useEffect as x, useCallback as D } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
11
11
|
/* empty css */
|
|
12
|
-
import { useResponsiveContainer as
|
|
12
|
+
import { useResponsiveContainer as H, containerQueries as M } from "../../../../../hooks/useResponsiveContainer.js";
|
|
13
13
|
const $ = ({
|
|
14
14
|
columnConfigs: i,
|
|
15
15
|
isHeader: u = !1,
|
|
16
|
-
|
|
17
|
-
isSkeletonVisible:
|
|
18
|
-
isLoading:
|
|
16
|
+
showLabelUnderline: d = !1,
|
|
17
|
+
isSkeletonVisible: o = !1,
|
|
18
|
+
isLoading: C = !1,
|
|
19
19
|
widths: m,
|
|
20
20
|
onWidthsSet: L,
|
|
21
21
|
isEmpty: A
|
|
22
22
|
}) => {
|
|
23
|
-
const { i18n:
|
|
23
|
+
const { i18n: s } = _();
|
|
24
24
|
x(() => {
|
|
25
25
|
const e = i.map((r) => {
|
|
26
|
-
var a,
|
|
27
|
-
return ((
|
|
26
|
+
var a, l;
|
|
27
|
+
return ((l = (a = r.ref) == null ? void 0 : a.current) == null ? void 0 : l.getBoundingClientRect().width) ?? 0;
|
|
28
28
|
});
|
|
29
29
|
L(e);
|
|
30
30
|
}, [L]);
|
|
31
|
-
const c = (e) => ({ width: m && m[e] ? m[e] : "auto" }), y =
|
|
32
|
-
(e, r) => e.valueHasLabelStyle ?
|
|
31
|
+
const c = (e) => ({ width: m && m[e] ? m[e] : "auto" }), y = H(M.only.xs), v = D(
|
|
32
|
+
(e, r) => e.valueHasLabelStyle ? n.CAPTION : r && !y ? n.BODY : n.TITLE,
|
|
33
33
|
[y]
|
|
34
34
|
);
|
|
35
35
|
return /* @__PURE__ */ t("div", { className: p(S, { [N]: !u }), children: i.map((e, r) => {
|
|
36
|
-
const a = e.getValue(),
|
|
36
|
+
const a = e.getValue(), l = !!a && a.length > 12;
|
|
37
37
|
return /* @__PURE__ */ t("div", { children: [
|
|
38
|
-
u && /* @__PURE__ */ t("div", { role: "presentation", children: e.tooltipLabel ? /* @__PURE__ */ t(B, { content:
|
|
39
|
-
|
|
38
|
+
u && /* @__PURE__ */ t("div", { role: "presentation", children: e.tooltipLabel ? /* @__PURE__ */ t(B, { content: s.get(`${e.tooltipLabel}`), isUnderlineVisible: d, children: /* @__PURE__ */ t(h, { config: e, i18n: s, isSkeletonVisible: o }) }) : /* @__PURE__ */ t(h, { config: e, i18n: s, isSkeletonVisible: o }) }),
|
|
39
|
+
o ? /* @__PURE__ */ t(b, { isLoading: C, hasMargin: e.hasSkeletonMargin, width: e.skeletonWidth + "px" }) : A ? /* @__PURE__ */ t("span", { className: p([S, f]) }) : /* @__PURE__ */ t("div", { id: e.elemId, ref: e.ref, style: c(r), "aria-label": e.ariaLabel, role: "presentation", children: /* @__PURE__ */ t(
|
|
40
40
|
O,
|
|
41
41
|
{
|
|
42
42
|
el: I.SPAN,
|
|
43
|
-
variant: v(e,
|
|
44
|
-
className: p({ [E]: e.valueHasLabelStyle, [
|
|
43
|
+
variant: v(e, l),
|
|
44
|
+
className: p({ [E]: e.valueHasLabelStyle, [T]: !e.valueHasLabelStyle }),
|
|
45
45
|
children: a
|
|
46
46
|
}
|
|
47
47
|
) })
|
|
@@ -6,7 +6,7 @@ const K = ({
|
|
|
6
6
|
total: e,
|
|
7
7
|
hiddenField: n,
|
|
8
8
|
isHeader: o = !1,
|
|
9
|
-
|
|
9
|
+
showLabelUnderline: i = !1,
|
|
10
10
|
isSkeleton: r = !1,
|
|
11
11
|
isLoading: a = !1,
|
|
12
12
|
widths: l,
|
|
@@ -50,7 +50,7 @@ const K = ({
|
|
|
50
50
|
return /* @__PURE__ */ x(
|
|
51
51
|
C,
|
|
52
52
|
{
|
|
53
|
-
|
|
53
|
+
showLabelUnderline: i,
|
|
54
54
|
isEmpty: !e,
|
|
55
55
|
columnConfigs: y,
|
|
56
56
|
isHeader: o,
|
package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsx as r } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import { memo as h } from "../../../../../external/preact/compat/dist/compat.module.js";
|
|
3
3
|
import { useState as $, useMemo as i } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import w from "../../../../../core/Context/useCoreContext.js";
|
|
5
|
+
import y from "../../../../internal/ExpandableCard/ExpandableCard.js";
|
|
6
6
|
import { TransactionTotalItem as v } from "../TransactionTotalItem/TransactionTotalItem.js";
|
|
7
7
|
import { useMaxWidthsState as M } from "../../hooks/useMaxWidths.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { Fragment as C } from "../../../../../external/preact/dist/preact.module.js";
|
|
10
10
|
import { uniqueId as I } from "../../../../../utils/random/uniqueId.js";
|
|
11
|
-
const
|
|
12
|
-
const { i18n:
|
|
13
|
-
switch (
|
|
11
|
+
const B = h(({ totals: p, isLoading: o, hiddenField: n, fullWidth: x, ...E }) => {
|
|
12
|
+
const { i18n: t } = w(), [m, a] = M(), [l, c] = $(!1), d = i(() => t.get("transactions.overview.totals.currency.label"), [t]), [s, ...u] = i(() => p.map((e) => (e.key = `${e.currency}-${Math.random()}`, e.expensesElemId = I("elem"), e.incomingsElemId = I("elem"), e)), [p]), f = i(() => {
|
|
13
|
+
switch (n) {
|
|
14
14
|
case "expenses":
|
|
15
|
-
return
|
|
15
|
+
return t.get("transactions.overview.totals.lists.incoming");
|
|
16
16
|
case "incomings":
|
|
17
|
-
return
|
|
17
|
+
return t.get("transactions.overview.totals.lists.outgoing");
|
|
18
18
|
default:
|
|
19
|
-
return
|
|
19
|
+
return t.get("transactions.overview.totals.lists.default");
|
|
20
20
|
}
|
|
21
|
-
}, [
|
|
21
|
+
}, [t, n]), g = i(
|
|
22
22
|
() => /* @__PURE__ */ r(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
@@ -28,9 +28,9 @@ const P = h(({ totals: p, isLoading: o, hiddenField: t, fullWidth: x, ...E }) =>
|
|
|
28
28
|
children: /* @__PURE__ */ r(
|
|
29
29
|
v,
|
|
30
30
|
{
|
|
31
|
-
|
|
31
|
+
showLabelUnderline: l,
|
|
32
32
|
total: s,
|
|
33
|
-
hiddenField:
|
|
33
|
+
hiddenField: n,
|
|
34
34
|
widths: m,
|
|
35
35
|
isHeader: !0,
|
|
36
36
|
isSkeleton: o,
|
|
@@ -42,7 +42,7 @@ const P = h(({ totals: p, isLoading: o, hiddenField: t, fullWidth: x, ...E }) =>
|
|
|
42
42
|
)
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
[l, s,
|
|
45
|
+
[l, s, n, m, o, a, d]
|
|
46
46
|
), b = i(() => !o && u.length ? /* @__PURE__ */ r(C, { children: u.map((e) => /* @__PURE__ */ r(
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
@@ -52,9 +52,9 @@ const P = h(({ totals: p, isLoading: o, hiddenField: t, fullWidth: x, ...E }) =>
|
|
|
52
52
|
children: /* @__PURE__ */ r(
|
|
53
53
|
v,
|
|
54
54
|
{
|
|
55
|
-
|
|
55
|
+
showLabelUnderline: l,
|
|
56
56
|
total: e,
|
|
57
|
-
hiddenField:
|
|
57
|
+
hiddenField: n,
|
|
58
58
|
widths: m,
|
|
59
59
|
onWidthsSet: a,
|
|
60
60
|
expensesElemId: e.expensesElemId,
|
|
@@ -63,9 +63,9 @@ const P = h(({ totals: p, isLoading: o, hiddenField: t, fullWidth: x, ...E }) =>
|
|
|
63
63
|
)
|
|
64
64
|
},
|
|
65
65
|
e.key
|
|
66
|
-
)) }) : void 0, [o, u, l,
|
|
66
|
+
)) }) : void 0, [o, u, l, n, m, a, d]);
|
|
67
67
|
return /* @__PURE__ */ r(
|
|
68
|
-
|
|
68
|
+
y,
|
|
69
69
|
{
|
|
70
70
|
renderContent: ({ collapsibleContent: e }) => /* @__PURE__ */ r("div", { role: "list", "aria-label": f, children: [
|
|
71
71
|
g,
|
|
@@ -82,5 +82,5 @@ const P = h(({ totals: p, isLoading: o, hiddenField: t, fullWidth: x, ...E }) =>
|
|
|
82
82
|
);
|
|
83
83
|
});
|
|
84
84
|
export {
|
|
85
|
-
|
|
85
|
+
B as TotalsCard
|
|
86
86
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as t } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { useState as I, useCallback as x, useMemo as H } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
3
|
+
import U from "../../../../internal/DataOverviewError/DataOverviewError.js";
|
|
4
|
+
import K from "../../../../../core/Context/useCoreContext.js";
|
|
5
5
|
import { getCurrencyCode as B } from "../../../../../core/Localization/amount/amount-util.js";
|
|
6
6
|
import $ from "../../../../../hooks/useTimezoneAwareDateFormatting.js";
|
|
7
7
|
import { Tooltip as G } from "../../../../internal/Tooltip/Tooltip.js";
|
|
8
8
|
import { TypographyVariant as n, TypographyElement as a } from "../../../../internal/Typography/types.js";
|
|
9
9
|
import i from "../../../../internal/Typography/Typography.js";
|
|
10
|
-
import { getTransactionCategory as
|
|
10
|
+
import { getTransactionCategory as V, getTransactionCategoryDescription as j } from "../../../../utils/translation/getters.js";
|
|
11
11
|
import { useResponsiveContainer as c, containerQueries as d } from "../../../../../hooks/useResponsiveContainer.js";
|
|
12
|
-
import { BASE_CLASS as
|
|
12
|
+
import { BASE_CLASS as q, DATE_AND_PAYMENT_METHOD_CLASS as z, DATE_METHOD_CLASS as Q, AMOUNT_CLASS as X } from "./constants.js";
|
|
13
13
|
/* empty css */
|
|
14
14
|
import S from "./PaymentMethodCell.js";
|
|
15
15
|
import { useTableColumns as Z } from "../../../../../hooks/useTableColumns.js";
|
|
16
16
|
import g from "../../../../internal/DataGrid/DataGrid.js";
|
|
17
17
|
import J from "../../../../internal/Pagination/Pagination.js";
|
|
18
18
|
import { DATE_FORMAT_TRANSACTIONS_MOBILE as W, DATE_FORMAT_TRANSACTIONS as tt } from "../../../../../constants/dateFormats.js";
|
|
19
|
-
const et = ["createdAt", "paymentMethod", "transactionType", "amount"],
|
|
19
|
+
const et = ["createdAt", "paymentMethod", "transactionType", "amount"], M = {
|
|
20
20
|
amount: "transactions.overview.list.fields.amount",
|
|
21
21
|
createdAt: "transactions.overview.list.fields.createdAt",
|
|
22
22
|
// currency: 'transactions.overview.list.fields.currency',
|
|
@@ -28,19 +28,19 @@ const et = ["createdAt", "paymentMethod", "transactionType", "amount"], C = {
|
|
|
28
28
|
availableCurrencies: m,
|
|
29
29
|
error: l,
|
|
30
30
|
hasMultipleCurrencies: p,
|
|
31
|
-
loading:
|
|
31
|
+
loading: C,
|
|
32
32
|
onContactSupport: A,
|
|
33
33
|
onRowClick: D,
|
|
34
34
|
showDetails: ot,
|
|
35
35
|
showPagination: E,
|
|
36
|
-
transactions:
|
|
37
|
-
customColumns:
|
|
38
|
-
...
|
|
36
|
+
transactions: b,
|
|
37
|
+
customColumns: w,
|
|
38
|
+
...N
|
|
39
39
|
}) => {
|
|
40
|
-
const { i18n: r } =
|
|
41
|
-
customColumns:
|
|
40
|
+
const { i18n: r } = K(), { dateFormat: T } = $(s == null ? void 0 : s.timeZone), [_, y] = I(), u = c(d.up.sm), O = c(d.up.md), L = c(d.down.xs), R = r.get(M.amount), F = Z({
|
|
41
|
+
customColumns: w,
|
|
42
42
|
fields: et,
|
|
43
|
-
fieldsKeys:
|
|
43
|
+
fieldsKeys: M,
|
|
44
44
|
columnConfig: {
|
|
45
45
|
amount: {
|
|
46
46
|
label: p ? void 0 : `${R} ${m && m[0] ? `(${B(m[0])})` : ""}`,
|
|
@@ -53,23 +53,23 @@ const et = ["createdAt", "paymentMethod", "transactionType", "amount"], C = {
|
|
|
53
53
|
}), P = {
|
|
54
54
|
title: "transactions.overview.errors.listEmpty",
|
|
55
55
|
message: ["common.errors.updateFilters"]
|
|
56
|
-
}, k =
|
|
56
|
+
}, k = x(
|
|
57
57
|
(e) => {
|
|
58
58
|
y(e ?? void 0);
|
|
59
59
|
},
|
|
60
60
|
[y]
|
|
61
|
-
), Y =
|
|
62
|
-
() => () => /* @__PURE__ */ t(
|
|
61
|
+
), Y = H(
|
|
62
|
+
() => () => /* @__PURE__ */ t(U, { error: l, onContactSupport: A, errorMessage: "transactions.overview.errors.listUnavailable" }),
|
|
63
63
|
[l, A]
|
|
64
64
|
);
|
|
65
|
-
return /* @__PURE__ */ t("div", { className:
|
|
65
|
+
return /* @__PURE__ */ t("div", { className: q, children: /* @__PURE__ */ t(
|
|
66
66
|
g,
|
|
67
67
|
{
|
|
68
68
|
errorDisplay: Y,
|
|
69
69
|
error: l,
|
|
70
70
|
columns: F,
|
|
71
|
-
data:
|
|
72
|
-
loading:
|
|
71
|
+
data: b,
|
|
72
|
+
loading: C,
|
|
73
73
|
outline: !1,
|
|
74
74
|
onRowClick: { callback: D },
|
|
75
75
|
onRowHover: k,
|
|
@@ -85,10 +85,10 @@ const et = ["createdAt", "paymentMethod", "transactionType", "amount"], C = {
|
|
|
85
85
|
// );
|
|
86
86
|
// },
|
|
87
87
|
transactionType: ({ item: e, rowIndex: o }) => {
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
const
|
|
91
|
-
return
|
|
88
|
+
const f = V(r, e.category);
|
|
89
|
+
if (f) {
|
|
90
|
+
const h = j(r, e.category), v = () => /* @__PURE__ */ t(i, { el: a.SPAN, variant: n.BODY, children: f });
|
|
91
|
+
return h ? /* @__PURE__ */ t(G, { content: h, isUnderlineVisible: o === _, children: /* @__PURE__ */ t("span", { children: v() }) }) : v();
|
|
92
92
|
}
|
|
93
93
|
return null;
|
|
94
94
|
},
|
|
@@ -96,16 +96,16 @@ const et = ["createdAt", "paymentMethod", "transactionType", "amount"], C = {
|
|
|
96
96
|
const o = r.amount(e.value, e.currency, { hideCurrency: !p });
|
|
97
97
|
return /* @__PURE__ */ t(i, { el: a.SPAN, variant: n.BODY, className: X, children: o });
|
|
98
98
|
},
|
|
99
|
-
createdAt: ({ item: e, value: o }) => L ? /* @__PURE__ */ t("div", { className:
|
|
99
|
+
createdAt: ({ item: e, value: o }) => L ? /* @__PURE__ */ t("div", { className: z, children: [
|
|
100
100
|
/* @__PURE__ */ t(S, { paymentMethod: e.paymentMethod, bankAccount: e.bankAccount }),
|
|
101
|
-
/* @__PURE__ */ t("time", { dateTime: e.createdAt, className:
|
|
101
|
+
/* @__PURE__ */ t("time", { dateTime: e.createdAt, className: Q, children: /* @__PURE__ */ t(i, { el: a.SPAN, variant: n.BODY, children: T(e.createdAt, W) }) })
|
|
102
102
|
] }) : /* @__PURE__ */ t("time", { dateTime: o, children: /* @__PURE__ */ t(i, { el: a.SPAN, variant: n.BODY, children: T(o, tt) }) }),
|
|
103
103
|
paymentMethod: ({ item: e }) => /* @__PURE__ */ t(S, { paymentMethod: e.paymentMethod, bankAccount: e.bankAccount })
|
|
104
104
|
},
|
|
105
105
|
children: E && /* @__PURE__ */ t(g.Footer, { children: /* @__PURE__ */ t(
|
|
106
106
|
J,
|
|
107
107
|
{
|
|
108
|
-
...
|
|
108
|
+
...N,
|
|
109
109
|
ariaLabelKey: "transactions.overview.pagination.label",
|
|
110
110
|
limitSelectAriaLabelKey: "transactions.overview.pagination.controls.limitSelect.label"
|
|
111
111
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = Object.freeze({
|
|
2
2
|
klarna: "Klarna",
|
|
3
|
-
paypal: "PayPal"
|
|
3
|
+
paypal: "PayPal",
|
|
4
|
+
klarna_paynow: "Klarna Pay Now"
|
|
4
5
|
});
|
|
5
|
-
function
|
|
6
|
-
return
|
|
6
|
+
function l(a, r) {
|
|
7
|
+
return a.lastFourDigits ? r === "detail" ? "•••• •••• •••• " + a.lastFourDigits : a.lastFourDigits : a.description || i[a.type] || a.type;
|
|
7
8
|
}
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
l as parsePaymentMethodType
|
|
10
11
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { useMemo as c,
|
|
2
|
-
import { getTimezoneOffsetFromFormattedDateString as
|
|
1
|
+
import { useMemo as c, useState as d, useEffect as g } from "../../../../external/preact/hooks/dist/hooks.module.js";
|
|
2
|
+
import { getTimezoneOffsetFromFormattedDateString as p, getGMTSuffixForTimezoneOffset as E } from "../../../../core/Localization/datetime/restamper/utils.js";
|
|
3
3
|
import { clock as M } from "../../../../primitives/time/clock/main.js";
|
|
4
|
-
import { isWatchlistUnsubscribeToken as
|
|
5
|
-
import
|
|
6
|
-
import { EMPTY_OBJECT as
|
|
7
|
-
import { boolOrFalse as
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
return { getTimezoneTime: (t, i = Date.now()) => {
|
|
4
|
+
import { isWatchlistUnsubscribeToken as l } from "../../../../primitives/reactive/watchlist/main.js";
|
|
5
|
+
import _ from "../../../../core/Localization/datetime/restamper/restamper.js";
|
|
6
|
+
import { EMPTY_OBJECT as G, EMPTY_ARRAY as O } from "../../../../utils/value/constants.js";
|
|
7
|
+
import { boolOrFalse as S } from "../../../../utils/value/bool.js";
|
|
8
|
+
const { getTimezoneTime: U, getUsedTimezone: F } = (() => {
|
|
9
|
+
const s = /\d{2}:\d{2}(?=:\d{2}(?:\.\d+)?\s+([AP]M))/i, m = /^GMT|0(?=\d:00)|:00/g, e = _();
|
|
10
|
+
return { getTimezoneTime: (t, T = Date.now()) => {
|
|
12
11
|
e.tz = t;
|
|
13
|
-
const { formatted: o } = e(
|
|
14
|
-
return [
|
|
12
|
+
const { formatted: o } = e(T), [i = "", f = ""] = (o == null ? void 0 : o.match(s)) ?? O, a = p(o), u = `${i}${f && ` ${f}`}`, z = E(a).replace(m, "");
|
|
13
|
+
return [u, z];
|
|
15
14
|
}, getUsedTimezone: (t) => (e.tz = t, e.tz.current) };
|
|
16
|
-
})(), N = ({ timezone:
|
|
17
|
-
const e = c(() =>
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
})(), N = ({ timezone: s, withClock: m = !1 } = G) => {
|
|
16
|
+
const e = c(() => S(m), [m]), n = c(() => F(s), [s]), [r, t] = d(Date.now()), [T, o] = c(() => U(n, r), [r, n]);
|
|
17
|
+
return g(() => {
|
|
18
|
+
if (e)
|
|
19
|
+
return M.subscribe((i) => {
|
|
20
|
+
l(i) || t(i.now);
|
|
21
|
+
});
|
|
22
|
+
}, [t, e]), { clockTime: T, GMTOffset: o, timestamp: r, timezone: n };
|
|
23
23
|
};
|
|
24
24
|
export {
|
|
25
25
|
N as default,
|
|
26
26
|
U as getTimezoneTime,
|
|
27
|
-
|
|
27
|
+
F as getUsedTimezone
|
|
28
28
|
};
|
|
@@ -1,86 +1,67 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { useState as
|
|
1
|
+
import { jsx as e } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
+
import y from "classnames";
|
|
3
|
+
import { useState as B, useCallback as u, useMemo as f } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
4
|
import C from "../../../core/Context/useCoreContext.js";
|
|
5
5
|
import { Tooltip as b } from "../Tooltip/Tooltip.js";
|
|
6
|
-
import { ButtonVariant as
|
|
6
|
+
import { ButtonVariant as I } from "../Button/types.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
import { Icon as
|
|
10
|
-
const
|
|
11
|
-
base:
|
|
12
|
-
container:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
label: n + "__label",
|
|
18
|
-
text: n + "__text"
|
|
8
|
+
import S from "../Button/Button.js";
|
|
9
|
+
import { Icon as T } from "../Icon/Icon.js";
|
|
10
|
+
const a = "adyen-pe-copy-text", t = {
|
|
11
|
+
base: a,
|
|
12
|
+
container: a + "__container",
|
|
13
|
+
icon: a + "__icon",
|
|
14
|
+
information: a + "__information",
|
|
15
|
+
label: a + "__label",
|
|
16
|
+
text: a + "__text"
|
|
19
17
|
}, D = ({
|
|
20
18
|
copyButtonAriaLabelKey: s,
|
|
21
|
-
|
|
22
|
-
textToCopy:
|
|
23
|
-
visibleText:
|
|
19
|
+
isUnderlineVisible: _,
|
|
20
|
+
textToCopy: o,
|
|
21
|
+
visibleText: r,
|
|
24
22
|
onCopyText: c,
|
|
25
|
-
showCopyTextTooltip:
|
|
26
|
-
type:
|
|
27
|
-
...
|
|
23
|
+
showCopyTextTooltip: h = !0,
|
|
24
|
+
type: n = "Trimmed",
|
|
25
|
+
...v
|
|
28
26
|
}) => {
|
|
29
|
-
const { i18n:
|
|
30
|
-
if (
|
|
27
|
+
const { i18n: i } = C(), [l, m] = B(!1), d = u(() => m(!1), []), N = f(() => i.get(s ?? "common.actions.copy.labels.default"), [i, s]), x = u(async () => {
|
|
28
|
+
if (o)
|
|
31
29
|
try {
|
|
32
|
-
await navigator.clipboard.writeText(
|
|
33
|
-
} catch (
|
|
34
|
-
console.error(
|
|
30
|
+
await navigator.clipboard.writeText(o), m(!0), c && c();
|
|
31
|
+
} catch (g) {
|
|
32
|
+
console.error(g);
|
|
35
33
|
}
|
|
36
|
-
}, [
|
|
37
|
-
() => /* @__PURE__ */
|
|
34
|
+
}, [o, c]), p = f(
|
|
35
|
+
() => /* @__PURE__ */ e(
|
|
38
36
|
"span",
|
|
39
37
|
{
|
|
40
|
-
className:
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
38
|
+
className: y({
|
|
39
|
+
[t.label]: n !== "Default",
|
|
40
|
+
[t.information]: n === "Trimmed",
|
|
41
|
+
[t.text]: n === "Text"
|
|
44
42
|
}),
|
|
45
|
-
children:
|
|
43
|
+
children: r || o
|
|
46
44
|
}
|
|
47
45
|
),
|
|
48
|
-
[
|
|
49
|
-
);
|
|
50
|
-
return /* @__PURE__ */ o(
|
|
51
|
-
"span",
|
|
52
|
-
{
|
|
53
|
-
className: r(a.container, {
|
|
54
|
-
[a.containerInformation]: e === "Link"
|
|
55
|
-
}),
|
|
56
|
-
...I,
|
|
57
|
-
children: [
|
|
58
|
-
v ? /* @__PURE__ */ o(b, { content: i, isContainerHovered: h, children: p }) : p,
|
|
59
|
-
/* @__PURE__ */ o(b, { content: t.get(m ? "common.actions.copy.labels.done" : "common.actions.copy.labels.default"), children: /* @__PURE__ */ o(
|
|
60
|
-
B,
|
|
61
|
-
{
|
|
62
|
-
variant: g.TERTIARY,
|
|
63
|
-
className: a.base,
|
|
64
|
-
onClick: L,
|
|
65
|
-
onBlur: f,
|
|
66
|
-
onMouseLeaveCapture: f,
|
|
67
|
-
"aria-label": k,
|
|
68
|
-
"data-testid": "copyText",
|
|
69
|
-
children: /* @__PURE__ */ o(
|
|
70
|
-
"div",
|
|
71
|
-
{
|
|
72
|
-
className: r(a.icon, {
|
|
73
|
-
[a.iconInformation]: e === "Link"
|
|
74
|
-
}),
|
|
75
|
-
children: /* @__PURE__ */ o(S, { name: "copy", "data-testid": "copy-icon" })
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
) }),
|
|
80
|
-
/* @__PURE__ */ o("div", { className: "adyen-pe-visually-hidden", "aria-atomic": "true", "aria-live": "polite", children: m && t.get("common.actions.copy.labels.done") })
|
|
81
|
-
]
|
|
82
|
-
}
|
|
46
|
+
[r, o, n]
|
|
83
47
|
);
|
|
48
|
+
return /* @__PURE__ */ e("span", { className: t.container, ...v, children: [
|
|
49
|
+
h ? /* @__PURE__ */ e(b, { content: o, isUnderlineVisible: _, children: p }) : p,
|
|
50
|
+
/* @__PURE__ */ e(b, { content: i.get(l ? "common.actions.copy.labels.done" : "common.actions.copy.labels.default"), children: /* @__PURE__ */ e(
|
|
51
|
+
S,
|
|
52
|
+
{
|
|
53
|
+
variant: I.TERTIARY,
|
|
54
|
+
className: t.base,
|
|
55
|
+
onClick: x,
|
|
56
|
+
onBlur: d,
|
|
57
|
+
onMouseLeaveCapture: d,
|
|
58
|
+
"aria-label": N,
|
|
59
|
+
"data-testid": "copyText",
|
|
60
|
+
children: /* @__PURE__ */ e("div", { className: t.icon, children: /* @__PURE__ */ e(T, { name: "copy", "data-testid": "copy-icon" }) })
|
|
61
|
+
}
|
|
62
|
+
) }),
|
|
63
|
+
/* @__PURE__ */ e("div", { className: "adyen-pe-visually-hidden", "aria-atomic": "true", "aria-live": "polite", children: l && i.get("common.actions.copy.labels.done") })
|
|
64
|
+
] });
|
|
84
65
|
};
|
|
85
66
|
export {
|
|
86
67
|
D as default
|
package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { useState as a, useRef as
|
|
1
|
+
import { useState as a, useRef as R, useMemo as i, useCallback as W } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
2
2
|
import N from "../../../../../core/Context/useCoreContext.js";
|
|
3
3
|
import q from "../../../Calendar/calendar/timerange/presets/yearToDate.js";
|
|
4
4
|
import A from "../../../Calendar/calendar/timerange/presets/lastMonth.js";
|
|
5
5
|
import E from "../../../Calendar/calendar/timerange/presets/thisMonth.js";
|
|
6
6
|
import K from "../../../Calendar/calendar/timerange/presets/lastWeek.js";
|
|
7
7
|
import Z from "../../../Calendar/calendar/timerange/presets/thisWeek.js";
|
|
8
|
-
import
|
|
8
|
+
import y from "../../../Calendar/calendar/timerange/presets/lastNDays.js";
|
|
9
9
|
const Y = () => Object.freeze({
|
|
10
|
-
"common.filters.types.date.rangeSelect.options.last7Days":
|
|
11
|
-
"common.filters.types.date.rangeSelect.options.last30Days":
|
|
10
|
+
"common.filters.types.date.rangeSelect.options.last7Days": y(7),
|
|
11
|
+
"common.filters.types.date.rangeSelect.options.last30Days": y(30),
|
|
12
|
+
"common.filters.types.date.rangeSelect.options.last90Days": y(90),
|
|
12
13
|
"common.filters.types.date.rangeSelect.options.thisWeek": Z(),
|
|
13
14
|
"common.filters.types.date.rangeSelect.options.lastWeek": K(),
|
|
14
15
|
"common.filters.types.date.rangeSelect.options.thisMonth": E(),
|
|
@@ -20,33 +21,33 @@ const Y = () => Object.freeze({
|
|
|
20
21
|
selectedOption: m,
|
|
21
22
|
timezone: l
|
|
22
23
|
}) => {
|
|
23
|
-
const { i18n: p } = N(), [j, S] = a(), [M,
|
|
24
|
+
const { i18n: p } = N(), [j, S] = a(), [M, O] = a(), [f, u] = a(), h = R(), D = R(), [e, T, s] = i(() => {
|
|
24
25
|
const o = p.get("common.filters.types.date.rangeSelect.options.custom"), t = Object.keys(n), c = Object.freeze(t.map((d) => p.get(d)));
|
|
25
26
|
return [o, (d, v = c) => {
|
|
26
27
|
const z = v.findIndex((I) => I === d);
|
|
27
28
|
return n[t[z]];
|
|
28
29
|
}, c];
|
|
29
|
-
}, [p, n]), [
|
|
30
|
-
() =>
|
|
31
|
-
[
|
|
32
|
-
), g =
|
|
30
|
+
}, [p, n]), [b, k] = a(m === e), C = i(() => Object.freeze([...s, e]), [e, s]), x = i(
|
|
31
|
+
() => b ? C : s,
|
|
32
|
+
[b, s, C]
|
|
33
|
+
), g = W(
|
|
33
34
|
(o) => {
|
|
34
|
-
const t =
|
|
35
|
-
t && (S(t.from),
|
|
35
|
+
const t = T(o, s);
|
|
36
|
+
t && (S(t.from), O(t.to), k(!1), u(o));
|
|
36
37
|
},
|
|
37
|
-
[e,
|
|
38
|
-
), F =
|
|
39
|
-
S(void 0),
|
|
38
|
+
[e, T, f, s]
|
|
39
|
+
), F = W(() => {
|
|
40
|
+
S(void 0), O(void 0), k(!0), u(e);
|
|
40
41
|
}, [e]);
|
|
41
42
|
return i(() => {
|
|
42
43
|
m === e ? u(e) : g(m);
|
|
43
44
|
}, []), i(() => {
|
|
44
45
|
var o;
|
|
45
|
-
if (
|
|
46
|
+
if (h.current !== r || D.current !== l) {
|
|
46
47
|
const t = Object.values(n);
|
|
47
48
|
t.forEach((c) => {
|
|
48
49
|
c.now = r, c.timezone = l;
|
|
49
|
-
}),
|
|
50
|
+
}), h.current = r, D.current = (o = t[0]) == null ? void 0 : o.timezone, g(f);
|
|
50
51
|
}
|
|
51
52
|
}, [r, l, n]), {
|
|
52
53
|
customSelection: F,
|