@adyen/adyen-platform-experience-web 1.0.3 → 1.1.1
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/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/da-DK-a148e492.cjs +2 -0
- package/dist/da-DK-a148e492.cjs.map +1 -0
- package/dist/de-DE-a39a50e8.cjs +2 -0
- package/dist/de-DE-a39a50e8.cjs.map +1 -0
- package/dist/es/components/external/PayoutDetails/components/PayoutData.js +41 -41
- package/dist/es/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.js +93 -94
- package/dist/es/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.js +76 -69
- package/dist/es/components/external/ReportsOverview/ReportsOverviewElement.js +25 -0
- package/dist/es/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.js +112 -0
- package/dist/es/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.scss.js +4 -0
- package/dist/es/components/external/ReportsOverview/components/ReportsOverview/constants.js +5 -0
- package/dist/es/components/external/ReportsOverview/components/ReportsOverviewContainer/ReportsOverviewContainer.js +30 -0
- package/dist/es/components/external/ReportsOverview/components/ReportsOverviewContainer/constants.js +4 -0
- package/dist/es/components/external/ReportsOverview/components/ReportsTable/ReportsTable.js +149 -0
- package/dist/es/components/external/ReportsOverview/components/ReportsTable/ReportsTable.scss.js +4 -0
- package/dist/es/components/external/ReportsOverview/components/ReportsTable/constants.js +7 -0
- package/dist/es/components/external/TransactionDetails/components/TransactionData.js +67 -46
- package/dist/es/components/external/TransactionDetails/components/TransactionDataSkeleton.js +28 -17
- package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.js +13 -13
- package/dist/es/components/external/TransactionsOverview/components/Category/Category.js +19 -14
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.js +1 -1
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +10 -10
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.js +11 -11
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.js +1 -1
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +183 -164
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/PaymentMethodCell.js +31 -24
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +95 -89
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/constants.js +6 -5
- package/dist/es/components/hooks/useCustomColumnsData.js +29 -0
- package/dist/es/components/hooks/useFreezePeriod.js +18 -0
- package/dist/es/components/{external/TransactionsOverview/hooks → hooks}/useResponsiveViewport.js +2 -2
- package/dist/es/components/hooks/useTableColumns.js +46 -0
- package/dist/es/components/internal/Accordion/Accordion.js +15 -15
- package/dist/es/components/internal/Alert/Alert.js +62 -0
- package/dist/es/components/internal/Alert/Alert.scss.js +4 -0
- package/dist/es/components/internal/Alert/types.js +4 -0
- package/dist/es/components/internal/Button/DownloadButton/DownloadButton.js +81 -0
- package/dist/es/components/internal/Button/DownloadButton/DownloadButton.scss.js +4 -0
- package/dist/es/components/internal/Button/DownloadButton/useDownload.js +18 -0
- package/dist/es/components/internal/Card/Card.js +15 -15
- package/dist/es/components/internal/DataGrid/DataGrid.js +4 -4
- package/dist/es/components/internal/DataGrid/DataGridCell.js +12 -12
- package/dist/es/components/internal/DataGrid/components/Icon.js +17 -0
- package/dist/es/components/internal/DataGrid/components/SkeletonBody.js +7 -7
- package/dist/es/components/internal/DataGrid/components/TableCells.js +54 -37
- package/dist/es/components/internal/DataOverviewContainer/DataOverviewContainer.js +11 -11
- package/dist/es/components/internal/DataOverviewDetails/DataOverviewDetails.js +54 -54
- package/dist/es/components/internal/DataOverviewDisplay/DataOverviewHeader/DataOverviewHeader.js +45 -0
- package/dist/es/components/internal/DataOverviewDisplay/DataOverviewHeader/DataOverviewHeader.scss.js +4 -0
- package/dist/es/components/internal/DataOverviewDisplay/constants.js +30 -24
- package/dist/es/components/internal/DatePicker/DatePicker.js +10 -10
- package/dist/es/components/internal/ExpandableCard/ExpandableCard.js +13 -13
- package/dist/es/components/internal/FilterBar/FilterBar.js +50 -42
- package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.js +7 -7
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/RangeSelection.js +54 -50
- package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.js +1 -1
- package/dist/es/components/internal/FormFields/InputBase.js +25 -25
- package/dist/es/components/internal/FormFields/Select/BalanceAccountSelector/BalanceAccountSelector.js +1 -1
- package/dist/es/components/internal/FormFields/Select/Select.js +5 -5
- package/dist/es/components/internal/FormFields/Select/components/SelectList.js +5 -5
- package/dist/es/components/internal/Image/Image.js +6 -6
- package/dist/es/components/internal/Img/Img.js +4 -4
- package/dist/es/components/internal/Modal/Modal.js +6 -6
- package/dist/es/components/internal/Pagination/Pagination.js +17 -17
- package/dist/es/components/internal/Popover/Popover.js +11 -11
- package/dist/es/components/internal/SVGIcons/Download.js +21 -0
- package/dist/es/components/internal/SVGIcons/Warning.js +23 -0
- package/dist/es/components/internal/SVGIcons/WarningFilled.js +18 -0
- package/dist/es/components/internal/StructuredList/StructuredList.js +8 -8
- package/dist/es/components/internal/Tag/Tag.js +8 -8
- package/dist/es/components/internal/Tooltip/Tooltip.js +20 -20
- package/dist/es/components/internal/Typography/Typography.js +12 -12
- package/dist/es/components/utils/getLabel.js +6 -3
- package/dist/es/core/Http/http.js +34 -31
- package/dist/es/core/Http/utils.js +39 -30
- package/dist/es/core/Localization/Localization.js +74 -76
- package/dist/es/core/Localization/constants/localization.js +9 -6
- package/dist/es/core/Localization/localization-utils.js +11 -12
- package/dist/es/core/Localization/utils.js +45 -47
- package/dist/es/core/core.js +1 -1
- package/dist/es/index.js +14 -12
- package/dist/es/translations/da-DK.json.js +2 -218
- package/dist/es/translations/de-DE.json.js +2 -218
- package/dist/es/translations/en-US.json.js +2 -218
- package/dist/es/translations/es-ES.json.js +2 -218
- package/dist/es/translations/fr-FR.json.js +2 -218
- package/dist/es/translations/index.js +41 -45
- package/dist/es/translations/it-IT.json.js +2 -218
- package/dist/es/translations/nl-NL.json.js +2 -218
- package/dist/es/translations/no-NO.json.js +2 -218
- package/dist/es/translations/pt-BR.json.js +2 -218
- package/dist/es/translations/sv-SE.json.js +2 -218
- package/dist/es/utils/preact/className.js +3 -3
- package/dist/es-ES-153e5f15.cjs +2 -0
- package/dist/es-ES-153e5f15.cjs.map +1 -0
- package/dist/fr-FR-69b3df0d.cjs +2 -0
- package/dist/fr-FR-69b3df0d.cjs.map +1 -0
- package/dist/it-IT-efca230f.cjs +2 -0
- package/dist/it-IT-efca230f.cjs.map +1 -0
- package/dist/nl-NL-ffbb8184.cjs +2 -0
- package/dist/nl-NL-ffbb8184.cjs.map +1 -0
- package/dist/no-NO-eaf65f6f.cjs +2 -0
- package/dist/no-NO-eaf65f6f.cjs.map +1 -0
- package/dist/pt-BR-590ccc53.cjs +2 -0
- package/dist/pt-BR-590ccc53.cjs.map +1 -0
- package/dist/style.css +1 -1
- package/dist/sv-SE-18f4e86e.cjs +2 -0
- package/dist/sv-SE-18f4e86e.cjs.map +1 -0
- package/dist/types/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.d.ts.map +1 -1
- package/dist/types/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.d.ts +2 -2
- package/dist/types/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.d.ts.map +1 -1
- package/dist/types/components/external/ReportsOverview/ReportsOverviewElement.d.ts +9 -0
- package/dist/types/components/external/ReportsOverview/ReportsOverviewElement.d.ts.map +1 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.d.ts +8 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.d.ts.map +1 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsOverview/constants.d.ts +3 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsOverview/constants.d.ts.map +1 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsOverviewContainer/ReportsOverviewContainer.d.ts +4 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsOverviewContainer/ReportsOverviewContainer.d.ts.map +1 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsOverviewContainer/constants.d.ts +2 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsOverviewContainer/constants.d.ts.map +1 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsTable/ReportsTable.d.ts +15 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsTable/ReportsTable.d.ts.map +1 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsTable/constants.d.ts +5 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsTable/constants.d.ts.map +1 -0
- package/dist/types/components/external/ReportsOverview/index.d.ts +2 -0
- package/dist/types/components/external/ReportsOverview/index.d.ts.map +1 -0
- package/dist/types/components/external/TransactionDetails/components/TransactionData.d.ts +20 -2
- package/dist/types/components/external/TransactionDetails/components/TransactionData.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/components/TransactionDataSkeleton.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/types.d.ts +5 -1
- package/dist/types/components/external/TransactionDetails/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/Category/Category.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/types.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/PaymentMethodCell.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.d.ts +3 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/constants.d.ts +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/constants.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts +5 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts.map +1 -1
- package/dist/types/components/external/index.d.ts +1 -0
- package/dist/types/components/external/index.d.ts.map +1 -1
- package/dist/types/components/hooks/useCustomColumnsData.d.ts +13 -0
- package/dist/types/components/hooks/useCustomColumnsData.d.ts.map +1 -0
- package/dist/types/components/hooks/useFreezePeriod.d.ts +6 -0
- package/dist/types/components/hooks/useFreezePeriod.d.ts.map +1 -0
- package/dist/types/components/{external/TransactionsOverview/hooks → hooks}/useResponsiveViewport.d.ts +1 -1
- package/dist/types/components/hooks/useResponsiveViewport.d.ts.map +1 -0
- package/dist/types/components/hooks/useTableColumns.d.ts +20 -0
- package/dist/types/components/hooks/useTableColumns.d.ts.map +1 -0
- package/dist/types/components/internal/Alert/Alert.d.ts +5 -0
- package/dist/types/components/internal/Alert/Alert.d.ts.map +1 -0
- package/dist/types/components/internal/Alert/types.d.ts +17 -0
- package/dist/types/components/internal/Alert/types.d.ts.map +1 -0
- package/dist/types/components/internal/Button/DownloadButton/DownloadButton.d.ts +16 -0
- package/dist/types/components/internal/Button/DownloadButton/DownloadButton.d.ts.map +1 -0
- package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts +143 -0
- package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts.map +1 -0
- package/dist/types/components/internal/DataGrid/DataGrid.d.ts +2 -5
- package/dist/types/components/internal/DataGrid/DataGrid.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/components/Icon.d.ts +7 -0
- package/dist/types/components/internal/DataGrid/components/Icon.d.ts.map +1 -0
- package/dist/types/components/internal/DataGrid/components/TableCells.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/types.d.ts +4 -3
- package/dist/types/components/internal/DataGrid/types.d.ts.map +1 -1
- package/dist/types/components/internal/DataOverviewContainer/DataOverviewContainer.d.ts +1 -1
- package/dist/types/components/internal/DataOverviewContainer/DataOverviewContainer.d.ts.map +1 -1
- package/dist/types/components/internal/DataOverviewDetails/DataOverviewDetails.d.ts.map +1 -1
- package/dist/types/components/internal/DataOverviewDetails/types.d.ts +3 -2
- package/dist/types/components/internal/DataOverviewDetails/types.d.ts.map +1 -1
- package/dist/types/components/internal/DataOverviewDisplay/DataOverviewHeader/DataOverviewHeader.d.ts +13 -0
- package/dist/types/components/internal/DataOverviewDisplay/DataOverviewHeader/DataOverviewHeader.d.ts.map +1 -0
- package/dist/types/components/internal/DataOverviewDisplay/DataOverviewHeader/index.d.ts +3 -0
- package/dist/types/components/internal/DataOverviewDisplay/DataOverviewHeader/index.d.ts.map +1 -0
- package/dist/types/components/internal/DataOverviewDisplay/constants.d.ts +5 -2
- package/dist/types/components/internal/DataOverviewDisplay/constants.d.ts.map +1 -1
- package/dist/types/components/internal/DataOverviewError/DataOverviewError.d.ts +1 -1
- package/dist/types/components/internal/DataOverviewError/DataOverviewError.d.ts.map +1 -1
- package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.d.ts +1 -1
- package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.d.ts.map +1 -1
- package/dist/types/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.d.ts +1 -1
- package/dist/types/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/FilterBar.d.ts +9 -2
- package/dist/types/components/internal/FilterBar/FilterBar.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/filters/AmountFilter/RangeSelection.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/index.d.ts +1 -0
- package/dist/types/components/internal/FilterBar/index.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/types.d.ts +11 -1
- package/dist/types/components/internal/FilterBar/types.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts +1 -1
- package/dist/types/components/internal/Pagination/Pagination.d.ts.map +1 -1
- package/dist/types/components/internal/SVGIcons/Download.d.ts +4 -0
- package/dist/types/components/internal/SVGIcons/Download.d.ts.map +1 -0
- package/dist/types/components/internal/SVGIcons/Warning.d.ts +4 -0
- package/dist/types/components/internal/SVGIcons/Warning.d.ts.map +1 -0
- package/dist/types/components/internal/SVGIcons/WarningFilled.d.ts +4 -0
- package/dist/types/components/internal/SVGIcons/WarningFilled.d.ts.map +1 -0
- package/dist/types/components/internal/StructuredList/types.d.ts +1 -1
- package/dist/types/components/internal/StructuredList/types.d.ts.map +1 -1
- package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts +2 -2
- package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts.map +1 -1
- package/dist/types/components/types.d.ts +33 -1
- package/dist/types/components/types.d.ts.map +1 -1
- package/dist/types/components/utils/getCommonErrorCode.d.ts +1 -1
- package/dist/types/components/utils/getCommonErrorCode.d.ts.map +1 -1
- package/dist/types/components/utils/getErrorMessage.d.ts +1 -1
- package/dist/types/components/utils/getErrorMessage.d.ts.map +1 -1
- package/dist/types/components/utils/getLabel.d.ts +4 -1
- package/dist/types/components/utils/getLabel.d.ts.map +1 -1
- package/dist/types/core/Auth/context.d.ts +8 -6
- package/dist/types/core/Auth/context.d.ts.map +1 -1
- package/dist/types/core/Auth/session/AuthSession.d.ts +8 -6
- package/dist/types/core/Auth/session/AuthSession.d.ts.map +1 -1
- package/dist/types/core/Auth/session/AuthSetupContext.d.ts +8 -6
- package/dist/types/core/Auth/session/AuthSetupContext.d.ts.map +1 -1
- package/dist/types/core/Http/http.d.ts.map +1 -1
- package/dist/types/core/Http/utils.d.ts +2 -0
- package/dist/types/core/Http/utils.d.ts.map +1 -1
- package/dist/types/core/Localization/Localization.d.ts +8 -10
- package/dist/types/core/Localization/Localization.d.ts.map +1 -1
- package/dist/types/core/Localization/constants/localization.d.ts +5 -2
- package/dist/types/core/Localization/constants/localization.d.ts.map +1 -1
- package/dist/types/core/Localization/localization-utils.d.ts +4 -4
- package/dist/types/core/Localization/localization-utils.d.ts.map +1 -1
- package/dist/types/core/Localization/types.d.ts +0 -19
- package/dist/types/core/Localization/types.d.ts.map +1 -1
- package/dist/types/core/Localization/utils.d.ts +7 -271
- package/dist/types/core/Localization/utils.d.ts.map +1 -1
- package/dist/types/core/core.d.ts +2 -3
- package/dist/types/core/core.d.ts.map +1 -1
- package/dist/types/core/types.d.ts +5 -4
- package/dist/types/core/types.d.ts.map +1 -1
- package/dist/types/hooks/useFetch/useFetch.d.ts +1 -1
- package/dist/types/hooks/useFetch/useFetch.d.ts.map +1 -1
- package/dist/types/hooks/useModalDetails/types.d.ts +1 -1
- package/dist/types/hooks/useModalDetails/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/translations/index.d.ts +189 -2529
- package/dist/types/translations/index.d.ts.map +1 -1
- package/dist/types/types/api/models/reports.d.ts +1 -1
- package/dist/types/types/api/models/reports.d.ts.map +1 -1
- package/dist/types/types/api/resources/ReportsResource.d.ts +18 -19
- package/dist/types/types/api/resources/ReportsResource.d.ts.map +1 -1
- package/dist/types/utils/types.d.ts +3 -0
- package/dist/types/utils/types.d.ts.map +1 -1
- package/package.json +7 -5
- package/dist/es/core/Localization/constants/locale.js +0 -7
- package/dist/types/components/external/TransactionsOverview/hooks/useResponsiveViewport.d.ts.map +0 -1
- package/dist/types/core/Localization/constants/locale.d.ts +0 -139
- package/dist/types/core/Localization/constants/locale.d.ts.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ButtonVariant as s } from "../Button/types.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useMemo as
|
|
2
|
+
import g from "../../../core/Context/useCoreContext.js";
|
|
3
|
+
import b from "classnames";
|
|
4
|
+
import { useMemo as h, useCallback as v } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
5
5
|
import "./Pagination.scss.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import C from "../SVGIcons/ChevronLeft.js";
|
|
7
|
+
import _ from "../SVGIcons/ChevronRight.js";
|
|
8
8
|
import { jsx as a } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
9
9
|
import R from "../FormFields/Select/Select.js";
|
|
10
10
|
import d from "../Button/Button.js";
|
|
@@ -14,29 +14,29 @@ function q({
|
|
|
14
14
|
next: m,
|
|
15
15
|
hasNext: n,
|
|
16
16
|
hasPrev: o,
|
|
17
|
-
page:
|
|
18
|
-
prev:
|
|
19
|
-
limit:
|
|
17
|
+
page: N,
|
|
18
|
+
prev: p,
|
|
19
|
+
limit: f,
|
|
20
20
|
limitOptions: t,
|
|
21
21
|
onLimitSelection: i
|
|
22
22
|
}) {
|
|
23
23
|
const {
|
|
24
24
|
i18n: r
|
|
25
|
-
} =
|
|
25
|
+
} = g(), l = h(() => t && Object.freeze(t.map((e) => ({
|
|
26
26
|
id: `${e}`,
|
|
27
27
|
name: `${e}`
|
|
28
|
-
}))), [t]),
|
|
28
|
+
}))), [t]), u = v(({
|
|
29
29
|
target: e
|
|
30
30
|
}) => {
|
|
31
31
|
T(e == null ? void 0 : e.value) || i == null || i(+e.value);
|
|
32
32
|
}, [i]);
|
|
33
33
|
return a("div", {
|
|
34
34
|
"aria-label": r.get("paginatedNavigation"),
|
|
35
|
-
className: `adyen-pe-pagination ${
|
|
35
|
+
className: `adyen-pe-pagination ${b({})}`,
|
|
36
36
|
children: [a("div", {
|
|
37
37
|
className: "adyen-pe-pagination__context",
|
|
38
38
|
children: [a("span", {
|
|
39
|
-
children:
|
|
39
|
+
children: r.get("pagination.showing")
|
|
40
40
|
}), l && i && a("div", {
|
|
41
41
|
className: "adyen-pe-pagination__limit-selector",
|
|
42
42
|
children: a(R, {
|
|
@@ -44,8 +44,8 @@ function q({
|
|
|
44
44
|
filterable: !1,
|
|
45
45
|
multiSelect: !1,
|
|
46
46
|
items: l,
|
|
47
|
-
onChange:
|
|
48
|
-
selected: `${
|
|
47
|
+
onChange: u,
|
|
48
|
+
selected: `${f ?? ""}`
|
|
49
49
|
})
|
|
50
50
|
})]
|
|
51
51
|
}), a("div", {
|
|
@@ -56,8 +56,8 @@ function q({
|
|
|
56
56
|
disabled: !o,
|
|
57
57
|
iconButton: !0,
|
|
58
58
|
classNameModifiers: ["circle"].concat(o ? c : "disabled"),
|
|
59
|
-
onClick:
|
|
60
|
-
children: a(
|
|
59
|
+
onClick: p,
|
|
60
|
+
children: a(C, {
|
|
61
61
|
disabled: !o
|
|
62
62
|
})
|
|
63
63
|
}), a(d, {
|
|
@@ -67,7 +67,7 @@ function q({
|
|
|
67
67
|
iconButton: !0,
|
|
68
68
|
classNameModifiers: ["circle"].concat(n ? c : "disabled"),
|
|
69
69
|
onClick: m,
|
|
70
|
-
children: a(
|
|
70
|
+
children: a(_, {
|
|
71
71
|
disabled: !n
|
|
72
72
|
})
|
|
73
73
|
})]
|
|
@@ -5,8 +5,8 @@ import io from "./PopoverDismissButton/PopoverDismissButton.js";
|
|
|
5
5
|
import so from "./PopoverTitle/PopoverTitle.js";
|
|
6
6
|
import { PopoverContainerVariant as i, PopoverContainerSize as w } from "./types.js";
|
|
7
7
|
import { InteractionKeyCode as uo } from "../../types.js";
|
|
8
|
-
import { useClickOutside as mo, ClickOutsideVariant as
|
|
9
|
-
import
|
|
8
|
+
import { useClickOutside as mo, ClickOutsideVariant as po, CONTROL_ELEMENT_PROPERTY as O } from "../../../hooks/element/useClickOutside.js";
|
|
9
|
+
import ao from "../../../hooks/element/useFocusTrap.js";
|
|
10
10
|
import fo from "../../../hooks/element/usePopoverPositioner.js";
|
|
11
11
|
import k from "../../../hooks/element/useUniqueIdentifier.js";
|
|
12
12
|
import { SELECTORS as lo, isFocusable as Oo } from "../../../primitives/dom/tabbableRoot/tabbable.js";
|
|
@@ -22,20 +22,20 @@ import { boolOrTrue as Ao } from "../../../utils/value/bool.js";
|
|
|
22
22
|
import { getModifierClasses as No } from "../../../utils/preact/className.js";
|
|
23
23
|
const Lo = (s) => {
|
|
24
24
|
var e;
|
|
25
|
-
let
|
|
25
|
+
let p;
|
|
26
26
|
const l = (e = s.querySelector(`.${U}`)) == null ? void 0 : e.querySelectorAll(lo);
|
|
27
27
|
return l ? (Array.prototype.some.call(l, (u) => {
|
|
28
28
|
if (Oo(u))
|
|
29
|
-
return
|
|
30
|
-
}),
|
|
29
|
+
return p = u;
|
|
30
|
+
}), p) : null;
|
|
31
31
|
}, Co = (s) => s === i.TOOLTIP ? [10, 3, 5, 5] : [15, 15, 15, 15];
|
|
32
32
|
function Ho({
|
|
33
33
|
actions: s,
|
|
34
|
-
disableFocusTrap:
|
|
34
|
+
disableFocusTrap: p = !1,
|
|
35
35
|
actionsLayout: l = ro.SPACE_BETWEEN,
|
|
36
36
|
variant: e = i.TOOLTIP,
|
|
37
37
|
title: u,
|
|
38
|
-
open:
|
|
38
|
+
open: a,
|
|
39
39
|
dismissible: S,
|
|
40
40
|
modifiers: K,
|
|
41
41
|
divider: y,
|
|
@@ -58,14 +58,14 @@ function Ho({
|
|
|
58
58
|
n && n(), t && ((m = o == null ? void 0 : o.current) == null || m.focus());
|
|
59
59
|
}, [n, o]), E = C((t) => {
|
|
60
60
|
t.code === uo.ESCAPE && (n && n(), (o == null ? void 0 : o.current).focus());
|
|
61
|
-
}, [n, o]), P = L(E), h = L(), D = mo(fo(Co(e), o, e, W, V, j, f, Y), n, e === i.TOOLTIP && !
|
|
61
|
+
}, [n, o]), P = L(E), h = L(), D = mo(fo(Co(e), o, e, W, V, j, f, Y), n, e === i.TOOLTIP && !a, po.POPOVER), Q = ao(p ? null : D, J), T = Po(C((t, m) => {
|
|
62
62
|
m instanceof Element && (m[O] = void 0, delete m[O]), t instanceof Element && (t[O] = o.current, cancelAnimationFrame(h.current), h.current = requestAnimationFrame(() => {
|
|
63
|
-
if ($.current ===
|
|
63
|
+
if ($.current === a || !($.current = a))
|
|
64
64
|
return;
|
|
65
65
|
const A = Lo(t);
|
|
66
66
|
A == null || A.focus();
|
|
67
67
|
}));
|
|
68
|
-
}, [
|
|
68
|
+
}, [a, o]), p ? D : Q), X = k(T), Z = q(() => ({
|
|
69
69
|
[`${c}--medium`]: d === w.MEDIUM,
|
|
70
70
|
[`${c}--with-divider`]: !!y,
|
|
71
71
|
[`${c}--wide`]: d === w.WIDE,
|
|
@@ -78,7 +78,7 @@ function Ho({
|
|
|
78
78
|
}, [o]), x(() => (document.removeEventListener("keydown", P.current), document.addEventListener("keydown", P.current = E), () => document.removeEventListener("keydown", P.current)), [E]);
|
|
79
79
|
const z = e === i.TOOLTIP ? eo : `${c} ${no}`, g = e === i.TOOLTIP ? U : `${N}`;
|
|
80
80
|
return Eo(r(_, {
|
|
81
|
-
children:
|
|
81
|
+
children: a ? r(_, {
|
|
82
82
|
children: [f && r("div", {
|
|
83
83
|
className: "adyen-pe-popover__overlay"
|
|
84
84
|
}), r("div", {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as o } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
+
const t = ({
|
|
3
|
+
...l
|
|
4
|
+
}) => o("svg", {
|
|
5
|
+
width: "15",
|
|
6
|
+
height: "14",
|
|
7
|
+
viewBox: "0 0 15 14",
|
|
8
|
+
fill: "none",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
...l,
|
|
11
|
+
children: [o("path", {
|
|
12
|
+
d: "M8.25 0.25V8.18957L10.5001 5.93945L11.5608 7.00011L7.50011 11.0608L3.43945 7.00011L4.50011 5.93945L6.75 8.18934V0.25H8.25Z",
|
|
13
|
+
fill: "currentColor"
|
|
14
|
+
}), o("path", {
|
|
15
|
+
d: "M2.25 11.5V9.25H0.75V11.5C0.75 12.0967 0.987053 12.669 1.40901 13.091C1.83097 13.5129 2.40326 13.75 3 13.75H12C12.5967 13.75 13.169 13.5129 13.591 13.091C14.0129 12.669 14.25 12.0967 14.25 11.5V9.25H12.75V11.5C12.75 11.6989 12.671 11.8897 12.5303 12.0303C12.3897 12.171 12.1989 12.25 12 12.25H3C2.80109 12.25 2.61032 12.171 2.46967 12.0303C2.32902 11.8897 2.25 11.6989 2.25 11.5Z",
|
|
16
|
+
fill: "currentColor"
|
|
17
|
+
})]
|
|
18
|
+
}), n = t;
|
|
19
|
+
export {
|
|
20
|
+
n as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as C } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
+
const r = ({
|
|
3
|
+
...o
|
|
4
|
+
}) => C("svg", {
|
|
5
|
+
width: "16",
|
|
6
|
+
height: "16",
|
|
7
|
+
viewBox: "0 0 16 16",
|
|
8
|
+
fill: "currentColor",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
children: [C("path", {
|
|
11
|
+
d: "M8.75 4.58008H7.25V9.08008H8.75V4.58008Z",
|
|
12
|
+
fill: "currentColor"
|
|
13
|
+
}), C("path", {
|
|
14
|
+
d: "M8.71 10.6201C8.57 10.4801 8.39 10.3801 8.2 10.3501C8.01 10.3101 7.8 10.3301 7.62 10.4101C7.44 10.4901 7.28 10.6101 7.17 10.7801C7.06 10.9401 7 11.1401 7 11.3401C7 11.6101 7.11 11.8601 7.29 12.0501C7.48 12.2401 7.73 12.3401 8 12.3401C8.2 12.3401 8.39 12.2801 8.56 12.1701C8.72 12.0601 8.85 11.9001 8.93 11.7201C9.01 11.5401 9.03 11.3401 8.99 11.1401C8.95 10.9501 8.86 10.7701 8.72 10.6301L8.71 10.6201Z",
|
|
15
|
+
fill: "currentColor"
|
|
16
|
+
}), C("path", {
|
|
17
|
+
d: "M9.9501 2.21008L15.3501 11.5301V11.5201C15.5501 11.8601 15.6501 12.2501 15.6501 12.6501C15.6501 13.0501 15.5501 13.4401 15.3501 13.7801C15.1501 14.1201 14.8601 14.4001 14.5201 14.6001C14.1801 14.8001 13.7901 14.9001 13.4001 14.9001H2.6001C2.2001 14.9001 1.8101 14.8001 1.4701 14.6001C1.1301 14.4101 0.850097 14.1201 0.650097 13.7801C0.450097 13.4501 0.350098 13.0601 0.350098 12.6601C0.350098 12.2601 0.450097 11.8701 0.650097 11.5301L6.0601 2.20008C6.2501 1.86008 6.5401 1.58008 6.8801 1.38008C7.5601 0.980078 8.4401 0.980078 9.1301 1.38008C9.4701 1.58008 9.7501 1.87008 9.9501 2.21008ZM13.7701 13.3001C13.8901 13.2401 13.9801 13.1401 14.0501 13.0301L14.0601 13.0401C14.1301 12.9201 14.1601 12.7901 14.1601 12.6601C14.1601 12.5301 14.1301 12.4001 14.0601 12.2901L8.6601 2.96008C8.5901 2.84008 8.5001 2.74008 8.3801 2.68008C8.2601 2.62008 8.1401 2.58008 8.0001 2.58008C7.8601 2.58008 7.7301 2.61008 7.6201 2.68008C7.5101 2.74008 7.4201 2.84008 7.3501 2.95008L1.9501 12.2901C1.8801 12.4001 1.8501 12.5301 1.8501 12.6601C1.8501 12.7901 1.8801 12.9201 1.9501 13.0301C2.0101 13.1401 2.1101 13.2401 2.2201 13.3001C2.3401 13.3601 2.4701 13.4001 2.6001 13.4001H13.3901C13.5301 13.4001 13.6601 13.3701 13.7701 13.3001Z",
|
|
18
|
+
fill: "currentColor"
|
|
19
|
+
})]
|
|
20
|
+
}), l = r;
|
|
21
|
+
export {
|
|
22
|
+
l as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as C } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
+
const r = ({
|
|
3
|
+
...l
|
|
4
|
+
}) => C("svg", {
|
|
5
|
+
width: "16",
|
|
6
|
+
height: "16",
|
|
7
|
+
viewBox: "0 0 16 16",
|
|
8
|
+
fill: "currentColor",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
...l,
|
|
11
|
+
children: C("path", {
|
|
12
|
+
d: "M15.3501 11.5301L9.9501 2.21008C9.7501 1.87008 9.4701 1.58008 9.1301 1.38008C8.4401 0.980078 7.5601 0.980078 6.8801 1.38008C6.5401 1.58008 6.2501 1.86008 6.0601 2.20008L0.650097 11.5301C0.450097 11.8701 0.350098 12.2601 0.350098 12.6601C0.350098 13.0601 0.450097 13.4501 0.650097 13.7801C0.850097 14.1201 1.1301 14.4101 1.4701 14.6001C1.8101 14.8001 2.2001 14.9001 2.6001 14.9001H13.4001C13.7901 14.9001 14.1801 14.8001 14.5201 14.6001C14.8601 14.4001 15.1501 14.1201 15.3501 13.7801C15.5501 13.4401 15.6501 13.0501 15.6501 12.6501C15.6501 12.2501 15.5501 11.8601 15.3501 11.5201V11.5301ZM7.2501 4.58008H8.7501V9.08008H7.2501V4.58008ZM8.9201 11.7101C8.8401 11.8901 8.7201 12.0501 8.5501 12.1601C8.3801 12.2701 8.1901 12.3301 7.9901 12.3301C7.7201 12.3301 7.4701 12.2301 7.2801 12.0401C7.0901 11.8501 6.9901 11.6001 6.9901 11.3301C6.9901 11.1301 7.0501 10.9401 7.1601 10.7801C7.2701 10.6201 7.4201 10.4901 7.6101 10.4101C7.7901 10.3301 7.9901 10.3201 8.1901 10.3501C8.3901 10.3901 8.5601 10.4801 8.7001 10.6201C8.8401 10.7601 8.9301 10.9401 8.9701 11.1301C9.0101 11.3201 8.9901 11.5201 8.9101 11.7101H8.9201Z",
|
|
13
|
+
fill: "currentColor"
|
|
14
|
+
})
|
|
15
|
+
}), i = r;
|
|
16
|
+
export {
|
|
17
|
+
i as default
|
|
18
|
+
};
|
|
@@ -7,13 +7,13 @@ import { SL_GRID_CLASS as m, SL_BASE_CLASS as C, SL_ITEM_CLASS as f, SL_ITEM_WIT
|
|
|
7
7
|
import "./StructuredList.scss.js";
|
|
8
8
|
import { useStructuredListItems as I } from "./useStructuredListItem.js";
|
|
9
9
|
import { jsx as t } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
10
|
-
const
|
|
11
|
-
function
|
|
10
|
+
const v = "6-6";
|
|
11
|
+
function b({
|
|
12
12
|
items: l,
|
|
13
13
|
highlightable: c,
|
|
14
|
-
renderValue:
|
|
15
|
-
renderLabel:
|
|
16
|
-
layout: L =
|
|
14
|
+
renderValue: e,
|
|
15
|
+
renderLabel: s,
|
|
16
|
+
layout: L = v,
|
|
17
17
|
grid: _ = !0
|
|
18
18
|
}) {
|
|
19
19
|
const [n, p] = u(() => L.split("-").map((r) => `${m}--width-${r}-of-12`), [L]), d = I(l), {
|
|
@@ -29,14 +29,14 @@ function x({
|
|
|
29
29
|
}),
|
|
30
30
|
children: [t("dt", {
|
|
31
31
|
className: o(h, n),
|
|
32
|
-
children:
|
|
32
|
+
children: s ? s(r.label) : t(i, {
|
|
33
33
|
variant: S.BODY,
|
|
34
34
|
children: r.label
|
|
35
35
|
})
|
|
36
36
|
}), t("dd", {
|
|
37
37
|
"aria-label": `${a.get(r.key)} ${a.get("value")}`,
|
|
38
38
|
className: o(E, p),
|
|
39
|
-
children:
|
|
39
|
+
children: e ? e(r.value) : t(i, {
|
|
40
40
|
variant: S.BODY,
|
|
41
41
|
children: r.value
|
|
42
42
|
})
|
|
@@ -45,5 +45,5 @@ function x({
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
export {
|
|
48
|
-
|
|
48
|
+
b as default
|
|
49
49
|
};
|
|
@@ -4,17 +4,17 @@ import "./Tag.scss.js";
|
|
|
4
4
|
import { memo as o } from "../../../external/preact/compat/dist/compat.module.js";
|
|
5
5
|
import { jsx as p } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
6
6
|
const y = o(({
|
|
7
|
-
variant:
|
|
8
|
-
label:
|
|
7
|
+
variant: r = e.DEFAULT,
|
|
8
|
+
label: a
|
|
9
9
|
}) => p("div", {
|
|
10
10
|
className: m("adyen-pe-tag", {
|
|
11
|
-
"adyen-pe-tag--success":
|
|
12
|
-
"adyen-pe-tag--default":
|
|
13
|
-
"adyen-pe-tag--warning":
|
|
14
|
-
"adyen-pe-tag--error":
|
|
15
|
-
"adyen-pe-tag--primary":
|
|
11
|
+
"adyen-pe-tag--success": r === e.SUCCESS,
|
|
12
|
+
"adyen-pe-tag--default": r === e.DEFAULT,
|
|
13
|
+
"adyen-pe-tag--warning": r === e.WARNING,
|
|
14
|
+
"adyen-pe-tag--error": r === e.ERROR,
|
|
15
|
+
"adyen-pe-tag--primary": r === e.WHITE
|
|
16
16
|
}),
|
|
17
|
-
children:
|
|
17
|
+
children: a
|
|
18
18
|
}));
|
|
19
19
|
export {
|
|
20
20
|
y as Tag
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { useResponsiveViewport as v, mediaQueries as T } from "../../
|
|
1
|
+
import { useResponsiveViewport as v, mediaQueries as T } from "../../hooks/useResponsiveViewport.js";
|
|
2
2
|
import b from "../Popover/Popover.js";
|
|
3
|
-
import { PopoverContainerVariant as
|
|
4
|
-
import { useTooltipListeners as
|
|
3
|
+
import { PopoverContainerVariant as V } from "../Popover/types.js";
|
|
4
|
+
import { useTooltipListeners as x } from "./useTooltipListeners.js";
|
|
5
5
|
import { TypographyVariant as I } from "../Typography/types.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import N from "../Typography/Typography.js";
|
|
7
|
+
import P from "../../../hooks/element/useUniqueIdentifier.js";
|
|
8
8
|
import u from "classnames";
|
|
9
|
-
import { Fragment as p, cloneElement as
|
|
9
|
+
import { Fragment as p, cloneElement as w } from "../../../external/preact/dist/preact.module.js";
|
|
10
10
|
import "./Tooltip.scss.js";
|
|
11
11
|
import { jsx as r } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
12
12
|
const O = (t) => typeof t == "string", Q = ({
|
|
13
13
|
content: t,
|
|
14
14
|
children: o,
|
|
15
15
|
triggerRef: g,
|
|
16
|
-
showTooltip:
|
|
16
|
+
showTooltip: a,
|
|
17
17
|
position: y,
|
|
18
|
-
isContainerHovered:
|
|
18
|
+
isContainerHovered: s = !1
|
|
19
19
|
}) => {
|
|
20
20
|
var i, f, n;
|
|
21
|
-
const e =
|
|
21
|
+
const e = P(), _ = v(T.down.sm), {
|
|
22
22
|
isVisible: m,
|
|
23
|
-
listeners:
|
|
24
|
-
} =
|
|
25
|
-
return
|
|
23
|
+
listeners: l
|
|
24
|
+
} = x();
|
|
25
|
+
return _ ? r(p, {
|
|
26
26
|
children: o
|
|
27
27
|
}) : r(p, {
|
|
28
|
-
children: [o ?
|
|
28
|
+
children: [o ? w(o, {
|
|
29
29
|
...o == null ? void 0 : o.props,
|
|
30
30
|
role: "button",
|
|
31
31
|
tabIndex: -1,
|
|
32
32
|
ref: e,
|
|
33
33
|
className: (i = o == null ? void 0 : o.props) != null && i.className ? u(`${(f = o == null ? void 0 : o.props) == null ? void 0 : f.className} adyen-pe__tooltip-target`, {
|
|
34
|
-
" adyen-pe__tooltip-target--hovered":
|
|
34
|
+
" adyen-pe__tooltip-target--hovered": s
|
|
35
35
|
}) : u("adyen-pe__tooltip-target", {
|
|
36
|
-
"adyen-pe__tooltip-target--hovered":
|
|
36
|
+
"adyen-pe__tooltip-target--hovered": s
|
|
37
37
|
}),
|
|
38
|
-
...
|
|
38
|
+
...l,
|
|
39
39
|
"aria-describedby": `tooltip-${(n = e.current) == null ? void 0 : n.id}`
|
|
40
|
-
}) : null, (m ||
|
|
41
|
-
variant:
|
|
40
|
+
}) : null, (m || a) && r(b, {
|
|
41
|
+
variant: V.TOOLTIP,
|
|
42
42
|
targetElement: g ?? e,
|
|
43
43
|
position: y,
|
|
44
|
-
open: m ||
|
|
44
|
+
open: m || a,
|
|
45
45
|
children: r(p, {
|
|
46
|
-
children: t && O(t) ? r(
|
|
46
|
+
children: t && O(t) ? r(N, {
|
|
47
47
|
variant: I.CAPTION,
|
|
48
48
|
children: t
|
|
49
49
|
}) : {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { DEFAULT_TYPOGRAPHY_CLASSNAME as o } from "./constants.js";
|
|
2
|
-
import
|
|
3
|
-
import { useMemo as
|
|
2
|
+
import Y from "classnames";
|
|
3
|
+
import { useMemo as f } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
4
|
import { TypographyVariant as T, TypographyModifier as E } from "./types.js";
|
|
5
|
-
import { memo as
|
|
5
|
+
import { memo as s } from "../../../external/preact/compat/dist/compat.module.js";
|
|
6
6
|
import "./Typography.scss.js";
|
|
7
7
|
import { jsx as R } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
8
8
|
function y({
|
|
9
|
-
el:
|
|
10
|
-
className:
|
|
9
|
+
el: B,
|
|
10
|
+
className: D,
|
|
11
11
|
stronger: I,
|
|
12
12
|
strongest: L,
|
|
13
13
|
variant: $,
|
|
14
14
|
medium: O,
|
|
15
15
|
large: p,
|
|
16
16
|
wide: m,
|
|
17
|
-
children:
|
|
17
|
+
children: N
|
|
18
18
|
}) {
|
|
19
|
-
const
|
|
19
|
+
const A = B || "p", S = f(() => ({
|
|
20
20
|
// Caption
|
|
21
21
|
[`${o}--${T.CAPTION}`]: $ === T.CAPTION,
|
|
22
22
|
[`${o}--${T.CAPTION}-${E.WIDE}`]: $ === T.CAPTION && m,
|
|
@@ -34,12 +34,12 @@ function y({
|
|
|
34
34
|
[`${o}--${T.TITLE}-${E.MEDIUM}`]: $ === T.TITLE && O,
|
|
35
35
|
[`${o}--${T.TITLE}-${E.LARGE}`]: $ === T.TITLE && p
|
|
36
36
|
}), [$, m, I, O, p, L]);
|
|
37
|
-
return R(
|
|
38
|
-
className:
|
|
39
|
-
children:
|
|
37
|
+
return R(A, {
|
|
38
|
+
className: Y([`${o}`, S, D]),
|
|
39
|
+
children: N
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
const
|
|
42
|
+
const u = s(y);
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
u as default
|
|
45
45
|
};
|
|
@@ -13,8 +13,11 @@ const e = {
|
|
|
13
13
|
fundsCapturedAmount: "fundsCaptured",
|
|
14
14
|
payoutAmount: "netPayout",
|
|
15
15
|
adjustmentAmount: "adjustments",
|
|
16
|
-
dateAndPaymentMethod: "date"
|
|
17
|
-
|
|
16
|
+
dateAndPaymentMethod: "date",
|
|
17
|
+
dateAndReportType: "date",
|
|
18
|
+
reportType: "report",
|
|
19
|
+
reportFile: "file"
|
|
20
|
+
}, a = (t) => e[t] || t;
|
|
18
21
|
export {
|
|
19
|
-
|
|
22
|
+
a as getLabel
|
|
20
23
|
};
|
|
@@ -1,52 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
1
|
+
import { getRequestObject as g, getResponseContentType as p, getResponseDownloadFilename as y, getErrorType as w, isAdyenErrorResponse as C, handleFetchError as R } from "./utils.js";
|
|
2
|
+
import { API_VERSION as b } from "./constants.js";
|
|
3
|
+
import { normalizeLoadingContext as E, normalizeUrl as $ } from "../utils.js";
|
|
4
|
+
const c = (r, o) => {
|
|
5
5
|
try {
|
|
6
|
-
|
|
6
|
+
r == null || r(o);
|
|
7
7
|
} catch {
|
|
8
|
-
throw
|
|
8
|
+
throw o;
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
|
-
async function
|
|
11
|
+
async function j(r, o) {
|
|
12
12
|
const {
|
|
13
13
|
errorLevel: i,
|
|
14
|
-
loadingContext:
|
|
14
|
+
loadingContext: d = "",
|
|
15
15
|
path: m
|
|
16
|
-
} =
|
|
17
|
-
return
|
|
18
|
-
const
|
|
19
|
-
|
|
16
|
+
} = r, h = g(r, o), s = new URL(`${E(d)}${b}${$(m)}`);
|
|
17
|
+
return r.params && r.params.forEach((n, t) => {
|
|
18
|
+
const e = decodeURIComponent(n);
|
|
19
|
+
e && s.searchParams.append(t, e);
|
|
20
20
|
}), (async () => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const r = {
|
|
21
|
+
let n = !1;
|
|
22
|
+
const t = {
|
|
24
23
|
level: i
|
|
25
24
|
};
|
|
26
25
|
try {
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
26
|
+
const e = await fetch(s, h);
|
|
27
|
+
if (e.ok)
|
|
29
28
|
try {
|
|
30
|
-
switch ((
|
|
29
|
+
switch (p(e)) {
|
|
31
30
|
case "application/json":
|
|
32
|
-
return await
|
|
31
|
+
return await e.json();
|
|
33
32
|
default:
|
|
34
|
-
|
|
33
|
+
const f = await e.blob(), u = y(e);
|
|
34
|
+
return {
|
|
35
|
+
blob: f,
|
|
36
|
+
filename: u
|
|
37
|
+
};
|
|
35
38
|
}
|
|
36
|
-
} catch (
|
|
37
|
-
throw
|
|
39
|
+
} catch (l) {
|
|
40
|
+
throw n = !0, l;
|
|
38
41
|
}
|
|
39
|
-
|
|
40
|
-
const a = await
|
|
41
|
-
|
|
42
|
-
} catch (
|
|
43
|
-
if (
|
|
44
|
-
throw
|
|
45
|
-
|
|
42
|
+
t.type = w(e.status);
|
|
43
|
+
const a = await e.json();
|
|
44
|
+
t.message = r.errorMessage || `Service at ${s} not available`, t.errorCode = String(a.status), t.requestId = a == null ? void 0 : a.requestId, C(a) && (t.message = a.detail, t.errorCode = a.errorCode), c(r.errorHandler, t);
|
|
45
|
+
} catch (e) {
|
|
46
|
+
if (n)
|
|
47
|
+
throw c(r.errorHandler, e), e;
|
|
48
|
+
c(r.errorHandler, e), t.message = r.errorMessage || `Call to ${s} failed. Error: ${e}`;
|
|
46
49
|
}
|
|
47
|
-
|
|
50
|
+
R(t);
|
|
48
51
|
})();
|
|
49
52
|
}
|
|
50
53
|
export {
|
|
51
|
-
|
|
54
|
+
j as http
|
|
52
55
|
};
|
|
@@ -1,72 +1,81 @@
|
|
|
1
1
|
import s from "../Errors/AdyenPlatformExperienceError.js";
|
|
2
2
|
import { isNullish as i } from "../../utils/value/is.js";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const c = /^[^]*?filename[^;\n]*=\s*(?:UTF-\d['"]*)?(?:(['"])([^]*?)\1|([^;\n]*))?[^]*?$/;
|
|
4
|
+
var R = /* @__PURE__ */ ((e) => (e.NETWORK_ERROR = "NETWORK_ERROR", e.CANCEL = "CANCEL", e.IMPLEMENTATION_ERROR = "IMPLEMENTATION_ERROR", e.ERROR = "ERROR", e.EXPIRED_TOKEN = "EXPIRED_TOKEN", e))(R || {});
|
|
5
|
+
const l = (e) => {
|
|
5
6
|
switch (e) {
|
|
6
7
|
case 401:
|
|
7
8
|
return "EXPIRED_TOKEN";
|
|
8
9
|
default:
|
|
9
10
|
return "NETWORK_ERROR";
|
|
10
11
|
}
|
|
11
|
-
},
|
|
12
|
+
}, p = (e) => {
|
|
13
|
+
var n;
|
|
14
|
+
return (n = e.headers.get("Content-Type")) == null ? void 0 : n.split(";", 1)[0];
|
|
15
|
+
}, d = (e) => {
|
|
16
|
+
const r = (e.headers.get("Content-Disposition") ?? "").replace(c, "$2$3");
|
|
17
|
+
return decodeURIComponent(r);
|
|
18
|
+
}, O = (e, n) => {
|
|
12
19
|
const {
|
|
13
|
-
headers:
|
|
14
|
-
method:
|
|
20
|
+
headers: r = [],
|
|
21
|
+
method: o = "GET"
|
|
15
22
|
} = e;
|
|
16
23
|
return {
|
|
17
|
-
method:
|
|
24
|
+
method: o,
|
|
18
25
|
mode: "cors",
|
|
19
26
|
cache: "default",
|
|
20
27
|
credentials: "same-origin",
|
|
21
28
|
headers: {
|
|
22
29
|
Accept: "application/json, text/plain, */*",
|
|
23
30
|
"Content-Type": "application/json",
|
|
24
|
-
...
|
|
25
|
-
"SDK-Version": "1.
|
|
31
|
+
...r,
|
|
32
|
+
"SDK-Version": "1.1.1"
|
|
26
33
|
},
|
|
27
34
|
redirect: "follow",
|
|
28
35
|
signal: e.signal,
|
|
29
36
|
referrerPolicy: "no-referrer-when-downgrade",
|
|
30
|
-
...
|
|
31
|
-
body: JSON.stringify(
|
|
37
|
+
...o === "POST" && n && {
|
|
38
|
+
body: JSON.stringify(n)
|
|
32
39
|
}
|
|
33
40
|
};
|
|
34
41
|
};
|
|
35
|
-
function
|
|
42
|
+
function f({
|
|
36
43
|
message: e,
|
|
37
|
-
level:
|
|
38
|
-
errorCode:
|
|
39
|
-
type:
|
|
44
|
+
level: n,
|
|
45
|
+
errorCode: r,
|
|
46
|
+
type: o = "NETWORK_ERROR",
|
|
40
47
|
requestId: t
|
|
41
48
|
}) {
|
|
42
|
-
switch (
|
|
49
|
+
switch (n) {
|
|
43
50
|
case "silent":
|
|
44
51
|
break;
|
|
45
52
|
case "info":
|
|
46
53
|
case "warn":
|
|
47
|
-
console[
|
|
54
|
+
console[n](e);
|
|
48
55
|
break;
|
|
49
56
|
case "error":
|
|
50
57
|
default:
|
|
51
|
-
throw new s(
|
|
58
|
+
throw new s(o, t, e, r);
|
|
52
59
|
}
|
|
53
60
|
}
|
|
54
|
-
function
|
|
61
|
+
function u(e) {
|
|
55
62
|
return e && e.errorCode && e.type && (e.detail || e.invalidFields) && e.status;
|
|
56
63
|
}
|
|
57
|
-
function
|
|
58
|
-
const
|
|
59
|
-
for (const
|
|
60
|
-
const
|
|
61
|
-
i(
|
|
64
|
+
function N(e) {
|
|
65
|
+
const n = new URLSearchParams();
|
|
66
|
+
for (const r of Object.keys(e)) {
|
|
67
|
+
const o = e[r];
|
|
68
|
+
i(o) || (Array.isArray(o) ? o.forEach((t) => n.append(r, t)) : n.set(r, String(o)));
|
|
62
69
|
}
|
|
63
|
-
return
|
|
70
|
+
return n;
|
|
64
71
|
}
|
|
65
72
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
R as ErrorTypes,
|
|
74
|
+
l as getErrorType,
|
|
75
|
+
O as getRequestObject,
|
|
76
|
+
p as getResponseContentType,
|
|
77
|
+
d as getResponseDownloadFilename,
|
|
78
|
+
f as handleFetchError,
|
|
79
|
+
u as isAdyenErrorResponse,
|
|
80
|
+
N as parseSearchParams
|
|
72
81
|
};
|