@adyen/adyen-platform-experience-web 1.4.1 → 1.5.0
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/README.md +12 -13
- package/dist/adyen-platform-experience-web.css +1 -1
- package/dist/{angle-right-DpuNqT0j.cjs → angle-right-B2I_t62j.cjs} +2 -2
- package/dist/{angle-right-DpuNqT0j.cjs.map → angle-right-B2I_t62j.cjs.map} +1 -1
- package/dist/{checkmark-CC7Mmd_x.cjs → checkmark-CIwP_FdK.cjs} +2 -2
- package/dist/{checkmark-CC7Mmd_x.cjs.map → checkmark-CIwP_FdK.cjs.map} +1 -1
- package/dist/{checkmark-circle-fill-1IL4ERtO.cjs → checkmark-circle-fill-Cw5UXqzN.cjs} +2 -2
- package/dist/{checkmark-circle-fill-1IL4ERtO.cjs.map → checkmark-circle-fill-Cw5UXqzN.cjs.map} +1 -1
- package/dist/{checkmark-square-fill-Bu2jdGU3.cjs → checkmark-square-fill-BwkQfKCG.cjs} +2 -2
- package/dist/{checkmark-square-fill-Bu2jdGU3.cjs.map → checkmark-square-fill-BwkQfKCG.cjs.map} +1 -1
- package/dist/{chevron-down-BVCFqkLo.cjs → chevron-down-BuYiZOY7.cjs} +2 -2
- package/dist/{chevron-down-BVCFqkLo.cjs.map → chevron-down-BuYiZOY7.cjs.map} +1 -1
- package/dist/{chevron-left-DfGEXTbq.cjs → chevron-left-DhRCcHqQ.cjs} +2 -2
- package/dist/{chevron-left-DfGEXTbq.cjs.map → chevron-left-DhRCcHqQ.cjs.map} +1 -1
- package/dist/{chevron-right-DzkYlomK.cjs → chevron-right-DvPR8FD2.cjs} +2 -2
- package/dist/{chevron-right-DzkYlomK.cjs.map → chevron-right-DvPR8FD2.cjs.map} +1 -1
- package/dist/{chevron-up-CpmBSOon.cjs → chevron-up-DFrrO8PJ.cjs} +2 -2
- package/dist/{chevron-up-CpmBSOon.cjs.map → chevron-up-DFrrO8PJ.cjs.map} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/{copy-DuV1z0-c.cjs → copy-Bl3l133y.cjs} +2 -2
- package/dist/{copy-DuV1z0-c.cjs.map → copy-Bl3l133y.cjs.map} +1 -1
- package/dist/{cross-C5L4gQrS.cjs → cross-BtdvCTEP.cjs} +2 -2
- package/dist/{cross-C5L4gQrS.cjs.map → cross-BtdvCTEP.cjs.map} +1 -1
- package/dist/{cross-circle-fill-D6Ir0xDO.cjs → cross-circle-fill-BBjJLOad.cjs} +2 -2
- package/dist/{cross-circle-fill-D6Ir0xDO.cjs.map → cross-circle-fill-BBjJLOad.cjs.map} +1 -1
- package/dist/da-DK-qSZWEjaU.cjs +2 -0
- package/dist/da-DK-qSZWEjaU.cjs.map +1 -0
- package/dist/de-DE-Dngq7NwF.cjs +2 -0
- package/dist/de-DE-Dngq7NwF.cjs.map +1 -0
- package/dist/{download-IwqY_7gX.cjs → download-Cqu4yqTE.cjs} +2 -2
- package/dist/{download-IwqY_7gX.cjs.map → download-Cqu4yqTE.cjs.map} +1 -1
- package/dist/es/components/external/CapitalOffer/components/CapitalOffer/CapitalOffer.js +14 -14
- package/dist/es/components/external/CapitalOffer/components/CapitalOfferSelection/CapitalOfferSelection.js +20 -20
- package/dist/es/components/external/CapitalOffer/components/CapitalOfferSummary/CapitalOfferSummary.js +73 -62
- package/dist/es/components/external/CapitalOffer/components/utils/utils.js +16 -16
- package/dist/es/components/external/CapitalOverview/components/AccountDetails/AccountDetail.js +3 -3
- package/dist/es/components/external/CapitalOverview/components/AccountDetails/AccountDetails.js +3 -3
- package/dist/es/components/external/CapitalOverview/components/AccountDetails/utils.js +3 -3
- package/dist/es/components/external/CapitalOverview/components/GrantAction/GrantAction.js +6 -6
- package/dist/es/components/external/CapitalOverview/components/GrantAdjustmentDetails/constants.js +0 -1
- package/dist/es/components/external/CapitalOverview/components/GrantDetails/GrantDetails.js +2 -2
- package/dist/es/components/external/CapitalOverview/components/GrantItem/utils.js +14 -14
- package/dist/es/components/external/CapitalOverview/components/GrantList/GrantList.js +2 -2
- package/dist/es/components/external/CapitalOverview/components/GrantList/GrantsDisplay.js +29 -29
- package/dist/es/components/external/CapitalOverview/components/GrantRepaymentDetails/GrantRepaymentDetails.js +1 -1
- package/dist/es/components/external/CapitalOverview/components/PreQualified/PreQualified.js +13 -13
- package/dist/es/components/external/CapitalOverview/components/Unqualified.js +2 -2
- package/dist/es/components/external/CapitalOverview/constants.js +0 -1
- package/dist/es/components/external/PayoutDetails/components/PayoutData.js +21 -21
- package/dist/es/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.js +17 -17
- package/dist/es/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.js +4 -4
- package/dist/es/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.js +16 -16
- package/dist/es/components/external/ReportsOverview/components/ReportsTable/ReportsTable.js +1 -1
- package/dist/es/components/external/TransactionDetails/components/TransactionData/TransactionDataContent.js +20 -20
- package/dist/es/components/external/TransactionDetails/components/details/TransactionDataProperties.js +4 -4
- package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundAmount.js +8 -8
- package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundNotice.js +1 -1
- package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundReason.js +2 -2
- package/dist/es/components/external/TransactionDetails/context/details/context.js +10 -10
- package/dist/es/components/external/TransactionDetails/context/refund/context.js +1 -1
- package/dist/es/components/external/TransactionDetails/context/refund/hooks/useRefundContextLineItems.js +2 -2
- package/dist/es/components/external/TransactionDetails/hooks/useTransaction/transactionNavigator/createDuplexTransactionNavigator.js +20 -20
- package/dist/es/components/external/TransactionDetails/hooks/useTransaction/useTransaction.js +3 -3
- package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.js +2 -2
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +4 -4
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.js +3 -3
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.js +8 -8
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +66 -66
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +19 -19
- package/dist/es/components/external/TransactionsOverview/hooks/useTransactionsOverviewMultiSelectionFilters.js +3 -3
- package/dist/es/components/internal/Accordion/Accordion.js +10 -10
- package/dist/es/components/internal/Alert/Alert.js +1 -1
- package/dist/es/components/internal/Button/DownloadButton/DownloadButton.js +5 -5
- package/dist/es/components/internal/Button/hooks/useButton.js +7 -7
- package/dist/es/components/internal/Calendar/calendar/facade/Calendar.js +104 -104
- package/dist/es/components/internal/Calendar/calendar/facade/index.js +12 -12
- package/dist/es/components/internal/Calendar/calendar/timeframe/common/flags.js +14 -14
- package/dist/es/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.js +4 -4
- package/dist/es/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.js +58 -58
- package/dist/es/components/internal/Calendar/calendar/timerange/factory.js +4 -4
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastNDays.js +3 -3
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetWeek.js +2 -2
- package/dist/es/components/internal/Calendar/calendar/timerange/utils.js +7 -7
- package/dist/es/components/internal/Calendar/calendar/timeslice/index.js +6 -6
- package/dist/es/components/internal/Calendar/calendar/utils.js +22 -22
- package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDayOfWeek.js +11 -11
- package/dist/es/components/internal/Calendar/components/CalendarGrid/utils.js +22 -22
- package/dist/es/components/internal/Calendar/hooks/useCalendar.js +7 -7
- package/dist/es/components/internal/Calendar/hooks/useTimezone.js +12 -12
- package/dist/es/components/internal/CapitalHeader/constants.js +4 -4
- package/dist/es/components/internal/CapitalHeader/helpers.js +14 -12
- package/dist/es/components/internal/Card/Card.js +9 -9
- package/dist/es/components/internal/DataGrid/DataGridCell.js +8 -8
- package/dist/es/components/internal/DataGrid/components/TableCells.js +16 -16
- package/dist/es/components/internal/DataOverviewDetails/DataOverviewDetails.js +13 -13
- package/dist/es/components/internal/DataOverviewDetails/useDataOverviewDetailsTitle.js +8 -8
- package/dist/es/components/internal/DataOverviewDisplay/DataDetailsModal.js +5 -5
- package/dist/es/components/internal/DataOverviewDisplay/DataOverviewHeader/DataOverviewHeader.js +3 -3
- package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js +29 -29
- package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.js +1 -2
- package/dist/es/components/internal/ExpandableCard/ExpandableCard.js +53 -42
- package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.js +2 -2
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/AmountFilter.js +31 -31
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/RangeSelection.js +33 -33
- package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.js +15 -15
- package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilter.js +2 -2
- package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilterCore.js +9 -9
- package/dist/es/components/internal/FormFields/InputBase.js +5 -5
- package/dist/es/components/internal/FormFields/Select/Select.js +15 -15
- package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +43 -43
- package/dist/es/components/internal/FormFields/Select/components/SelectList.js +14 -14
- package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +5 -5
- package/dist/es/components/internal/FormFields/Select/hooks/useSelect.js +2 -2
- package/dist/es/components/internal/Header/Header.js +4 -4
- package/dist/es/components/internal/Icon/Icon.js +5 -3
- package/dist/es/components/internal/Img/Img.js +2 -2
- package/dist/es/components/internal/Link/Link.js +2 -2
- package/dist/es/components/internal/Modal/Modal.js +4 -4
- package/dist/es/components/internal/Pagination/hooks/useCursorPagination.js +12 -12
- package/dist/es/components/internal/Pagination/hooks/usePagination.js +22 -22
- package/dist/es/components/internal/Popover/Popover.js +4 -4
- package/dist/es/components/internal/ProgressBar/ProgressBar.js +3 -3
- package/dist/es/components/internal/SVGIcons/Checkmark.js +3 -3
- package/dist/es/components/internal/SVGIcons/ChevronLeft.js +12 -10
- package/dist/es/components/internal/SVGIcons/ChevronRight.js +12 -10
- package/dist/es/components/internal/SVGIcons/CloseCircle.js +1 -1
- package/dist/es/components/internal/SegmentedControl/SegmentedControl.js +55 -0
- package/dist/es/components/internal/StructuredList/StructuredList.js +4 -4
- package/dist/es/components/internal/Translation/Translation.js +15 -15
- package/dist/es/components/utils/getErrorMessage.js +2 -2
- package/dist/es/constants/dateFormats.js +3 -3
- package/dist/es/core/ConfigContext/context.js +18 -18
- package/dist/es/core/ConfigContext/session/AuthSession.js +36 -36
- package/dist/es/core/ConfigContext/session/AuthSessionSpecification.js +7 -7
- package/dist/es/core/ConfigContext/session/SetupContext.js +5 -5
- package/dist/es/core/ConfigContext/session/constants.js +8 -8
- package/dist/es/core/ConfigContext/session/utils/sessionReady.js +5 -5
- package/dist/es/core/Http/utils.js +1 -1
- package/dist/es/core/Localization/Localization.js +32 -32
- package/dist/es/core/Localization/datetime/restamper/constants.js +3 -3
- package/dist/es/core/Localization/datetime/restamper/restamper.js +1 -1
- package/dist/es/core/Localization/utils.js +1 -1
- package/dist/es/core/core.js +1 -1
- package/dist/es/external/preact/compat/dist/compat.module.js +40 -40
- package/dist/es/external/preact/dist/preact.module.js +197 -195
- package/dist/es/external/preact/hooks/dist/hooks.module.js +71 -67
- package/dist/es/external/preact/jsx-runtime/dist/jsxRuntime.module.js +9 -9
- package/dist/es/hooks/element/useDetachedRender.js +11 -11
- package/dist/es/hooks/element/useFocusTrap.js +5 -5
- package/dist/es/hooks/useBalanceAccountSelection.js +10 -10
- package/dist/es/hooks/useCommitAction/useCommitAction.js +7 -7
- package/dist/es/hooks/useContainerQuery.js +4 -4
- package/dist/es/hooks/useCustomColumnsData.js +2 -2
- package/dist/es/hooks/useDefaultOverviewFilterParams.js +18 -18
- package/dist/es/hooks/useFetch.js +22 -22
- package/dist/es/hooks/useModalDetails/useModalDetails.js +7 -7
- package/dist/es/hooks/useMutation/useMutation.js +3 -3
- package/dist/es/hooks/useReactiveState/useReactiveState.js +21 -21
- package/dist/es/hooks/useResponsiveContainer.js +7 -10
- package/dist/es/hooks/useTabbedControl.js +66 -0
- package/dist/es/images/icons/trash-can.svg.js +9 -0
- package/dist/es/images/icons/upload.svg.js +9 -0
- package/dist/es/primitives/async/abortable/main.js +9 -9
- package/dist/es/primitives/async/deferred/main.js +1 -1
- package/dist/es/primitives/auxiliary/errorContainer/main.js +9 -9
- package/dist/es/primitives/auxiliary/indexed/helpers.js +4 -4
- package/dist/es/primitives/auxiliary/indexed/main.js +7 -7
- package/dist/es/primitives/context/session/internal/autofresher.js +15 -15
- package/dist/es/primitives/context/session/internal/deadline.js +22 -22
- package/dist/es/primitives/context/session/internal/refresher.js +19 -19
- package/dist/es/primitives/dom/tabbableRoot/tabbable.js +3 -3
- package/dist/es/primitives/reactive/eventEmitter/main.js +3 -3
- package/dist/es/primitives/reactive/reflex/main.js +22 -22
- package/dist/es/primitives/reactive/reflex/register.js +25 -25
- package/dist/es/primitives/reactive/watchlist/main.js +24 -24
- package/dist/es/primitives/time/clock/main.js +6 -6
- package/dist/es/primitives/time/interval/main.js +9 -9
- package/dist/es/translations/da-DK.json.js +55 -46
- package/dist/es/translations/de-DE.json.js +67 -58
- package/dist/es/translations/en-US.json.js +79 -70
- package/dist/es/translations/es-ES.json.js +91 -82
- package/dist/es/translations/fi-FI.json.js +93 -84
- package/dist/es/translations/fr-FR.json.js +75 -66
- package/dist/es/translations/it-IT.json.js +95 -86
- package/dist/es/translations/nl-NL.json.js +92 -83
- package/dist/es/translations/no-NO.json.js +71 -62
- package/dist/es/translations/pt-BR.json.js +67 -58
- package/dist/es/translations/sv-SE.json.js +95 -86
- package/dist/es/utils/abort/internals.js +3 -3
- package/dist/es/utils/abort/main.js +19 -19
- package/dist/es/utils/collection/main.js +14 -14
- package/dist/es/utils/datetime/main.js +3 -3
- package/dist/es/utils/preact/className.js +2 -2
- package/dist/es/utils/struct/main.js +8 -8
- package/dist/es/utils/value/is.js +9 -9
- package/dist/es/utils/value/number.js +2 -2
- package/dist/es-ES-Bjddx94n.cjs +2 -0
- package/dist/es-ES-Bjddx94n.cjs.map +1 -0
- package/dist/{external-link-r39cGU4L.cjs → external-link-CqDz5BtK.cjs} +2 -2
- package/dist/{external-link-r39cGU4L.cjs.map → external-link-CqDz5BtK.cjs.map} +1 -1
- package/dist/fi-FI-CNpmToDG.cjs +2 -0
- package/dist/fi-FI-CNpmToDG.cjs.map +1 -0
- package/dist/{filter-BGBP3TAU.cjs → filter-DLAt7sYb.cjs} +2 -2
- package/dist/{filter-BGBP3TAU.cjs.map → filter-DLAt7sYb.cjs.map} +1 -1
- package/dist/fr-FR-CUUHB8JU.cjs +2 -0
- package/dist/fr-FR-CUUHB8JU.cjs.map +1 -0
- package/dist/index-DbNUA_xB.cjs +12 -0
- package/dist/index-DbNUA_xB.cjs.map +1 -0
- package/dist/{info-filled-C_zUEZ2b.cjs → info-filled-B9fmmNGT.cjs} +2 -2
- package/dist/{info-filled-C_zUEZ2b.cjs.map → info-filled-B9fmmNGT.cjs.map} +1 -1
- package/dist/it-IT-B-E80zCo.cjs +2 -0
- package/dist/it-IT-B-E80zCo.cjs.map +1 -0
- package/dist/{minus-circle-outline-1CJ3DOVB.cjs → minus-circle-outline-JkeH7g3f.cjs} +2 -2
- package/dist/{minus-circle-outline-1CJ3DOVB.cjs.map → minus-circle-outline-JkeH7g3f.cjs.map} +1 -1
- package/dist/nl-NL--CGhOJhH.cjs +2 -0
- package/dist/nl-NL--CGhOJhH.cjs.map +1 -0
- package/dist/no-NO-D0UNXgzr.cjs +2 -0
- package/dist/no-NO-D0UNXgzr.cjs.map +1 -0
- package/dist/{plus-circle-outline-CPQ_oOtQ.cjs → plus-circle-outline-Cmz1Lb00.cjs} +2 -2
- package/dist/{plus-circle-outline-CPQ_oOtQ.cjs.map → plus-circle-outline-Cmz1Lb00.cjs.map} +1 -1
- package/dist/pt-BR-Du4cDUgf.cjs +2 -0
- package/dist/pt-BR-Du4cDUgf.cjs.map +1 -0
- package/dist/{square-BmHyYgat.cjs → square-Bow_5TP1.cjs} +2 -2
- package/dist/{square-BmHyYgat.cjs.map → square-Bow_5TP1.cjs.map} +1 -1
- package/dist/sv-SE-C92aO-iv.cjs +2 -0
- package/dist/sv-SE-C92aO-iv.cjs.map +1 -0
- package/dist/trash-can-DLEmgXUG.cjs +2 -0
- package/dist/trash-can-DLEmgXUG.cjs.map +1 -0
- package/dist/types/components/external/CapitalOffer/components/CapitalOfferSummary/CapitalOfferSummary.d.ts.map +1 -1
- package/dist/types/components/external/CapitalOffer/components/utils/utils.d.ts +1 -1
- package/dist/types/components/external/CapitalOffer/components/utils/utils.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/components/utils.d.ts +1 -1
- package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts +71 -0
- package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts.map +1 -1
- package/dist/types/components/internal/CapitalHeader/constants.d.ts +2 -1
- package/dist/types/components/internal/CapitalHeader/constants.d.ts.map +1 -1
- package/dist/types/components/internal/CapitalHeader/helpers.d.ts.map +1 -1
- package/dist/types/components/internal/ExpandableCard/ExpandableCard.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +3 -3
- package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts +1 -1
- package/dist/types/components/internal/Icon/Icon.d.ts +2 -0
- package/dist/types/components/internal/Icon/Icon.d.ts.map +1 -1
- package/dist/types/components/internal/SVGIcons/CheckedBox.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/Checkmark.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/ChevronDown.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/ChevronLeft.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/ChevronLeft.d.ts.map +1 -1
- package/dist/types/components/internal/SVGIcons/ChevronRight.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/ChevronRight.d.ts.map +1 -1
- package/dist/types/components/internal/SVGIcons/ChevronUp.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/CloseCircle.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/Download.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/Download.d.ts.map +1 -1
- package/dist/types/components/internal/SVGIcons/UncheckedBox.d.ts +1 -1
- package/dist/types/components/internal/SegmentedControl/SegmentedControl.d.ts +5 -0
- package/dist/types/components/internal/SegmentedControl/SegmentedControl.d.ts.map +1 -0
- package/dist/types/components/internal/SegmentedControl/types.d.ts +14 -0
- package/dist/types/components/internal/SegmentedControl/types.d.ts.map +1 -0
- package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts +1 -1
- package/dist/types/components/utils/getLabel.d.ts +1 -1
- package/dist/types/core/ConfigContext/context.d.ts +2 -0
- package/dist/types/core/ConfigContext/context.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/session/AuthSession.d.ts +4 -0
- package/dist/types/core/ConfigContext/session/AuthSession.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/session/SetupContext.d.ts +2 -0
- package/dist/types/core/ConfigContext/session/SetupContext.d.ts.map +1 -1
- package/dist/types/hooks/useTabbedControl.d.ts +19 -0
- package/dist/types/hooks/useTabbedControl.d.ts.map +1 -0
- package/dist/types/translations/index.d.ts +9 -0
- package/dist/types/translations/index.d.ts.map +1 -1
- package/dist/types/types/api/resources/CapitalResource.d.ts +1 -0
- package/dist/types/types/api/resources/CapitalResource.d.ts.map +1 -1
- package/dist/types/utils/file/read.d.ts +5 -0
- package/dist/types/utils/file/read.d.ts.map +1 -0
- package/dist/types/utils/file/size.d.ts +45 -0
- package/dist/types/utils/file/size.d.ts.map +1 -0
- package/dist/types/utils/file/upload.d.ts +17 -0
- package/dist/types/utils/file/upload.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/upload-DWOtVcWc.cjs +2 -0
- package/dist/upload-DWOtVcWc.cjs.map +1 -0
- package/dist/{warning-eizPFTg-.cjs → warning-DNUR39rT.cjs} +2 -2
- package/dist/{warning-eizPFTg-.cjs.map → warning-DNUR39rT.cjs.map} +1 -1
- package/dist/{warning-filled-CiVuOE_O.cjs → warning-filled-qxDqTfWV.cjs} +2 -2
- package/dist/{warning-filled-CiVuOE_O.cjs.map → warning-filled-qxDqTfWV.cjs.map} +1 -1
- package/package.json +16 -15
- package/dist/da-DK-DHGqGo8Q.cjs +0 -2
- package/dist/da-DK-DHGqGo8Q.cjs.map +0 -1
- package/dist/de-DE-k_BRPv7a.cjs +0 -2
- package/dist/de-DE-k_BRPv7a.cjs.map +0 -1
- package/dist/es/components/internal/Tabs/Tabs.js +0 -69
- package/dist/es-ES-Cy-9bm8z.cjs +0 -2
- package/dist/es-ES-Cy-9bm8z.cjs.map +0 -1
- package/dist/fi-FI-C7ICLuS8.cjs +0 -2
- package/dist/fi-FI-C7ICLuS8.cjs.map +0 -1
- package/dist/fr-FR-DH8euUOp.cjs +0 -2
- package/dist/fr-FR-DH8euUOp.cjs.map +0 -1
- package/dist/index-BeWwE_B0.cjs +0 -12
- package/dist/index-BeWwE_B0.cjs.map +0 -1
- package/dist/it-IT-DsfPVAun.cjs +0 -2
- package/dist/it-IT-DsfPVAun.cjs.map +0 -1
- package/dist/nl-NL-DP_t6EpF.cjs +0 -2
- package/dist/nl-NL-DP_t6EpF.cjs.map +0 -1
- package/dist/no-NO-ARsXLWv0.cjs +0 -2
- package/dist/no-NO-ARsXLWv0.cjs.map +0 -1
- package/dist/pt-BR-CuTqntp7.cjs +0 -2
- package/dist/pt-BR-CuTqntp7.cjs.map +0 -1
- package/dist/sv-SE-DDAIHLKD.cjs +0 -2
- package/dist/sv-SE-DDAIHLKD.cjs.map +0 -1
- package/dist/types/components/internal/Tabs/Tabs.d.ts +0 -5
- package/dist/types/components/internal/Tabs/Tabs.d.ts.map +0 -1
- package/dist/types/components/internal/Tabs/types.d.ts +0 -15
- package/dist/types/components/internal/Tabs/types.d.ts.map +0 -1
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { getExpectedRepaymentDate as
|
|
1
|
+
import { jsx as t } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
+
import I from "../../../../../core/Context/useCoreContext.js";
|
|
3
|
+
import { useMemo as u, useCallback as P } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
|
+
import { getExpectedRepaymentDate as M, calculateMaximumRepaymentPeriodInMonths as k, getPercentage as v } from "../utils/utils.js";
|
|
5
5
|
import n from "../../../../internal/Typography/Typography.js";
|
|
6
|
-
import {
|
|
6
|
+
import { TypographyVariant as l, TypographyElement as m } from "../../../../internal/Typography/types.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import y from "../../../../internal/Button/Button.js";
|
|
9
9
|
import { ButtonVariant as C } from "../../../../internal/Button/types.js";
|
|
10
|
-
import
|
|
11
|
-
import { Tooltip as
|
|
10
|
+
import D from "../../../../../hooks/useMutation/useMutation.js";
|
|
11
|
+
import { Tooltip as N } from "../../../../internal/Tooltip/Tooltip.js";
|
|
12
12
|
import { AlertTypeOption as E } from "../../../../internal/Alert/types.js";
|
|
13
13
|
import { Alert as b } from "../../../../internal/Alert/Alert.js";
|
|
14
14
|
import { CapitalErrorMessageDisplay as F } from "../utils/CapitalErrorMessageDisplay.js";
|
|
15
15
|
import L from "classnames";
|
|
16
|
-
import { CAPITAL_REPAYMENT_FREQUENCY as
|
|
16
|
+
import { CAPITAL_REPAYMENT_FREQUENCY as R } from "../../../../constants.js";
|
|
17
17
|
import { CapitalOfferLegalNotice as S } from "../CapitalOfferLegalNotice/CapitalOfferLegalNotice.js";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { Icon as
|
|
21
|
-
import { useConfigContext as
|
|
18
|
+
import w from "../../../../internal/InfoBox/InfoBox.js";
|
|
19
|
+
import B from "../../../../internal/StructuredList/StructuredList.js";
|
|
20
|
+
import { Icon as W } from "../../../../internal/Icon/Icon.js";
|
|
21
|
+
import { useConfigContext as q } from "../../../../../core/ConfigContext/context.js";
|
|
22
22
|
import { EMPTY_OBJECT as H } from "../../../../../utils/value/constants.js";
|
|
23
|
-
const
|
|
24
|
-
grantOffer:
|
|
23
|
+
const Y = ["30_013"], ce = ({
|
|
24
|
+
grantOffer: a,
|
|
25
25
|
onBack: h,
|
|
26
|
-
onFundsRequest:
|
|
27
|
-
onContactSupport:
|
|
26
|
+
onFundsRequest: p,
|
|
27
|
+
onContactSupport: d
|
|
28
28
|
}) => {
|
|
29
|
-
const { i18n: e } =
|
|
30
|
-
const r =
|
|
29
|
+
const { i18n: e } = I(), f = u(() => {
|
|
30
|
+
const r = M(a.expectedRepaymentPeriodDays);
|
|
31
31
|
return r ? e.date(r, { month: "long" }) : null;
|
|
32
|
-
}, [
|
|
33
|
-
queryFn:
|
|
32
|
+
}, [a, e]), { requestFunds: T } = q().endpoints, o = D({
|
|
33
|
+
queryFn: T,
|
|
34
34
|
options: {
|
|
35
|
-
onSuccess: (r) =>
|
|
35
|
+
onSuccess: (r) => p == null ? void 0 : p(r)
|
|
36
36
|
}
|
|
37
|
-
}), A =
|
|
37
|
+
}), A = P(
|
|
38
38
|
(r) => {
|
|
39
39
|
o.mutate(H, { path: { grantOfferId: r } });
|
|
40
40
|
},
|
|
41
41
|
[o]
|
|
42
|
-
),
|
|
43
|
-
|
|
44
|
-
}, [
|
|
45
|
-
() =>
|
|
46
|
-
[
|
|
47
|
-
), i =
|
|
42
|
+
), _ = P(() => {
|
|
43
|
+
a.id && A(a.id);
|
|
44
|
+
}, [a.id, A]), s = u(
|
|
45
|
+
() => k(a.maximumRepaymentPeriodDays),
|
|
46
|
+
[a.maximumRepaymentPeriodDays]
|
|
47
|
+
), i = u(() => {
|
|
48
48
|
const r = o.error ? o.error : null;
|
|
49
|
-
if (r &&
|
|
49
|
+
if (r && Y.includes(r.errorCode))
|
|
50
50
|
switch (r.errorCode) {
|
|
51
51
|
case "30_013":
|
|
52
52
|
return {
|
|
@@ -61,62 +61,65 @@ const B = ["30_013"], ce = ({
|
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
return null;
|
|
64
|
-
}, [e, o.error]),
|
|
64
|
+
}, [e, o.error]), x = u(() => {
|
|
65
65
|
const r = [
|
|
66
66
|
{
|
|
67
67
|
key: "capital.fees",
|
|
68
|
-
value: e.amount(
|
|
68
|
+
value: e.amount(a.feesAmount.value, a.feesAmount.currency)
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
key: "capital.totalRepaymentAmount",
|
|
72
|
-
value: e.amount(
|
|
72
|
+
value: e.amount(a.totalAmount.value, a.totalAmount.currency)
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
key: "capital.repaymentThreshold",
|
|
76
|
-
value: e.amount(
|
|
76
|
+
value: e.amount(a.thresholdAmount.value, a.thresholdAmount.currency)
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
key: "capital.dailyRepaymentRate",
|
|
80
|
-
value: e.get("capital.xPercent", { values: { percentage:
|
|
80
|
+
value: e.get("capital.xPercent", { values: { percentage: v(a.repaymentRate) } })
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
key: "capital.expectedRepaymentPeriod",
|
|
84
|
-
value: e.get("capital.xDays", { values: { days:
|
|
84
|
+
value: e.get("capital.xDays", { values: { days: a.expectedRepaymentPeriodDays } })
|
|
85
85
|
},
|
|
86
86
|
{ key: "account", value: e.get("capital.primaryAccount") }
|
|
87
87
|
];
|
|
88
88
|
return s && r.splice(4, 0, {
|
|
89
89
|
key: "capital.maximumRepaymentPeriod",
|
|
90
90
|
value: s === 1 ? e.get("capital.oneMonth") : e.get("capital.xMonths", { values: { months: s } })
|
|
91
|
+
}), a.aprBasisPoints && r.splice(1, 0, {
|
|
92
|
+
key: "capital.annualPercentageRate",
|
|
93
|
+
value: e.get("capital.xPercent", { values: { percentage: v(a.aprBasisPoints) } })
|
|
91
94
|
}), r;
|
|
92
|
-
}, [
|
|
93
|
-
return !i && o.error ? /* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
95
|
+
}, [a, e, s]);
|
|
96
|
+
return !i && o.error ? /* @__PURE__ */ t(F, { error: o.error, onBack: h, onContactSupport: d }) : /* @__PURE__ */ t("div", { className: "adyen-pe-capital-offer-summary", children: [
|
|
97
|
+
/* @__PURE__ */ t(w, { className: "adyen-pe-capital-offer-summary__grant-summary", children: [
|
|
98
|
+
/* @__PURE__ */ t(n, { el: m.PARAGRAPH, variant: l.BODY, children: [
|
|
96
99
|
e.get("capital.youAreRequestingFundingOf"),
|
|
97
100
|
" ",
|
|
98
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ t("strong", { children: `${e.amount(a.grantAmount.value, a.grantAmount.currency, { minimumFractionDigits: 0 })}.` })
|
|
99
102
|
] }),
|
|
100
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ t(n, { el: m.PARAGRAPH, variant: l.CAPTION, children: e.get("capital.youWillNeedToRepayAMinimumOfXEveryXDaysToPayOffTheFunds", {
|
|
101
104
|
values: {
|
|
102
|
-
amount: e.amount(
|
|
103
|
-
days:
|
|
105
|
+
amount: e.amount(a.thresholdAmount.value, a.thresholdAmount.currency),
|
|
106
|
+
days: R,
|
|
104
107
|
date: f ?? ""
|
|
105
108
|
}
|
|
106
109
|
}) })
|
|
107
110
|
] }),
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
|
|
111
|
+
/* @__PURE__ */ t(
|
|
112
|
+
B,
|
|
110
113
|
{
|
|
111
114
|
classNames: "adyen-pe-capital-offer-summary__details",
|
|
112
|
-
renderLabel: (r,
|
|
113
|
-
|
|
115
|
+
renderLabel: (r, c) => c === "capital.repaymentThreshold" ? /* @__PURE__ */ t(
|
|
116
|
+
N,
|
|
114
117
|
{
|
|
115
118
|
isContainerHovered: !0,
|
|
116
119
|
content: e.get("capital.minimumRepaymentToRepayTheFinancingOnTime", {
|
|
117
|
-
values: { days:
|
|
120
|
+
values: { days: R }
|
|
118
121
|
}),
|
|
119
|
-
children: /* @__PURE__ */
|
|
122
|
+
children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(
|
|
120
123
|
n,
|
|
121
124
|
{
|
|
122
125
|
className: "adyen-pe-capital-offer-summary__list-label",
|
|
@@ -126,7 +129,15 @@ const B = ["30_013"], ce = ({
|
|
|
126
129
|
}
|
|
127
130
|
) })
|
|
128
131
|
}
|
|
129
|
-
) : /* @__PURE__ */
|
|
132
|
+
) : c === "capital.annualPercentageRate" ? /* @__PURE__ */ t(N, { isContainerHovered: !0, content: e.get("capital.annualPercentageRateIsTheCostOfBorrowingForALoan"), children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(
|
|
133
|
+
n,
|
|
134
|
+
{
|
|
135
|
+
className: "adyen-pe-capital-offer-summary__list-label",
|
|
136
|
+
el: m.SPAN,
|
|
137
|
+
variant: l.CAPTION,
|
|
138
|
+
children: r
|
|
139
|
+
}
|
|
140
|
+
) }) }) : /* @__PURE__ */ t(
|
|
130
141
|
n,
|
|
131
142
|
{
|
|
132
143
|
className: "adyen-pe-capital-offer-summary__list-label",
|
|
@@ -135,9 +146,9 @@ const B = ["30_013"], ce = ({
|
|
|
135
146
|
children: r
|
|
136
147
|
}
|
|
137
148
|
),
|
|
138
|
-
renderValue: (r,
|
|
139
|
-
const g =
|
|
140
|
-
return /* @__PURE__ */
|
|
149
|
+
renderValue: (r, c) => {
|
|
150
|
+
const g = c === "account" && o.error && i && i.errorCode === "30_013";
|
|
151
|
+
return /* @__PURE__ */ t(
|
|
141
152
|
n,
|
|
142
153
|
{
|
|
143
154
|
className: L({
|
|
@@ -147,34 +158,34 @@ const B = ["30_013"], ce = ({
|
|
|
147
158
|
variant: l.CAPTION,
|
|
148
159
|
stronger: !0,
|
|
149
160
|
children: [
|
|
150
|
-
g ? /* @__PURE__ */
|
|
161
|
+
g ? /* @__PURE__ */ t(W, { name: "warning-filled", "data-testid": "primary-account-warning-icon" }) : null,
|
|
151
162
|
r
|
|
152
163
|
]
|
|
153
164
|
}
|
|
154
165
|
);
|
|
155
166
|
},
|
|
156
|
-
items:
|
|
167
|
+
items: x
|
|
157
168
|
}
|
|
158
169
|
),
|
|
159
|
-
i && /* @__PURE__ */
|
|
170
|
+
i && /* @__PURE__ */ t(
|
|
160
171
|
b,
|
|
161
172
|
{
|
|
162
173
|
className: "adyen-pe-capital-offer-summary__error-alert",
|
|
163
174
|
type: E.WARNING,
|
|
164
175
|
title: i.title,
|
|
165
176
|
description: i.message,
|
|
166
|
-
children:
|
|
177
|
+
children: d ? /* @__PURE__ */ t(y, { className: "adyen-pe-capital-offer-summary__error-alert-button", onClick: d, children: e.get("contactSupport") }) : null
|
|
167
178
|
}
|
|
168
179
|
),
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
o.error && !i ? null : /* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ t(S, {}),
|
|
181
|
+
/* @__PURE__ */ t("div", { className: "adyen-pe-capital-offer-summary__buttons", children: [
|
|
182
|
+
o.error && !i ? null : /* @__PURE__ */ t(y, { variant: C.SECONDARY, onClick: h, children: e.get("back") }),
|
|
183
|
+
/* @__PURE__ */ t(
|
|
173
184
|
y,
|
|
174
185
|
{
|
|
175
186
|
variant: C.PRIMARY,
|
|
176
187
|
state: o.isLoading ? "loading" : void 0,
|
|
177
|
-
onClick:
|
|
188
|
+
onClick: _,
|
|
178
189
|
disabled: o.isLoading || !!o.error || !!o.data,
|
|
179
190
|
children: e.get(o.isLoading ? "capital.requesting" : "capital.requestFunds")
|
|
180
191
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { DAY_MS as
|
|
2
|
-
import { parseDate as
|
|
3
|
-
const
|
|
4
|
-
let t,
|
|
5
|
-
function
|
|
6
|
-
clearTimeout(t),
|
|
7
|
-
e(
|
|
8
|
-
},
|
|
1
|
+
import { DAY_MS as c } from "../../../../internal/Calendar/calendar/constants.js";
|
|
2
|
+
import { parseDate as i } from "../../../../../utils/datetime/main.js";
|
|
3
|
+
const u = (e, n = 0) => new Date(new Date(e).setUTCHours(0, 0, 0, 0) + Math.floor(n) * c), l = (e) => i(u(/* @__PURE__ */ new Date(), e)), d = (e) => e ? Math.ceil(e / 30) : null, p = (e, n) => {
|
|
4
|
+
let t, o;
|
|
5
|
+
function r(...a) {
|
|
6
|
+
clearTimeout(t), o = a, t = setTimeout(() => {
|
|
7
|
+
e(o), o = void 0;
|
|
8
|
+
}, n);
|
|
9
9
|
}
|
|
10
|
-
return
|
|
11
|
-
t && (clearTimeout(t), t = void 0,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
10
|
+
return r.cancel = () => {
|
|
11
|
+
t && (clearTimeout(t), t = void 0, o = void 0);
|
|
12
|
+
}, r;
|
|
13
|
+
}, f = (e) => e / 100;
|
|
14
14
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
d as calculateMaximumRepaymentPeriodInMonths,
|
|
16
|
+
p as debounce,
|
|
17
|
+
l as getExpectedRepaymentDate,
|
|
18
|
+
f as getPercentage
|
|
19
19
|
};
|
package/dist/es/components/external/CapitalOverview/components/AccountDetails/AccountDetail.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as r } from "../../../../../external/preact/jsx-runtime/dist/jsxRun
|
|
|
2
2
|
import c from "../../../../internal/CopyText/CopyText.js";
|
|
3
3
|
import d from "../../../../../core/Context/useCoreContext.js";
|
|
4
4
|
import t from "../../../../internal/Typography/Typography.js";
|
|
5
|
-
import {
|
|
5
|
+
import { TypographyVariant as a, TypographyElement as i } from "../../../../internal/Typography/types.js";
|
|
6
6
|
const x = ({
|
|
7
7
|
className: p,
|
|
8
8
|
content: e,
|
|
@@ -13,8 +13,8 @@ const x = ({
|
|
|
13
13
|
}) => {
|
|
14
14
|
const { i18n: s } = d();
|
|
15
15
|
return /* @__PURE__ */ r("div", { className: p, children: [
|
|
16
|
-
/* @__PURE__ */ r("dt", { className: m, children: /* @__PURE__ */ r(t, { el:
|
|
17
|
-
/* @__PURE__ */ r("dd", { className: l, children: o ? /* @__PURE__ */ r(c, { buttonLabel: e, textToCopy: o, showCopyTextTooltip: !1, type: "Text" }) : /* @__PURE__ */ r(t, { el:
|
|
16
|
+
/* @__PURE__ */ r("dt", { className: m, children: /* @__PURE__ */ r(t, { el: i.SPAN, variant: a.CAPTION, children: s.get(n) }) }),
|
|
17
|
+
/* @__PURE__ */ r("dd", { className: l, children: o ? /* @__PURE__ */ r(c, { buttonLabel: e, textToCopy: o, showCopyTextTooltip: !1, type: "Text" }) : /* @__PURE__ */ r(t, { el: i.SPAN, variant: a.BODY, children: e }) })
|
|
18
18
|
] });
|
|
19
19
|
};
|
|
20
20
|
export {
|
package/dist/es/components/external/CapitalOverview/components/AccountDetails/AccountDetails.js
CHANGED
|
@@ -3,7 +3,7 @@ import A from "classnames";
|
|
|
3
3
|
import { useMemo as C } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
4
|
import { AccountDetail as F } from "./AccountDetail.js";
|
|
5
5
|
import { Fragment as _ } from "../../../../../external/preact/dist/preact.module.js";
|
|
6
|
-
import {
|
|
6
|
+
import { getAccountFieldTextToCopy as y, getAccountFieldFormattedValue as S, getAccountFieldTranslationKey as b } from "./utils.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
const o = "adyen-pe-capital-account-details", n = {
|
|
9
9
|
detail: `${o}__detail`,
|
|
@@ -22,9 +22,9 @@ const o = "adyen-pe-capital-account-details", n = {
|
|
|
22
22
|
className: n.detail,
|
|
23
23
|
contentClassName: n.detailContent,
|
|
24
24
|
labelClassName: n.detailLabel,
|
|
25
|
-
label:
|
|
25
|
+
label: b(t),
|
|
26
26
|
content: S(t, e),
|
|
27
|
-
textToCopy:
|
|
27
|
+
textToCopy: y(t, e)
|
|
28
28
|
}
|
|
29
29
|
) }, t) : null;
|
|
30
30
|
}) });
|
|
@@ -16,7 +16,7 @@ const n = (e, t = !0) => {
|
|
|
16
16
|
default:
|
|
17
17
|
return !1;
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, o = (e, t) => r(e) ? t : void 0, u = (e, t) => {
|
|
20
20
|
switch (e) {
|
|
21
21
|
case "iban":
|
|
22
22
|
return t && n(t);
|
|
@@ -40,7 +40,7 @@ const n = (e, t = !0) => {
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
u as getAccountFieldFormattedValue,
|
|
44
|
+
o as getAccountFieldTextToCopy,
|
|
45
45
|
s as getAccountFieldTranslationKey
|
|
46
46
|
};
|
|
@@ -5,11 +5,11 @@ import F from "../../../../../hooks/useTimezoneAwareDateFormatting.js";
|
|
|
5
5
|
import { GRANT_ACTION_CLASS_NAMES as l } from "./constants.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { Alert as p } from "../../../../internal/Alert/Alert.js";
|
|
8
|
-
import { AlertTypeOption as
|
|
8
|
+
import { AlertTypeOption as d } from "../../../../internal/Alert/types.js";
|
|
9
9
|
import { useFetch as S } from "../../../../../hooks/useFetch.js";
|
|
10
10
|
import "../../../../../external/preact/compat/dist/compat.module.js";
|
|
11
11
|
import { getTopWindowHref as _, setTopWindowHref as b } from "./utils.js";
|
|
12
|
-
import
|
|
12
|
+
import f from "../../../../internal/Button/Button.js";
|
|
13
13
|
import { DATE_FORMAT_CAPITAL_OVERVIEW as I } from "../../../../../constants/dateFormats.js";
|
|
14
14
|
import { useConfigContext as N } from "../../../../../core/ConfigContext/context.js";
|
|
15
15
|
import { EMPTY_OBJECT as W } from "../../../../../utils/value/constants.js";
|
|
@@ -33,22 +33,22 @@ const D = ({ action: n, className: s, offerExpiresAt: m }) => {
|
|
|
33
33
|
p,
|
|
34
34
|
{
|
|
35
35
|
className: s,
|
|
36
|
-
type:
|
|
36
|
+
type: d.CRITICAL,
|
|
37
37
|
title: e.get("somethingWentWrongTryRefreshingOrComeBackLater"),
|
|
38
|
-
description: /* @__PURE__ */ r(
|
|
38
|
+
description: /* @__PURE__ */ r(f, { className: l.button, onClick: u, children: e.get("refresh") })
|
|
39
39
|
}
|
|
40
40
|
) : /* @__PURE__ */ r(
|
|
41
41
|
p,
|
|
42
42
|
{
|
|
43
43
|
className: s,
|
|
44
|
-
type:
|
|
44
|
+
type: d.WARNING,
|
|
45
45
|
title: `${e.get("capital.signTermsAndConditionsToReceiveFunds")}${m ? ` ${e.get("capital.thisOfferExpiresOn", {
|
|
46
46
|
values: {
|
|
47
47
|
date: T(m, I)
|
|
48
48
|
}
|
|
49
49
|
})}` : ""}`,
|
|
50
50
|
description: /* @__PURE__ */ r(
|
|
51
|
-
|
|
51
|
+
f,
|
|
52
52
|
{
|
|
53
53
|
className: l.button,
|
|
54
54
|
onClick: () => C(!0),
|
|
@@ -2,10 +2,10 @@ import { jsx as a } from "../../../../../external/preact/jsx-runtime/dist/jsxRun
|
|
|
2
2
|
import { useCallback as s, useMemo as p } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
3
3
|
import y from "../../../../../core/Context/useCoreContext.js";
|
|
4
4
|
import r from "../../../../internal/Typography/Typography.js";
|
|
5
|
-
import {
|
|
5
|
+
import { TypographyVariant as o, TypographyElement as m } from "../../../../internal/Typography/types.js";
|
|
6
6
|
import { GRANT_DETAILS_CLASS_NAMES as l } from "./constants.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import {
|
|
8
|
+
import { getPercentage as d } from "../../../CapitalOffer/components/utils/utils.js";
|
|
9
9
|
import { Tooltip as A } from "../../../../internal/Tooltip/Tooltip.js";
|
|
10
10
|
import { CAPITAL_REPAYMENT_FREQUENCY as v } from "../../../../constants.js";
|
|
11
11
|
import h from "../../../../internal/StructuredList/StructuredList.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TagVariant as
|
|
2
|
-
const u = (e) => e === "Active", c = (e) => e === "Repaid",
|
|
1
|
+
import { TagVariant as s } from "../../../../internal/Tag/types.js";
|
|
2
|
+
const u = (e) => e === "Active", c = (e) => e === "Repaid", o = (e) => e === "Active" ? "capital.remaining" : "capital.requestedFunds", r = (e) => e.status === "Active" ? e.remainingTotalAmount : e.grantAmount, d = ({ status: e, missingActions: t }) => {
|
|
3
3
|
switch (e) {
|
|
4
4
|
case "Active":
|
|
5
5
|
return;
|
|
@@ -17,26 +17,26 @@ const u = (e) => e === "Active", c = (e) => e === "Repaid", r = (e) => e === "Ac
|
|
|
17
17
|
}, l = ({ status: e, missingActions: t }) => {
|
|
18
18
|
switch (e) {
|
|
19
19
|
case "Failed":
|
|
20
|
-
return
|
|
20
|
+
return s.ERROR;
|
|
21
21
|
case "Pending":
|
|
22
|
-
return t != null && t.length ?
|
|
22
|
+
return t != null && t.length ? s.WARNING : s.DEFAULT;
|
|
23
23
|
case "Repaid":
|
|
24
|
-
return
|
|
24
|
+
return s.LIGHT;
|
|
25
25
|
case "Revoked":
|
|
26
26
|
case "WrittenOff":
|
|
27
|
-
return
|
|
27
|
+
return s.WARNING;
|
|
28
28
|
default:
|
|
29
|
-
return
|
|
29
|
+
return s.DEFAULT;
|
|
30
30
|
}
|
|
31
31
|
}, p = (e) => {
|
|
32
32
|
const t = /* @__PURE__ */ new Date(), a = /* @__PURE__ */ new Date();
|
|
33
33
|
return a.setDate(t.getDate() + e), a;
|
|
34
34
|
}, y = (e) => {
|
|
35
|
-
var a,
|
|
35
|
+
var a, n;
|
|
36
36
|
const t = ((a = e.missingActions) == null ? void 0 : a.some((i) => i.type === "signToS")) || !1;
|
|
37
37
|
switch (e.status) {
|
|
38
38
|
case "Pending":
|
|
39
|
-
return (
|
|
39
|
+
return (n = e.missingActions) != null && n.length ? t ? "capital.signTheTermsToReceiveYourFunds" : void 0 : "capital.youShouldGetTheFundsWithinOneBusinessDay";
|
|
40
40
|
case "Failed":
|
|
41
41
|
return "capital.weCouldNotProcessThisRequestTryAgain";
|
|
42
42
|
case "WrittenOff":
|
|
@@ -47,14 +47,14 @@ const u = (e) => e === "Active", c = (e) => e === "Repaid", r = (e) => e === "Ac
|
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
}, T = (e) => {
|
|
50
|
-
var
|
|
50
|
+
var n;
|
|
51
51
|
const t = e.status === "Active", a = e.status === "Pending";
|
|
52
52
|
return {
|
|
53
|
-
amount:
|
|
54
|
-
amountLabelKey:
|
|
53
|
+
amount: r(e),
|
|
54
|
+
amountLabelKey: o(e.status),
|
|
55
55
|
hasAlerts: a,
|
|
56
56
|
hasDetails: u(e.status),
|
|
57
|
-
hasUnscheduledRepaymentDetails: t && !!((
|
|
57
|
+
hasUnscheduledRepaymentDetails: t && !!((n = e.unscheduledRepaymentAccounts) != null && n.length),
|
|
58
58
|
// The grant revocation account details is currently not ready to be rendered.
|
|
59
59
|
// A future iteration of this component might include revocation account details.
|
|
60
60
|
// Only then should the following line be uncommented.
|
|
@@ -66,7 +66,7 @@ const u = (e) => e === "Active", c = (e) => e === "Repaid", r = (e) => e === "Ac
|
|
|
66
66
|
isLabelColorSecondary: t,
|
|
67
67
|
isProgressBarVisible: t,
|
|
68
68
|
repaymentPeriodEndDate: p(e.repaymentPeriodLeft),
|
|
69
|
-
statusKey:
|
|
69
|
+
statusKey: d(e),
|
|
70
70
|
statusTagVariant: l(e),
|
|
71
71
|
statusTooltipKey: y(e)
|
|
72
72
|
};
|
|
@@ -3,7 +3,7 @@ import { jsx as a } from "../../../../../external/preact/jsx-runtime/dist/jsxRun
|
|
|
3
3
|
import { useState as k, useCallback as t } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
4
|
import { CapitalOffer as C } from "../../../CapitalOffer/components/CapitalOffer/CapitalOffer.js";
|
|
5
5
|
import { GrantsDisplay as b } from "./GrantsDisplay.js";
|
|
6
|
-
import { Fragment as
|
|
6
|
+
import { Fragment as x } from "../../../../../external/preact/dist/preact.module.js";
|
|
7
7
|
const V = ({
|
|
8
8
|
externalDynamicOffersConfig: l,
|
|
9
9
|
grantList: p,
|
|
@@ -20,7 +20,7 @@ const V = ({
|
|
|
20
20
|
},
|
|
21
21
|
[e, i]
|
|
22
22
|
);
|
|
23
|
-
return /* @__PURE__ */ a(
|
|
23
|
+
return /* @__PURE__ */ a(x, { children: c ? /* @__PURE__ */ a(
|
|
24
24
|
C,
|
|
25
25
|
{
|
|
26
26
|
externalDynamicOffersConfig: l,
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { jsx as e } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
-
import { BaseList as
|
|
3
|
-
import { GrantItem as
|
|
4
|
-
import { getGrantConfig as
|
|
5
|
-
import { GRANT_ADJUSTMENT_DETAILS as
|
|
6
|
-
import { GrantRepaymentDetails as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { CapitalHeader as
|
|
13
|
-
const u = ({ grants: t, showDetails: c }) => /* @__PURE__ */ e(
|
|
14
|
-
const [
|
|
15
|
-
const
|
|
2
|
+
import { BaseList as C } from "../../../../internal/BaseList/BaseList.js";
|
|
3
|
+
import { GrantItem as _ } from "../GrantItem/GrantItem.js";
|
|
4
|
+
import { getGrantConfig as b } from "../GrantItem/utils.js";
|
|
5
|
+
import { GRANT_ADJUSTMENT_DETAILS as R } from "../GrantAdjustmentDetails/constants.js";
|
|
6
|
+
import { GrantRepaymentDetails as T } from "../GrantRepaymentDetails/GrantRepaymentDetails.js";
|
|
7
|
+
import A from "../../../../internal/SegmentedControl/SegmentedControl.js";
|
|
8
|
+
import B from "../../../../../core/Context/useCoreContext.js";
|
|
9
|
+
import { useState as G, useMemo as l, useCallback as D } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
10
|
+
import E from "../../../../internal/Button/Button.js";
|
|
11
|
+
import { ButtonVariant as U } from "../../../../internal/Button/types.js";
|
|
12
|
+
import { CapitalHeader as k } from "../../../../internal/CapitalHeader/CapitalHeader.js";
|
|
13
|
+
const u = ({ grants: t, showDetails: c }) => /* @__PURE__ */ e(C, { classNames: "adyen-pe-grant-list__items", children: t.map((n) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(_, { grant: n, showDetails: c.bind(null, n) }) }, n.id)) }), Y = ({ grantList: t, hideTitle: c, newOfferAvailable: n, onNewOfferRequest: v }) => {
|
|
14
|
+
const [g, h] = G(), [a, y] = G(), { i18n: N } = B(), [i, m] = l(() => {
|
|
15
|
+
const s = [], r = [];
|
|
16
16
|
return t == null || t.forEach((o) => {
|
|
17
|
-
o.status === "Active" || o.status === "Pending" ?
|
|
18
|
-
}), [
|
|
19
|
-
}, [t]), f = l(() => t.length > 1 && i.length && m.length ? "
|
|
20
|
-
h(r), y(
|
|
17
|
+
o.status === "Active" || o.status === "Pending" ? s.push(o) : r.push(o);
|
|
18
|
+
}), [s, r];
|
|
19
|
+
}, [t]), f = l(() => t.length > 1 && i.length && m.length ? "SegmentedGrants" : "UnifiedGrants", [i.length, t.length, m.length]), S = l(() => n && !i.some((s) => s.status === "Pending"), [i, n]), d = l(() => a && b(a), [a]), w = D(() => h(void 0), []), p = D((s, r) => {
|
|
20
|
+
h(r), y(s);
|
|
21
21
|
}, []);
|
|
22
|
-
if (
|
|
23
|
-
switch (
|
|
24
|
-
case
|
|
22
|
+
if (a)
|
|
23
|
+
switch (g) {
|
|
24
|
+
case R.unscheduledRepayment: {
|
|
25
25
|
if (d != null && d.hasUnscheduledRepaymentDetails)
|
|
26
|
-
return /* @__PURE__ */ e(
|
|
26
|
+
return /* @__PURE__ */ e(T, { grant: a, onDetailsClose: w });
|
|
27
27
|
break;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
return /* @__PURE__ */ e("div", { className: "adyen-pe-grant-list", children: [
|
|
31
31
|
/* @__PURE__ */ e("div", { className: "adyen-pe-grant-list__header-container", children: [
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
|
|
32
|
+
/* @__PURE__ */ e(k, { hideTitle: c, titleKey: "capital.businessFinancing" }),
|
|
33
|
+
S ? /* @__PURE__ */ e(E, { onClick: v, className: "adyen-pe-grant-list__offer-button", variant: U.SECONDARY, children: N.get("capital.seeNewOffer") }) : null
|
|
34
34
|
] }),
|
|
35
|
-
f === "
|
|
36
|
-
f === "
|
|
37
|
-
|
|
35
|
+
f === "UnifiedGrants" && /* @__PURE__ */ e(u, { grants: t, showDetails: p }),
|
|
36
|
+
f === "SegmentedGrants" && /* @__PURE__ */ e(
|
|
37
|
+
A,
|
|
38
38
|
{
|
|
39
|
-
|
|
39
|
+
items: [
|
|
40
40
|
{
|
|
41
41
|
label: "capital.inProgress",
|
|
42
42
|
content: /* @__PURE__ */ e(u, { grants: i, showDetails: p }),
|
|
@@ -48,7 +48,7 @@ const u = ({ grants: t, showDetails: c }) => /* @__PURE__ */ e(w, { classNames:
|
|
|
48
48
|
id: "inactive"
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
|
-
|
|
51
|
+
defaultItem: "active"
|
|
52
52
|
}
|
|
53
53
|
)
|
|
54
54
|
] });
|
|
@@ -2,7 +2,7 @@ import { jsx as e } from "../../../../../external/preact/jsx-runtime/dist/jsxRun
|
|
|
2
2
|
import { useMemo as s } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
3
3
|
import d from "../../../../../core/Context/useCoreContext.js";
|
|
4
4
|
import o from "../../../../internal/Typography/Typography.js";
|
|
5
|
-
import {
|
|
5
|
+
import { TypographyVariant as c, TypographyElement as m } from "../../../../internal/Typography/types.js";
|
|
6
6
|
import { AccountDetails as A } from "../AccountDetails/AccountDetails.js";
|
|
7
7
|
import { GrantAdjustmentDetails as f } from "../GrantAdjustmentDetails/GrantAdjustmentDetails.js";
|
|
8
8
|
/* empty css */
|