@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,22 +1,22 @@
|
|
|
1
1
|
import { jsx as a } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import { useMediaQuery as g, mediaQueries as A } from "../../../../external/TransactionsOverview/hooks/useMediaQuery.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { PopoverContainerVariant as
|
|
3
|
+
import q from "../../components/FilterButton/FilterButton.js";
|
|
4
|
+
import z from "../../../Popover/Popover.js";
|
|
5
|
+
import { PopoverContainerVariant as H, PopoverContainerPosition as L } from "../../../Popover/types.js";
|
|
6
6
|
import { TypographyElement as D, TypographyVariant as N } from "../../../Typography/types.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { isEmpty as
|
|
10
|
-
import { memo as
|
|
11
|
-
import { useMemo as E, useCallback as
|
|
7
|
+
import _ from "../../../Typography/Typography.js";
|
|
8
|
+
import Q from "../../../../../hooks/element/useUniqueIdentifier.js";
|
|
9
|
+
import { isEmpty as R } from "../../../../../utils/validator-utils.js";
|
|
10
|
+
import { memo as j } from "../../../../../external/preact/compat/dist/compat.module.js";
|
|
11
|
+
import { useMemo as E, useCallback as O, useEffect as V, useState as G } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
12
12
|
import J from "../../../FormFields/InputText.js";
|
|
13
13
|
import c from "../../../../../hooks/useBooleanState/useBooleanState.js";
|
|
14
14
|
import K from "../../../../../hooks/useCommitAction/useCommitAction.js";
|
|
15
15
|
import { Fragment as W } from "../../../../../external/preact/dist/preact.module.js";
|
|
16
|
-
import { CommitAction as
|
|
17
|
-
const X = (s) => !s ||
|
|
16
|
+
import { CommitAction as w } from "../../../../../hooks/useCommitAction/types.js";
|
|
17
|
+
const X = (s) => !s || R(s), Z = (() => {
|
|
18
18
|
const s = (e) => {
|
|
19
|
-
const { editAction: f, name: i, onChange: u, onValueUpdated: r } = e, [l, n] = G(e.value), d =
|
|
19
|
+
const { editAction: f, name: i, onChange: u, onValueUpdated: r } = e, [l, n] = G(e.value), d = O(
|
|
20
20
|
(t) => {
|
|
21
21
|
const y = t.target.value.trim();
|
|
22
22
|
n(y), r(y);
|
|
@@ -24,24 +24,24 @@ const X = (s) => !s || j(s), Z = (() => {
|
|
|
24
24
|
[r]
|
|
25
25
|
);
|
|
26
26
|
return V(() => {
|
|
27
|
-
if (f ===
|
|
27
|
+
if (f === w.CLEAR) {
|
|
28
28
|
const t = "";
|
|
29
29
|
n(t), r(t), u(t);
|
|
30
30
|
}
|
|
31
|
-
f ===
|
|
31
|
+
f === w.APPLY && u(l ?? "");
|
|
32
32
|
}, [l, f, u, r]), /* @__PURE__ */ a(J, { name: i, value: l, onInput: d });
|
|
33
33
|
};
|
|
34
34
|
return (e) => /* @__PURE__ */ a(s, { ...e });
|
|
35
35
|
})(), ee = ({ render: s, ...e }) => {
|
|
36
36
|
var B;
|
|
37
|
-
const f = g(A.down.xs), [i, u] = c(!1), [r, l] = c(!1), n = E(() => e.isValueEmpty ?? X, [e.isValueEmpty]), [d, t] = c(n(e.value)), [y, v] = c(!1), [
|
|
37
|
+
const f = g(A.down.xs), [i, u] = c(!1), [r, l] = c(!1), n = E(() => e.isValueEmpty ?? X, [e.isValueEmpty]), [d, t] = c(n(e.value)), [y, v] = c(!1), [S, h] = c(!1), [I, M] = c(n(e.value)), b = Q(), T = E(() => s ?? Z, [s]), x = O(
|
|
38
38
|
(o) => {
|
|
39
39
|
const m = n(o ?? void 0);
|
|
40
40
|
t(m), M(o === null), h(y ? o !== e.value : !m);
|
|
41
41
|
},
|
|
42
42
|
[n, t, M, h, y, e.value]
|
|
43
|
-
), { commitAction: k, commitActionButtons:
|
|
44
|
-
applyDisabled:
|
|
43
|
+
), { commitAction: k, commitActionButtons: $, committing: C, resetCommitAction: P } = K({
|
|
44
|
+
applyDisabled: I || !S,
|
|
45
45
|
resetDisabled: d
|
|
46
46
|
}), [p, F] = E(() => {
|
|
47
47
|
const o = (m) => () => {
|
|
@@ -57,11 +57,11 @@ const X = (s) => !s || j(s), Z = (() => {
|
|
|
57
57
|
}, [e.value, r, n, l, t, v]), V(() => {
|
|
58
58
|
C && p(), t(d);
|
|
59
59
|
}, [C, p, t, d]);
|
|
60
|
-
const
|
|
60
|
+
const U = g(A.only.sm), Y = g(A.only.md);
|
|
61
61
|
return /* @__PURE__ */ a(W, { children: [
|
|
62
62
|
/* @__PURE__ */ a("div", { className: `adyen-pe-filter adyen-pe-filter--${e.type}`, children: E(
|
|
63
63
|
() => /* @__PURE__ */ a(
|
|
64
|
-
|
|
64
|
+
q,
|
|
65
65
|
{
|
|
66
66
|
classNameModifiers: [
|
|
67
67
|
...e.appliedFilterAmount ? ["with-counter"] : [],
|
|
@@ -74,7 +74,7 @@ const X = (s) => !s || j(s), Z = (() => {
|
|
|
74
74
|
ref: b,
|
|
75
75
|
children: /* @__PURE__ */ a("div", { className: "adyen-pe-filter-button__default-container", children: [
|
|
76
76
|
/* @__PURE__ */ a(
|
|
77
|
-
|
|
77
|
+
_,
|
|
78
78
|
{
|
|
79
79
|
el: D.SPAN,
|
|
80
80
|
variant: N.BODY,
|
|
@@ -84,7 +84,7 @@ const X = (s) => !s || j(s), Z = (() => {
|
|
|
84
84
|
}
|
|
85
85
|
),
|
|
86
86
|
!!e.appliedFilterAmount && /* @__PURE__ */ a("div", { className: "adyen-pe-filter-button__counter-wrapper", children: /* @__PURE__ */ a(
|
|
87
|
-
|
|
87
|
+
_,
|
|
88
88
|
{
|
|
89
89
|
el: D.SPAN,
|
|
90
90
|
variant: N.BODY,
|
|
@@ -108,11 +108,11 @@ const X = (s) => !s || j(s), Z = (() => {
|
|
|
108
108
|
]
|
|
109
109
|
) }),
|
|
110
110
|
i && /* @__PURE__ */ a(
|
|
111
|
-
|
|
111
|
+
z,
|
|
112
112
|
{
|
|
113
|
-
actions:
|
|
113
|
+
actions: $,
|
|
114
114
|
title: (B = e.title) == null ? void 0 : B.trim(),
|
|
115
|
-
variant:
|
|
115
|
+
variant: H.POPOVER,
|
|
116
116
|
modifiers: ["filter"],
|
|
117
117
|
open: i,
|
|
118
118
|
"aria-label": `${e.label}`,
|
|
@@ -122,15 +122,15 @@ const X = (s) => !s || j(s), Z = (() => {
|
|
|
122
122
|
divider: !0,
|
|
123
123
|
targetElement: b,
|
|
124
124
|
disableFocusTrap: !1,
|
|
125
|
-
position:
|
|
125
|
+
position: L.BOTTOM,
|
|
126
126
|
containerSize: e.containerSize,
|
|
127
127
|
showOverlay: f,
|
|
128
|
-
fitPosition:
|
|
129
|
-
children:
|
|
128
|
+
fitPosition: U || Y,
|
|
129
|
+
children: T({ ...e, editAction: k, onValueUpdated: x })
|
|
130
130
|
}
|
|
131
131
|
)
|
|
132
132
|
] });
|
|
133
|
-
}, he =
|
|
133
|
+
}, he = j(ee);
|
|
134
134
|
export {
|
|
135
135
|
he as default
|
|
136
136
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as C } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as y, useCallback as M, useMemo as R, useEffect as h, useRef as B } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
3
3
|
import k from "../../../../../core/Context/useCoreContext.js";
|
|
4
4
|
import { DateRangeFilterParam as b } from "./types.js";
|
|
5
5
|
import "./DateFilter.scss.js";
|
|
@@ -11,7 +11,7 @@ const v = {
|
|
|
11
11
|
month: "short",
|
|
12
12
|
day: "numeric",
|
|
13
13
|
year: "numeric"
|
|
14
|
-
}, L = new Intl.DateTimeFormat("en-US", v),
|
|
14
|
+
}, L = new Intl.DateTimeFormat("en-US", v), x = (n, t, r) => {
|
|
15
15
|
const e = t && n.fullDate(t), a = r && n.fullDate(r);
|
|
16
16
|
if (e && a)
|
|
17
17
|
return `${e} - ${a}`;
|
|
@@ -38,22 +38,22 @@ const v = {
|
|
|
38
38
|
timeRangePresetOptions: g,
|
|
39
39
|
timezone: c,
|
|
40
40
|
sinceDate: w,
|
|
41
|
-
untilDate:
|
|
41
|
+
untilDate: O
|
|
42
42
|
}) => {
|
|
43
|
-
const { i18n: D } = k(), [d,
|
|
44
|
-
(m,
|
|
45
|
-
f(
|
|
43
|
+
const { i18n: D } = k(), [d, T] = y(i), u = R(() => [new Date(r), new Date(e)], [r, e]), l = B(), P = M(
|
|
44
|
+
(m, p) => {
|
|
45
|
+
f(x(D, o(m), o(p)));
|
|
46
46
|
},
|
|
47
47
|
[D, f]
|
|
48
48
|
);
|
|
49
|
-
return
|
|
50
|
-
var m,
|
|
49
|
+
return h(() => {
|
|
50
|
+
var m, p, S;
|
|
51
51
|
switch (t) {
|
|
52
52
|
case E.APPLY:
|
|
53
53
|
s({
|
|
54
54
|
selectedPresetOption: d,
|
|
55
55
|
[b.FROM]: o((m = l.current) == null ? void 0 : m.from),
|
|
56
|
-
[b.TO]: o((
|
|
56
|
+
[b.TO]: o((p = l.current) == null ? void 0 : p.to)
|
|
57
57
|
});
|
|
58
58
|
break;
|
|
59
59
|
case E.CLEAR:
|
|
@@ -66,20 +66,20 @@ const v = {
|
|
|
66
66
|
now: a,
|
|
67
67
|
originDate: u,
|
|
68
68
|
onHighlight: P,
|
|
69
|
-
onPresetOptionSelected:
|
|
69
|
+
onPresetOptionSelected: T,
|
|
70
70
|
selectedPresetOption: i,
|
|
71
71
|
timeRangePresetOptions: g,
|
|
72
72
|
timezone: c,
|
|
73
73
|
showTimezoneInfo: F,
|
|
74
74
|
sinceDate: o(w),
|
|
75
|
-
untilDate: o(
|
|
75
|
+
untilDate: o(O)
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
};
|
|
79
79
|
return (t) => /* @__PURE__ */ C(n, { ...t });
|
|
80
80
|
})(), _ = (n, t, r) => n.formatRange(t, r);
|
|
81
81
|
function Q({ title: n, from: t, to: r, selectedPresetOption: e, ...a }) {
|
|
82
|
-
const { i18n: s } = k(), [f, F] =
|
|
82
|
+
const { i18n: s } = k(), [f, F] = y(), [i, g] = y(), [c, w] = y(), O = M(
|
|
83
83
|
(u) => {
|
|
84
84
|
const { from: l, to: P, selectedPresetOption: m } = u ?? A;
|
|
85
85
|
try {
|
|
@@ -97,8 +97,8 @@ function Q({ title: n, from: t, to: r, selectedPresetOption: e, ...a }) {
|
|
|
97
97
|
}
|
|
98
98
|
return [s.get("rangePreset.custom"), u];
|
|
99
99
|
}, [s]);
|
|
100
|
-
|
|
101
|
-
const
|
|
100
|
+
h(() => F(e), [e]), h(() => g(o(t || Date.now())), [t]), h(() => w(o(r || Date.now())), [r]);
|
|
101
|
+
const T = R(() => e === D && i && c ? _(d, new Date(i), new Date(c)) : e ?? a.label, [D, d, i, c, e, a.label]);
|
|
102
102
|
return /* @__PURE__ */ C(
|
|
103
103
|
I,
|
|
104
104
|
{
|
|
@@ -106,11 +106,11 @@ function Q({ title: n, from: t, to: r, selectedPresetOption: e, ...a }) {
|
|
|
106
106
|
from: t,
|
|
107
107
|
to: r,
|
|
108
108
|
type: "date",
|
|
109
|
-
label:
|
|
110
|
-
onChange:
|
|
109
|
+
label: T,
|
|
110
|
+
onChange: O,
|
|
111
111
|
render: Y,
|
|
112
112
|
selectedPresetOption: e,
|
|
113
|
-
value:
|
|
113
|
+
value: x(s, t, r),
|
|
114
114
|
withContentPadding: !1
|
|
115
115
|
}
|
|
116
116
|
);
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { jsx as c } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import { ARIA_ERROR_SUFFIX as h } from "../../../core/Errors/constants.js";
|
|
3
3
|
import { hasOwnProperty as _ } from "../../../utils/common/index.js";
|
|
4
|
-
import
|
|
5
|
-
import { forwardRef as
|
|
4
|
+
import P from "classnames";
|
|
5
|
+
import { forwardRef as k } from "../../../external/preact/compat/dist/compat.module.js";
|
|
6
6
|
import { useCallback as r } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
7
7
|
import "./FormFields.scss.js";
|
|
8
8
|
import { Fragment as q } from "../../../external/preact/dist/preact.module.js";
|
|
9
9
|
function u({ onInput: a, onKeyUp: d, trimOnBlur: l, onBlurHandler: e, onBlur: t, onFocusHandler: s, errorMessage: f, ...p }, v) {
|
|
10
|
-
const { autoCorrect: A, classNameModifiers: m, isInvalid: n, isValid: C, readonly:
|
|
10
|
+
const { autoCorrect: A, classNameModifiers: m, isInvalid: n, isValid: C, readonly: I = !1, spellCheck: O, type: y, uniqueId: o, isCollatingErrors: $, disabled: g } = p;
|
|
11
11
|
_(p, "onChange") && console.error("Error: Form fields that rely on InputBase may not have an onChange property");
|
|
12
12
|
const N = r(
|
|
13
13
|
(i) => {
|
|
14
14
|
a == null || a(i);
|
|
15
15
|
},
|
|
16
16
|
[a]
|
|
17
|
-
),
|
|
17
|
+
), x = r(
|
|
18
18
|
(i) => {
|
|
19
19
|
d && d(i);
|
|
20
20
|
},
|
|
21
21
|
[d]
|
|
22
|
-
),
|
|
22
|
+
), R = r(
|
|
23
23
|
(i) => {
|
|
24
24
|
e == null || e(i), l && (i.target.value = i.target.value.trim()), t == null || t(i);
|
|
25
25
|
},
|
|
26
26
|
[t, e, l]
|
|
27
|
-
),
|
|
27
|
+
), b = r(
|
|
28
28
|
(i) => {
|
|
29
29
|
s == null || s(i);
|
|
30
30
|
},
|
|
31
31
|
[s]
|
|
32
|
-
),
|
|
32
|
+
), w = P(
|
|
33
33
|
"adyen-pe-input",
|
|
34
34
|
[`adyen-pe-input--${y}`],
|
|
35
35
|
p.className,
|
|
@@ -38,7 +38,7 @@ function u({ onInput: a, onKeyUp: d, trimOnBlur: l, onBlurHandler: e, onBlur: t,
|
|
|
38
38
|
"adyen-pe-input--valid": C
|
|
39
39
|
},
|
|
40
40
|
m == null ? void 0 : m.map((i) => `adyen-pe-input--${i}`)
|
|
41
|
-
), { classNameModifiers: V, uniqueId: j, isInvalid: F, isValid: S, isCollatingErrors:
|
|
41
|
+
), { classNameModifiers: V, uniqueId: j, isInvalid: F, isValid: S, isCollatingErrors: U, ...E } = p;
|
|
42
42
|
return /* @__PURE__ */ c(q, { children: [
|
|
43
43
|
/* @__PURE__ */ c(
|
|
44
44
|
"input",
|
|
@@ -46,14 +46,14 @@ function u({ onInput: a, onKeyUp: d, trimOnBlur: l, onBlurHandler: e, onBlur: t,
|
|
|
46
46
|
id: o,
|
|
47
47
|
...E,
|
|
48
48
|
type: y,
|
|
49
|
-
className:
|
|
50
|
-
readOnly:
|
|
51
|
-
"aria-describedby":
|
|
49
|
+
className: w,
|
|
50
|
+
readOnly: I,
|
|
51
|
+
"aria-describedby": $ ? void 0 : `${o}${h}`,
|
|
52
52
|
"aria-invalid": n,
|
|
53
53
|
onInput: N,
|
|
54
|
-
onBlur:
|
|
55
|
-
onFocus:
|
|
56
|
-
onKeyUp:
|
|
54
|
+
onBlur: R,
|
|
55
|
+
onFocus: b,
|
|
56
|
+
onKeyUp: x,
|
|
57
57
|
disabled: g,
|
|
58
58
|
ref: v
|
|
59
59
|
}
|
|
@@ -67,7 +67,7 @@ u.defaultProps = {
|
|
|
67
67
|
onInput: () => {
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
|
-
const
|
|
70
|
+
const Q = k(u);
|
|
71
71
|
export {
|
|
72
|
-
|
|
72
|
+
Q as default
|
|
73
73
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as t } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import a from "./InputBase.js";
|
|
3
3
|
import { forwardRef as i } from "../../../external/preact/compat/dist/compat.module.js";
|
|
4
|
-
const
|
|
4
|
+
const m = i(function(e, r) {
|
|
5
5
|
return /* @__PURE__ */ t(a, { classNameModifiers: e.classNameModifiers, ...e, ref: r, "aria-required": e.required, type: "text" });
|
|
6
6
|
});
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
m as default
|
|
9
9
|
};
|
|
@@ -10,10 +10,10 @@ import Ee from "./components/SelectList.js";
|
|
|
10
10
|
import Se from "./hooks/useSelect.js";
|
|
11
11
|
import { DROPDOWN_BASE_CLASS as K, DROPDOWN_MULTI_SELECT_CLASS as Re } from "./constants.js";
|
|
12
12
|
import "./Select.scss.js";
|
|
13
|
-
import
|
|
13
|
+
import De from "../../../../hooks/useCommitAction/useCommitAction.js";
|
|
14
14
|
import { CommitAction as U } from "../../../../hooks/useCommitAction/types.js";
|
|
15
15
|
import { EMPTY_ARRAY as Y } from "../../../../utils/common/constants.js";
|
|
16
|
-
const
|
|
16
|
+
const he = ({
|
|
17
17
|
className: P,
|
|
18
18
|
classNameModifiers: _ = Y,
|
|
19
19
|
popoverClassNameModifiers: M,
|
|
@@ -25,17 +25,17 @@ const De = ({
|
|
|
25
25
|
selected: H,
|
|
26
26
|
name: O,
|
|
27
27
|
isInvalid: X,
|
|
28
|
-
isValid:
|
|
29
|
-
placeholder:
|
|
30
|
-
uniqueId:
|
|
31
|
-
renderListItem:
|
|
32
|
-
isCollatingErrors:
|
|
33
|
-
setToTargetWidth:
|
|
34
|
-
withoutCollapseIndicator:
|
|
35
|
-
showOverlay:
|
|
28
|
+
isValid: q,
|
|
29
|
+
placeholder: z,
|
|
30
|
+
uniqueId: D,
|
|
31
|
+
renderListItem: G,
|
|
32
|
+
isCollatingErrors: J,
|
|
33
|
+
setToTargetWidth: Q,
|
|
34
|
+
withoutCollapseIndicator: V = !1,
|
|
35
|
+
showOverlay: Z = !1,
|
|
36
36
|
fitPosition: ee
|
|
37
37
|
}) => {
|
|
38
|
-
const { resetSelection: f, select: v, selection: n } = Se({ items: g, multiSelect: m, selected: H }), [o, i] = w(!1), [
|
|
38
|
+
const { resetSelection: f, select: v, selection: n } = Se({ items: g, multiSelect: m, selected: H }), [o, i] = w(!1), [h, d] = w(""), E = a(null), p = a(null), k = a(null), I = a(`select-${be()}`), [te, x] = w(0), B = a(), S = a(!0), C = a(!1), L = a(n), N = a(n), re = l(() => {
|
|
39
39
|
d(""), i(!1), o && (f(L.current), S.current = !0);
|
|
40
40
|
}, [f, i, d, o]), se = de(
|
|
41
41
|
() => fe([
|
|
@@ -45,7 +45,7 @@ const De = ({
|
|
|
45
45
|
P
|
|
46
46
|
]),
|
|
47
47
|
[P, _, m]
|
|
48
|
-
), { commitAction: y, commitActionButtons: ne, committing: W, resetCommitAction: $ } =
|
|
48
|
+
), { commitAction: y, commitActionButtons: ne, committing: W, resetCommitAction: $ } = De({
|
|
49
49
|
resetDisabled: !n.length
|
|
50
50
|
}), c = l(() => {
|
|
51
51
|
var e;
|
|
@@ -80,8 +80,8 @@ const De = ({
|
|
|
80
80
|
b(() => {
|
|
81
81
|
N.current !== n && (N.current = n, (!m || C.current) && (R(), c())), C.current = !1;
|
|
82
82
|
}, [c, R, m, n]), b(() => {
|
|
83
|
-
W && (
|
|
84
|
-
}, [W, c,
|
|
83
|
+
W && (x(n.length), c());
|
|
84
|
+
}, [W, c, x, n.length]);
|
|
85
85
|
const oe = l(
|
|
86
86
|
(e) => {
|
|
87
87
|
switch (e.code) {
|
|
@@ -93,7 +93,7 @@ const De = ({
|
|
|
93
93
|
case s.SPACE:
|
|
94
94
|
if (u && o) {
|
|
95
95
|
if (e.key === s.ENTER)
|
|
96
|
-
if (
|
|
96
|
+
if (h)
|
|
97
97
|
A(e);
|
|
98
98
|
else
|
|
99
99
|
break;
|
|
@@ -108,10 +108,10 @@ const De = ({
|
|
|
108
108
|
}
|
|
109
109
|
e.preventDefault(), i(!0);
|
|
110
110
|
},
|
|
111
|
-
[c, u, A, o, i,
|
|
111
|
+
[c, u, A, o, i, h]
|
|
112
112
|
);
|
|
113
113
|
b(() => {
|
|
114
|
-
o && (cancelAnimationFrame(
|
|
114
|
+
o && (cancelAnimationFrame(B.current), B.current = requestAnimationFrame(() => {
|
|
115
115
|
var e;
|
|
116
116
|
e: {
|
|
117
117
|
let t = (e = p.current) == null ? void 0 : e.firstElementChild, r;
|
|
@@ -192,31 +192,31 @@ const De = ({
|
|
|
192
192
|
/* @__PURE__ */ T(
|
|
193
193
|
ge,
|
|
194
194
|
{
|
|
195
|
-
id:
|
|
195
|
+
id: D ?? void 0,
|
|
196
196
|
appliedFilterNumber: te,
|
|
197
197
|
active: n,
|
|
198
198
|
filterInputRef: E,
|
|
199
199
|
filterable: u,
|
|
200
200
|
isInvalid: X,
|
|
201
|
-
isValid:
|
|
201
|
+
isValid: q,
|
|
202
202
|
onButtonKeyDown: oe,
|
|
203
203
|
onInput: ae,
|
|
204
204
|
multiSelect: m,
|
|
205
|
-
placeholder:
|
|
205
|
+
placeholder: z,
|
|
206
206
|
readonly: j,
|
|
207
207
|
selectListId: I.current,
|
|
208
208
|
showList: o,
|
|
209
209
|
toggleButtonRef: k,
|
|
210
210
|
toggleList: ie,
|
|
211
|
-
withoutCollapseIndicator:
|
|
212
|
-
ariaDescribedBy: !
|
|
211
|
+
withoutCollapseIndicator: V,
|
|
212
|
+
ariaDescribedBy: !J && D ? `${D}${pe}` : ""
|
|
213
213
|
}
|
|
214
214
|
),
|
|
215
215
|
/* @__PURE__ */ T(
|
|
216
216
|
Ee,
|
|
217
217
|
{
|
|
218
218
|
popoverClassNameModifiers: M,
|
|
219
|
-
setToTargetWidth:
|
|
219
|
+
setToTargetWidth: Q,
|
|
220
220
|
dismissPopover: re,
|
|
221
221
|
active: n,
|
|
222
222
|
commitActions: ne,
|
|
@@ -227,15 +227,15 @@ const De = ({
|
|
|
227
227
|
selectListId: I.current,
|
|
228
228
|
ref: p,
|
|
229
229
|
toggleButtonRef: k,
|
|
230
|
-
renderListItem:
|
|
230
|
+
renderListItem: G,
|
|
231
231
|
showList: o,
|
|
232
|
-
showOverlay:
|
|
233
|
-
textFilter:
|
|
232
|
+
showOverlay: Z,
|
|
233
|
+
textFilter: h,
|
|
234
234
|
fitPosition: ee
|
|
235
235
|
}
|
|
236
236
|
)
|
|
237
237
|
] });
|
|
238
|
-
}, We =
|
|
238
|
+
}, We = he;
|
|
239
239
|
export {
|
|
240
240
|
We as default
|
|
241
241
|
};
|
|
@@ -3,9 +3,9 @@ import T from "classnames";
|
|
|
3
3
|
import { useMemo as N } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
4
|
import S from "../../../../../core/Context/useCoreContext.js";
|
|
5
5
|
import { ButtonVariant as C } from "../../../Button/types.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { TypographyElement as
|
|
6
|
+
import u from "../../../Typography/Typography.js";
|
|
7
|
+
import L from "../../../SVGIcons/ChevronDown.js";
|
|
8
|
+
import { TypographyElement as f, TypographyVariant as B } from "../../../Typography/types.js";
|
|
9
9
|
import { DROPDOWN_BUTTON_CLASS as p, DROPDOWN_BUTTON_ACTIVE_CLASS as R, DROPDOWN_BUTTON_HAS_SELECTION_CLASS as h, DROPDOWN_BUTTON_READONLY_CLASS as y, DROPDOWN_BUTTON_INVALID_CLASS as A, DROPDOWN_BUTTON_VALID_CLASS as E, DROPDOWN_BUTTON_ICON_CLASS as P, DROPDOWN_BUTTON_TEXT_CLASS as U, DROPDOWN_BUTTON_MULTI_SELECT_COUNTER_CLASS as g, DROPDOWN_BUTTON_COLLAPSE_INDICATOR_CLASS as x, DROPDOWN_BUTTON_CLASSNAME as I } from "../constants.js";
|
|
10
10
|
import { Fragment as W } from "../../../../../external/preact/dist/preact.module.js";
|
|
11
11
|
import b from "../../../Img/Img.js";
|
|
@@ -13,13 +13,13 @@ import w from "../../../Button/Button.js";
|
|
|
13
13
|
const V = ({
|
|
14
14
|
active: e,
|
|
15
15
|
disabled: m,
|
|
16
|
-
className:
|
|
17
|
-
filterable:
|
|
16
|
+
className: i,
|
|
17
|
+
filterable: o,
|
|
18
18
|
toggleButtonRef: l,
|
|
19
19
|
...n
|
|
20
20
|
}) => {
|
|
21
|
-
const r = N(() =>
|
|
22
|
-
return
|
|
21
|
+
const r = N(() => o ? T(I, i) : i, [i, o]);
|
|
22
|
+
return o ? /* @__PURE__ */ a("div", { ...n, className: r, ref: l }) : /* @__PURE__ */ a(
|
|
23
23
|
w,
|
|
24
24
|
{
|
|
25
25
|
...n,
|
|
@@ -31,37 +31,37 @@ const V = ({
|
|
|
31
31
|
);
|
|
32
32
|
}, v = (e) => {
|
|
33
33
|
var d;
|
|
34
|
-
const { i18n: m } = S(), { active:
|
|
34
|
+
const { i18n: m } = S(), { active: i, filterable: o, multiSelect: l, placeholder: n, readonly: r, showList: s, withoutCollapseIndicator: _ } = e, O = N(() => (n == null ? void 0 : n.trim()) || m.get("select.filter.placeholder"), [m, n]), t = N(() => l === !0 ? void 0 : i[0], [i, l]), D = N(() => {
|
|
35
35
|
var c;
|
|
36
36
|
return ((c = t == null ? void 0 : t.name) == null ? void 0 : c.trim()) || O;
|
|
37
37
|
}, [t, O]);
|
|
38
38
|
return /* @__PURE__ */ a(
|
|
39
39
|
V,
|
|
40
40
|
{
|
|
41
|
-
active:
|
|
41
|
+
active: i,
|
|
42
42
|
disabled: r,
|
|
43
43
|
"aria-disabled": r,
|
|
44
44
|
"aria-expanded": s,
|
|
45
45
|
"aria-haspopup": "listbox",
|
|
46
46
|
className: T(p, {
|
|
47
47
|
[R]: s,
|
|
48
|
-
[h]: !!
|
|
48
|
+
[h]: !!i.length,
|
|
49
49
|
[y]: r,
|
|
50
50
|
[A]: e.isInvalid,
|
|
51
51
|
[E]: e.isValid
|
|
52
52
|
}),
|
|
53
|
-
filterable:
|
|
53
|
+
filterable: o,
|
|
54
54
|
onClick: r ? void 0 : e.toggleList,
|
|
55
55
|
onKeyDown: r ? void 0 : e.onButtonKeyDown,
|
|
56
|
-
role:
|
|
56
|
+
role: o ? "button" : void 0,
|
|
57
57
|
tabIndex: 0,
|
|
58
58
|
title: D,
|
|
59
59
|
toggleButtonRef: e.toggleButtonRef,
|
|
60
|
-
type:
|
|
60
|
+
type: o ? "" : "button",
|
|
61
61
|
"aria-describedby": e.ariaDescribedBy,
|
|
62
62
|
id: e.id ?? "",
|
|
63
63
|
children: [
|
|
64
|
-
s &&
|
|
64
|
+
s && o ? /* @__PURE__ */ a(
|
|
65
65
|
"input",
|
|
66
66
|
{
|
|
67
67
|
"aria-autocomplete": "list",
|
|
@@ -79,9 +79,9 @@ const V = ({
|
|
|
79
79
|
) : /* @__PURE__ */ a(W, { children: [
|
|
80
80
|
(t == null ? void 0 : t.icon) && /* @__PURE__ */ a(b, { className: P, src: t.icon, alt: t.name.trim() }),
|
|
81
81
|
/* @__PURE__ */ a("span", { className: U, children: ((d = t == null ? void 0 : t.selectedOptionName) == null ? void 0 : d.trim()) || (t == null ? void 0 : t.name.trim()) || O }),
|
|
82
|
-
l && e.appliedFilterNumber > 0 && /* @__PURE__ */ a("div", { className: g, children: /* @__PURE__ */ a(
|
|
82
|
+
l && e.appliedFilterNumber > 0 && /* @__PURE__ */ a("div", { className: g, children: /* @__PURE__ */ a(u, { el: f.SPAN, variant: B.BODY, stronger: !0, children: e.appliedFilterNumber }) })
|
|
83
83
|
] }),
|
|
84
|
-
!_ && /* @__PURE__ */ a("span", { className: x, children: /* @__PURE__ */ a(
|
|
84
|
+
!_ && /* @__PURE__ */ a("span", { className: x, children: /* @__PURE__ */ a(L, { role: "presentation" }) })
|
|
85
85
|
]
|
|
86
86
|
}
|
|
87
87
|
);
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as o } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
-
import { useMediaQuery as
|
|
3
|
-
import
|
|
4
|
-
import { PopoverContainerSize as
|
|
5
|
-
import
|
|
6
|
-
import { isFunction as
|
|
7
|
-
import
|
|
2
|
+
import { useMediaQuery as x, mediaQueries as R } from "../../../../external/TransactionsOverview/hooks/useMediaQuery.js";
|
|
3
|
+
import w from "../../../Popover/Popover.js";
|
|
4
|
+
import { PopoverContainerSize as A, PopoverContainerVariant as b, PopoverContainerPosition as g } from "../../../Popover/types.js";
|
|
5
|
+
import h from "../../../../../core/Context/useCoreContext.js";
|
|
6
|
+
import { isFunction as V } from "../../../../../utils/common/index.js";
|
|
7
|
+
import W from "../../../../../utils/fixedForwardRef.js";
|
|
8
8
|
import m from "classnames";
|
|
9
|
-
import { memo as
|
|
9
|
+
import { memo as F } from "../../../../../external/preact/compat/dist/compat.module.js";
|
|
10
10
|
import { useMemo as l } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
11
11
|
import { DROPDOWN_LIST_CLASS as y, DROPDOWN_LIST_ACTIVE_CLASS as z, DROPDOWN_ELEMENT_CLASS as Q, DROPDOWN_ELEMENT_NO_OPTION_CLASS as j } from "../constants.js";
|
|
12
|
-
import
|
|
13
|
-
const
|
|
12
|
+
import q, { renderSelectListItemDefault as B } from "./SelectListItem.js";
|
|
13
|
+
const U = W(
|
|
14
14
|
({
|
|
15
15
|
active: c,
|
|
16
16
|
commitActions: d,
|
|
17
17
|
items: p,
|
|
18
18
|
multiSelect: s,
|
|
19
|
-
onKeyDown:
|
|
20
|
-
onSelect:
|
|
19
|
+
onKeyDown: u,
|
|
20
|
+
onSelect: f,
|
|
21
21
|
renderListItem: t,
|
|
22
22
|
selectListId: O,
|
|
23
23
|
showList: i,
|
|
@@ -29,9 +29,9 @@ const $ = V(
|
|
|
29
29
|
showOverlay: _,
|
|
30
30
|
fitPosition: D
|
|
31
31
|
}, E) => {
|
|
32
|
-
const { i18n: L } =
|
|
32
|
+
const { i18n: L } = h(), v = x(R.down.xs), a = p.filter((e) => !n || e.name.toLowerCase().includes(n)), T = m(y, { [z]: i }), M = m(Q, j), I = l(() => V(t) ? t : B, [t]), r = l(() => s === !0, [s]);
|
|
33
33
|
return i ? /* @__PURE__ */ o(
|
|
34
|
-
|
|
34
|
+
w,
|
|
35
35
|
{
|
|
36
36
|
classNameModifiers: P,
|
|
37
37
|
actions: r ? d : void 0,
|
|
@@ -41,21 +41,21 @@ const $ = V(
|
|
|
41
41
|
dismissible: !1,
|
|
42
42
|
open: i,
|
|
43
43
|
setToTargetWidth: N,
|
|
44
|
-
containerSize:
|
|
45
|
-
variant:
|
|
44
|
+
containerSize: A.MEDIUM,
|
|
45
|
+
variant: b.POPOVER,
|
|
46
46
|
targetElement: S,
|
|
47
47
|
withContentPadding: !1,
|
|
48
|
-
position:
|
|
48
|
+
position: g.BOTTOM,
|
|
49
49
|
showOverlay: _ && v,
|
|
50
50
|
fitPosition: D,
|
|
51
51
|
children: /* @__PURE__ */ o("ul", { className: T, id: O, ref: E, role: "listbox", "aria-multiselectable": r, children: a.length ? a.map((e) => /* @__PURE__ */ o(
|
|
52
|
-
|
|
52
|
+
q,
|
|
53
53
|
{
|
|
54
54
|
item: e,
|
|
55
55
|
multiSelect: r,
|
|
56
|
-
onKeyDown:
|
|
57
|
-
onSelect:
|
|
58
|
-
renderListItem:
|
|
56
|
+
onKeyDown: u,
|
|
57
|
+
onSelect: f,
|
|
58
|
+
renderListItem: I,
|
|
59
59
|
selected: c.includes(e)
|
|
60
60
|
},
|
|
61
61
|
e.id
|
|
@@ -63,7 +63,7 @@ const $ = V(
|
|
|
63
63
|
}
|
|
64
64
|
) : null;
|
|
65
65
|
}
|
|
66
|
-
), ie =
|
|
66
|
+
), ie = F(U);
|
|
67
67
|
export {
|
|
68
68
|
ie as default
|
|
69
69
|
};
|