@adyen/adyen-platform-experience-web 1.0.0-beta.2 → 1.0.0-beta.3
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/ModalContent-387502da.js +2 -0
- package/dist/{ModalContent-88fdb6f4.js.map → ModalContent-387502da.js.map} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/components/external/TransactionDetails/TransactionDetails.js +6 -6
- package/dist/es/components/external/TransactionDetails/components/TransactionData.js +3 -3
- package/dist/es/components/external/TransactionDetails/components/TransactionDetails.js +6 -6
- package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.js +2 -2
- package/dist/es/components/external/TransactionsOverview/components/BalanceAccountSelector/useBalanceAccountSelection.js +7 -7
- package/dist/es/components/external/TransactionsOverview/components/Balances/Balances.js +9 -9
- package/dist/es/components/external/TransactionsOverview/components/ModalContent.js +4 -4
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.js +6 -6
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.js +7 -7
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +15 -15
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.js +3 -3
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotalItem/TransactionTotalItem.js +6 -6
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.js +7 -7
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.js +31 -31
- package/dist/es/components/external/TransactionsOverview/components/TransactionsDisplay/TransactionsDisplay.js +15 -15
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +6 -6
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverviewContainer/TransactionsOverviewContainer.js +21 -21
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverviewDateFilter.js +21 -21
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +30 -30
- package/dist/es/components/external/TransactionsOverview/components/utils.js +1 -1
- package/dist/es/components/external/TransactionsOverview/hooks/useMaxWidths.js +4 -4
- package/dist/es/components/external/UIElement.js +4 -4
- package/dist/es/components/internal/BaseButton/BaseButton.js +11 -11
- package/dist/es/components/internal/BaseList/BaseList.js +2 -2
- package/dist/es/components/internal/Button/Button.js +9 -9
- package/dist/es/components/internal/Button/hooks/useButton.js +2 -2
- package/dist/es/components/internal/Calendar/components/CalendarControls/CalendarControls.js +2 -2
- package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDayOfWeek.js +4 -4
- package/dist/es/components/internal/Calendar/hooks/useCalendar.js +13 -13
- package/dist/es/components/internal/Calendar/hooks/useTimezone.js +2 -2
- package/dist/es/components/internal/DataGrid/DataGrid.js +6 -6
- package/dist/es/components/internal/DataGrid/components/InteractiveBody.js +8 -8
- package/dist/es/components/internal/DataGrid/components/TableBody.js +5 -5
- package/dist/es/components/internal/DataGrid/components/TableCells.js +2 -2
- package/dist/es/components/internal/DataGrid/hooks/useInteractiveDataGrid.js +2 -2
- package/dist/es/components/internal/DatePicker/DatePicker.js +9 -9
- package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.js +9 -9
- package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js +29 -29
- package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.js +10 -10
- package/dist/es/components/internal/ExpandableCard/ExpandableCard.js +14 -14
- package/dist/es/components/internal/FilterBar/FilterBar.js +12 -12
- package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.js +8 -8
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/AmountFilter.js +26 -26
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/RangeSelection.js +3 -3
- package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.js +27 -27
- package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilter.js +17 -17
- package/dist/es/components/internal/FormFields/InputBase.js +16 -16
- package/dist/es/components/internal/FormFields/InputText.js +2 -2
- package/dist/es/components/internal/FormFields/Select/Select.js +27 -27
- package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +16 -16
- package/dist/es/components/internal/FormFields/Select/components/SelectList.js +21 -21
- package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +9 -9
- package/dist/es/components/internal/FormFields/Select/hooks/useSelect.js +7 -7
- package/dist/es/components/internal/Image/Image.js +2 -2
- package/dist/es/components/internal/Img/Img.js +4 -4
- package/dist/es/components/internal/Modal/Modal.js +16 -16
- package/dist/es/components/internal/Pagination/Pagination.js +4 -4
- package/dist/es/components/internal/Pagination/hooks/usePageLimit.js +2 -2
- package/dist/es/components/internal/Pagination/hooks/usePaginatedRecords.js +42 -44
- package/dist/es/components/internal/Pagination/hooks/usePagination.js +15 -15
- package/dist/es/components/internal/Popover/Popover.js +31 -31
- package/dist/es/components/internal/Popover/PopoverTitle/PopoverTitle.js +2 -2
- package/dist/es/components/internal/SVGIcons/ChevronLeft.js +3 -3
- package/dist/es/components/internal/SVGIcons/ChevronRight.js +3 -3
- package/dist/es/components/internal/SVGIcons/ChevronUp.js +2 -2
- package/dist/es/components/internal/SVGIcons/Filter.js +2 -2
- package/dist/es/components/internal/Tag/Tag.js +3 -3
- package/dist/es/components/internal/Tooltip/Tooltip.js +3 -3
- package/dist/es/components/internal/Typography/Typography.js +2 -2
- package/dist/es/core/Auth/AuthProvider.js +6 -6
- package/dist/es/core/Context/CoreProvider.js +4 -4
- package/dist/es/core/Localization/utils.js +30 -30
- package/dist/es/core/Session/Session.js +1 -1
- package/dist/es/core/core.js +9 -9
- package/dist/es/external/preact/compat/dist/compat.module.js +86 -86
- package/dist/es/external/preact/dist/preact.module.js +241 -234
- package/dist/es/external/preact/hooks/dist/hooks.module.js +86 -84
- package/dist/es/external/preact/jsx-runtime/dist/jsxRuntime.module.js +5 -5
- package/dist/es/hooks/element/useClickOutside.js +2 -2
- package/dist/es/hooks/element/useDetachedRender.js +2 -2
- package/dist/es/hooks/element/useFocusCursor.js +2 -2
- package/dist/es/hooks/element/useFocusTrap.js +2 -2
- package/dist/es/hooks/element/usePopoverPositioner.js +27 -27
- package/dist/es/hooks/useCommitAction/useCommitAction.js +2 -2
- package/dist/es/hooks/useFetch/useFetch.js +1 -1
- package/dist/es/hooks/useModalDetails/useModalDetails.js +4 -4
- package/dist/es/hooks/useReactiveState/useReactiveState.js +10 -10
- package/dist/es/hooks/useSetupEndpoint/useSetupEndpoint.js +4 -4
- package/dist/es/utils/SessionStorage.js +31 -0
- package/dist/index-8daceaea.js +12 -0
- package/dist/index-8daceaea.js.map +1 -0
- package/dist/types/components/external/TransactionDetails/components/TransactionData.d.ts +2 -2
- package/dist/types/components/external/TransactionDetails/components/TransactionData.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/components/TransactionDataSkeleton.d.ts +2 -2
- package/dist/types/components/external/TransactionDetails/components/TransactionDataSkeleton.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.d.ts +1 -5
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionListError/TransactionListError.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionListError/TransactionListError.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/utils.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/hooks/useMaxWidths.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/hooks/useTransactionsOverviewMultiSelectionFilters.d.ts +2 -2
- package/dist/types/components/internal/Button/constants.d.ts +7 -7
- package/dist/types/components/internal/Button/constants.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/calendar/shared/indexed/index.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/calendar/timerange/utils.d.ts +1 -1
- package/dist/types/components/internal/Calendar/calendar/timerange/utils.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/components/CalendarGrid/utils.d.ts +2 -2
- package/dist/types/components/internal/Calendar/components/CalendarGrid/utils.d.ts.map +1 -1
- package/dist/types/components/internal/CopyText/CopyText.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/components/InteractiveBody.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/components/SkeletonBody.d.ts +1 -1
- package/dist/types/components/internal/DataGrid/components/SkeletonBody.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/components/TableBody.d.ts +1 -1
- package/dist/types/components/internal/DataGrid/components/TableBody.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/components/TableCells.d.ts +1 -1
- package/dist/types/components/internal/DataGrid/components/TableCells.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/hooks/useInteractiveDataGrid.d.ts.map +1 -1
- package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.d.ts +1 -1
- package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/Select.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectButton.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +1 -3
- package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/constants.d.ts +21 -21
- package/dist/types/components/internal/FormFields/Select/constants.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/index.d.ts +1 -1
- package/dist/types/components/internal/FormFields/index.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/hooks/useCursorPaginatedRecords.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/hooks/useOffsetPaginatedRecords.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/hooks/usePaginatedRecords.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/hooks/usePaginatedRecordsFilters.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/hooks/usePagination.d.ts +1 -1
- package/dist/types/components/internal/Pagination/hooks/usePagination.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/types.d.ts +5 -1
- package/dist/types/components/internal/Pagination/types.d.ts.map +1 -1
- package/dist/types/components/internal/Popover/constants.d.ts +6 -6
- package/dist/types/components/internal/Popover/constants.d.ts.map +1 -1
- package/dist/types/components/internal/Tooltip/useTooltipListeners.d.ts.map +1 -1
- package/dist/types/components/types.d.ts +2 -0
- package/dist/types/components/types.d.ts.map +1 -1
- package/dist/types/core/Localization/amount/amount-util.d.ts +28 -0
- package/dist/types/core/Localization/amount/amount-util.d.ts.map +1 -1
- package/dist/types/core/Localization/datetime/restamper/utils.d.ts.map +1 -1
- package/dist/types/core/Localization/localization-utils.d.ts.map +1 -1
- package/dist/types/core/Localization/utils.d.ts +468 -3
- package/dist/types/core/Localization/utils.d.ts.map +1 -1
- package/dist/types/core/core.d.ts +19 -0
- package/dist/types/core/core.d.ts.map +1 -1
- package/dist/types/core/types.d.ts +5 -0
- package/dist/types/core/types.d.ts.map +1 -1
- package/dist/types/hooks/element/useClickOutside.d.ts +1 -1
- package/dist/types/hooks/element/useClickOutside.d.ts.map +1 -1
- package/dist/types/hooks/element/useDetachedRender.d.ts.map +1 -1
- package/dist/types/hooks/element/useFocusTrap.d.ts.map +1 -1
- package/dist/types/hooks/useImageUrl/useImageUrl.d.ts.map +1 -1
- package/dist/types/hooks/useModalDetails/useModalDetails.d.ts.map +1 -1
- package/dist/types/hooks/useMounted/useMounted.d.ts +1 -1
- package/dist/types/hooks/useMounted/useMounted.d.ts.map +1 -1
- package/dist/types/hooks/useReactiveState/useReactiveState.d.ts.map +1 -1
- package/dist/types/hooks/useReflex/core/reflex.d.ts.map +1 -1
- package/dist/types/hooks/useReflex/core/utils.d.ts.map +1 -1
- package/dist/types/hooks/useReflex/hooks/useReflex.d.ts.map +1 -1
- package/dist/types/hooks/useSessionAwareRequest/useSessionAwareRequest.d.ts.map +1 -1
- package/dist/types/hooks/useSetupEndpoint/useSetupEndpoint.d.ts +1 -1
- package/dist/types/hooks/useSetupEndpoint/useSetupEndpoint.d.ts.map +1 -1
- package/dist/types/types/models/openapi/BalanceAccountsResource.d.ts +104 -0
- package/dist/types/types/models/openapi/BalanceAccountsResource.d.ts.map +1 -0
- package/dist/types/types/models/openapi/SetupResource.d.ts +59 -0
- package/dist/types/types/models/openapi/SetupResource.d.ts.map +1 -0
- package/dist/types/types/models/openapi/TransactionsResource.d.ts +198 -0
- package/dist/types/types/models/openapi/TransactionsResource.d.ts.map +1 -0
- package/dist/types/types/models/openapi/endpoints.d.ts +11 -0
- package/dist/types/types/models/openapi/endpoints.d.ts.map +1 -0
- package/dist/types/utils/SessionStorage.d.ts +11 -0
- package/dist/types/utils/SessionStorage.d.ts.map +1 -0
- package/dist/types/utils/common/index.d.ts +2 -2
- package/dist/types/utils/common/index.d.ts.map +1 -1
- package/dist/types/utils/fixedForwardRef.d.ts +3 -3
- package/dist/types/utils/fixedForwardRef.d.ts.map +1 -1
- package/dist/types/utils/watchable/core/Watchable.d.ts +5 -3
- package/dist/types/utils/watchable/core/Watchable.d.ts.map +1 -1
- package/dist/types/utils/watchable/core/helpers.d.ts +4 -2
- package/dist/types/utils/watchable/core/helpers.d.ts.map +1 -1
- package/dist/types/utils/watchable/core/syncEffect.d.ts +1 -1
- package/dist/types/utils/watchable/core/syncEffect.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/ModalContent-88fdb6f4.js +0 -2
- package/dist/es/utils/Storage.js +0 -31
- package/dist/index-7e2df524.js +0 -12
- package/dist/index-7e2df524.js.map +0 -1
- package/dist/types/utils/Storage.d.ts +0 -11
- package/dist/types/utils/Storage.d.ts.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as n } from "../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
-
import
|
|
2
|
+
import g from "../../../../core/Context/useCoreContext.js";
|
|
3
3
|
import { noop as p } from "../../../../utils/common/index.js";
|
|
4
|
-
import { TableCells as
|
|
4
|
+
import { TableCells as h } from "./TableCells.js";
|
|
5
5
|
import { Fragment as y } from "../../../../external/preact/dist/preact.module.js";
|
|
6
6
|
const x = ({
|
|
7
7
|
data: a,
|
|
8
8
|
columns: c,
|
|
9
|
-
customCells:
|
|
9
|
+
customCells: u,
|
|
10
10
|
onRowHover: r
|
|
11
11
|
}) => {
|
|
12
|
-
const { i18n: s } =
|
|
12
|
+
const { i18n: s } = g();
|
|
13
13
|
return /* @__PURE__ */ n(y, { children: a == null ? void 0 : a.map((o, l) => /* @__PURE__ */ n(
|
|
14
14
|
"tr",
|
|
15
15
|
{
|
|
@@ -18,7 +18,7 @@ const x = ({
|
|
|
18
18
|
onFocus: s.has(`tooltip.${o == null ? void 0 : o.category}`) ? () => r(l) : p,
|
|
19
19
|
onMouseLeave: s.has(`tooltip.${o == null ? void 0 : o.category}`) ? () => r() : p,
|
|
20
20
|
onBlur: s.has(`tooltip.${o == null ? void 0 : o.category}`) ? () => r() : p,
|
|
21
|
-
children: /* @__PURE__ */ n(
|
|
21
|
+
children: /* @__PURE__ */ n(h, { columns: c, customCells: u, item: o, rowIndex: l })
|
|
22
22
|
},
|
|
23
23
|
o
|
|
24
24
|
)) });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import d from "../DataGridCell.js";
|
|
3
3
|
import { Fragment as p } from "../../../../external/preact/dist/preact.module.js";
|
|
4
|
-
const
|
|
4
|
+
const h = ({
|
|
5
5
|
columns: b,
|
|
6
6
|
customCells: a,
|
|
7
7
|
item: i,
|
|
@@ -17,5 +17,5 @@ const g = ({
|
|
|
17
17
|
})
|
|
18
18
|
}, r) : /* @__PURE__ */ n(d, { "aria-labelledby": String(r), children: i[r] }, r)) });
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
h as TableCells
|
|
21
21
|
};
|
|
@@ -2,7 +2,7 @@ import { useReducer as I, useCallback as o } from "../../../../external/preact/h
|
|
|
2
2
|
import { InteractionKeyCode as s } from "../../../types.js";
|
|
3
3
|
import { INITIAL_STATE as p } from "../DataGrid.js";
|
|
4
4
|
import R from "../../../../hooks/useReflex/hooks/useReflex.js";
|
|
5
|
-
const
|
|
5
|
+
const m = ({ totalRows: x }) => {
|
|
6
6
|
const [i, a] = I(
|
|
7
7
|
(e, t) => {
|
|
8
8
|
const n = x;
|
|
@@ -74,5 +74,5 @@ const l = ({ totalRows: x }) => {
|
|
|
74
74
|
return { listeners: { onKeyDownCapture: c, onFocusCapture: f }, ref: r, activeIndex: i.activeIndex, currentIndex: i.index };
|
|
75
75
|
};
|
|
76
76
|
export {
|
|
77
|
-
|
|
77
|
+
m as useInteractiveDataGrid
|
|
78
78
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as n } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import _ from "classnames";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { useState as
|
|
3
|
+
import { forwardRef as p } from "../../../external/preact/compat/dist/compat.module.js";
|
|
4
|
+
import { useState as y, useMemo as i, useCallback as N } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
5
5
|
import O from "../../../core/Context/useCoreContext.js";
|
|
6
6
|
import { noop as P } from "../../../utils/common/index.js";
|
|
7
|
-
import
|
|
8
|
-
import { DEFAULT_FIRST_WEEK_DAY as
|
|
9
|
-
import
|
|
7
|
+
import x from "../Calendar/hooks/useTimezone.js";
|
|
8
|
+
import { DEFAULT_FIRST_WEEK_DAY as I } from "../Calendar/calendar/timerange/presets/shared/offsetWeek.js";
|
|
9
|
+
import M from "../Calendar/hooks/useCalendarControlsRendering.js";
|
|
10
10
|
import "./DatePicker.scss.js";
|
|
11
|
-
import
|
|
11
|
+
import v from "../../../hooks/useReflex/hooks/useReflex.js";
|
|
12
12
|
import D from "./components/TimeRangeSelector/TimeRangeSelector.js";
|
|
13
13
|
import E from "../Calendar/Calendar.js";
|
|
14
14
|
import g from "../Calendar/calendar/facade/index.js";
|
|
15
15
|
import { EMPTY_OBJECT as S } from "../../../utils/common/constants.js";
|
|
16
|
-
const A =
|
|
17
|
-
const { i18n: r } = O(), [T, k] =
|
|
16
|
+
const A = p((e, u) => {
|
|
17
|
+
const { i18n: r } = O(), [T, k] = M(e.renderControl), [C, a] = y(performance.now()), t = i(() => e.showTimezoneInfo !== !1, [e.showTimezoneInfo]), { clockTime: m, GMTOffset: c } = x({ timezone: e.timezone, withClock: t }), z = i(() => _([{ "adyen-pe-datepicker--with-timezone": t }, "adyen-pe-datepicker"]), [t]), w = i(() => t ? { values: { offset: c, time: m } } : S, [c, m, t]), o = v(P, u), R = N(() => {
|
|
18
18
|
var l, s, d, f, h;
|
|
19
19
|
a(performance.now()), (l = o.current) != null && l.from && ((s = o.current) != null && s.to) && ((h = e.onHighlight) == null || h.call(e, +((d = o.current) == null ? void 0 : d.from), +((f = o.current) == null ? void 0 : f.to)));
|
|
20
20
|
}, [a, e.onHighlight]);
|
|
@@ -37,7 +37,7 @@ const A = y((e, u) => {
|
|
|
37
37
|
{
|
|
38
38
|
...e,
|
|
39
39
|
ref: o,
|
|
40
|
-
firstWeekDay:
|
|
40
|
+
firstWeekDay: I,
|
|
41
41
|
dynamicBlockRows: !0,
|
|
42
42
|
onlyCellsWithin: !0,
|
|
43
43
|
controls: e.controls ?? g.controls.MINIMAL,
|
package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { useTimeRangeSelection as
|
|
1
|
+
import { jsx as x } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
+
import { useMemo as C, useCallback as j, useRef as h, useEffect as i } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
3
|
+
import { useTimeRangeSelection as w } from "./useTimeRangeSelection.js";
|
|
4
4
|
import D from "../../../FormFields/Select/Select.js";
|
|
5
|
-
const
|
|
5
|
+
const a = ({
|
|
6
6
|
calendarRef: t,
|
|
7
7
|
onTimeRangeSelected: o,
|
|
8
8
|
timestamp: s,
|
|
9
9
|
...O
|
|
10
10
|
}) => {
|
|
11
|
-
const { customSelection: f, from:
|
|
11
|
+
const { customSelection: f, from: u, onSelection: l, options: m, selectedOption: r, to: c } = w(O), S = C(() => Object.freeze(m.map((e) => ({ id: e, name: e }))), [m]), b = j(({ target: e }) => l(e == null ? void 0 : e.value), [l]), n = h(!0), p = h(s);
|
|
12
12
|
return i(() => {
|
|
13
|
-
t != null && t.current &&
|
|
14
|
-
}, [t,
|
|
13
|
+
t != null && t.current && u && c && (n.current = !0, t.current.from = new Date(u), t.current.to = new Date(c));
|
|
14
|
+
}, [t, u, c]), i(() => {
|
|
15
15
|
p.current !== s && (p.current = s, n.current ? n.current = !1 : f());
|
|
16
16
|
}, [f, s]), i(() => {
|
|
17
17
|
r && (o == null || o(r));
|
|
18
|
-
}, [r, o]), /* @__PURE__ */
|
|
18
|
+
}, [r, o]), /* @__PURE__ */ x(
|
|
19
19
|
D,
|
|
20
20
|
{
|
|
21
21
|
setToTargetWidth: !0,
|
|
@@ -26,7 +26,7 @@ const T = ({
|
|
|
26
26
|
selected: r
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
|
-
}, E =
|
|
29
|
+
}, E = a;
|
|
30
30
|
export {
|
|
31
31
|
E as default
|
|
32
32
|
};
|
package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { useState as m, useRef as
|
|
1
|
+
import { useState as m, useRef as P, useMemo as i, useCallback as R } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
2
2
|
import z from "../../../../../core/Context/useCoreContext.js";
|
|
3
3
|
import I from "../../../Calendar/calendar/timerange/presets/lastNDays.js";
|
|
4
4
|
import N from "../../../Calendar/calendar/timerange/presets/thisWeek.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
5
|
+
import q from "../../../Calendar/calendar/timerange/presets/lastWeek.js";
|
|
6
|
+
import E from "../../../Calendar/calendar/timerange/presets/thisMonth.js";
|
|
7
|
+
import K from "../../../Calendar/calendar/timerange/presets/lastMonth.js";
|
|
8
|
+
import Z from "../../../Calendar/calendar/timerange/presets/yearToDate.js";
|
|
9
|
+
const X = () => Object.freeze({
|
|
10
10
|
"rangePreset.last7Days": I(7),
|
|
11
11
|
"rangePreset.thisWeek": N(),
|
|
12
|
-
"rangePreset.lastWeek":
|
|
13
|
-
"rangePreset.thisMonth":
|
|
14
|
-
"rangePreset.lastMonth":
|
|
15
|
-
"rangePreset.yearToDate":
|
|
16
|
-
}),
|
|
12
|
+
"rangePreset.lastWeek": q(),
|
|
13
|
+
"rangePreset.thisMonth": E(),
|
|
14
|
+
"rangePreset.lastMonth": K(),
|
|
15
|
+
"rangePreset.yearToDate": Z()
|
|
16
|
+
}), Y = ({
|
|
17
17
|
now: a = Date.now(),
|
|
18
18
|
options: r,
|
|
19
19
|
selectedOption: u,
|
|
20
20
|
timezone: l
|
|
21
21
|
}) => {
|
|
22
|
-
const { i18n: s } = z(), [
|
|
22
|
+
const { i18n: s } = z(), [T, h] = m(), [W, D] = m(), [f, g] = m(), S = P(), d = P(), [e, b, n] = i(() => {
|
|
23
23
|
const o = s.get("rangePreset.custom"), t = Object.keys(r), c = Object.freeze(t.map((O) => s.get(O)));
|
|
24
|
-
return [o, (O,
|
|
25
|
-
const
|
|
26
|
-
return r[t[
|
|
24
|
+
return [o, (O, F = c) => {
|
|
25
|
+
const M = F.findIndex((v) => v === O);
|
|
26
|
+
return r[t[M]];
|
|
27
27
|
}, c];
|
|
28
|
-
}, [s, r]), [
|
|
29
|
-
() =>
|
|
30
|
-
[
|
|
31
|
-
), p =
|
|
28
|
+
}, [s, r]), [k, y] = m(u === e), C = i(() => Object.freeze([...n, e]), [e, n]), j = i(
|
|
29
|
+
() => k ? C : n,
|
|
30
|
+
[k, n, C]
|
|
31
|
+
), p = R(
|
|
32
32
|
(o) => {
|
|
33
|
-
const t =
|
|
34
|
-
t && (h(s.fullDate(t.from)), D(s.fullDate(t.to)),
|
|
33
|
+
const t = b(o, n);
|
|
34
|
+
t && (h(s.fullDate(t.from)), D(s.fullDate(t.to)), y(!1), g(o));
|
|
35
35
|
},
|
|
36
|
-
[s, e,
|
|
37
|
-
),
|
|
38
|
-
h(void 0), D(void 0),
|
|
36
|
+
[s, e, b, f, n]
|
|
37
|
+
), x = R(() => {
|
|
38
|
+
h(void 0), D(void 0), y(!0), g(e);
|
|
39
39
|
}, [e]);
|
|
40
40
|
return i(() => {
|
|
41
41
|
u === e ? g(e) : p(u);
|
|
@@ -48,8 +48,8 @@ const V = () => Object.freeze({
|
|
|
48
48
|
}), S.current = a, d.current = (o = t[0]) == null ? void 0 : o.timezone, p(f);
|
|
49
49
|
}
|
|
50
50
|
}, [a, l, r]), {
|
|
51
|
-
customSelection:
|
|
52
|
-
from:
|
|
51
|
+
customSelection: x,
|
|
52
|
+
from: T,
|
|
53
53
|
onSelection: p,
|
|
54
54
|
options: j,
|
|
55
55
|
selectedOption: f,
|
|
@@ -57,7 +57,7 @@ const V = () => Object.freeze({
|
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
59
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
Y as default,
|
|
61
|
+
X as getTimeRangeSelectionDefaultPresetOptions,
|
|
62
|
+
Y as useTimeRangeSelection
|
|
63
63
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import l from "../Typography/Typography.js";
|
|
3
3
|
import { TypographyVariant as s } from "../Typography/types.js";
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import
|
|
4
|
+
import { useCallback as E } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
5
|
+
import T from "../../../core/Context/useCoreContext.js";
|
|
6
6
|
import "./ErrorMessageDisplay.scss.js";
|
|
7
7
|
import _ from "../../../images/no-results.svg.js";
|
|
8
8
|
import I from "../../../core/Auth/useAuthContext.js";
|
|
@@ -11,20 +11,20 @@ import y from "../Button/Button.js";
|
|
|
11
11
|
const a = {
|
|
12
12
|
md: 680,
|
|
13
13
|
lg: 1024
|
|
14
|
-
},
|
|
14
|
+
}, k = ({
|
|
15
15
|
title: g,
|
|
16
16
|
message: p,
|
|
17
17
|
imageDesktop: c,
|
|
18
18
|
imageMobile: n,
|
|
19
|
-
withImage:
|
|
20
|
-
centered:
|
|
19
|
+
withImage: x,
|
|
20
|
+
centered: f,
|
|
21
21
|
refreshComponent: h,
|
|
22
22
|
onContactSupport: t,
|
|
23
23
|
translationValues: i
|
|
24
24
|
}) => {
|
|
25
|
-
const { i18n: e } =
|
|
25
|
+
const { i18n: e } = T(), { updateCore: u } = I(), v = E(
|
|
26
26
|
(o) => Array.isArray(o) ? o.map(
|
|
27
|
-
(d,
|
|
27
|
+
(d, A) => A === 0 ? /* @__PURE__ */ r(m, { children: [
|
|
28
28
|
e.get(d),
|
|
29
29
|
i && i[d] && /* @__PURE__ */ r(m, { children: i[d] })
|
|
30
30
|
] }) : /* @__PURE__ */ r(m, { children: [
|
|
@@ -35,8 +35,8 @@ const a = {
|
|
|
35
35
|
) : e.get(o),
|
|
36
36
|
[e, i]
|
|
37
37
|
);
|
|
38
|
-
return /* @__PURE__ */ r("div", { className: `adyen-pe-error-message-display ${
|
|
39
|
-
(c || n ||
|
|
38
|
+
return /* @__PURE__ */ r("div", { className: `adyen-pe-error-message-display ${f ? "adyen-pe-error-message-display--centered" : ""}`, children: [
|
|
39
|
+
(c || n || x) && /* @__PURE__ */ r("div", { className: "adyen-pe-error-message-display__illustration", children: /* @__PURE__ */ r("picture", { children: [
|
|
40
40
|
/* @__PURE__ */ r("source", { type: "image/svg+xml", media: `(min-width: ${a.md}px)`, srcSet: c }),
|
|
41
41
|
/* @__PURE__ */ r("source", { type: "image/svg+xml", media: `(max-width: ${a.md}px)`, srcSet: n }),
|
|
42
42
|
/* @__PURE__ */ r("img", { srcSet: c ?? _, alt: e.get("thereWasAnUnexpectedError") })
|
|
@@ -50,6 +50,6 @@ const a = {
|
|
|
50
50
|
] });
|
|
51
51
|
};
|
|
52
52
|
export {
|
|
53
|
-
|
|
53
|
+
k as ErrorMessageDisplay,
|
|
54
54
|
a as IMAGE_BREAKPOINT_SIZES
|
|
55
55
|
};
|
|
@@ -3,13 +3,13 @@ import s from "classnames";
|
|
|
3
3
|
import { useState as v, useCallback as h, useRef as l, useEffect as I } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
4
|
import "./ExpandableCard.scss.js";
|
|
5
5
|
import b from "../SVGIcons/ChevronUp.js";
|
|
6
|
-
import
|
|
7
|
-
import { BASE_CLASS as
|
|
6
|
+
import B from "../SVGIcons/ChevronDown.js";
|
|
7
|
+
import { BASE_CLASS as D, CONTAINER_CLASS as p, CONTAINER_BUTTON_CLASS as x, CONTAINER_FILLED_CLASS as m, CONTAINER_OVERLAY_ID as C, CONTENT_CLASS as N, CONTENT_EXPANDABLE_CLASS as L, CHEVRON_CLASS as R, CONTAINER_OVERLAY_CLASS as g, CONTAINER_HIDDEN_CLASS as k } from "./constants.js";
|
|
8
8
|
import y from "../../../core/Context/useCoreContext.js";
|
|
9
9
|
import { useClickOutside as F } from "../../../hooks/element/useClickOutside.js";
|
|
10
10
|
import { Fragment as V } from "../../../external/preact/dist/preact.module.js";
|
|
11
11
|
import T from "../BaseButton/BaseButton.js";
|
|
12
|
-
const
|
|
12
|
+
const w = ({ renderHeader: t, children: u, filled: o, fullWidth: f, ...i }) => {
|
|
13
13
|
const { i18n: A } = y(), [a, S] = v(!1), r = h(() => S((n) => !n), [S]), E = l(null), c = l(!1), O = l(a), d = F(
|
|
14
14
|
void 0,
|
|
15
15
|
h(() => {
|
|
@@ -19,11 +19,11 @@ const U = ({ renderHeader: o, children: u, filled: t, fullWidth: f, ...i }) => {
|
|
|
19
19
|
return I(() => {
|
|
20
20
|
var n, _;
|
|
21
21
|
a ? (n = d.current) == null || n.focus() : (O.current !== a && !c.current && ((_ = E.current) == null || _.focus()), c.current = !1), O.current = a;
|
|
22
|
-
}, [a, d]), /* @__PURE__ */ e("div", { className:
|
|
22
|
+
}, [a, d]), /* @__PURE__ */ e("div", { className: D, children: u ? /* @__PURE__ */ e(V, { children: [
|
|
23
23
|
/* @__PURE__ */ e(
|
|
24
24
|
T,
|
|
25
25
|
{
|
|
26
|
-
className: s(p,
|
|
26
|
+
className: s(p, x, { [m]: o }),
|
|
27
27
|
disabled: a,
|
|
28
28
|
fullWidth: f,
|
|
29
29
|
"aria-controls": C,
|
|
@@ -35,8 +35,8 @@ const U = ({ renderHeader: o, children: u, filled: t, fullWidth: f, ...i }) => {
|
|
|
35
35
|
...i,
|
|
36
36
|
children: [
|
|
37
37
|
/* @__PURE__ */ e("span", { className: "adyen-pe-sr-only", children: A.get("expandableCard.expand") }),
|
|
38
|
-
/* @__PURE__ */ e("div", { className: s(N,
|
|
39
|
-
/* @__PURE__ */ e("div", { className: R, children: /* @__PURE__ */ e(
|
|
38
|
+
/* @__PURE__ */ e("div", { className: s(N, L), children: t }),
|
|
39
|
+
/* @__PURE__ */ e("div", { className: R, children: /* @__PURE__ */ e(B, { role: "presentation" }) })
|
|
40
40
|
]
|
|
41
41
|
}
|
|
42
42
|
),
|
|
@@ -44,9 +44,9 @@ const U = ({ renderHeader: o, children: u, filled: t, fullWidth: f, ...i }) => {
|
|
|
44
44
|
T,
|
|
45
45
|
{
|
|
46
46
|
id: C,
|
|
47
|
-
className: s(p,
|
|
48
|
-
[m]:
|
|
49
|
-
[
|
|
47
|
+
className: s(p, x, g, {
|
|
48
|
+
[m]: o,
|
|
49
|
+
[k]: !a
|
|
50
50
|
}),
|
|
51
51
|
disabled: !a,
|
|
52
52
|
fullWidth: f,
|
|
@@ -59,16 +59,16 @@ const U = ({ renderHeader: o, children: u, filled: t, fullWidth: f, ...i }) => {
|
|
|
59
59
|
...i,
|
|
60
60
|
children: [
|
|
61
61
|
/* @__PURE__ */ e("span", { className: "adyen-pe-sr-only", children: A.get("expandableCard.collapse") }),
|
|
62
|
-
/* @__PURE__ */ e("div", { className: s(N,
|
|
63
|
-
|
|
62
|
+
/* @__PURE__ */ e("div", { className: s(N, L), children: [
|
|
63
|
+
t,
|
|
64
64
|
/* @__PURE__ */ e("div", { children: u })
|
|
65
65
|
] }),
|
|
66
66
|
/* @__PURE__ */ e("div", { className: R, children: /* @__PURE__ */ e(b, { role: "presentation" }) })
|
|
67
67
|
]
|
|
68
68
|
}
|
|
69
69
|
)
|
|
70
|
-
] }) : /* @__PURE__ */ e("div", { className: s(p, { [m]:
|
|
71
|
-
}, K =
|
|
70
|
+
] }) : /* @__PURE__ */ e("div", { className: s(p, { [m]: o }), ...i, children: /* @__PURE__ */ e("div", { className: N, children: t }) }) });
|
|
71
|
+
}, K = w;
|
|
72
72
|
export {
|
|
73
73
|
K as default
|
|
74
74
|
};
|
|
@@ -4,32 +4,32 @@ import { ButtonVariant as n } from "../Button/types.js";
|
|
|
4
4
|
import f from "../SVGIcons/Close.js";
|
|
5
5
|
import d from "../SVGIcons/Filter.js";
|
|
6
6
|
import { TypographyVariant as p } from "../Typography/types.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import u from "../Typography/Typography.js";
|
|
8
|
+
import h from "../../../core/Context/useCoreContext.js";
|
|
9
9
|
import y from "classnames";
|
|
10
10
|
import { useState as F, useEffect as b } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
11
11
|
import "./FilterBar.scss.js";
|
|
12
12
|
import l from "../Button/Button.js";
|
|
13
|
-
import { Fragment as
|
|
14
|
-
function
|
|
15
|
-
const { i18n: i } =
|
|
13
|
+
import { Fragment as _ } from "../../../external/preact/dist/preact.module.js";
|
|
14
|
+
function k(t) {
|
|
15
|
+
const { i18n: i } = h(), e = s(c.down.xs), [a, o] = F(!e);
|
|
16
16
|
return b(() => {
|
|
17
|
-
|
|
18
|
-
}, [e]), /* @__PURE__ */ r(
|
|
17
|
+
o(!e);
|
|
18
|
+
}, [e]), /* @__PURE__ */ r(_, { children: [
|
|
19
19
|
e && /* @__PURE__ */ r("div", { className: "adyen-pe-filter-bar__header", children: [
|
|
20
|
-
/* @__PURE__ */ r(
|
|
20
|
+
/* @__PURE__ */ r(u, { variant: p.SUBTITLE, children: i.get("transactions") }),
|
|
21
21
|
/* @__PURE__ */ r(
|
|
22
22
|
l,
|
|
23
23
|
{
|
|
24
24
|
className: "adyen-pe-filter-bar__header-icon",
|
|
25
25
|
variant: n.SECONDARY,
|
|
26
26
|
iconButton: !0,
|
|
27
|
-
onClick: () =>
|
|
28
|
-
children:
|
|
27
|
+
onClick: () => o((m) => !m),
|
|
28
|
+
children: a ? /* @__PURE__ */ r(f, {}) : /* @__PURE__ */ r(d, {})
|
|
29
29
|
}
|
|
30
30
|
)
|
|
31
31
|
] }),
|
|
32
|
-
|
|
32
|
+
a && /* @__PURE__ */ r(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
35
|
"aria-label": i.get("filterBar"),
|
|
@@ -43,5 +43,5 @@ function V(t) {
|
|
|
43
43
|
] });
|
|
44
44
|
}
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
k as default
|
|
47
47
|
};
|
|
@@ -2,17 +2,17 @@ import { jsx as t } from "../../../../../external/preact/jsx-runtime/dist/jsxRun
|
|
|
2
2
|
import c from "../../../Button/hooks/useButton.js";
|
|
3
3
|
import { TypographyElement as y, TypographyVariant as T } from "../../../Typography/types.js";
|
|
4
4
|
import B from "../../../Typography/Typography.js";
|
|
5
|
-
import { parseClassName as
|
|
6
|
-
import { parseBoolean as
|
|
7
|
-
import { forwardRef as
|
|
5
|
+
import { parseClassName as N } from "../../../../../utils/class-name-utils.js";
|
|
6
|
+
import { parseBoolean as d } from "../../../../../utils/common/index.js";
|
|
7
|
+
import { forwardRef as g } from "../../../../../external/preact/compat/dist/compat.module.js";
|
|
8
8
|
import { useMemo as e } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
9
9
|
import "./FilterButton.scss.js";
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
const i = e(() =>
|
|
13
|
-
return /* @__PURE__ */ t("button", { className:
|
|
10
|
+
const h = "adyen-pe-filter-button";
|
|
11
|
+
function A({ className: o, classNameModifiers: a = [], children: s, disabled: r, onClick: m, ...n }, p) {
|
|
12
|
+
const i = e(() => N("", o) || "", [o]), l = e(() => d(r), [r]), { classes: u, click: f } = c(i, a, h, l, m);
|
|
13
|
+
return /* @__PURE__ */ t("button", { className: u, ref: p, onClick: f, ...n, children: /* @__PURE__ */ t(B, { el: y.SPAN, variant: T.BODY, stronger: !0, children: s }) });
|
|
14
14
|
}
|
|
15
|
-
const x =
|
|
15
|
+
const x = g(A);
|
|
16
16
|
export {
|
|
17
17
|
x as default
|
|
18
18
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { RangeSelection as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { PopoverContainerSize as
|
|
5
|
-
import
|
|
6
|
-
import { AMOUNT_MULTIPLIER as
|
|
7
|
-
import
|
|
8
|
-
import { EMPTY_OBJECT as
|
|
9
|
-
const
|
|
10
|
-
const { i18n: A } =
|
|
1
|
+
import { jsx as P } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
+
import { RangeSelection as U } from "./RangeSelection.js";
|
|
3
|
+
import { useState as M, useMemo as v, useCallback as E } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
|
+
import { PopoverContainerSize as w } from "../../../Popover/types.js";
|
|
5
|
+
import z from "../../../../../core/Context/useCoreContext.js";
|
|
6
|
+
import { AMOUNT_MULTIPLIER as L } from "./constants.js";
|
|
7
|
+
import B from "../BaseFilter/BaseFilter.js";
|
|
8
|
+
import { EMPTY_OBJECT as D } from "../../../../../utils/common/constants.js";
|
|
9
|
+
const u = ({ updateFilters: $, selectedCurrencies: t, availableCurrencies: m, ...x }) => {
|
|
10
|
+
const { i18n: A } = z(), [y, T] = M(), [p, g] = M(), S = v(() => (t == null ? void 0 : t.length) === 1 || (m == null ? void 0 : m.length) === 1, [m == null ? void 0 : m.length, t == null ? void 0 : t.length]), h = E(
|
|
11
11
|
(n, o) => {
|
|
12
|
-
const f = (t == null ? void 0 : t[0]) || (m == null ? void 0 : m[0]),
|
|
12
|
+
const f = (t == null ? void 0 : t[0]) || (m == null ? void 0 : m[0]), I = o && f ? {
|
|
13
13
|
style: "currency",
|
|
14
14
|
currency: f,
|
|
15
15
|
currencyDisplay: "symbol"
|
|
16
16
|
} : void 0;
|
|
17
|
-
return n.toLocaleString(A.locale,
|
|
17
|
+
return n.toLocaleString(A.locale, I);
|
|
18
18
|
},
|
|
19
19
|
[m, A, t]
|
|
20
|
-
), V =
|
|
20
|
+
), V = E(
|
|
21
21
|
(n) => {
|
|
22
|
-
const { minAmount: o, maxAmount: f } = n ??
|
|
23
|
-
|
|
24
|
-
minAmount: o !== void 0 ? String(o *
|
|
25
|
-
maxAmount: f !== void 0 ? String(f *
|
|
22
|
+
const { minAmount: o, maxAmount: f } = n ?? D;
|
|
23
|
+
T({ minAmount: o, maxAmount: f }), o === void 0 && f === void 0 && g(void 0), $({
|
|
24
|
+
minAmount: o !== void 0 ? String(o * L) : void 0,
|
|
25
|
+
maxAmount: f !== void 0 ? String(f * L) : void 0
|
|
26
26
|
});
|
|
27
27
|
},
|
|
28
28
|
[$]
|
|
@@ -30,27 +30,27 @@ const N = ({ updateFilters: $, selectedCurrencies: t, availableCurrencies: m, ..
|
|
|
30
30
|
if (y && (y.minAmount || y.maxAmount)) {
|
|
31
31
|
const { minAmount: n, maxAmount: o } = y ?? {};
|
|
32
32
|
n !== void 0 && o !== void 0 && n <= o ? g(
|
|
33
|
-
`${
|
|
34
|
-
) : n !== void 0 && o === void 0 && n >= 0 ? g(`${A.get("from")} ${
|
|
33
|
+
`${h(n, S)} ${A.get("to").toLowerCase()} ${h(o, S)}`
|
|
34
|
+
) : n !== void 0 && o === void 0 && n >= 0 ? g(`${A.get("from")} ${h(n, S)}`) : g(n === void 0 && o !== void 0 ? `${A.get("to")} ${h(o, S)}` : void 0);
|
|
35
35
|
}
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
|
|
36
|
+
return /* @__PURE__ */ P(
|
|
37
|
+
B,
|
|
38
38
|
{
|
|
39
39
|
...x,
|
|
40
40
|
updateFilters: $,
|
|
41
41
|
minAmount: x.minAmount,
|
|
42
42
|
maxAmount: x.maxAmount,
|
|
43
43
|
onChange: V,
|
|
44
|
-
value:
|
|
45
|
-
label:
|
|
44
|
+
value: p,
|
|
45
|
+
label: p || x.label,
|
|
46
46
|
type: "text",
|
|
47
|
-
containerSize:
|
|
47
|
+
containerSize: w.MEDIUM,
|
|
48
48
|
selectedCurrencies: t,
|
|
49
49
|
availableCurrencies: m,
|
|
50
|
-
render:
|
|
50
|
+
render: U
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
};
|
|
54
54
|
export {
|
|
55
|
-
|
|
55
|
+
u as AmountFilter
|
|
56
56
|
};
|
|
@@ -2,19 +2,19 @@ import { jsx as n } from "../../../../../external/preact/jsx-runtime/dist/jsxRun
|
|
|
2
2
|
import f from "../../../FormFields/InputBase.js";
|
|
3
3
|
import "./AmountFilter.scss.js";
|
|
4
4
|
import { useState as p, useCallback as A, useEffect as g, useMemo as F } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
5
|
-
import
|
|
5
|
+
import b from "../../../../../core/Context/useCoreContext.js";
|
|
6
6
|
import { AMOUNT_MULTIPLIER as x } from "./constants.js";
|
|
7
7
|
import { CommitAction as T } from "../../../../../hooks/useCommitAction/types.js";
|
|
8
8
|
const E = ({
|
|
9
9
|
onChange: l,
|
|
10
10
|
editAction: m,
|
|
11
11
|
onValueUpdated: u,
|
|
12
|
-
selectedCurrencies:
|
|
12
|
+
selectedCurrencies: h,
|
|
13
13
|
availableCurrencies: I,
|
|
14
14
|
value: M,
|
|
15
15
|
...i
|
|
16
16
|
}) => {
|
|
17
|
-
const { i18n: r } =
|
|
17
|
+
const { i18n: r } = b(), [e, s] = p(
|
|
18
18
|
i.minAmount !== void 0 ? parseFloat(i.minAmount) / x : void 0
|
|
19
19
|
), [t, c] = p(
|
|
20
20
|
i.maxAmount !== void 0 ? parseFloat(i.maxAmount) / x : void 0
|