@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,27 +1,27 @@
|
|
|
1
1
|
import { jsx as o } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import { useSetupEndpoint as g } from "../../../../../hooks/useSetupEndpoint/useSetupEndpoint.js";
|
|
3
|
-
import { useFetch as
|
|
4
|
-
import { TransactionsOverview as
|
|
5
|
-
import { useCallback as
|
|
6
|
-
import
|
|
3
|
+
import { useFetch as d } from "../../../../../hooks/useFetch/useFetch.js";
|
|
4
|
+
import { TransactionsOverview as h } from "../TransactionsOverview/TransactionsOverview.js";
|
|
5
|
+
import { useCallback as f, useMemo as a } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
6
|
+
import A from "../../../../../core/Auth/useAuthContext.js";
|
|
7
7
|
import p from "classnames";
|
|
8
|
-
import { ErrorMessageDisplay as
|
|
8
|
+
import { ErrorMessageDisplay as i } from "../../../../internal/ErrorMessageDisplay/ErrorMessageDisplay.js";
|
|
9
9
|
import { BASE_CLASS as C, WITH_ERROR_CLASS as I } from "./constants.js";
|
|
10
10
|
import "./TransactionsOverviewContainer.scss.js";
|
|
11
|
-
import { EMPTY_OBJECT as
|
|
12
|
-
function
|
|
13
|
-
const { sessionSetupError:
|
|
14
|
-
fetchOptions: { enabled: !!
|
|
15
|
-
queryFn:
|
|
11
|
+
import { EMPTY_OBJECT as v } from "../../../../../utils/common/constants.js";
|
|
12
|
+
function R(n) {
|
|
13
|
+
const { sessionSetupError: r, endpoints: s } = A(), c = g("getBalanceAccounts"), { data: e, isFetching: m } = d({
|
|
14
|
+
fetchOptions: { enabled: !!s.getBalanceAccounts, keepPrevData: !0 },
|
|
15
|
+
queryFn: f(async () => c(v), [c])
|
|
16
16
|
}), t = a(
|
|
17
|
-
() => e == null ? void 0 : e.
|
|
18
|
-
[e == null ? void 0 : e.
|
|
19
|
-
),
|
|
20
|
-
() => !!n.balanceAccountId && !!(e != null && e.
|
|
21
|
-
[t == null ? void 0 : t.length, e == null ? void 0 : e.
|
|
17
|
+
() => e == null ? void 0 : e.data.filter((l) => n.balanceAccountId ? l.id === n.balanceAccountId : !0),
|
|
18
|
+
[e == null ? void 0 : e.data, n.balanceAccountId]
|
|
19
|
+
), u = a(
|
|
20
|
+
() => !!n.balanceAccountId && !!(e != null && e.data.length) && (t == null ? void 0 : t.length) === 0,
|
|
21
|
+
[t == null ? void 0 : t.length, e == null ? void 0 : e.data.length, n.balanceAccountId]
|
|
22
22
|
);
|
|
23
|
-
return /* @__PURE__ */ o("div", { className: p(C, { [I]:
|
|
24
|
-
|
|
23
|
+
return /* @__PURE__ */ o("div", { className: p(C, { [I]: r }), children: r ? /* @__PURE__ */ o(
|
|
24
|
+
i,
|
|
25
25
|
{
|
|
26
26
|
withImage: !0,
|
|
27
27
|
centered: !0,
|
|
@@ -29,16 +29,16 @@ function F(n) {
|
|
|
29
29
|
message: ["weCouldNotLoadTheTransactionsOverview", "tryRefreshingThePageOrComeBackLater"],
|
|
30
30
|
refreshComponent: !0
|
|
31
31
|
}
|
|
32
|
-
) :
|
|
33
|
-
|
|
32
|
+
) : u ? /* @__PURE__ */ o(
|
|
33
|
+
i,
|
|
34
34
|
{
|
|
35
35
|
withImage: !0,
|
|
36
36
|
centered: !0,
|
|
37
37
|
title: "somethingWentWrong",
|
|
38
38
|
message: ["weCouldNotLoadTheTransactionsOverview", "theSelectedBalanceAccountIsIncorrect"]
|
|
39
39
|
}
|
|
40
|
-
) : /* @__PURE__ */ o(
|
|
40
|
+
) : /* @__PURE__ */ o(h, { ...n, balanceAccounts: t, isLoadingBalanceAccount: m }) });
|
|
41
41
|
}
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
R as default
|
|
44
44
|
};
|
|
@@ -7,28 +7,28 @@ import P from "../../../internal/FilterBar/filters/DateFilter/DateFilter.js";
|
|
|
7
7
|
import { EMPTY_OBJECT as S } from "../../../../utils/common/constants.js";
|
|
8
8
|
const _ = ({
|
|
9
9
|
balanceAccount: a,
|
|
10
|
-
canResetFilters:
|
|
11
|
-
defaultParams:
|
|
12
|
-
filters:
|
|
13
|
-
nowTimestamp:
|
|
10
|
+
canResetFilters: C,
|
|
11
|
+
defaultParams: n,
|
|
12
|
+
filters: T,
|
|
13
|
+
nowTimestamp: o,
|
|
14
14
|
refreshNowTimestamp: D,
|
|
15
15
|
updateFilters: s
|
|
16
16
|
}) => {
|
|
17
|
-
const { i18n: i } = I(), t = E(() => i.get(
|
|
17
|
+
const { i18n: i } = I(), t = E(() => i.get(n.current.defaultTimeRange), [i]), [g, R] = d(t), l = p(
|
|
18
18
|
(r = S) => {
|
|
19
|
-
for (const [
|
|
20
|
-
switch (
|
|
19
|
+
for (const [f, m] of Object.entries(r)) {
|
|
20
|
+
switch (f) {
|
|
21
21
|
case "selectedPresetOption":
|
|
22
22
|
R(m || t);
|
|
23
23
|
break;
|
|
24
24
|
case c.FROM:
|
|
25
25
|
s({
|
|
26
|
-
[e.CREATED_SINCE]: m ||
|
|
26
|
+
[e.CREATED_SINCE]: m || n.current.defaultFilterParams[e.CREATED_SINCE]
|
|
27
27
|
});
|
|
28
28
|
break;
|
|
29
29
|
case c.TO:
|
|
30
30
|
s({
|
|
31
|
-
[e.CREATED_UNTIL]: m ||
|
|
31
|
+
[e.CREATED_UNTIL]: m || n.current.defaultFilterParams[e.CREATED_UNTIL]
|
|
32
32
|
});
|
|
33
33
|
break;
|
|
34
34
|
default:
|
|
@@ -39,29 +39,29 @@ const _ = ({
|
|
|
39
39
|
},
|
|
40
40
|
[t, D, s]
|
|
41
41
|
);
|
|
42
|
-
E(() => !
|
|
43
|
-
const
|
|
44
|
-
const r = new Date(
|
|
42
|
+
E(() => !C && R(t), [C, t]);
|
|
43
|
+
const u = E(() => {
|
|
44
|
+
const r = new Date(o);
|
|
45
45
|
return r.setMonth(r.getMonth() - 24), r.toString();
|
|
46
|
-
}, [
|
|
46
|
+
}, [o]);
|
|
47
47
|
return /* @__PURE__ */ O(
|
|
48
48
|
P,
|
|
49
49
|
{
|
|
50
50
|
label: i.get("dateRange"),
|
|
51
51
|
name: e.CREATED_SINCE,
|
|
52
|
-
sinceDate:
|
|
53
|
-
untilDate: new Date(
|
|
54
|
-
from:
|
|
55
|
-
to:
|
|
52
|
+
sinceDate: u,
|
|
53
|
+
untilDate: new Date(o).toString(),
|
|
54
|
+
from: T[e.CREATED_SINCE],
|
|
55
|
+
to: T[e.CREATED_UNTIL],
|
|
56
56
|
selectedPresetOption: g,
|
|
57
|
-
timeRangePresetOptions:
|
|
57
|
+
timeRangePresetOptions: n.current.timeRangeOptions,
|
|
58
58
|
timezone: a == null ? void 0 : a.timeZone,
|
|
59
59
|
onChange: l,
|
|
60
60
|
showTimezoneInfo: !0,
|
|
61
|
-
now:
|
|
61
|
+
now: o
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
|
-
},
|
|
64
|
+
}, w = _;
|
|
65
65
|
export {
|
|
66
|
-
|
|
66
|
+
w as default
|
|
67
67
|
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
import { jsx as t } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useState as
|
|
5
|
-
import { getLabel as
|
|
2
|
+
import _ from "../Category/Category.js";
|
|
3
|
+
import L from "../../../../../core/Context/useCoreContext.js";
|
|
4
|
+
import { useState as N, useMemo as l, useCallback as C } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
5
|
+
import { getLabel as D, parsePaymentMethodType as b } from "../utils.js";
|
|
6
6
|
import { Tag as O } from "../../../../internal/Tag/Tag.js";
|
|
7
7
|
import { TagVariant as v } from "../../../../internal/Tag/types.js";
|
|
8
8
|
import { CellTextPosition as H } from "../../../../internal/DataGrid/types.js";
|
|
9
9
|
import { Image as w } from "../../../../internal/Image/Image.js";
|
|
10
|
-
import
|
|
11
|
-
import { getCurrencyCode as
|
|
12
|
-
import { BASE_CLASS as
|
|
10
|
+
import P from "../TransactionListError/TransactionListError.js";
|
|
11
|
+
import { getCurrencyCode as R } from "../../../../../core/Localization/amount/amount-util.js";
|
|
12
|
+
import { BASE_CLASS as F, AMOUNT_CLASS as x, PAYMENT_METHOD_CLASS as G, PAYMENT_METHOD_LOGO_CONTAINER_CLASS as I, PAYMENT_METHOD_LOGO_CLASS as Y } from "./constants.js";
|
|
13
13
|
import "./TransactionTable.scss.js";
|
|
14
|
-
import { useMediaQuery as
|
|
15
|
-
import
|
|
14
|
+
import { useMediaQuery as k, mediaQueries as $ } from "../../hooks/useMediaQuery.js";
|
|
15
|
+
import d from "../../../../internal/DataGrid/DataGrid.js";
|
|
16
16
|
import { Fragment as W } from "../../../../../external/preact/dist/preact.module.js";
|
|
17
17
|
import B from "../../../../internal/Pagination/Pagination.js";
|
|
18
|
-
const Q = ["
|
|
18
|
+
const Q = ["createdAt", "paymentMethod", "transactionType", "amount"], lo = ({
|
|
19
19
|
availableCurrencies: r,
|
|
20
20
|
error: n,
|
|
21
21
|
hasMultipleCurrencies: s,
|
|
22
|
-
loading:
|
|
22
|
+
loading: p,
|
|
23
23
|
onContactSupport: m,
|
|
24
24
|
onRowClick: u,
|
|
25
25
|
onTransactionSelected: V,
|
|
26
26
|
showDetails: j,
|
|
27
|
-
showPagination:
|
|
28
|
-
transactions:
|
|
27
|
+
showPagination: y,
|
|
28
|
+
transactions: T,
|
|
29
29
|
...f
|
|
30
30
|
}) => {
|
|
31
|
-
const { i18n: a } =
|
|
31
|
+
const { i18n: a } = L(), [h, c] = N(), i = k($.down.sm), M = l(
|
|
32
32
|
() => Q.map((o) => {
|
|
33
|
-
const e = a.get(
|
|
33
|
+
const e = a.get(D(o));
|
|
34
34
|
return o === "amount" ? {
|
|
35
35
|
key: o,
|
|
36
|
-
label: s ? e : `${e} ${r && r[0] ? `(${
|
|
36
|
+
label: s ? e : `${e} ${r && r[0] ? `(${R(r[0])})` : ""}`,
|
|
37
37
|
position: o === "amount" ? H.RIGHT : void 0
|
|
38
38
|
} : { key: o, label: e };
|
|
39
|
-
}).filter((o) => !(
|
|
40
|
-
[r, s, a,
|
|
39
|
+
}).filter((o) => !(i && ["status", "type"].includes(o.key))),
|
|
40
|
+
[r, s, a, i]
|
|
41
41
|
), g = {
|
|
42
42
|
title: "noTransactionsFound",
|
|
43
43
|
message: ["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]
|
|
44
|
-
}, A =
|
|
44
|
+
}, A = C(
|
|
45
45
|
(o) => {
|
|
46
|
-
|
|
46
|
+
c(o ?? void 0);
|
|
47
47
|
},
|
|
48
|
-
[
|
|
49
|
-
), S = l(() => () => /* @__PURE__ */ t(
|
|
50
|
-
return /* @__PURE__ */ t("div", { className:
|
|
51
|
-
|
|
48
|
+
[c]
|
|
49
|
+
), S = l(() => () => /* @__PURE__ */ t(P, { error: n, onContactSupport: m }), [n, m]);
|
|
50
|
+
return /* @__PURE__ */ t("div", { className: F, children: /* @__PURE__ */ t(
|
|
51
|
+
d,
|
|
52
52
|
{
|
|
53
53
|
errorDisplay: S,
|
|
54
54
|
error: n,
|
|
55
55
|
columns: M,
|
|
56
|
-
data:
|
|
57
|
-
loading:
|
|
56
|
+
data: T,
|
|
57
|
+
loading: p,
|
|
58
58
|
outline: !1,
|
|
59
59
|
onRowClick: { callback: u },
|
|
60
60
|
onRowHover: A,
|
|
@@ -71,12 +71,12 @@ const Q = ["creationDate", "paymentMethod", "transactionType", "amount"], lo = (
|
|
|
71
71
|
},*/
|
|
72
72
|
transactionType: ({ item: o, rowIndex: e }) => {
|
|
73
73
|
const E = `tooltip.${o.category}`;
|
|
74
|
-
return o.category ? a.has(E) ? /* @__PURE__ */ t(
|
|
74
|
+
return o.category ? a.has(E) ? /* @__PURE__ */ t(_, { value: o.category, isContainerHovered: e === h }) : /* @__PURE__ */ t("span", { children: o.category }) : null;
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
createdAt: ({ value: o }) => a.fullDate(o),
|
|
77
77
|
amount: ({ value: o }) => {
|
|
78
78
|
const e = a.amount(o.value, o.currency, { hideCurrency: !s });
|
|
79
|
-
return /* @__PURE__ */ t("span", { className:
|
|
79
|
+
return /* @__PURE__ */ t("span", { className: x, children: e });
|
|
80
80
|
},
|
|
81
81
|
paymentMethod: ({ item: o }) => {
|
|
82
82
|
var e;
|
|
@@ -94,7 +94,7 @@ const Q = ["creationDate", "paymentMethod", "transactionType", "amount"], lo = (
|
|
|
94
94
|
] }) : /* @__PURE__ */ t(O, { label: a.get("noData"), variant: v.WHITE }) });
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
|
-
children:
|
|
97
|
+
children: y && /* @__PURE__ */ t(d.Footer, { children: /* @__PURE__ */ t(B, { ...f }) })
|
|
98
98
|
}
|
|
99
99
|
) });
|
|
100
100
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useState as
|
|
1
|
+
import { useState as c, useCallback as u } from "../../../../external/preact/hooks/dist/hooks.module.js";
|
|
2
2
|
const W = () => {
|
|
3
|
-
const [s, r] =
|
|
3
|
+
const [s, r] = c([]), n = u((a) => {
|
|
4
4
|
r(
|
|
5
|
-
(o) => a.every((t) => !t) ? a : a.map((t,
|
|
6
|
-
const e = o[
|
|
5
|
+
(o) => a.every((t) => !t) ? a : a.map((t, x) => {
|
|
6
|
+
const e = o[x];
|
|
7
7
|
return !e || t > e ? t : e;
|
|
8
8
|
})
|
|
9
9
|
);
|
|
@@ -3,11 +3,11 @@ var h = (s, e, t) => e in s ? a(s, e, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var o = (s, e, t) => (h(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import { jsx as i } from "../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
5
5
|
import m from "../../core/Auth/AuthProvider.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import u from "../../core/Context/CoreProvider.js";
|
|
7
|
+
import c from "./BaseElement.js";
|
|
8
8
|
import d from "../../utils/get-image.js";
|
|
9
9
|
import { EMPTY_OBJECT as l } from "../../utils/common/constants.js";
|
|
10
|
-
class f extends
|
|
10
|
+
class f extends c {
|
|
11
11
|
constructor(t) {
|
|
12
12
|
super(t);
|
|
13
13
|
o(this, "componentRef");
|
|
@@ -73,7 +73,7 @@ class f extends u {
|
|
|
73
73
|
token: ((n = this.session) == null ? void 0 : n.token) ?? "",
|
|
74
74
|
updateCore: this.props.core.update.bind(this.props.core),
|
|
75
75
|
sessionSetupError: this.sessionSetupError,
|
|
76
|
-
children: /* @__PURE__ */ i(
|
|
76
|
+
children: /* @__PURE__ */ i(u, { i18n: this.i18n, loadingContext: this.loadingContext, children: this.componentToRender && /* @__PURE__ */ i("div", { className: "adyen-pe-component", children: this.componentToRender() }) })
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as B } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
-
import
|
|
3
|
-
import { DEFAULT_BASE_BUTTON_CLASSNAME as
|
|
4
|
-
import { parseClassName as
|
|
5
|
-
import { parseBoolean as
|
|
6
|
-
import { forwardRef as
|
|
2
|
+
import N from "../Button/hooks/useButton.js";
|
|
3
|
+
import { DEFAULT_BASE_BUTTON_CLASSNAME as A } from "./constants.js";
|
|
4
|
+
import { parseClassName as C } from "../../../utils/class-name-utils.js";
|
|
5
|
+
import { parseBoolean as E } from "../../../utils/common/index.js";
|
|
6
|
+
import { forwardRef as S } from "../../../external/preact/compat/dist/compat.module.js";
|
|
7
7
|
import { useMemo as r } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
8
8
|
import "./BaseButton.scss.js";
|
|
9
|
-
function
|
|
10
|
-
const i = r(() =>
|
|
9
|
+
function T({ disabled: o = !1, onClick: s, classNameModifiers: a = [], type: m = "button", children: e, className: t, fullWidth: n, ...u }, f) {
|
|
10
|
+
const i = r(() => C("", t) || "", [t]), l = r(() => E(o), [o]), { classes: p, click: c } = N(
|
|
11
11
|
i,
|
|
12
12
|
[...a, ...n ? ["full-width"] : []],
|
|
13
|
-
|
|
13
|
+
A,
|
|
14
14
|
l,
|
|
15
15
|
s
|
|
16
16
|
);
|
|
17
|
-
return /* @__PURE__ */ B("button", { className: p, type: m, disabled: o, onClick: c, ref:
|
|
17
|
+
return /* @__PURE__ */ B("button", { className: p, type: m, disabled: o, onClick: c, ref: f, ...u, children: e });
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const b = S(T);
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
b as default
|
|
22
22
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import "./BaseList.scss.js";
|
|
3
3
|
import { BASE_CLASS as s } from "./constants.js";
|
|
4
|
-
const e = ({ children:
|
|
4
|
+
const e = ({ children: r }) => /* @__PURE__ */ o("ul", { className: s, children: r });
|
|
5
5
|
export {
|
|
6
6
|
e as BaseList
|
|
7
7
|
};
|
|
@@ -4,14 +4,14 @@ import { ICON_BUTTON_CLASSNAME as S, ICON_BUTTON_CONTENT_CLASSNAME as B, BUTTON_
|
|
|
4
4
|
import { TypographyElement as U, TypographyVariant as y } from "../Typography/types.js";
|
|
5
5
|
import I from "../Typography/Typography.js";
|
|
6
6
|
import { parseClassName as h } from "../../../utils/class-name-utils.js";
|
|
7
|
-
import { parseBoolean as
|
|
8
|
-
import { forwardRef as
|
|
7
|
+
import { parseBoolean as d } from "../../../utils/common/index.js";
|
|
8
|
+
import { forwardRef as g } from "../../../external/preact/compat/dist/compat.module.js";
|
|
9
9
|
import { useMemo as p } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
10
|
-
import { ButtonVariant as
|
|
10
|
+
import { ButtonVariant as V } from "./types.js";
|
|
11
11
|
import "./Button.scss.js";
|
|
12
|
-
import { Fragment as
|
|
12
|
+
import { Fragment as $ } from "../../../external/preact/dist/preact.module.js";
|
|
13
13
|
function F({
|
|
14
|
-
variant: n =
|
|
14
|
+
variant: n = V.PRIMARY,
|
|
15
15
|
disabled: o = !1,
|
|
16
16
|
onClick: T,
|
|
17
17
|
classNameModifiers: l = [],
|
|
@@ -23,7 +23,7 @@ function F({
|
|
|
23
23
|
iconButton: e = !1,
|
|
24
24
|
...f
|
|
25
25
|
}, A) {
|
|
26
|
-
const _ = p(() => h("", m) || "", [m]), c = p(() =>
|
|
26
|
+
const _ = p(() => h("", m) || "", [m]), c = p(() => d(o), [o]), { classes: N, click: u } = C(_, [...l, n], M, c, T);
|
|
27
27
|
return /* @__PURE__ */ r(
|
|
28
28
|
"button",
|
|
29
29
|
{
|
|
@@ -33,7 +33,7 @@ function F({
|
|
|
33
33
|
onClick: u,
|
|
34
34
|
ref: A,
|
|
35
35
|
...f,
|
|
36
|
-
children: e ? /* @__PURE__ */ r("div", { className: `${B}`, children: s }) : /* @__PURE__ */ r(
|
|
36
|
+
children: e ? /* @__PURE__ */ r("div", { className: `${B}`, children: s }) : /* @__PURE__ */ r($, { children: [
|
|
37
37
|
a && /* @__PURE__ */ r("span", { className: O, children: a }),
|
|
38
38
|
/* @__PURE__ */ r(I, { className: E, el: U.SPAN, variant: y.BODY, stronger: !0, children: s }),
|
|
39
39
|
t && /* @__PURE__ */ r("span", { className: L, children: t })
|
|
@@ -41,7 +41,7 @@ function F({
|
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const H = g(F);
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
H as default
|
|
47
47
|
};
|
package/dist/es/components/internal/Calendar/components/CalendarControls/CalendarControls.js
CHANGED
|
@@ -3,7 +3,7 @@ import { memo as s } from "../../../../../external/preact/compat/dist/compat.mod
|
|
|
3
3
|
import { isFunction as l } from "../../../../../utils/common/index.js";
|
|
4
4
|
import i from "../../calendar/facade/index.js";
|
|
5
5
|
import { Fragment as c } from "../../../../../external/preact/dist/preact.module.js";
|
|
6
|
-
const e = ({ config: r, grid: { controls: t }, renderer: o }) => r.controls === i.controls.NONE || !l(o) ? null : /* @__PURE__ */ a(c, { children: t.map(([n, m]) => o(n, m)) }),
|
|
6
|
+
const e = ({ config: r, grid: { controls: t }, renderer: o }) => r.controls === i.controls.NONE || !l(o) ? null : /* @__PURE__ */ a(c, { children: t.map(([n, m]) => o(n, m)) }), g = s(e);
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
g as default
|
|
9
9
|
};
|
package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDayOfWeek.js
CHANGED
|
@@ -5,7 +5,7 @@ import { propsProperty as k, property as o } from "./utils.js";
|
|
|
5
5
|
import { CalendarGridRenderToken as L } from "../../types.js";
|
|
6
6
|
import n from "../../../../../utils/memoComparator/memoComparator.js";
|
|
7
7
|
import { EMPTY_OBJECT as l } from "../../../../../utils/common/constants.js";
|
|
8
|
-
const m = "adyen-pe-calendar__cell adyen-pe-calendar__cell--day-of-week", i = "adyen-pe-calendar__day-of-week",
|
|
8
|
+
const m = "adyen-pe-calendar__cell adyen-pe-calendar__cell--day-of-week", i = "adyen-pe-calendar__day-of-week", u = (a = l, e) => {
|
|
9
9
|
const s = k.unwrapped(
|
|
10
10
|
{
|
|
11
11
|
childClassName: o.mutable(i),
|
|
@@ -23,17 +23,17 @@ const m = "adyen-pe-calendar__cell adyen-pe-calendar__cell--day-of-week", i = "a
|
|
|
23
23
|
!0
|
|
24
24
|
);
|
|
25
25
|
return e == null || e(L.DAY_OF_WEEK, s), s;
|
|
26
|
-
},
|
|
26
|
+
}, A = ({ prepare: a, flags: e, labels: { long: s, short: p } }) => {
|
|
27
27
|
const d = {
|
|
28
28
|
"aria-label": s,
|
|
29
29
|
"data-first-week-day": e.LINE_START,
|
|
30
30
|
"data-last-week-day": e.LINE_END,
|
|
31
31
|
"data-weekend": e.WEEKEND,
|
|
32
32
|
scope: "col"
|
|
33
|
-
}, r =
|
|
33
|
+
}, r = u(d, a), { children: P, className: _, ...N } = r.props || l, E = t(r.className, m, _), { children: D, className: h, ...C } = r.childProps || l, f = t(r.childClassName, i, h);
|
|
34
34
|
return /* @__PURE__ */ c("th", { ...N, ...d, className: E, children: /* @__PURE__ */ c("abbr", { ...C, className: f, children: p }) });
|
|
35
35
|
}, G = y(
|
|
36
|
-
|
|
36
|
+
A,
|
|
37
37
|
n({
|
|
38
38
|
block: n.exclude,
|
|
39
39
|
flags: (a) => +a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState as
|
|
1
|
+
import { useState as q, useMemo as l, useRef as J, useCallback as $, useImperativeHandle as y, useEffect as A } from "../../../../external/preact/hooks/dist/hooks.module.js";
|
|
2
2
|
import z from "../../../../core/Context/useCoreContext.js";
|
|
3
3
|
import { getDateObjectFromTimestamp as P } from "../calendar/utils.js";
|
|
4
4
|
import { isFunction as K } from "../../../../utils/common/index.js";
|
|
@@ -20,23 +20,23 @@ const Q = ({
|
|
|
20
20
|
untilDate: T,
|
|
21
21
|
useYearView: d
|
|
22
22
|
}, w) => {
|
|
23
|
-
const { i18n: b } = z(), [B, R] =
|
|
23
|
+
const { i18n: b } = z(), [B, R] = q(performance.now()), O = l(() => n.slice(E, T), [E, T]), x = J(u), F = l(
|
|
24
24
|
() => f ?? (K(N) ? n.controls.MINIMAL : n.controls.NONE),
|
|
25
25
|
[f, N]
|
|
26
|
-
),
|
|
26
|
+
), I = l(
|
|
27
27
|
() => p ?? (K(s) ? n.highlight.ONE : n.highlight.NONE),
|
|
28
28
|
[p, s]
|
|
29
29
|
), { grid: t, kill: S } = l(() => {
|
|
30
30
|
const { grid: e, kill: r } = n(function() {
|
|
31
|
-
R(performance.now()),
|
|
31
|
+
R(performance.now()), x.current = this, !(o === e.highlight.from && h === e.highlight.to) && (o = e.highlight.from, h = e.highlight.to, s == null || s(o, h));
|
|
32
32
|
});
|
|
33
33
|
let { from: o, to: h } = e.highlight;
|
|
34
34
|
return e.config.cursorIndex = (i) => {
|
|
35
35
|
let c = i.target;
|
|
36
36
|
for (; c && c !== i.currentTarget; ) {
|
|
37
|
-
const
|
|
38
|
-
if (Number.isFinite(
|
|
39
|
-
return
|
|
37
|
+
const k = Number(c.dataset.cursorPosition);
|
|
38
|
+
if (Number.isFinite(k))
|
|
39
|
+
return k;
|
|
40
40
|
c = c.parentNode;
|
|
41
41
|
}
|
|
42
42
|
}, e.config.shiftFactor = function(i) {
|
|
@@ -56,7 +56,7 @@ const Q = ({
|
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
}, [t]), j = G(
|
|
59
|
-
|
|
59
|
+
$(
|
|
60
60
|
(e, r) => {
|
|
61
61
|
r instanceof Element && r.removeAttribute("aria-selected"), e instanceof Element && e.setAttribute("aria-selected", "true");
|
|
62
62
|
},
|
|
@@ -72,7 +72,7 @@ const Q = ({
|
|
|
72
72
|
t != null && t.highlight && (t.highlight.from = void 0);
|
|
73
73
|
},
|
|
74
74
|
get config() {
|
|
75
|
-
return { ...
|
|
75
|
+
return { ...x.current ?? u };
|
|
76
76
|
},
|
|
77
77
|
get from() {
|
|
78
78
|
return P(e);
|
|
@@ -89,19 +89,19 @@ const Q = ({
|
|
|
89
89
|
};
|
|
90
90
|
},
|
|
91
91
|
[t, B]
|
|
92
|
-
),
|
|
92
|
+
), A(() => {
|
|
93
93
|
t.config({
|
|
94
94
|
blocks: a,
|
|
95
|
-
controls:
|
|
95
|
+
controls: F,
|
|
96
96
|
firstWeekDay: g,
|
|
97
97
|
fixedBlockHeight: !m,
|
|
98
|
-
highlight:
|
|
98
|
+
highlight: I,
|
|
99
99
|
locale: C ?? b.locale,
|
|
100
100
|
minified: d,
|
|
101
101
|
timeslice: O,
|
|
102
102
|
trackCurrentDay: M
|
|
103
103
|
});
|
|
104
|
-
}, [
|
|
104
|
+
}, [F, I, a, m, g, t, b, C, O, M, d]), A(() => {
|
|
105
105
|
const e = [].concat(L).slice(0, 2).map(Number).filter(Boolean);
|
|
106
106
|
return e[0] && (t.highlight.from = +e[0]), e[1] && (t.highlight.to = +e[1]), S;
|
|
107
107
|
}, []), { cursorElementRef: j, cursorRootProps: _, grid: t };
|
|
@@ -18,9 +18,9 @@ const { getTimezoneTime: S, getUsedTimezone: F } = (() => {
|
|
|
18
18
|
typeof m != "symbol" && i(m.timestamp);
|
|
19
19
|
}) : a;
|
|
20
20
|
}, [i, e]), { clockTime: o, GMTOffset: f, timestamp: t, timezone: r };
|
|
21
|
-
},
|
|
21
|
+
}, h = O;
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
h as default,
|
|
24
24
|
S as getTimezoneTime,
|
|
25
25
|
F as getUsedTimezone
|
|
26
26
|
};
|
|
@@ -8,8 +8,8 @@ import { CellTextPosition as c } from "./types.js";
|
|
|
8
8
|
import w from "./components/SkeletonBody.js";
|
|
9
9
|
import { ErrorMessageDisplay as N } from "../ErrorMessageDisplay/ErrorMessageDisplay.js";
|
|
10
10
|
import { useMemo as m } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
11
|
-
import
|
|
12
|
-
const
|
|
11
|
+
import T from "../../../images/no-data-female.svg.js";
|
|
12
|
+
const S = Object.freeze({
|
|
13
13
|
activeIndex: -1,
|
|
14
14
|
index: -1
|
|
15
15
|
});
|
|
@@ -42,14 +42,14 @@ function g({ errorDisplay: e, ...a }) {
|
|
|
42
42
|
},
|
|
43
43
|
t.key
|
|
44
44
|
)) }) }),
|
|
45
|
-
/* @__PURE__ */ d(
|
|
45
|
+
/* @__PURE__ */ d(C, { ...a, emptyBody: n })
|
|
46
46
|
] }),
|
|
47
47
|
u && (a.error && e ? e() : /* @__PURE__ */ d(
|
|
48
48
|
N,
|
|
49
49
|
{
|
|
50
50
|
title: ((r = a.emptyTableMessage) == null ? void 0 : r.title) ?? "thereAreNoResults",
|
|
51
51
|
message: (i = a.emptyTableMessage) == null ? void 0 : i.message,
|
|
52
|
-
imageDesktop:
|
|
52
|
+
imageDesktop: T,
|
|
53
53
|
centered: !0
|
|
54
54
|
}
|
|
55
55
|
))
|
|
@@ -59,7 +59,7 @@ function g({ errorDisplay: e, ...a }) {
|
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function C(e) {
|
|
63
63
|
const a = m(() => e.loading || e.emptyBody || e.error, [e.emptyBody, e.error, e.loading]);
|
|
64
64
|
return /* @__PURE__ */ d("tbody", { className: o("adyen-pe-data-grid__body"), children: a ? /* @__PURE__ */ d(w, { columnsNumber: e.columns.length, loading: e.loading }) : e.onRowClick ? /* @__PURE__ */ d(
|
|
65
65
|
b,
|
|
@@ -90,6 +90,6 @@ g.defaultProps = {
|
|
|
90
90
|
scrollable: !0
|
|
91
91
|
};
|
|
92
92
|
export {
|
|
93
|
-
|
|
93
|
+
S as INITIAL_STATE,
|
|
94
94
|
g as default
|
|
95
95
|
};
|
|
@@ -5,17 +5,17 @@ import { noop as t } from "../../../../utils/common/index.js";
|
|
|
5
5
|
import { useCallback as d } from "../../../../external/preact/hooks/dist/hooks.module.js";
|
|
6
6
|
import { useInteractiveDataGrid as b } from "../hooks/useInteractiveDataGrid.js";
|
|
7
7
|
import { Fragment as I } from "../../../../external/preact/dist/preact.module.js";
|
|
8
|
-
const
|
|
8
|
+
const M = ({
|
|
9
9
|
data: s,
|
|
10
|
-
columns:
|
|
10
|
+
columns: c,
|
|
11
11
|
onRowClick: o,
|
|
12
|
-
customCells:
|
|
12
|
+
customCells: n,
|
|
13
13
|
onRowHover: e
|
|
14
14
|
}) => {
|
|
15
15
|
const y = d(
|
|
16
16
|
(r) => () => o == null ? void 0 : o.callback(o != null && o.retrievedField ? r[o.retrievedField] : r),
|
|
17
17
|
[o]
|
|
18
|
-
), { i18n: p } = F(), { currentIndex: f, listeners:
|
|
18
|
+
), { i18n: p } = F(), { currentIndex: f, listeners: u, ref: g } = b({ totalRows: (s == null ? void 0 : s.length) ?? 0 });
|
|
19
19
|
return /* @__PURE__ */ l(I, { children: s == null ? void 0 : s.map((r, a) => /* @__PURE__ */ l(
|
|
20
20
|
"tr",
|
|
21
21
|
{
|
|
@@ -28,13 +28,13 @@ const T = ({
|
|
|
28
28
|
"data-index": a,
|
|
29
29
|
className: "adyen-pe-data-grid__row adyen-pe-data-grid__row--clickable",
|
|
30
30
|
onClick: y(r),
|
|
31
|
-
onFocusCapture:
|
|
32
|
-
onKeyDownCapture:
|
|
33
|
-
children: /* @__PURE__ */ l(h, { columns:
|
|
31
|
+
onFocusCapture: u.onFocusCapture(a),
|
|
32
|
+
onKeyDownCapture: u.onKeyDownCapture,
|
|
33
|
+
children: /* @__PURE__ */ l(h, { columns: c, customCells: n, item: r, rowIndex: a })
|
|
34
34
|
},
|
|
35
35
|
r
|
|
36
36
|
)) });
|
|
37
37
|
};
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
M as InteractiveBody
|
|
40
40
|
};
|