@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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-8daceaea.js");require("classnames");const e=t=>n.hasOwnProperty(t,"id");function o({data:t}){const r=e(t)?{transaction:t}:{transactionId:t};return n.u(n.w,{children:r&&n.u(n.TransactionDetails,{...r})})}exports.default=o;
|
|
2
|
+
//# sourceMappingURL=ModalContent-387502da.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalContent-
|
|
1
|
+
{"version":3,"file":"ModalContent-387502da.js","sources":["../src/components/external/TransactionsOverview/components/ModalContent.tsx"],"sourcesContent":["import { SelectedDetail, TransactionDetailData } from '../../../../components';\nimport TransactionDetails from '../../TransactionDetails/components/TransactionDetails';\nimport { hasOwnProperty } from '../../../../utils/common';\n\nconst isTransactionWithoutId = (data: string | TransactionDetailData): data is TransactionDetailData => hasOwnProperty(data, 'id');\nfunction ModalContent({ data }: SelectedDetail) {\n const transactionProps = isTransactionWithoutId(data) ? { transaction: data } : { transactionId: data };\n\n return <>{transactionProps && <TransactionDetails {...transactionProps} />}</>;\n}\nexport default ModalContent;\n"],"names":["isTransactionWithoutId","data","hasOwnProperty","ModalContent","transactionProps","jsx","TransactionDetails"],"mappings":"6IAIA,MAAMA,EAA0BC,GAAwEC,EAAA,eAAeD,EAAM,IAAI,EACjI,SAASE,EAAa,CAAE,KAAAF,GAAwB,CACtC,MAAAG,EAAmBJ,EAAuBC,CAAI,EAAI,CAAE,YAAaA,GAAS,CAAE,cAAeA,GAEjG,gBAAU,SAAoBG,GAAAC,IAACC,EAAAA,mBAAoB,CAAA,GAAGF,CAAkB,CAAA,CAAG,CAAA,CAC/E"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../index-8daceaea.js");require("classnames");exports.AdyenPlatformExperience=_.AdyenPlatformExperience;exports.Core=_.Core;exports.TransactionFilterParam=_.TransactionFilterParam;exports.TransactionsDetails=_.TransactionsElement$1;exports.TransactionsOverview=_.TransactionsElement;exports.all_locales=_.all_locales;exports.ar=_.ar;exports.cs_CZ=_.cs_CZ;exports.da_DK=_.da_DK;exports.de_DE=_.de_DE;exports.el_GR=_.el_GR;exports.en_US=_.en_US;exports.es_ES=_.es_ES;exports.fi_FI=_.fi_FI;exports.fr_FR=_.fr_FR;exports.hr_HR=_.hr_HR;exports.hu_HU=_.hu_HU;exports.it_IT=_.it_IT;exports.ja_JP=_.ja_JP;exports.ko_KR=_.ko_KR;exports.nl_NL=_.nl_NL;exports.no_NO=_.no_NO;exports.pl_PL=_.pl_PL;exports.pt_BR=_.pt_BR;exports.pt_PT=_.pt_PT;exports.ro_RO=_.ro_RO;exports.ru_RU=_.ru_RU;exports.sk_SK=_.sk_SK;exports.sl_SI=_.sl_SI;exports.sv_SE=_.sv_SE;exports.zh_CN=_.zh_CN;exports.zh_TW=_.zh_TW;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var r = Object.defineProperty;
|
|
2
2
|
var i = (n, e, t) => e in n ? r(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
-
var
|
|
3
|
+
var s = (n, e, t) => (i(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import { jsx as a } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
5
5
|
import m from "../UIElement.js";
|
|
6
6
|
import c from "./components/TransactionDetails.js";
|
|
7
|
-
class
|
|
7
|
+
class o extends m {
|
|
8
8
|
constructor(t) {
|
|
9
9
|
super(t);
|
|
10
|
-
|
|
10
|
+
s(this, "componentToRender", () => /* @__PURE__ */ a(c, { ...this.props }));
|
|
11
11
|
this.elementRef = t && t.elementRef || this, this.componentToRender = this.componentToRender.bind(this);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
o
|
|
15
|
-
const h =
|
|
14
|
+
s(o, "type", "transactionsDetails");
|
|
15
|
+
const h = o;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
o as TransactionsElement,
|
|
18
18
|
h as default
|
|
19
19
|
};
|
|
@@ -7,10 +7,10 @@ import { TagVariant as a } from "../../../internal/Tag/types.js";
|
|
|
7
7
|
import r from "../../../../core/Context/useCoreContext.js";
|
|
8
8
|
import { useMemo as g } from "../../../../external/preact/hooks/dist/hooks.module.js";
|
|
9
9
|
import { Fragment as i } from "../../../../external/preact/dist/preact.module.js";
|
|
10
|
-
const
|
|
10
|
+
const M = ({ transaction: e, isFetching: y }) => {
|
|
11
11
|
var l;
|
|
12
12
|
const { i18n: m } = r(), o = g(
|
|
13
|
-
() => e ? m.date(new Date(e.
|
|
13
|
+
() => e ? m.date(new Date(e.createdAt), {
|
|
14
14
|
weekday: "long",
|
|
15
15
|
month: "long",
|
|
16
16
|
year: "numeric",
|
|
@@ -66,5 +66,5 @@ const T = ({ transaction: e, isFetching: y }) => {
|
|
|
66
66
|
] }) : /* @__PURE__ */ d(_, { isLoading: y, skeletonRowNumber: 6 }) });
|
|
67
67
|
};
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
M as TransactionData
|
|
70
70
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as a } from "../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import { TransactionData as h } from "./TransactionData.js";
|
|
3
3
|
import { ErrorMessageDisplay as g } from "../../../internal/ErrorMessageDisplay/ErrorMessageDisplay.js";
|
|
4
|
-
import { getErrorMessage as
|
|
5
|
-
import
|
|
4
|
+
import { getErrorMessage as C } from "../../../utils/transactionResourceErrorCodes.js";
|
|
5
|
+
import T from "../../../../core/Context/useCoreContext.js";
|
|
6
6
|
import { useFetch as p } from "../../../../hooks/useFetch/useFetch.js";
|
|
7
7
|
import { useSetupEndpoint as y } from "../../../../hooks/useSetupEndpoint/useSetupEndpoint.js";
|
|
8
8
|
import { useMemo as e, useCallback as D } from "../../../../external/preact/hooks/dist/hooks.module.js";
|
|
9
9
|
import "./TransactionDetails.scss.js";
|
|
10
10
|
import { EMPTY_OBJECT as E } from "../../../../utils/common/constants.js";
|
|
11
11
|
const c = (t) => "transaction" in t;
|
|
12
|
-
function
|
|
13
|
-
const s = e(() => c(t) ? t.transaction : null, [t]), n = e(() => c(t) ? null : t.transactionId, [t]), { i18n: m } =
|
|
12
|
+
function O(t) {
|
|
13
|
+
const s = e(() => c(t) ? t.transaction : null, [t]), n = e(() => c(t) ? null : t.transactionId, [t]), { i18n: m } = T(), o = y("getTransaction"), l = D(async () => {
|
|
14
14
|
if (n)
|
|
15
15
|
return o(E, {
|
|
16
16
|
path: { transactionId: n }
|
|
@@ -20,7 +20,7 @@ function P(t) {
|
|
|
20
20
|
queryFn: l
|
|
21
21
|
}), i = e(() => {
|
|
22
22
|
if (r)
|
|
23
|
-
return
|
|
23
|
+
return C(r, t.onContactSupport);
|
|
24
24
|
}, [r, t.onContactSupport]), f = s ?? u;
|
|
25
25
|
return /* @__PURE__ */ a("div", { className: "adyen-pe-transaction", children: [
|
|
26
26
|
t.title && /* @__PURE__ */ a("div", { className: "adyen-pe-title", children: m.get(t.title) }),
|
|
@@ -29,5 +29,5 @@ function P(t) {
|
|
|
29
29
|
] });
|
|
30
30
|
}
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
O as default
|
|
33
33
|
};
|
package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.js
CHANGED
|
@@ -2,8 +2,8 @@ import { jsx as s } from "../../../../../external/preact/jsx-runtime/dist/jsxRun
|
|
|
2
2
|
import m from "classnames";
|
|
3
3
|
import { BASE_CLASS as r, LOADING_CLASS as S, MARGIN_CLASS as a } from "./constants.js";
|
|
4
4
|
import "./AmountSkeleton.scss.js";
|
|
5
|
-
const n = ({ hasMargin: o = !1, isLoading: t = !1, width: e }) => /* @__PURE__ */ s("span", { className: m(r, { [S]: t, [a]: o }), style: { width: e } }),
|
|
5
|
+
const n = ({ hasMargin: o = !1, isLoading: t = !1, width: e }) => /* @__PURE__ */ s("span", { className: m(r, { [S]: t, [a]: o }), style: { width: e } }), u = n;
|
|
6
6
|
export {
|
|
7
7
|
n as AmountSkeleton,
|
|
8
|
-
|
|
8
|
+
u as default
|
|
9
9
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
const
|
|
3
|
-
const [n, t] =
|
|
1
|
+
import { useState as p, useCallback as d, useMemo as s } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
2
|
+
const r = (e) => {
|
|
3
|
+
const [n, t] = p(0), B = d(() => t(0), [t]), S = s(() => e == null ? void 0 : e[n], [e, n]), l = s(
|
|
4
4
|
() => e && e.length > 1 ? Object.freeze(e.map(({ id: o }) => ({ id: o, name: o }))) : void 0,
|
|
5
5
|
[e]
|
|
6
|
-
),
|
|
6
|
+
), x = d(
|
|
7
7
|
({ target: o }) => {
|
|
8
|
-
const
|
|
8
|
+
const f = o == null ? void 0 : o.value, i = e == null ? void 0 : e.findIndex(({ id: m }) => m === f);
|
|
9
9
|
i >= 0 && t(i);
|
|
10
10
|
},
|
|
11
11
|
[e, t]
|
|
12
12
|
);
|
|
13
|
-
return { activeBalanceAccount: S, balanceAccountSelectionOptions: l, onBalanceAccountSelection:
|
|
14
|
-
}, u =
|
|
13
|
+
return { activeBalanceAccount: S, balanceAccountSelectionOptions: l, onBalanceAccountSelection: x, resetBalanceAccountSelection: B };
|
|
14
|
+
}, u = r;
|
|
15
15
|
export {
|
|
16
16
|
u as default
|
|
17
17
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as t } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import { useSetupEndpoint as y } from "../../../../../hooks/useSetupEndpoint/useSetupEndpoint.js";
|
|
3
3
|
import { useCallback as E, useMemo as g, useEffect as W } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
|
-
import { useFetch as
|
|
5
|
-
import { memo as
|
|
4
|
+
import { useFetch as w } from "../../../../../hooks/useFetch/useFetch.js";
|
|
5
|
+
import { memo as C } from "../../../../../external/preact/compat/dist/compat.module.js";
|
|
6
6
|
import { BASE_CLASS as M } from "./constants.js";
|
|
7
7
|
import k from "../../../../internal/ExpandableCard/ExpandableCard.js";
|
|
8
|
-
import { BaseList as
|
|
8
|
+
import { BaseList as F } from "../../../../internal/BaseList/BaseList.js";
|
|
9
9
|
import { BalanceItem as h } from "../BalanceItem/BalanceItem.js";
|
|
10
10
|
import { useMaxWidthsState as L } from "../../hooks/useMaxWidths.js";
|
|
11
11
|
import { EMPTY_OBJECT as O } from "../../../../../utils/common/constants.js";
|
|
12
|
-
const
|
|
12
|
+
const A = C(({ balanceAccountId: s, onCurrenciesChange: n, fullWidth: d }) => {
|
|
13
13
|
const a = y("getBalances"), u = E(async () => a(O, {
|
|
14
14
|
path: { balanceAccountId: s }
|
|
15
|
-
}), [s, a]), { data: e, error: B, isFetching: i } =
|
|
15
|
+
}), [s, a]), { data: e, error: B, isFetching: i } = w({
|
|
16
16
|
fetchOptions: g(() => ({ enabled: !!s }), [s]),
|
|
17
17
|
queryFn: u
|
|
18
|
-
}), c = !s || i, S = !!B || !(e != null && e.
|
|
18
|
+
}), c = !s || i, S = !!B || !(e != null && e.data.length), o = e == null ? void 0 : e.data.sort((r, m) => r.currency.localeCompare(m.currency)), [x, ...p] = o ?? [], [l, f] = L();
|
|
19
19
|
return W(() => {
|
|
20
20
|
const r = new Set((o == null ? void 0 : o.map(({ currency: m }) => m)) || []);
|
|
21
21
|
n(Array.from(r), i);
|
|
@@ -27,7 +27,7 @@ const z = F(({ balanceAccountId: s, onCurrenciesChange: n, fullWidth: d }) => {
|
|
|
27
27
|
{
|
|
28
28
|
isEmpty: S,
|
|
29
29
|
balance: x,
|
|
30
|
-
widths:
|
|
30
|
+
widths: l,
|
|
31
31
|
isHeader: !0,
|
|
32
32
|
isSkeleton: c,
|
|
33
33
|
isLoading: c,
|
|
@@ -36,10 +36,10 @@ const z = F(({ balanceAccountId: s, onCurrenciesChange: n, fullWidth: d }) => {
|
|
|
36
36
|
),
|
|
37
37
|
filled: !0,
|
|
38
38
|
fullWidth: d,
|
|
39
|
-
children:
|
|
39
|
+
children: p.length && /* @__PURE__ */ t(F, { children: p.map((r) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(h, { balance: r, widths: l, onWidthsSet: f }) }, r.currency)) })
|
|
40
40
|
}
|
|
41
41
|
) });
|
|
42
42
|
});
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
A as Balances
|
|
45
45
|
};
|
|
@@ -2,10 +2,10 @@ import { jsx as r } from "../../../../external/preact/jsx-runtime/dist/jsxRuntim
|
|
|
2
2
|
import n from "../../TransactionDetails/components/TransactionDetails.js";
|
|
3
3
|
import { hasOwnProperty as i } from "../../../../utils/common/index.js";
|
|
4
4
|
import { Fragment as s } from "../../../../external/preact/dist/preact.module.js";
|
|
5
|
-
const a = (
|
|
6
|
-
function f({ data:
|
|
7
|
-
const
|
|
8
|
-
return /* @__PURE__ */ r(s, { children:
|
|
5
|
+
const a = (t) => i(t, "id");
|
|
6
|
+
function f({ data: t }) {
|
|
7
|
+
const o = a(t) ? { transaction: t } : { transactionId: t };
|
|
8
|
+
return /* @__PURE__ */ r(s, { children: o && /* @__PURE__ */ r(n, { ...o }) });
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
11
11
|
f as default
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as
|
|
1
|
+
import { jsx as u } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
+
import { memo as a } from "../../../../../external/preact/compat/dist/compat.module.js";
|
|
3
3
|
import { useMediaQuery as t, mediaQueries as o } from "../../hooks/useMediaQuery.js";
|
|
4
4
|
import c from "../../../../internal/FormFields/Select/Select.js";
|
|
5
|
-
const d =
|
|
5
|
+
const d = a(
|
|
6
6
|
({
|
|
7
7
|
placeholder: i,
|
|
8
8
|
selection: l,
|
|
@@ -10,7 +10,7 @@ const d = u(
|
|
|
10
10
|
updateSelection: r
|
|
11
11
|
}) => {
|
|
12
12
|
const s = t(o.down.xs), m = t(o.only.sm), n = t(o.only.md);
|
|
13
|
-
return e && e.length > 1 ? /* @__PURE__ */
|
|
13
|
+
return e && e.length > 1 ? /* @__PURE__ */ u(
|
|
14
14
|
c,
|
|
15
15
|
{
|
|
16
16
|
onChange: r,
|
|
@@ -25,7 +25,7 @@ const d = u(
|
|
|
25
25
|
}
|
|
26
26
|
) : null;
|
|
27
27
|
}
|
|
28
|
-
),
|
|
28
|
+
), w = d;
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
w as default
|
|
31
31
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import { listFrom as
|
|
3
|
-
const
|
|
1
|
+
import { useMemo as x, useCallback as p } from "../../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
2
|
+
import { listFrom as q, selectionOptionsFor as s } from "./utils.js";
|
|
3
|
+
const v = ({
|
|
4
4
|
filterParam: o,
|
|
5
5
|
filterValues: S,
|
|
6
6
|
filters: n,
|
|
7
7
|
defaultFilters: c,
|
|
8
8
|
updateFilters: M
|
|
9
9
|
}) => {
|
|
10
|
-
const
|
|
10
|
+
const O = x(() => q((n == null ? void 0 : n[o]) ?? (c == null ? void 0 : c[o]) ?? ""), [c, n, o]), b = x(() => S && s(S), [S]), k = p(
|
|
11
11
|
({ target: m }) => {
|
|
12
12
|
M == null || M({ [o]: (m == null ? void 0 : m.value) || "" });
|
|
13
13
|
},
|
|
14
14
|
[M, o]
|
|
15
15
|
);
|
|
16
|
-
return { selection:
|
|
17
|
-
}, h =
|
|
16
|
+
return { selection: O, selectionOptions: b, updateSelection: k };
|
|
17
|
+
}, h = v;
|
|
18
18
|
export {
|
|
19
19
|
h as default,
|
|
20
|
-
|
|
20
|
+
v as useMultiSelectionFilter
|
|
21
21
|
};
|
package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as t } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import v from "../AmountSkeleton/AmountSkeleton.js";
|
|
3
|
-
import { BASE_CLASS as y, BODY_CLASS as T, PLACEHOLDER_CLASS as E, LABEL_CLASS as
|
|
3
|
+
import { BASE_CLASS as y, BODY_CLASS as T, PLACEHOLDER_CLASS as E, LABEL_CLASS as _, AMOUNT_CLASS as b } from "./constants.js";
|
|
4
4
|
import { SummaryItemLabel as h } from "./SummaryItemLabel.js";
|
|
5
|
-
import { Tooltip as
|
|
6
|
-
import { TypographyVariant as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useEffect as
|
|
5
|
+
import { Tooltip as x } from "../../../../internal/Tooltip/Tooltip.js";
|
|
6
|
+
import { TypographyVariant as n } from "../../../../internal/Typography/types.js";
|
|
7
|
+
import B from "../../../../internal/Typography/Typography.js";
|
|
8
|
+
import N from "../../../../../core/Context/useCoreContext.js";
|
|
9
|
+
import p from "classnames";
|
|
10
|
+
import { useEffect as O, useCallback as H } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
11
11
|
import "./SummaryItem.scss.js";
|
|
12
12
|
import { useMediaQuery as I, mediaQueries as M } from "../../hooks/useMediaQuery.js";
|
|
13
13
|
const X = ({
|
|
@@ -20,8 +20,8 @@ const X = ({
|
|
|
20
20
|
onWidthsSet: L,
|
|
21
21
|
isEmpty: d
|
|
22
22
|
}) => {
|
|
23
|
-
const { i18n: s } =
|
|
24
|
-
|
|
23
|
+
const { i18n: s } = N();
|
|
24
|
+
O(() => {
|
|
25
25
|
const e = u.map((r) => {
|
|
26
26
|
var a, o;
|
|
27
27
|
return ((o = (a = r.ref) == null ? void 0 : a.current) == null ? void 0 : o.getBoundingClientRect().width) ?? 0;
|
|
@@ -29,18 +29,18 @@ const X = ({
|
|
|
29
29
|
L(e);
|
|
30
30
|
}, [L]);
|
|
31
31
|
const A = (e) => ({ width: m && m[e] ? m[e] : "auto" }), S = I(M.only.xs), f = H(
|
|
32
|
-
(e, r) => e.valueHasLabelStyle ?
|
|
32
|
+
(e, r) => e.valueHasLabelStyle ? n.CAPTION : r && !S ? n.BODY : n.TITLE,
|
|
33
33
|
[S]
|
|
34
34
|
);
|
|
35
|
-
return /* @__PURE__ */ t("div", { className:
|
|
35
|
+
return /* @__PURE__ */ t("div", { className: p(y, { [T]: !i }), children: u.map((e, r) => {
|
|
36
36
|
const a = e.getValue(), o = !!a && a.length > 12;
|
|
37
37
|
return /* @__PURE__ */ t("div", { children: [
|
|
38
|
-
i && (e.tooltipLabel ? /* @__PURE__ */ t(
|
|
39
|
-
l ? /* @__PURE__ */ t(v, { isLoading: C, hasMargin: e.hasSkeletonMargin, width: e.skeletonWidth + "px" }) : d ? /* @__PURE__ */ t("span", { className:
|
|
40
|
-
|
|
38
|
+
i && (e.tooltipLabel ? /* @__PURE__ */ t(x, { content: s.get(`${e.tooltipLabel}`), isContainerHovered: c, children: /* @__PURE__ */ t(h, { config: e, i18n: s, isSkeletonVisible: l }) }) : /* @__PURE__ */ t(h, { config: e, i18n: s, isSkeletonVisible: l })),
|
|
39
|
+
l ? /* @__PURE__ */ t(v, { isLoading: C, hasMargin: e.hasSkeletonMargin, width: e.skeletonWidth + "px" }) : d ? /* @__PURE__ */ t("span", { className: p([y, E]) }) : /* @__PURE__ */ t("div", { ref: e.ref, style: A(r), children: /* @__PURE__ */ t(
|
|
40
|
+
B,
|
|
41
41
|
{
|
|
42
42
|
variant: f(e, o),
|
|
43
|
-
className:
|
|
43
|
+
className: p({ [_]: e.valueHasLabelStyle, [b]: !e.valueHasLabelStyle }),
|
|
44
44
|
children: a
|
|
45
45
|
}
|
|
46
46
|
) })
|
package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.js
CHANGED
|
@@ -5,14 +5,14 @@ import A from "../../../../internal/Typography/Typography.js";
|
|
|
5
5
|
import f from "../../../../../utils/fixedForwardRef.js";
|
|
6
6
|
import y from "classnames";
|
|
7
7
|
const d = f(
|
|
8
|
-
({ config: r, i18n:
|
|
8
|
+
({ config: r, i18n: e, isSkeletonVisible: m, className: o, ...t }, p) => /* @__PURE__ */ a(
|
|
9
9
|
"span",
|
|
10
10
|
{
|
|
11
|
-
className: y(l,
|
|
11
|
+
className: y(l, o, { [L]: m }),
|
|
12
12
|
style: { cursor: "default" },
|
|
13
13
|
ref: p,
|
|
14
14
|
...t,
|
|
15
|
-
children: r.labelKey && /* @__PURE__ */ a(A, { variant: s.CAPTION, className: i, children:
|
|
15
|
+
children: r.labelKey && /* @__PURE__ */ a(A, { variant: s.CAPTION, className: i, children: e.get(r.labelKey) })
|
|
16
16
|
}
|
|
17
17
|
)
|
|
18
18
|
);
|
|
@@ -9,13 +9,13 @@ const S = ({
|
|
|
9
9
|
isHovered: i = !1,
|
|
10
10
|
isSkeleton: r = !1,
|
|
11
11
|
isLoading: c = !1,
|
|
12
|
-
widths:
|
|
13
|
-
onWidthsSet:
|
|
12
|
+
widths: u,
|
|
13
|
+
onWidthsSet: l
|
|
14
14
|
}) => {
|
|
15
|
-
const { i18n: o } = b(),
|
|
15
|
+
const { i18n: o } = b(), m = s(null), f = s(null), g = s(null), a = C(() => {
|
|
16
16
|
const p = {
|
|
17
17
|
labelKey: "totalIncoming",
|
|
18
|
-
ref:
|
|
18
|
+
ref: m,
|
|
19
19
|
skeletonWidth: 80,
|
|
20
20
|
getValue: () => e && o.amount(e.incomings, e.currency),
|
|
21
21
|
tooltipLabel: "tooltip.totalIncoming"
|
|
@@ -46,8 +46,8 @@ const S = ({
|
|
|
46
46
|
isHeader: t,
|
|
47
47
|
isSkeletonVisible: r,
|
|
48
48
|
isLoading: c,
|
|
49
|
-
widths:
|
|
50
|
-
onWidthsSet:
|
|
49
|
+
widths: u,
|
|
50
|
+
onWidthsSet: l
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
};
|
package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as t } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import { memo as
|
|
2
|
+
import { useState as u } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
3
|
+
import c from "../../../../internal/ExpandableCard/ExpandableCard.js";
|
|
4
|
+
import { memo as h } from "../../../../../external/preact/compat/dist/compat.module.js";
|
|
5
5
|
import { TransactionTotalItem as l } from "../TransactionTotalItem/TransactionTotalItem.js";
|
|
6
6
|
import { BaseList as x } from "../../../../internal/BaseList/BaseList.js";
|
|
7
7
|
import { useMaxWidthsState as S } from "../../hooks/useMaxWidths.js";
|
|
8
8
|
import "./TransactionTotals.scss.js";
|
|
9
|
-
const E =
|
|
10
|
-
const [
|
|
9
|
+
const E = h(({ totals: d, isLoading: r, hiddenField: o, fullWidth: f }) => {
|
|
10
|
+
const [p, ...s] = d, [a, m] = S(), [i, e] = u(!1);
|
|
11
11
|
return /* @__PURE__ */ t(
|
|
12
|
-
|
|
12
|
+
c,
|
|
13
13
|
{
|
|
14
14
|
renderHeader: /* @__PURE__ */ t(
|
|
15
15
|
l,
|
|
16
16
|
{
|
|
17
17
|
isHovered: i,
|
|
18
|
-
total:
|
|
18
|
+
total: p,
|
|
19
19
|
hiddenField: o,
|
|
20
20
|
widths: a,
|
|
21
21
|
isHeader: !0,
|
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
import { jsx as s } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import { useSetupEndpoint as O } from "../../../../../hooks/useSetupEndpoint/useSetupEndpoint.js";
|
|
3
|
-
import { useCallback as y, useMemo as
|
|
3
|
+
import { useCallback as y, useMemo as q } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
4
|
import { useFetch as L } from "../../../../../hooks/useFetch/useFetch.js";
|
|
5
|
-
import { BASE_CLASS as N, ITEM_CLASS as
|
|
5
|
+
import { BASE_CLASS as N, ITEM_CLASS as C } from "./constants.js";
|
|
6
6
|
import { memo as _ } from "../../../../../external/preact/compat/dist/compat.module.js";
|
|
7
|
-
import { useMediaQuery as
|
|
7
|
+
import { useMediaQuery as k, mediaQueries as w } from "../../hooks/useMediaQuery.js";
|
|
8
8
|
import "./TransactionTotals.scss.js";
|
|
9
9
|
import { TotalsCard as m } from "./TotalsCard.js";
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { EMPTY_OBJECT as
|
|
12
|
-
const
|
|
10
|
+
import { Fragment as B } from "../../../../../external/preact/dist/preact.module.js";
|
|
11
|
+
import { EMPTY_OBJECT as Q } from "../../../../../utils/common/constants.js";
|
|
12
|
+
const $ = _(
|
|
13
13
|
({
|
|
14
14
|
availableCurrencies: e,
|
|
15
|
-
isAvailableCurrenciesFetching:
|
|
15
|
+
isAvailableCurrenciesFetching: F,
|
|
16
16
|
balanceAccountId: t,
|
|
17
|
-
createdSince:
|
|
18
|
-
createdUntil:
|
|
19
|
-
categories:
|
|
20
|
-
statuses:
|
|
21
|
-
maxAmount:
|
|
22
|
-
minAmount:
|
|
17
|
+
createdSince: p,
|
|
18
|
+
createdUntil: c,
|
|
19
|
+
categories: l,
|
|
20
|
+
statuses: d,
|
|
21
|
+
maxAmount: f,
|
|
22
|
+
minAmount: T,
|
|
23
23
|
currencies: g,
|
|
24
24
|
fullWidth: n
|
|
25
25
|
}) => {
|
|
26
|
-
const h = O("getTransactionTotals"), S = y(async () => h(
|
|
26
|
+
const h = O("getTransactionTotals"), S = y(async () => h(Q, {
|
|
27
27
|
query: {
|
|
28
|
-
createdSince:
|
|
29
|
-
createdUntil:
|
|
30
|
-
categories:
|
|
31
|
-
statuses:
|
|
32
|
-
maxAmount:
|
|
33
|
-
minAmount:
|
|
28
|
+
createdSince: p,
|
|
29
|
+
createdUntil: c,
|
|
30
|
+
categories: l,
|
|
31
|
+
statuses: d,
|
|
32
|
+
maxAmount: f,
|
|
33
|
+
minAmount: T,
|
|
34
34
|
currencies: g,
|
|
35
35
|
balanceAccountId: t
|
|
36
36
|
}
|
|
37
|
-
}), [t,
|
|
38
|
-
fetchOptions:
|
|
37
|
+
}), [t, l, p, c, g, h, f, T, d]), { data: o, isFetching: x } = L({
|
|
38
|
+
fetchOptions: q(() => ({ enabled: !!t }), [t]),
|
|
39
39
|
queryFn: S
|
|
40
|
-
}), i = !t || x ||
|
|
40
|
+
}), i = !t || x || F, a = y(() => {
|
|
41
41
|
if (!e || !o)
|
|
42
|
-
return o == null ? void 0 : o.
|
|
43
|
-
const u = e.map((r) => o.
|
|
44
|
-
return u.concat(o.
|
|
45
|
-
}, [e, o])() ?? [], E =
|
|
46
|
-
return /* @__PURE__ */ s("div", { className: N, children: E ? /* @__PURE__ */ s(
|
|
47
|
-
/* @__PURE__ */ s("div", { className:
|
|
48
|
-
/* @__PURE__ */ s("div", { className:
|
|
42
|
+
return o == null ? void 0 : o.data;
|
|
43
|
+
const u = e.map((r) => o.data.find((M) => M.currency === r) || { currency: r, incomings: 0, expenses: 0 });
|
|
44
|
+
return u.concat(o.data.filter((r) => !u.includes(r)));
|
|
45
|
+
}, [e, o])() ?? [], E = k(w.only.xs);
|
|
46
|
+
return /* @__PURE__ */ s("div", { className: N, children: E ? /* @__PURE__ */ s(B, { children: [
|
|
47
|
+
/* @__PURE__ */ s("div", { className: C, children: /* @__PURE__ */ s(m, { totals: a, isLoading: i, hiddenField: "expenses", fullWidth: n }) }),
|
|
48
|
+
/* @__PURE__ */ s("div", { className: C, children: /* @__PURE__ */ s(m, { totals: a, isLoading: i, hiddenField: "incomings", fullWidth: n }) })
|
|
49
49
|
] }) : /* @__PURE__ */ s(m, { totals: a, isLoading: i, fullWidth: n }) });
|
|
50
50
|
}
|
|
51
|
-
), Z =
|
|
51
|
+
), Z = $;
|
|
52
52
|
export {
|
|
53
53
|
Z as default
|
|
54
54
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as t } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import { popoverUtil as b } from "../../../../internal/Popover/utils/popoverUtil.js";
|
|
3
3
|
import g from "../../../../../core/Context/useCoreContext.js";
|
|
4
|
-
import
|
|
5
|
-
import { Suspense as
|
|
6
|
-
import { useMemo as c, useCallback as
|
|
7
|
-
import { BASE_CLASS as
|
|
4
|
+
import x from "../../../../../hooks/useModalDetails/useModalDetails.js";
|
|
5
|
+
import { Suspense as A, lazy as E } from "../../../../../external/preact/compat/dist/compat.module.js";
|
|
6
|
+
import { useMemo as c, useCallback as O, useEffect as _ } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
7
|
+
import { BASE_CLASS as y, SPINNER_CONTAINER_CLASS as D } from "./constants.js";
|
|
8
8
|
import "./TransactionsDisplay.scss.js";
|
|
9
|
-
import { TransactionsTable as
|
|
10
|
-
import
|
|
9
|
+
import { TransactionsTable as I } from "../TransactionsTable/TransactionsTable.js";
|
|
10
|
+
import R from "../../../../internal/Modal/Modal.js";
|
|
11
11
|
import B from "../../../../internal/Spinner/Spinner.js";
|
|
12
|
-
const
|
|
12
|
+
const L = E(() => import("../ModalContent.js")), J = ({
|
|
13
13
|
availableCurrencies: s,
|
|
14
14
|
balanceAccountDescription: a,
|
|
15
15
|
error: d,
|
|
@@ -27,7 +27,7 @@ const I = O(() => import("../ModalContent.js")), J = ({
|
|
|
27
27
|
callback: i
|
|
28
28
|
}),
|
|
29
29
|
[r, i]
|
|
30
|
-
), N = c(() => ({ transaction: l }), [l]), { updateDetails: m, resetDetails: k, selectedDetail: o } =
|
|
30
|
+
), N = c(() => ({ transaction: l }), [l]), { updateDetails: m, resetDetails: k, selectedDetail: o } = x(N), z = O(
|
|
31
31
|
(p) => {
|
|
32
32
|
m({
|
|
33
33
|
selection: { type: "transaction", data: { ...p, balanceAccountDescription: a } },
|
|
@@ -36,11 +36,11 @@ const I = O(() => import("../ModalContent.js")), J = ({
|
|
|
36
36
|
},
|
|
37
37
|
[m, a]
|
|
38
38
|
), n = !!o;
|
|
39
|
-
return
|
|
39
|
+
return _(() => {
|
|
40
40
|
n && b.closeAll();
|
|
41
|
-
}, [n]), /* @__PURE__ */ t("div", { className:
|
|
41
|
+
}, [n]), /* @__PURE__ */ t("div", { className: y, children: [
|
|
42
42
|
/* @__PURE__ */ t(
|
|
43
|
-
|
|
43
|
+
I,
|
|
44
44
|
{
|
|
45
45
|
availableCurrencies: s,
|
|
46
46
|
error: d,
|
|
@@ -55,7 +55,7 @@ const I = O(() => import("../ModalContent.js")), J = ({
|
|
|
55
55
|
}
|
|
56
56
|
),
|
|
57
57
|
/* @__PURE__ */ t(
|
|
58
|
-
|
|
58
|
+
R,
|
|
59
59
|
{
|
|
60
60
|
title: o != null && o.title ? e.get(o.title) : void 0,
|
|
61
61
|
isOpen: !!o,
|
|
@@ -65,10 +65,10 @@ const I = O(() => import("../ModalContent.js")), J = ({
|
|
|
65
65
|
headerWithBorder: !1,
|
|
66
66
|
size: (o == null ? void 0 : o.modalSize) ?? "large",
|
|
67
67
|
children: o && /* @__PURE__ */ t(
|
|
68
|
-
|
|
68
|
+
A,
|
|
69
69
|
{
|
|
70
|
-
fallback: /* @__PURE__ */ t("span", { className:
|
|
71
|
-
children: /* @__PURE__ */ t(
|
|
70
|
+
fallback: /* @__PURE__ */ t("span", { className: D, children: /* @__PURE__ */ t(B, { size: "medium" }) }),
|
|
71
|
+
children: /* @__PURE__ */ t(L, { data: o.selection.data })
|
|
72
72
|
}
|
|
73
73
|
)
|
|
74
74
|
}
|
|
@@ -3,7 +3,7 @@ import { TransactionFilterParam as e } from "../../types.js";
|
|
|
3
3
|
import { TransactionsDisplay as B } from "../TransactionsDisplay/TransactionsDisplay.js";
|
|
4
4
|
import rr from "../../../../../core/Context/useCoreContext.js";
|
|
5
5
|
import { useSetupEndpoint as er } from "../../../../../hooks/useSetupEndpoint/useSetupEndpoint.js";
|
|
6
|
-
import { useCallback as
|
|
6
|
+
import { useCallback as _, useMemo as C, useState as h, useEffect as T } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
7
7
|
import { isFunction as O } from "../../../../../utils/common/index.js";
|
|
8
8
|
import { LIMIT_OPTIONS as tr, DEFAULT_PAGE_LIMIT as ir } from "../../../../internal/Pagination/constants.js";
|
|
9
9
|
import or from "../TransactionsOverviewDateFilter.js";
|
|
@@ -32,7 +32,7 @@ const Yr = ({
|
|
|
32
32
|
isLoadingBalanceAccount: b,
|
|
33
33
|
onContactSupport: w
|
|
34
34
|
}) => {
|
|
35
|
-
const { i18n: u } = rr(), E = er("getTransactions"), { activeBalanceAccount: r, balanceAccountSelectionOptions:
|
|
35
|
+
const { i18n: u } = rr(), E = er("getTransactions"), { activeBalanceAccount: r, balanceAccountSelectionOptions: x, onBalanceAccountSelection: R } = fr(c), { defaultParams: n, nowTimestamp: y, refreshNowTimestamp: p } = lr(r), P = _(
|
|
36
36
|
async ({ balanceAccount: M, ...o }, q) => E({ signal: q, errorLevel: "error" }, {
|
|
37
37
|
query: {
|
|
38
38
|
...o,
|
|
@@ -50,7 +50,7 @@ const Yr = ({
|
|
|
50
50
|
[r == null ? void 0 : r.id, n, E]
|
|
51
51
|
), X = C(() => O(a) ? a : void 0, [a]), k = C(() => O(d) ? d : void 0, [d]), G = C(() => A ? tr : void 0, [A]), { canResetFilters: Q, error: W, fetching: Y, filters: i, limit: j, limitOptions: V, records: z, resetFilters: Er, updateFilters: s, updateLimit: H, ...J } = Cr({
|
|
52
52
|
fetchRecords: P,
|
|
53
|
-
dataField: "
|
|
53
|
+
dataField: "data",
|
|
54
54
|
filterParams: n.current.defaultFilterParams,
|
|
55
55
|
initialFiltersSameAsDefault: !0,
|
|
56
56
|
onLimitChanged: k,
|
|
@@ -58,7 +58,7 @@ const Yr = ({
|
|
|
58
58
|
preferredLimit: D,
|
|
59
59
|
preferredLimitOptions: G,
|
|
60
60
|
enabled: !!(r != null && r.id)
|
|
61
|
-
}), [l, S] =
|
|
61
|
+
}), [l, S] = h([]), [K, Z] = h(!1), $ = _((M, o) => {
|
|
62
62
|
S(M), Z(o);
|
|
63
63
|
}, []), { categoriesFilter: F, currenciesFilter: N, statusesFilter: f } = mr(
|
|
64
64
|
{
|
|
@@ -84,8 +84,8 @@ const Yr = ({
|
|
|
84
84
|
Ar,
|
|
85
85
|
{
|
|
86
86
|
activeBalanceAccount: r,
|
|
87
|
-
balanceAccountSelectionOptions:
|
|
88
|
-
onBalanceAccountSelection:
|
|
87
|
+
balanceAccountSelectionOptions: x,
|
|
88
|
+
onBalanceAccountSelection: R
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
91
|
/* @__PURE__ */ t(
|