@adyen/adyen-platform-experience-web 0.1.1 → 1.0.0-beta
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 +13 -13
- package/dist/AmountSkeleton.css +23 -0
- package/dist/BalanceAccountSelector.css +4 -0
- package/dist/BaseButton.css +14 -0
- package/dist/BaseList.css +5 -0
- package/dist/Button.css +114 -0
- package/dist/ButtonActions-eb064f69.mjs +46 -0
- package/dist/ButtonActions.css +28 -0
- package/dist/CalendarGrid.css +113 -0
- package/dist/CopyText.css +18 -0
- package/dist/DatePicker.css +64 -0
- package/dist/ErrorMessageDisplay.css +20 -0
- package/dist/ErrorPanel.css +15 -0
- package/dist/ExpandableCard.css +71 -0
- package/dist/FilterBar.css +40 -0
- package/dist/FilterButton.css +48 -0
- package/dist/Img.css +7 -0
- package/dist/InputBase.css +175 -0
- package/dist/Modal.css +110 -0
- package/dist/Pagination.css +25 -0
- package/dist/Popover.css +127 -0
- package/dist/PopoverDismissButton.css +12 -0
- package/dist/RangeSelection.css +26 -0
- package/dist/Select.css +149 -0
- package/dist/SkeletonBody.css +154 -0
- package/dist/Spinner.css +50 -0
- package/dist/SummaryItem.css +37 -0
- package/dist/Tag-6d02fd64.mjs +32 -0
- package/dist/Tag.css +34 -0
- package/dist/Tooltip.css +7 -0
- package/dist/TotalsCard.css +14 -0
- package/dist/TransactionDetails.css +74 -0
- package/dist/TransactionsDisplay.css +4 -0
- package/dist/TransactionsOverview.css +29 -0
- package/dist/TransactionsOverviewContainer.css +3 -0
- package/dist/TransactionsTable.css +18 -0
- package/dist/Typography-11b95870.mjs +68 -0
- package/dist/Typography.css +57 -0
- package/dist/cjs/ModalContent-f4990141.js +10 -0
- package/dist/cjs/ModalContent-f4990141.js.map +1 -0
- package/dist/cjs/index-8c098f20.js +10401 -0
- package/dist/cjs/index-8c098f20.js.map +1 -0
- package/dist/cjs/index.css +1709 -0
- package/dist/cjs/index.js +35 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/compat.module-a4d537ff.mjs +237 -0
- package/dist/en-US-1daadfc1.mjs +371 -0
- package/dist/es/components/external/BaseElement.js +89 -49
- package/dist/es/components/external/EventEmitter.js +28 -17
- package/dist/es/components/external/FormElement.js +78 -0
- package/dist/es/components/external/TransactionDetails/TransactionDetails.js +20 -15
- package/dist/es/components/external/TransactionDetails/components/TransactionData.js +43 -42
- package/dist/es/components/external/TransactionDetails/components/TransactionDataSkeleton.js +13 -10
- package/dist/es/components/external/TransactionDetails/components/TransactionDetails.js +39 -28
- package/dist/es/components/external/TransactionDetails/index.js +4 -0
- package/dist/es/components/external/TransactionsOverview/TransactionsOverviewElement.js +35 -0
- package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.js +12 -0
- package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/constants.js +8 -0
- package/dist/es/components/external/TransactionsOverview/components/BalanceAccountSelector/BalanceAccountSelector.js +31 -0
- package/dist/es/components/external/TransactionsOverview/components/BalanceAccountSelector/index.js +6 -0
- package/dist/es/components/external/TransactionsOverview/components/BalanceAccountSelector/useBalanceAccountSelection.js +25 -0
- package/dist/es/components/external/TransactionsOverview/components/BalanceItem/BalanceItem.js +41 -0
- package/dist/es/components/external/TransactionsOverview/components/Balances/Balances.js +56 -0
- package/dist/es/components/external/TransactionsOverview/components/Balances/constants.js +4 -0
- package/dist/es/components/external/TransactionsOverview/components/Category/Category.js +12 -0
- package/dist/es/components/external/TransactionsOverview/components/ModalContent.js +12 -0
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.js +33 -0
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/index.js +15 -0
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/constants.js +27 -0
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/index.js +13 -0
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.js +31 -0
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.js +11 -0
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +60 -0
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.js +22 -0
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/constants.js +16 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionListError/TransactionListError.js +21 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotalItem/TransactionTotalItem.js +61 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.js +50 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.js +66 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/constants.js +6 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsDisplay/TransactionsDisplay.js +91 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsDisplay/constants.js +6 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +179 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/constants.js +8 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverviewContainer/TransactionsOverviewContainer.js +52 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverviewContainer/constants.js +6 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverviewDateFilter.js +71 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +112 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/constants.js +12 -0
- package/dist/es/components/external/{Transactions → TransactionsOverview}/components/utils.js +13 -7
- package/dist/es/components/external/TransactionsOverview/hooks/useDefaultTransactionsOverviewFilterParams.js +41 -0
- package/dist/es/components/external/TransactionsOverview/hooks/useMaxWidths.js +16 -0
- package/dist/es/components/external/TransactionsOverview/hooks/useMediaQuery.js +37 -0
- package/dist/es/components/external/TransactionsOverview/hooks/useTransactionsOverviewMultiSelectionFilters.js +33 -0
- package/dist/es/components/external/TransactionsOverview/index.js +6 -0
- package/dist/es/components/external/UIElement.js +51 -39
- package/dist/es/components/external/index.js +8 -0
- package/dist/es/components/index.js +11 -0
- package/dist/es/components/internal/BaseButton/BaseButton.js +22 -13
- package/dist/es/components/internal/BaseButton/constants.js +2 -2
- package/dist/es/components/internal/BaseButton/index.js +4 -0
- package/dist/es/components/internal/BaseList/BaseList.js +8 -5
- package/dist/es/components/internal/BaseList/constants.js +2 -2
- package/dist/es/components/internal/Button/Button.js +41 -39
- package/dist/es/components/internal/Button/ButtonActions/ButtonActions.js +8 -27
- package/dist/es/components/internal/Button/constants.js +16 -9
- package/dist/es/components/internal/Button/hooks/useButton.js +16 -12
- package/dist/es/components/internal/Button/index.js +4 -0
- package/dist/es/components/internal/Calendar/Calendar.js +21 -20
- package/dist/es/components/internal/Calendar/calendar/constants.js +70 -35
- package/dist/es/components/internal/Calendar/calendar/facade/Calendar.js +554 -317
- package/dist/es/components/internal/Calendar/calendar/facade/index.js +46 -37
- package/dist/es/components/internal/Calendar/calendar/index.js +4 -0
- package/dist/es/components/internal/Calendar/calendar/shared/indexed/index.js +46 -34
- package/dist/es/components/internal/Calendar/calendar/timeframe/common/flags.js +5 -31
- package/dist/es/components/internal/Calendar/calendar/timeframe/common/utils.js +16 -14
- package/dist/es/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.js +221 -122
- package/dist/es/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.js +418 -238
- package/dist/es/components/internal/Calendar/calendar/timeframe/frames/YearFrame.js +197 -0
- package/dist/es/components/internal/Calendar/calendar/timeframe/index.js +8 -0
- package/dist/es/components/internal/Calendar/calendar/timerange/factory.js +63 -40
- package/dist/es/components/internal/Calendar/calendar/timerange/factory.test.js +139 -0
- package/dist/es/components/internal/Calendar/calendar/timerange/index.js +4 -0
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/index.js +14 -0
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastMonth.js +3 -3
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastMonth.test.js +69 -0
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastNDays.js +27 -16
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastNDays.test.js +69 -0
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastWeek.js +3 -3
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastWeek.test.js +108 -0
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetMonth.js +23 -14
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetWeek.js +29 -21
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/testing/fixtures.js +15 -0
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/testing/helpers.js +19 -0
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/thisMonth.js +3 -3
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/thisMonth.test.js +46 -0
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/thisWeek.js +3 -3
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/thisWeek.test.js +85 -0
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/yearToDate.js +13 -9
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/yearToDate.test.js +49 -0
- package/dist/es/components/internal/Calendar/calendar/timerange/utils.js +83 -49
- package/dist/es/components/internal/Calendar/calendar/timeslice/TimeSlice.js +61 -38
- package/dist/es/components/internal/Calendar/calendar/timeslice/index.js +21 -17
- package/dist/es/components/internal/Calendar/calendar/utils.js +22 -15
- package/dist/es/components/internal/Calendar/clock/clock.js +41 -23
- package/dist/es/components/internal/Calendar/clock/clock.test.js +43 -0
- package/dist/es/components/internal/Calendar/clock/index.js +7 -0
- package/dist/es/components/internal/Calendar/clock/testing/fixtures.js +60 -0
- package/dist/es/components/internal/Calendar/clock/today.js +57 -37
- package/dist/es/components/internal/Calendar/clock/today.test.js +98 -0
- package/dist/es/components/internal/Calendar/components/CalendarControls/CalendarControls.js +12 -7
- package/dist/es/components/internal/Calendar/components/CalendarControls/index.js +4 -0
- package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGrid.js +29 -27
- package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDate.js +58 -33
- package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDayOfWeek.js +40 -30
- package/dist/es/components/internal/Calendar/components/CalendarGrid/index.js +4 -0
- package/dist/es/components/internal/Calendar/components/CalendarGrid/utils.js +49 -44
- package/dist/es/components/internal/Calendar/hooks/useCalendar.js +115 -84
- package/dist/es/components/internal/Calendar/hooks/useCalendarControlsRendering.js +40 -35
- package/dist/es/components/internal/Calendar/hooks/useTimezone.js +45 -23
- package/dist/es/components/internal/Calendar/index.js +4 -0
- package/dist/es/components/internal/CopyText/CopyText.js +41 -0
- package/dist/es/components/internal/DataGrid/DataGrid.js +10 -84
- package/dist/es/components/internal/DataGrid/DataGridCell.js +4 -4
- package/dist/es/components/internal/DataGrid/components/InteractiveBody.js +8 -31
- package/dist/es/components/internal/DataGrid/components/SkeletonBody.js +16 -14
- package/dist/es/components/internal/DataGrid/components/TableBody.js +26 -9
- package/dist/es/components/internal/DataGrid/components/TableCells.js +25 -17
- package/dist/es/components/internal/DataGrid/hooks/useInteractiveDataGrid.js +5 -76
- package/dist/es/components/internal/DataGrid/index.js +4 -0
- package/dist/es/components/internal/DataGrid/tests/DataGrid.test.js +190 -0
- package/dist/es/components/internal/DatePicker/DatePicker.js +62 -45
- package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.js +46 -19
- package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/index.js +7 -0
- package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js +85 -56
- package/dist/es/components/internal/DatePicker/index.js +4 -0
- package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.js +53 -40
- package/dist/es/components/internal/ExpandableCard/ExpandableCard.js +74 -51
- package/dist/es/components/internal/ExpandableCard/ExpandableCard.test.js +45 -0
- package/dist/es/components/internal/ExpandableCard/constants.js +20 -11
- package/dist/es/components/internal/FilterBar/FilterBar.js +46 -11
- package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.js +17 -15
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/AmountFilter.js +68 -29
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/RangeSelection.js +68 -60
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/constants.js +4 -0
- package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.js +155 -99
- package/dist/es/components/internal/FilterBar/filters/BaseFilter/index.js +4 -0
- package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilter.js +10 -107
- package/dist/es/components/internal/FilterBar/filters/DateFilter/index.js +4 -0
- package/dist/es/components/internal/FilterBar/filters/TextFilter/TextFilter.js +8 -0
- package/dist/es/components/internal/FilterBar/filters/TextFilter/index.js +4 -0
- package/dist/es/components/internal/FilterBar/index.js +4 -0
- package/dist/es/components/internal/FormFields/InputBase.js +67 -54
- package/dist/es/components/internal/FormFields/InputText.js +6 -6
- package/dist/es/components/internal/FormFields/Select/Select.js +246 -182
- package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +73 -69
- package/dist/es/components/internal/FormFields/Select/components/SelectList.js +71 -49
- package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +41 -37
- package/dist/es/components/internal/FormFields/Select/constants.js +49 -27
- package/dist/es/components/internal/FormFields/Select/hooks/useSelect.js +35 -27
- package/dist/es/components/internal/FormFields/Select/index.js +4 -0
- package/dist/es/components/internal/FormFields/index.js +18 -0
- package/dist/es/components/internal/FormFields/utils.js +4 -0
- package/dist/es/components/internal/Image/Image.js +10 -10
- package/dist/es/components/internal/Img/Img.js +33 -19
- package/dist/es/components/internal/Img/index.js +4 -0
- package/dist/es/components/internal/Modal/Modal.js +79 -66
- package/dist/es/components/internal/Modal/index.js +4 -0
- package/dist/es/components/internal/Pagination/Pagination.js +61 -45
- package/dist/es/components/internal/Pagination/components/LimitSelect.js +1 -0
- package/dist/es/components/internal/Pagination/constants.js +6 -4
- package/dist/es/components/internal/Pagination/hooks/index.js +6 -0
- package/dist/es/components/internal/Pagination/hooks/useCursorPaginatedRecords.js +8 -7
- package/dist/es/components/internal/Pagination/hooks/useCursorPagination.js +30 -18
- package/dist/es/components/internal/Pagination/hooks/useOffsetPaginatedRecords.js +10 -0
- package/dist/es/components/internal/Pagination/hooks/useOffsetPagination.js +21 -14
- package/dist/es/components/internal/Pagination/hooks/usePageLimit.js +60 -52
- package/dist/es/components/internal/Pagination/hooks/usePaginatedRecords.js +11 -78
- package/dist/es/components/internal/Pagination/hooks/usePaginatedRecordsFilters.js +13 -12
- package/dist/es/components/internal/Pagination/hooks/usePagination.js +87 -41
- package/dist/es/components/internal/Pagination/index.js +4 -0
- package/dist/es/components/internal/Pagination/utils.js +5 -5
- package/dist/es/components/internal/Popover/Popover.js +160 -102
- package/dist/es/components/internal/Popover/Popover.test.js +119 -0
- package/dist/es/components/internal/Popover/PopoverDismissButton/PopoverDismissButton.js +22 -18
- package/dist/es/components/internal/Popover/PopoverTitle/PopoverTitle.js +10 -8
- package/dist/es/components/internal/Popover/constants.js +16 -7
- package/dist/es/components/internal/Popover/utils/popoverUtil.js +51 -0
- package/dist/es/components/internal/Popover/utils/utils.js +28 -22
- package/dist/es/components/internal/SVGIcons/CheckedBox.js +5 -5
- package/dist/es/components/internal/SVGIcons/Checkmark.js +6 -6
- package/dist/es/components/internal/SVGIcons/ChevronDown.js +6 -6
- package/dist/es/components/internal/SVGIcons/ChevronLeft.js +8 -8
- package/dist/es/components/internal/SVGIcons/ChevronRight.js +8 -8
- package/dist/es/components/internal/SVGIcons/ChevronUp.js +7 -7
- package/dist/es/components/internal/SVGIcons/Close.js +13 -0
- package/dist/es/components/internal/SVGIcons/Copy.js +5 -0
- package/dist/es/components/internal/SVGIcons/Filter.js +11 -0
- package/dist/es/components/internal/SVGIcons/UncheckedBox.js +5 -5
- package/dist/es/components/internal/Spinner/Spinner.js +5 -4
- package/dist/es/components/internal/Spinner/index.js +4 -0
- package/dist/es/components/internal/Tag/Tag.js +5 -19
- package/dist/es/components/internal/Tooltip/Tooltip.js +48 -0
- package/dist/es/components/internal/Tooltip/useTooltipListeners.js +31 -0
- package/dist/es/components/internal/Typography/Typography.js +7 -33
- package/dist/es/components/internal/Typography/constants.js +2 -2
- package/dist/es/components/utils/transactionResourceErrorCodes.js +17 -13
- package/dist/es/components/utils/utils.js +34 -0
- package/dist/es/constants.js +8 -0
- package/dist/es/core/Analytics/Analytics.js +63 -0
- package/dist/es/core/Analytics/EventsQueue.js +22 -0
- package/dist/es/core/Analytics/index.js +4 -0
- package/dist/es/core/Auth/AuthContext.js +7 -5
- package/dist/es/core/Auth/AuthProvider.js +24 -5
- package/dist/es/core/Auth/useAuthContext.js +4 -4
- package/dist/es/core/Context/CoreContext.js +5 -5
- package/dist/es/core/Context/CoreProvider.js +23 -17
- package/dist/es/core/Context/useCoreContext.js +4 -4
- package/dist/es/core/Errors/AdyenPlatformExperienceError.js +21 -0
- package/dist/es/core/Errors/ErrorPanel.js +19 -0
- package/dist/es/core/Errors/constants.js +4 -2
- package/dist/es/core/Localization/Localization.js +12 -145
- package/dist/es/core/Localization/Localization.test.js +70 -0
- package/dist/es/core/Localization/amount/amount-util.js +42 -19
- package/dist/es/core/Localization/amount/amount-util.test.js +54 -0
- package/dist/es/core/Localization/constants/currency-codes.js +3 -3
- package/dist/es/core/Localization/constants/currency-decimals.js +3 -3
- package/dist/es/core/Localization/constants/locale.js +7 -5
- package/dist/es/core/Localization/constants/localization.js +9 -6
- package/dist/es/core/Localization/datetime/restamper/constants.js +29 -20
- package/dist/es/core/Localization/datetime/restamper/index.js +9 -0
- package/dist/es/core/Localization/datetime/restamper/restamper.js +44 -32
- package/dist/es/core/Localization/datetime/restamper/restamper.test.js +179 -0
- package/dist/es/core/Localization/datetime/restamper/testing/fixtures.js +21 -0
- package/dist/es/core/Localization/datetime/restamper/testing/helpers.js +27 -0
- package/dist/es/core/Localization/datetime/restamper/utils.js +44 -26
- package/dist/es/core/Localization/index.js +32 -0
- package/dist/es/core/Localization/localization-utils.js +7 -31
- package/dist/es/core/Localization/translations/index.js +356 -79
- package/dist/es/core/Localization/utils.js +72 -44
- package/dist/es/core/Localization/utils.test.js +215 -0
- package/dist/es/core/ProcessResponse/index.js +4 -0
- package/dist/es/core/ProcessResponse/process-response.js +40 -0
- package/dist/es/core/Services/analytics/collect-id.js +37 -0
- package/dist/es/core/Services/analytics/log-event.js +14 -0
- package/dist/es/core/Services/analytics/post-telemetry.js +22 -0
- package/dist/es/core/Services/data-set.js +1 -0
- package/dist/es/core/Services/get-dataset.js +13 -0
- package/dist/es/core/Services/requests/endpoints.js +9 -0
- package/dist/es/core/Services/requests/http.js +55 -28
- package/dist/es/core/Services/requests/utils.js +49 -34
- package/dist/es/core/Services/sessions/constants.js +2 -2
- package/dist/es/core/Services/sessions/setup-session.js +9 -9
- package/dist/es/core/Session/Session.js +38 -23
- package/dist/es/core/Session/index.js +4 -0
- package/dist/es/core/Session/utils.js +5 -5
- package/dist/es/core/config.js +6 -2
- package/dist/es/core/core.js +87 -45
- package/dist/es/core/index.js +36 -0
- package/dist/es/core/utils.js +10 -8
- package/dist/es/hooks/element/useClickOutside.js +75 -18
- package/dist/es/hooks/element/useDetachedRender.js +17 -15
- package/dist/es/hooks/element/useFocusCursor.js +18 -13
- package/dist/es/hooks/element/useFocusTrap.js +90 -47
- package/dist/es/hooks/element/useIdentifierString.js +61 -0
- package/dist/es/hooks/element/usePopoverPositioner.js +5 -69
- package/dist/es/hooks/element/useUniqueIdentifier.js +16 -12
- package/dist/es/hooks/useBooleanState/index.js +4 -0
- package/dist/es/hooks/useBooleanState/useBooleanState.js +8 -6
- package/dist/es/hooks/useCommitAction/index.js +6 -0
- package/dist/es/hooks/useCommitAction/useCommitAction.js +38 -27
- package/dist/es/hooks/useDefinedValue/index.js +4 -0
- package/dist/es/hooks/useDefinedValue/useDefinedValue.js +16 -0
- package/dist/es/hooks/useFetch/useFetch.js +37 -27
- package/dist/es/hooks/useImageUrl/useImageUrl.js +26 -22
- package/dist/es/hooks/useModalDetails/useModalDetails.js +38 -23
- package/dist/es/hooks/useMounted/index.js +4 -0
- package/dist/es/hooks/useMounted/useMounted.js +14 -8
- package/dist/es/hooks/useReactiveState/index.js +4 -0
- package/dist/es/hooks/useReactiveState/useReactiveState.js +53 -27
- package/dist/es/hooks/useReflex/constants.js +2 -2
- package/dist/es/hooks/useReflex/core/reflex.js +66 -47
- package/dist/es/hooks/useReflex/core/reflex.test.js +170 -0
- package/dist/es/hooks/useReflex/core/registry.js +68 -46
- package/dist/es/hooks/useReflex/core/registry.test.js +114 -0
- package/dist/es/hooks/useReflex/core/utils.js +18 -16
- package/dist/es/hooks/useReflex/core/utils.test.js +59 -0
- package/dist/es/hooks/useReflex/errors.js +6 -6
- package/dist/es/hooks/useReflex/hooks/useReflex.js +12 -7
- package/dist/es/hooks/useReflex/index.js +8 -0
- package/dist/es/hooks/useSessionAwareRequest/useSessionAwareRequest.js +37 -20
- package/dist/es/hooks/useSetupEndpoint/useSetupEndpoint.js +26 -20
- package/dist/es/index.js +45 -41
- package/dist/es/utils/Storage.js +21 -17
- package/dist/es/utils/Validator/ValidationRuleResult.js +28 -0
- package/dist/es/utils/Validator/Validator.js +67 -0
- package/dist/es/utils/Validator/Validator.test.js +27 -0
- package/dist/es/utils/Validator/defaultRules.js +12 -0
- package/dist/es/utils/Validator/index.js +4 -0
- package/dist/es/utils/class-name-utils.js +11 -5
- package/dist/es/utils/common/constants.js +10 -6
- package/dist/es/utils/common/index.js +59 -32
- package/dist/es/utils/fixedForwardRef.js +3 -3
- package/dist/es/utils/get-image.js +12 -11
- package/dist/es/utils/get-image.test.js +38 -0
- package/dist/es/utils/idGenerator.js +6 -3
- package/dist/es/utils/memoComparator/index.js +4 -0
- package/dist/es/utils/memoComparator/memoComparator.js +26 -17
- package/dist/es/utils/regex.js +6 -0
- package/dist/es/utils/tabbable.js +109 -70
- package/dist/es/utils/useForm/index.js +4 -0
- package/dist/es/utils/useForm/reducer.js +153 -0
- package/dist/es/utils/useForm/useForm.js +85 -0
- package/dist/es/utils/useForm/useForm.test.js +107 -0
- package/dist/es/utils/uuid.js +5 -5
- package/dist/es/utils/uuid.test.js +13 -0
- package/dist/es/utils/validator-utils.js +44 -3
- package/dist/es/utils/watchable/constants.js +2 -2
- package/dist/es/utils/watchable/core/Watchable.js +83 -45
- package/dist/es/utils/watchable/core/Watchable.test.js +103 -0
- package/dist/es/utils/watchable/core/helpers.js +26 -19
- package/dist/es/utils/watchable/core/helpers.test.js +106 -0
- package/dist/es/utils/watchable/core/syncEffect.js +19 -15
- package/dist/es/utils/watchable/core/syncEffect.test.js +103 -0
- package/dist/es/utils/watchable/index.js +17 -16
- package/dist/flags-41c36e13.mjs +83 -0
- package/dist/hooks.module-8565d716.mjs +161 -0
- package/dist/index-2c0f6175.mjs +12069 -0
- package/dist/index-6e47f755.mjs +231 -0
- package/dist/index-944be685.mjs +6609 -0
- package/dist/index-c88cd37e.mjs +243 -0
- package/dist/index-f5bc0382.mjs +155 -0
- package/dist/index.css +65 -0
- package/dist/index2.css +4 -0
- package/dist/jsxRuntime.module-69493d81.mjs +15 -0
- package/dist/magic-string.es-219c273f.mjs +1146 -0
- package/dist/preact.module-38e5a571.mjs +323 -0
- package/dist/types/components/external/TransactionDetails/components/TransactionDataSkeleton.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/index.d.ts +1 -1
- package/dist/types/components/external/TransactionDetails/index.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/TransactionsOverviewElement.d.ts.map +1 -0
- package/dist/types/components/external/{Transactions → TransactionsOverview}/components/AmountSkeleton/AmountSkeleton.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/AmountSkeleton/constants.d.ts +4 -0
- package/dist/types/components/external/TransactionsOverview/components/AmountSkeleton/constants.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/AmountSkeleton/types.d.ts.map +1 -0
- package/dist/types/components/external/{Transactions → TransactionsOverview}/components/BalanceAccountSelector/BalanceAccountSelector.d.ts +1 -0
- package/dist/types/components/external/TransactionsOverview/components/BalanceAccountSelector/BalanceAccountSelector.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/BalanceAccountSelector/index.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/BalanceAccountSelector/useBalanceAccountSelection.d.ts.map +1 -0
- package/dist/types/components/external/{Transactions → TransactionsOverview}/components/BalanceItem/BalanceItem.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/BalanceItem/BalanceItem.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/BalanceItem/types.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/Balances/Balances.d.ts +11 -0
- package/dist/types/components/external/TransactionsOverview/components/Balances/Balances.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/Balances/constants.d.ts +2 -0
- package/dist/types/components/external/TransactionsOverview/components/Balances/constants.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/Category/Category.d.ts +4 -0
- package/dist/types/components/external/TransactionsOverview/components/Category/Category.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/Category/types.d.ts +7 -0
- package/dist/types/components/external/TransactionsOverview/components/Category/types.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/ModalContent.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/index.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/constants.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/index.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/types.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.d.ts +4 -0
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.d.ts +14 -0
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/constants.d.ts +8 -0
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/constants.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/types.d.ts +36 -0
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/types.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionListError/TransactionListError.d.ts +7 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionListError/TransactionListError.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotalItem/TransactionTotalItem.d.ts +3 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotalItem/TransactionTotalItem.d.ts.map +1 -0
- package/dist/types/components/external/{Transactions → TransactionsOverview}/components/TransactionTotalItem/types.d.ts +2 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotalItem/types.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.d.ts +11 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.d.ts +12 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotals/constants.d.ts +3 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotals/constants.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsDisplay/TransactionsDisplay.d.ts +5 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsDisplay/TransactionsDisplay.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsDisplay/constants.d.ts +3 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsDisplay/constants.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsDisplay/types.d.ts +5 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsDisplay/types.d.ts.map +1 -0
- package/dist/types/components/external/{Transactions/components → TransactionsOverview/components/TransactionsOverview}/TransactionsOverview.d.ts +2 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/constants.d.ts +4 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/constants.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverviewContainer/TransactionsOverviewContainer.d.ts +6 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverviewContainer/TransactionsOverviewContainer.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverviewContainer/constants.d.ts +3 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverviewContainer/constants.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverviewDateFilter.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.d.ts +5 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/constants.d.ts +6 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/constants.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts +18 -0
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts.map +1 -0
- package/dist/types/components/external/{Transactions → TransactionsOverview}/components/utils.d.ts +2 -2
- package/dist/types/components/external/TransactionsOverview/components/utils.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/hooks/useDefaultTransactionsOverviewFilterParams.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/hooks/useMaxWidths.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/hooks/useMediaQuery.d.ts +26 -0
- package/dist/types/components/external/TransactionsOverview/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/hooks/useTransactionsOverviewMultiSelectionFilters.d.ts.map +1 -0
- package/dist/types/components/external/TransactionsOverview/index.d.ts +3 -0
- package/dist/types/components/external/TransactionsOverview/index.d.ts.map +1 -0
- package/dist/types/components/external/{Transactions → TransactionsOverview}/types.d.ts +3 -16
- package/dist/types/components/external/TransactionsOverview/types.d.ts.map +1 -0
- package/dist/types/components/external/index.d.ts +1 -1
- package/dist/types/components/external/index.d.ts.map +1 -1
- package/dist/types/components/internal/BaseButton/BaseButton.d.ts.map +1 -1
- package/dist/types/components/internal/BaseButton/constants.d.ts +1 -1
- package/dist/types/components/internal/BaseButton/types.d.ts +1 -0
- package/dist/types/components/internal/BaseButton/types.d.ts.map +1 -1
- package/dist/types/components/internal/BaseList/constants.d.ts +1 -1
- package/dist/types/components/internal/Button/constants.d.ts +1 -1
- package/dist/types/components/internal/Calendar/calendar/facade/Calendar.d.ts.map +1 -1
- package/dist/types/components/internal/CopyText/CopyText.d.ts +6 -0
- package/dist/types/components/internal/CopyText/CopyText.d.ts.map +1 -0
- package/dist/types/components/internal/DataGrid/DataGrid.d.ts +2 -0
- package/dist/types/components/internal/DataGrid/DataGrid.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/components/InteractiveBody.d.ts +1 -1
- package/dist/types/components/internal/DataGrid/components/InteractiveBody.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/components/TableBody.d.ts +1 -1
- package/dist/types/components/internal/DataGrid/components/TableBody.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/components/TableCells.d.ts +2 -1
- package/dist/types/components/internal/DataGrid/components/TableCells.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/types.d.ts +2 -0
- package/dist/types/components/internal/DataGrid/types.d.ts.map +1 -1
- package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -1
- package/dist/types/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.d.ts +5 -1
- package/dist/types/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.d.ts.map +1 -1
- package/dist/types/components/internal/ExpandableCard/ExpandableCard.d.ts +1 -1
- package/dist/types/components/internal/ExpandableCard/ExpandableCard.d.ts.map +1 -1
- package/dist/types/components/internal/ExpandableCard/constants.d.ts +1 -1
- package/dist/types/components/internal/ExpandableCard/types.d.ts +5 -0
- package/dist/types/components/internal/ExpandableCard/types.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/FilterBar.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/filters/AmountFilter/AmountFilter.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/filters/AmountFilter/RangeSelection.d.ts +1 -1
- package/dist/types/components/internal/FilterBar/filters/AmountFilter/RangeSelection.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/filters/AmountFilter/constants.d.ts +2 -0
- package/dist/types/components/internal/FilterBar/filters/AmountFilter/constants.d.ts.map +1 -0
- package/dist/types/components/internal/FilterBar/filters/AmountFilter/types.d.ts +0 -2
- package/dist/types/components/internal/FilterBar/filters/AmountFilter/types.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/filters/BaseFilter/BaseFilter.d.ts +0 -1
- package/dist/types/components/internal/FilterBar/filters/BaseFilter/BaseFilter.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/filters/DateFilter/DateFilter.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/Select.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectList.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/constants.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/types.d.ts +9 -0
- package/dist/types/components/internal/FormFields/Select/types.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/index.d.ts +3 -18
- package/dist/types/components/internal/FormFields/index.d.ts.map +1 -1
- package/dist/types/components/internal/Img/types.d.ts +1 -1
- package/dist/types/components/internal/Modal/Modal.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/Pagination.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/constants.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/hooks/types.d.ts +3 -3
- package/dist/types/components/internal/Pagination/hooks/types.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/hooks/usePaginatedRecords.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/hooks/usePagination.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/types.d.ts +2 -1
- package/dist/types/components/internal/Pagination/types.d.ts.map +1 -1
- package/dist/types/components/internal/Popover/Popover.d.ts +1 -2
- package/dist/types/components/internal/Popover/Popover.d.ts.map +1 -1
- package/dist/types/components/internal/Popover/constants.d.ts +3 -1
- package/dist/types/components/internal/Popover/constants.d.ts.map +1 -1
- package/dist/types/components/internal/Popover/types.d.ts +6 -0
- package/dist/types/components/internal/Popover/types.d.ts.map +1 -1
- package/dist/types/components/internal/Popover/utils/popoverUtil.d.ts +7 -0
- package/dist/types/components/internal/Popover/utils/popoverUtil.d.ts.map +1 -0
- package/dist/types/components/internal/SVGIcons/Close.d.ts +4 -0
- package/dist/types/components/internal/SVGIcons/Close.d.ts.map +1 -0
- package/dist/types/components/internal/SVGIcons/Copy.d.ts +4 -0
- package/dist/types/components/internal/SVGIcons/Copy.d.ts.map +1 -0
- package/dist/types/components/internal/SVGIcons/Filter.d.ts +4 -0
- package/dist/types/components/internal/SVGIcons/Filter.d.ts.map +1 -0
- package/dist/types/components/internal/Tooltip/Tooltip.d.ts +5 -0
- package/dist/types/components/internal/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/types/components/internal/Tooltip/types.d.ts +13 -0
- package/dist/types/components/internal/Tooltip/types.d.ts.map +1 -0
- package/dist/types/components/internal/Tooltip/useTooltipListeners.d.ts +12 -0
- package/dist/types/components/internal/Tooltip/useTooltipListeners.d.ts.map +1 -0
- package/dist/types/components/internal/Typography/constants.d.ts +1 -1
- package/dist/types/components/utils/transactionResourceErrorCodes.d.ts +6 -2
- package/dist/types/components/utils/transactionResourceErrorCodes.d.ts.map +1 -1
- package/dist/types/constants.d.ts +6 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/core/Auth/AuthContext.d.ts +2 -2
- package/dist/types/core/Auth/AuthContext.d.ts.map +1 -1
- package/dist/types/core/Auth/AuthProvider.d.ts.map +1 -1
- package/dist/types/core/Auth/types.d.ts +9 -2
- package/dist/types/core/Auth/types.d.ts.map +1 -1
- package/dist/types/core/Auth/useAuthContext.d.ts +1 -1
- package/dist/types/core/Auth/useAuthContext.d.ts.map +1 -1
- package/dist/types/core/Errors/AdyenPlatformExperienceError.d.ts +9 -0
- package/dist/types/core/Errors/AdyenPlatformExperienceError.d.ts.map +1 -0
- package/dist/types/core/Localization/Localization.d.ts +7 -0
- package/dist/types/core/Localization/Localization.d.ts.map +1 -1
- package/dist/types/core/Localization/amount/amount-util.d.ts +1 -5
- package/dist/types/core/Localization/amount/amount-util.d.ts.map +1 -1
- package/dist/types/core/Localization/constants/locale.d.ts +17 -7
- package/dist/types/core/Localization/constants/locale.d.ts.map +1 -1
- package/dist/types/core/Localization/localization-utils.d.ts +1 -0
- package/dist/types/core/Localization/localization-utils.d.ts.map +1 -1
- package/dist/types/core/Localization/translations/index.d.ts +17 -7
- package/dist/types/core/Localization/translations/index.d.ts.map +1 -1
- package/dist/types/core/Localization/utils.d.ts +17 -7
- package/dist/types/core/Localization/utils.d.ts.map +1 -1
- package/dist/types/core/Services/requests/http.d.ts.map +1 -1
- package/dist/types/core/Services/requests/types.d.ts +2 -0
- package/dist/types/core/Services/requests/types.d.ts.map +1 -1
- package/dist/types/core/Services/requests/utils.d.ts +2 -1
- package/dist/types/core/Services/requests/utils.d.ts.map +1 -1
- package/dist/types/core/core.d.ts +1 -0
- package/dist/types/core/core.d.ts.map +1 -1
- package/dist/types/core/types.d.ts +1 -0
- package/dist/types/core/types.d.ts.map +1 -1
- package/dist/types/hooks/element/useClickOutside.d.ts +5 -1
- package/dist/types/hooks/element/useClickOutside.d.ts.map +1 -1
- package/dist/types/hooks/element/usePopoverPositioner.d.ts +2 -2
- package/dist/types/hooks/element/usePopoverPositioner.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/hooks/useSessionAwareRequest/useSessionAwareRequest.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils/types.d.ts +1 -1
- package/dist/types/utils/types.d.ts.map +1 -1
- package/dist/types-0027b7c2.mjs +9 -0
- package/dist/types-0aaff3aa.mjs +19 -0
- package/dist/types-7ad6576a.mjs +10 -0
- package/dist/types-e4bbd37f.mjs +13 -0
- package/dist/types-e6a6a3ff.mjs +9 -0
- package/dist/usePaginatedRecords-63a69bf1.mjs +131 -0
- package/dist/usePopoverPositioner-882fea89.mjs +182 -0
- package/dist/vendor-vi.a3ff54b1-5e924357.mjs +22389 -0
- package/package.json +12 -9
- package/dist/ModalContent-83a84ba5.js +0 -2
- package/dist/ModalContent-83a84ba5.js.map +0 -1
- package/dist/es/components/external/TransactionDetails/components/TransactionDetails.scss.js +0 -4
- package/dist/es/components/external/Transactions/TransactionsOverviewElement.js +0 -28
- package/dist/es/components/external/Transactions/components/AmountSkeleton/AmountSkeleton.js +0 -9
- package/dist/es/components/external/Transactions/components/AmountSkeleton/AmountSkeleton.scss.js +0 -4
- package/dist/es/components/external/Transactions/components/AmountSkeleton/constants.js +0 -6
- package/dist/es/components/external/Transactions/components/BalanceAccountSelector/BalanceAccountSelector.js +0 -23
- package/dist/es/components/external/Transactions/components/BalanceAccountSelector/useBalanceAccountSelection.js +0 -17
- package/dist/es/components/external/Transactions/components/BalanceItem/BalanceItem.js +0 -35
- package/dist/es/components/external/Transactions/components/Balances/Balances.js +0 -50
- package/dist/es/components/external/Transactions/components/Balances/constants.js +0 -4
- package/dist/es/components/external/Transactions/components/ModalContent.js +0 -12
- package/dist/es/components/external/Transactions/components/MultiSelectionFilter/MultiSelectionFilter.js +0 -25
- package/dist/es/components/external/Transactions/components/MultiSelectionFilter/useMultiSelectionFilter/constants.js +0 -24
- package/dist/es/components/external/Transactions/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.js +0 -21
- package/dist/es/components/external/Transactions/components/MultiSelectionFilter/useMultiSelectionFilter/utils.js +0 -9
- package/dist/es/components/external/Transactions/components/SummaryItem/SummaryItem.js +0 -42
- package/dist/es/components/external/Transactions/components/SummaryItem/SummaryItem.scss.js +0 -4
- package/dist/es/components/external/Transactions/components/SummaryItem/constants.js +0 -7
- package/dist/es/components/external/Transactions/components/TransactionList.js +0 -127
- package/dist/es/components/external/Transactions/components/TransactionList.scss.js +0 -4
- package/dist/es/components/external/Transactions/components/TransactionListError/TransactionListError.js +0 -20
- package/dist/es/components/external/Transactions/components/TransactionTotalItem/TransactionTotalItem.js +0 -48
- package/dist/es/components/external/Transactions/components/TransactionTotals/TransactionTotals.js +0 -60
- package/dist/es/components/external/Transactions/components/TransactionTotals/constants.js +0 -4
- package/dist/es/components/external/Transactions/components/TransactionsOverview.js +0 -148
- package/dist/es/components/external/Transactions/components/TransactionsOverviewContainer.js +0 -36
- package/dist/es/components/external/Transactions/components/TransactionsOverviewDateFilter.js +0 -61
- package/dist/es/components/external/Transactions/hooks/useDefaultTransactionsOverviewFilterParams.js +0 -22
- package/dist/es/components/external/Transactions/hooks/useMaxWidths.js +0 -15
- package/dist/es/components/external/Transactions/hooks/useTransactionsOverviewMultiSelectionFilters.js +0 -29
- package/dist/es/components/external/Transactions/types.js +0 -4
- package/dist/es/components/internal/BaseButton/BaseButton.scss.js +0 -4
- package/dist/es/components/internal/BaseList/BaseList.scss.js +0 -4
- package/dist/es/components/internal/Button/Button.scss.js +0 -4
- package/dist/es/components/internal/Button/ButtonActions/ButtonActions.scss.js +0 -4
- package/dist/es/components/internal/Button/ButtonActions/types.js +0 -7
- package/dist/es/components/internal/Button/types.js +0 -4
- package/dist/es/components/internal/Calendar/Calendar.scss.js +0 -4
- package/dist/es/components/internal/Calendar/calendar/types.js +0 -15
- package/dist/es/components/internal/Calendar/types.js +0 -4
- package/dist/es/components/internal/DataGrid/DataGrid.scss.js +0 -4
- package/dist/es/components/internal/DataGrid/types.js +0 -4
- package/dist/es/components/internal/DatePicker/DatePicker.scss.js +0 -4
- package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.scss.js +0 -4
- package/dist/es/components/internal/ExpandableCard/ExpandableCard.scss.js +0 -4
- package/dist/es/components/internal/FilterBar/FilterBar.scss.js +0 -4
- package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.scss.js +0 -4
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/AmountFilter.scss.js +0 -4
- package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.scss.js +0 -4
- package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilter.scss.js +0 -4
- package/dist/es/components/internal/FilterBar/filters/DateFilter/types.js +0 -4
- package/dist/es/components/internal/FormFields/FormFields.scss.js +0 -4
- package/dist/es/components/internal/FormFields/Select/Select.scss.js +0 -4
- package/dist/es/components/internal/Img/Img.scss.js +0 -4
- package/dist/es/components/internal/Modal/Modal.scss.js +0 -4
- package/dist/es/components/internal/Pagination/Pagination.scss.js +0 -4
- package/dist/es/components/internal/Pagination/types.js +0 -5
- package/dist/es/components/internal/Popover/Popover.scss.js +0 -4
- package/dist/es/components/internal/Popover/PopoverContainer.scss.js +0 -4
- package/dist/es/components/internal/Popover/PopoverDismissButton/PopoverDismissButton.scss.js +0 -4
- package/dist/es/components/internal/Popover/types.js +0 -6
- package/dist/es/components/internal/Spinner/Spinner.scss.js +0 -4
- package/dist/es/components/internal/Tag/Tag.scss.js +0 -4
- package/dist/es/components/internal/Tag/types.js +0 -4
- package/dist/es/components/internal/Typography/Typography.scss.js +0 -4
- package/dist/es/components/internal/Typography/types.js +0 -6
- package/dist/es/components/shared.scss.js +0 -4
- package/dist/es/components/types.js +0 -4
- package/dist/es/core/Errors/AdyenFPError.js +0 -15
- package/dist/es/core/Localization/translations/ar.json.js +0 -4
- package/dist/es/core/Localization/translations/cs-CZ.json.js +0 -4
- package/dist/es/core/Localization/translations/da-DK.json.js +0 -4
- package/dist/es/core/Localization/translations/de-DE.json.js +0 -4
- package/dist/es/core/Localization/translations/el-GR.json.js +0 -4
- package/dist/es/core/Localization/translations/en-US.json.js +0 -358
- package/dist/es/core/Localization/translations/es-ES.json.js +0 -255
- package/dist/es/core/Localization/translations/fi-FI.json.js +0 -4
- package/dist/es/core/Localization/translations/fr-FR.json.js +0 -4
- package/dist/es/core/Localization/translations/hr-HR.json.js +0 -4
- package/dist/es/core/Localization/translations/hu-HU.json.js +0 -4
- package/dist/es/core/Localization/translations/it-IT.json.js +0 -4
- package/dist/es/core/Localization/translations/ja-JP.json.js +0 -4
- package/dist/es/core/Localization/translations/ko-KR.json.js +0 -4
- package/dist/es/core/Localization/translations/nl-NL.json.js +0 -4
- package/dist/es/core/Localization/translations/no-NO.json.js +0 -4
- package/dist/es/core/Localization/translations/pl-PL.json.js +0 -4
- package/dist/es/core/Localization/translations/pt-BR.json.js +0 -4
- package/dist/es/core/Localization/translations/pt-PT.json.js +0 -4
- package/dist/es/core/Localization/translations/ro-RO.json.js +0 -4
- package/dist/es/core/Localization/translations/ru-RU.json.js +0 -4
- package/dist/es/core/Localization/translations/sk-SK.json.js +0 -4
- package/dist/es/core/Localization/translations/sl-SI.json.js +0 -4
- package/dist/es/core/Localization/translations/sv-SE.json.js +0 -4
- package/dist/es/core/Localization/translations/zh-CN.json.js +0 -4
- package/dist/es/core/Localization/translations/zh-TW.json.js +0 -4
- package/dist/es/external/preact/compat/dist/compat.module.js +0 -254
- package/dist/es/external/preact/hooks/dist/hooks.module.js +0 -161
- package/dist/es/external/preact/jsx-runtime/dist/jsxRuntime.module.js +0 -19
- package/dist/es/hooks/useCommitAction/types.js +0 -4
- package/dist/es/hooks/useModalDetails/types.js +0 -6
- package/dist/es/images/no-data-female.svg.js +0 -4
- package/dist/es/images/no-results.svg.js +0 -4
- package/dist/es/style/index.scss.js +0 -4
- package/dist/index-ff45d757.js +0 -12
- package/dist/index-ff45d757.js.map +0 -1
- package/dist/style.css +0 -1
- package/dist/types/components/external/Transactions/TransactionsOverviewElement.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/AmountSkeleton/AmountSkeleton.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/AmountSkeleton/constants.d.ts +0 -4
- package/dist/types/components/external/Transactions/components/AmountSkeleton/constants.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/AmountSkeleton/types.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/BalanceAccountSelector/BalanceAccountSelector.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/BalanceAccountSelector/index.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/BalanceAccountSelector/useBalanceAccountSelection.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/BalanceItem/BalanceItem.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/BalanceItem/types.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/Balances/Balances.d.ts +0 -11
- package/dist/types/components/external/Transactions/components/Balances/Balances.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/Balances/constants.d.ts +0 -2
- package/dist/types/components/external/Transactions/components/Balances/constants.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/ModalContent.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/MultiSelectionFilter/MultiSelectionFilter.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/MultiSelectionFilter/index.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/MultiSelectionFilter/useMultiSelectionFilter/constants.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/MultiSelectionFilter/useMultiSelectionFilter/index.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/MultiSelectionFilter/useMultiSelectionFilter/types.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/MultiSelectionFilter/useMultiSelectionFilter/utils.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/SummaryItem/SummaryItem.d.ts +0 -4
- package/dist/types/components/external/Transactions/components/SummaryItem/SummaryItem.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/SummaryItem/constants.d.ts +0 -5
- package/dist/types/components/external/Transactions/components/SummaryItem/constants.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/SummaryItem/types.d.ts +0 -20
- package/dist/types/components/external/Transactions/components/SummaryItem/types.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/TransactionList.d.ts +0 -6
- package/dist/types/components/external/Transactions/components/TransactionList.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/TransactionListError/TransactionListError.d.ts +0 -7
- package/dist/types/components/external/Transactions/components/TransactionListError/TransactionListError.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/TransactionTotalItem/TransactionTotalItem.d.ts +0 -3
- package/dist/types/components/external/Transactions/components/TransactionTotalItem/TransactionTotalItem.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/TransactionTotalItem/types.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/TransactionTotals/TransactionTotals.d.ts +0 -9
- package/dist/types/components/external/Transactions/components/TransactionTotals/TransactionTotals.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/TransactionTotals/constants.d.ts +0 -2
- package/dist/types/components/external/Transactions/components/TransactionTotals/constants.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/TransactionsOverview.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/TransactionsOverviewContainer.d.ts +0 -6
- package/dist/types/components/external/Transactions/components/TransactionsOverviewContainer.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/TransactionsOverviewDateFilter.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/components/utils.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/hooks/useDefaultTransactionsOverviewFilterParams.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/hooks/useMaxWidths.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/hooks/useTransactionsOverviewMultiSelectionFilters.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/index.d.ts +0 -3
- package/dist/types/components/external/Transactions/index.d.ts.map +0 -1
- package/dist/types/components/external/Transactions/types.d.ts.map +0 -1
- package/dist/types/components/internal/FormFields/Checkbox/Checkbox.d.ts +0 -22
- package/dist/types/components/internal/FormFields/Checkbox/Checkbox.d.ts.map +0 -1
- package/dist/types/components/internal/FormFields/Checkbox/index.d.ts +0 -2
- package/dist/types/components/internal/FormFields/Checkbox/index.d.ts.map +0 -1
- package/dist/types/components/internal/FormFields/InputDate/InputDate.d.ts +0 -3
- package/dist/types/components/internal/FormFields/InputDate/InputDate.d.ts.map +0 -1
- package/dist/types/components/internal/FormFields/InputDate/index.d.ts +0 -2
- package/dist/types/components/internal/FormFields/InputDate/index.d.ts.map +0 -1
- package/dist/types/components/internal/FormFields/InputDate/utils.d.ts +0 -22
- package/dist/types/components/internal/FormFields/InputDate/utils.d.ts.map +0 -1
- package/dist/types/components/internal/FormFields/InputEmail.d.ts +0 -3
- package/dist/types/components/internal/FormFields/InputEmail.d.ts.map +0 -1
- package/dist/types/components/internal/FormFields/InputTelephone.d.ts +0 -3
- package/dist/types/components/internal/FormFields/InputTelephone.d.ts.map +0 -1
- package/dist/types/components/internal/FormFields/RadioGroup/RadioGroup.d.ts +0 -11
- package/dist/types/components/internal/FormFields/RadioGroup/RadioGroup.d.ts.map +0 -1
- package/dist/types/components/internal/FormFields/RadioGroup/index.d.ts +0 -2
- package/dist/types/components/internal/FormFields/RadioGroup/index.d.ts.map +0 -1
- package/dist/types/components/internal/FormFields/RadioGroup/types.d.ts +0 -19
- package/dist/types/components/internal/FormFields/RadioGroup/types.d.ts.map +0 -1
- package/dist/types/core/Errors/AdyenFPError.d.ts +0 -8
- package/dist/types/core/Errors/AdyenFPError.d.ts.map +0 -1
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/TransactionsOverviewElement.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/AmountSkeleton/types.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/BalanceAccountSelector/index.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/BalanceAccountSelector/useBalanceAccountSelection.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/BalanceItem/types.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/ModalContent.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/MultiSelectionFilter/MultiSelectionFilter.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/MultiSelectionFilter/index.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/MultiSelectionFilter/useMultiSelectionFilter/constants.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/MultiSelectionFilter/useMultiSelectionFilter/index.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/MultiSelectionFilter/useMultiSelectionFilter/types.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/MultiSelectionFilter/useMultiSelectionFilter/utils.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/components/TransactionsOverviewDateFilter.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/hooks/useDefaultTransactionsOverviewFilterParams.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/hooks/useMaxWidths.d.ts +0 -0
- /package/dist/types/components/external/{Transactions → TransactionsOverview}/hooks/useTransactionsOverviewMultiSelectionFilters.d.ts +0 -0
package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js
CHANGED
|
@@ -1,63 +1,92 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
"rangePreset.last7Days":
|
|
11
|
-
"rangePreset.thisWeek":
|
|
12
|
-
"rangePreset.lastWeek":
|
|
13
|
-
"rangePreset.thisMonth":
|
|
14
|
-
"rangePreset.lastMonth":
|
|
15
|
-
"rangePreset.yearToDate":
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { h, _, F, T } from "../../../../../../hooks.module-8565d716.mjs";
|
|
2
|
+
import useCoreContext from "../../../../../core/Context/useCoreContext.js";
|
|
3
|
+
import lastMonth from "../../../Calendar/calendar/timerange/presets/lastMonth.js";
|
|
4
|
+
import lastNDays from "../../../Calendar/calendar/timerange/presets/lastNDays.js";
|
|
5
|
+
import lastWeek from "../../../Calendar/calendar/timerange/presets/lastWeek.js";
|
|
6
|
+
import thisMonth from "../../../Calendar/calendar/timerange/presets/thisMonth.js";
|
|
7
|
+
import thisWeek from "../../../Calendar/calendar/timerange/presets/thisWeek.js";
|
|
8
|
+
import yearToDate from "../../../Calendar/calendar/timerange/presets/yearToDate.js";
|
|
9
|
+
const getTimeRangeSelectionDefaultPresetOptions = () => Object.freeze({
|
|
10
|
+
"rangePreset.last7Days": lastNDays(7),
|
|
11
|
+
"rangePreset.thisWeek": thisWeek(),
|
|
12
|
+
"rangePreset.lastWeek": lastWeek(),
|
|
13
|
+
"rangePreset.thisMonth": thisMonth(),
|
|
14
|
+
"rangePreset.lastMonth": lastMonth(),
|
|
15
|
+
"rangePreset.yearToDate": yearToDate()
|
|
16
|
+
});
|
|
17
|
+
const useTimeRangeSelection = ({
|
|
18
|
+
now = Date.now(),
|
|
19
|
+
options: presetOptions,
|
|
20
|
+
selectedOption: selectedPresetOption,
|
|
21
|
+
timezone
|
|
21
22
|
}) => {
|
|
22
|
-
const { i18n
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
(
|
|
33
|
-
const
|
|
34
|
-
|
|
23
|
+
const { i18n } = useCoreContext();
|
|
24
|
+
const [from, setFrom] = h();
|
|
25
|
+
const [to, setTo] = h();
|
|
26
|
+
const [selectedOption, setSelectedOption] = h();
|
|
27
|
+
const NOW = _();
|
|
28
|
+
const TZ = _();
|
|
29
|
+
const [customOption, getRangesForOption, selectionOptions] = F(() => {
|
|
30
|
+
const customOption2 = i18n.get("rangePreset.custom");
|
|
31
|
+
const optionKeys = Object.keys(presetOptions);
|
|
32
|
+
const selectionOptions2 = Object.freeze(optionKeys.map((key) => i18n.get(key)));
|
|
33
|
+
const getRangesForOption2 = (option, options2 = selectionOptions2) => {
|
|
34
|
+
const optionIndex = options2.findIndex((currentOption) => currentOption === option);
|
|
35
|
+
return presetOptions[optionKeys[optionIndex]];
|
|
36
|
+
};
|
|
37
|
+
return [customOption2, getRangesForOption2, selectionOptions2];
|
|
38
|
+
}, [i18n, presetOptions]);
|
|
39
|
+
const [isCustomSelection, setIsCustomSelection] = h(selectedPresetOption === customOption);
|
|
40
|
+
const selectionOptionsWithCustomOption = F(() => Object.freeze([...selectionOptions, customOption]), [customOption, selectionOptions]);
|
|
41
|
+
const options = F(
|
|
42
|
+
() => isCustomSelection ? selectionOptionsWithCustomOption : selectionOptions,
|
|
43
|
+
[isCustomSelection, selectionOptions, selectionOptionsWithCustomOption]
|
|
44
|
+
);
|
|
45
|
+
const onSelection = T(
|
|
46
|
+
(option) => {
|
|
47
|
+
const ranges = getRangesForOption(option, selectionOptions);
|
|
48
|
+
if (!ranges)
|
|
49
|
+
return;
|
|
50
|
+
setFrom(i18n.fullDate(ranges.from));
|
|
51
|
+
setTo(i18n.fullDate(ranges.to));
|
|
52
|
+
setIsCustomSelection(false);
|
|
53
|
+
setSelectedOption(option);
|
|
35
54
|
},
|
|
36
|
-
[
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
55
|
+
[i18n, customOption, getRangesForOption, selectedOption, selectionOptions]
|
|
56
|
+
);
|
|
57
|
+
const customSelection = T(() => {
|
|
58
|
+
setFrom(void 0);
|
|
59
|
+
setTo(void 0);
|
|
60
|
+
setIsCustomSelection(true);
|
|
61
|
+
setSelectedOption(customOption);
|
|
62
|
+
}, [customOption]);
|
|
63
|
+
F(() => {
|
|
64
|
+
selectedPresetOption === customOption ? setSelectedOption(customOption) : onSelection(selectedPresetOption);
|
|
65
|
+
}, []);
|
|
66
|
+
F(() => {
|
|
67
|
+
var _a;
|
|
68
|
+
if (NOW.current !== now || TZ.current !== timezone) {
|
|
69
|
+
const options2 = Object.values(presetOptions);
|
|
70
|
+
options2.forEach((ranges) => {
|
|
71
|
+
ranges.now = now;
|
|
72
|
+
ranges.timezone = timezone;
|
|
73
|
+
});
|
|
74
|
+
NOW.current = now;
|
|
75
|
+
TZ.current = (_a = options2[0]) == null ? void 0 : _a.timezone;
|
|
76
|
+
onSelection(selectedOption);
|
|
49
77
|
}
|
|
50
|
-
}, [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
78
|
+
}, [now, timezone, presetOptions]);
|
|
79
|
+
return {
|
|
80
|
+
customSelection,
|
|
81
|
+
from,
|
|
82
|
+
onSelection,
|
|
83
|
+
options,
|
|
84
|
+
selectedOption,
|
|
85
|
+
to
|
|
57
86
|
};
|
|
58
87
|
};
|
|
59
88
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
89
|
+
useTimeRangeSelection as default,
|
|
90
|
+
getTimeRangeSelectionDefaultPresetOptions,
|
|
91
|
+
useTimeRangeSelection
|
|
63
92
|
};
|
|
@@ -1,50 +1,63 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import "
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
import { Fragment as _ } from "preact";
|
|
11
|
-
const
|
|
1
|
+
import '../../../../ErrorMessageDisplay.css';
|
|
2
|
+
import { o } from "../../../../jsxRuntime.module-69493d81.mjs";
|
|
3
|
+
import { T as Typography, b as TypographyVariant } from "../../../../Typography-11b95870.mjs";
|
|
4
|
+
import { T } from "../../../../hooks.module-8565d716.mjs";
|
|
5
|
+
import useCoreContext from "../../../core/Context/useCoreContext.js";
|
|
6
|
+
import Button from "../Button/Button.js";
|
|
7
|
+
import useAuthContext from "../../../core/Auth/useAuthContext.js";
|
|
8
|
+
import { k } from "../../../../preact.module-38e5a571.mjs";
|
|
9
|
+
const ErrorMessageDisplay$1 = "";
|
|
10
|
+
const noResults = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMjMiIGhlaWdodD0iMTY5IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjIzIDE2OSI+CiAgICA8cGF0aCBmaWxsPSIjRUFCMUEwIiBzdHJva2U9IiMwMDExMkMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2Utd2lkdGg9Ii42IiBkPSJNMzYuNiAxMTIuMmMuNi0uMSAxLS43IDEtMS4zbC0uOS04LjcgMi4xIDYuNmMuMi42LjguOCAxLjQuNy42LS4xIDEtLjcuOC0xLjJsLTEuMy02LjggMi45LTQuOC01LjktNS41LTcuNiA5IDUgNC43IDEgNi4yYzAgLjcuNyAxLjIgMS41IDFaIi8+CiAgICA8cGF0aCBmaWxsPSIjRUFCMUEwIiBkPSJNMzEuNyAxMDMuNmMuMy40IDEuMiA2LjYgMS41IDkgMCAuNS42IDEgMS4xIDFoLjNjLjcgMCAxLjItLjYgMS4xLTEuM2wtLjctOS4xIi8+CiAgICA8cGF0aCBzdHJva2U9IiMwMDExMkMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2Utd2lkdGg9Ii42IiBkPSJNMzEuNyAxMDMuNmMuMy40IDEuMiA2LjYgMS41IDkgMCAuNS42IDEgMS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MCIgc3Ryb2tlLXdpZHRoPSIuNiIgZD0iTTIuMyAxNjhoMjE5LjQiLz4KICAgIDxwYXRoIGZpbGw9IiMwMDExMkMiIHN0cm9rZT0iIzAwMTEyQyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHN0cm9rZS13aWR0aD0iLjYiIGQ9Ik0yOS4yIDI2LjNjNi4yIDAgMTEuMy00LjcgMTEuMy0xMC41UzM1LjQgNS4yIDI5LjIgNS4yQzIzIDUuMiAxNy45IDEwIDE3LjkgMTUuOHM1IDEwLjUgMTEuMyAxMC41WiIvPgogICAgPHBhdGggc3Ryb2tlPSIjZmZmIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgc3Ryb2tlLXdpZHRoPSIuNiIgZD0ibTI1LjIgMTIgOCA3LjVNMzMuMiAxMmwtOCA3LjUiLz4KPC9zdmc+";
|
|
11
|
+
const IMAGE_BREAKPOINT_SIZES = {
|
|
12
12
|
md: 680,
|
|
13
13
|
lg: 1024
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
};
|
|
15
|
+
const ErrorMessageDisplay = ({
|
|
16
|
+
title,
|
|
17
|
+
message,
|
|
18
|
+
imageDesktop,
|
|
19
|
+
imageMobile,
|
|
20
|
+
withImage,
|
|
21
|
+
centered,
|
|
22
|
+
refreshComponent,
|
|
23
|
+
onContactSupport,
|
|
24
|
+
translationValues
|
|
23
25
|
}) => {
|
|
24
|
-
const { i18n
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
const { i18n } = useCoreContext();
|
|
27
|
+
const { updateCore } = useAuthContext();
|
|
28
|
+
const renderMessage = T(
|
|
29
|
+
(errorMessage) => {
|
|
30
|
+
if (Array.isArray(errorMessage)) {
|
|
31
|
+
return errorMessage.map(
|
|
32
|
+
(message2, i) => i === 0 ? /* @__PURE__ */ o(k, { children: [
|
|
33
|
+
i18n.get(message2),
|
|
34
|
+
translationValues && translationValues[message2] && /* @__PURE__ */ o(k, { children: translationValues[message2] })
|
|
35
|
+
] }) : /* @__PURE__ */ o(k, { children: [
|
|
36
|
+
/* @__PURE__ */ o("br", {}),
|
|
37
|
+
i18n.get(message2),
|
|
38
|
+
translationValues && translationValues[message2] && /* @__PURE__ */ o(k, { children: translationValues[message2] })
|
|
39
|
+
] })
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
return i18n.get(errorMessage);
|
|
43
|
+
},
|
|
44
|
+
[i18n, translationValues]
|
|
32
45
|
);
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
(
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ o("div", { className: `adyen-pe-error-message-display ${centered ? "adyen-pe-error-message-display--centered" : ""}`, children: [
|
|
47
|
+
(imageDesktop || imageMobile || withImage) && /* @__PURE__ */ o("div", { className: "adyen-pe-error-message-display__illustration", children: /* @__PURE__ */ o("picture", { children: [
|
|
48
|
+
/* @__PURE__ */ o("source", { type: "image/svg+xml", media: `(min-width: ${IMAGE_BREAKPOINT_SIZES.md}px)`, srcSet: imageDesktop }),
|
|
49
|
+
/* @__PURE__ */ o("source", { type: "image/svg+xml", media: `(max-width: ${IMAGE_BREAKPOINT_SIZES.md}px)`, srcSet: imageMobile }),
|
|
50
|
+
/* @__PURE__ */ o("img", { srcSet: imageDesktop ?? noResults, alt: i18n.get("thereWasAnUnexpectedError") })
|
|
38
51
|
] }) }),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
41
|
-
(
|
|
42
|
-
|
|
43
|
-
!
|
|
52
|
+
/* @__PURE__ */ o(Typography, { variant: TypographyVariant.TITLE, children: i18n.get(title) }),
|
|
53
|
+
message && /* @__PURE__ */ o(Typography, { variant: TypographyVariant.BODY, children: renderMessage(message) }),
|
|
54
|
+
(onContactSupport || refreshComponent) && /* @__PURE__ */ o("div", { className: "adyen-pe-error-message-display__button", children: [
|
|
55
|
+
onContactSupport && /* @__PURE__ */ o(Button, { onClick: onContactSupport, children: i18n.get("reachOutToSupport") }),
|
|
56
|
+
!onContactSupport && refreshComponent && /* @__PURE__ */ o(Button, { onClick: updateCore, children: i18n.get("refresh") })
|
|
44
57
|
] })
|
|
45
58
|
] });
|
|
46
59
|
};
|
|
47
60
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
61
|
+
ErrorMessageDisplay,
|
|
62
|
+
IMAGE_BREAKPOINT_SIZES
|
|
50
63
|
};
|
|
@@ -1,70 +1,93 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { BASE_CLASS
|
|
8
|
-
import
|
|
9
|
-
import { useClickOutside
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
const
|
|
13
|
-
|
|
1
|
+
import '../../../../ExpandableCard.css';
|
|
2
|
+
import { o } from "../../../../jsxRuntime.module-69493d81.mjs";
|
|
3
|
+
import cx from "classnames";
|
|
4
|
+
import { h, T, _, p } from "../../../../hooks.module-8565d716.mjs";
|
|
5
|
+
import ChevronUp from "../SVGIcons/ChevronUp.js";
|
|
6
|
+
import ChevronDown from "../SVGIcons/ChevronDown.js";
|
|
7
|
+
import { BASE_CLASS, CONTAINER_CLASS, CONTAINER_BUTTON_CLASS, CONTAINER_FILLED_CLASS, CONTAINER_OVERLAY_ID, CONTENT_CLASS, CONTENT_EXPANDABLE_CLASS, CHEVRON_CLASS, CONTAINER_OVERLAY_CLASS, CONTAINER_HIDDEN_CLASS } from "./constants.js";
|
|
8
|
+
import useCoreContext from "../../../core/Context/useCoreContext.js";
|
|
9
|
+
import { useClickOutside } from "../../../hooks/element/useClickOutside.js";
|
|
10
|
+
import BaseButton from "../BaseButton/BaseButton.js";
|
|
11
|
+
import { k } from "../../../../preact.module-38e5a571.mjs";
|
|
12
|
+
const ExpandableCard$1 = "";
|
|
13
|
+
const ExpandableCard = ({ renderHeader, children, filled, fullWidth, ...listeners }) => {
|
|
14
|
+
const { i18n } = useCoreContext();
|
|
15
|
+
const [isOpen, setIsOpen] = h(false);
|
|
16
|
+
const toggleIsOpen = T(() => setIsOpen((isOpen2) => !isOpen2), [setIsOpen]);
|
|
17
|
+
const expandButtonRef = _(null);
|
|
18
|
+
const isClosedFromOutside = _(false);
|
|
19
|
+
const isOpenRef = _(isOpen);
|
|
20
|
+
const clickOutsideRef = useClickOutside(
|
|
14
21
|
void 0,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
T(() => {
|
|
23
|
+
if (isOpen) {
|
|
24
|
+
toggleIsOpen();
|
|
25
|
+
isClosedFromOutside.current = true;
|
|
26
|
+
}
|
|
27
|
+
}, [isOpen, toggleIsOpen])
|
|
18
28
|
);
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
p(() => {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
if (isOpen) {
|
|
32
|
+
(_a = clickOutsideRef.current) == null ? void 0 : _a.focus();
|
|
33
|
+
} else {
|
|
34
|
+
if (isOpenRef.current !== isOpen && !isClosedFromOutside.current) {
|
|
35
|
+
(_b = expandButtonRef.current) == null ? void 0 : _b.focus();
|
|
36
|
+
}
|
|
37
|
+
isClosedFromOutside.current = false;
|
|
38
|
+
}
|
|
39
|
+
isOpenRef.current = isOpen;
|
|
40
|
+
}, [isOpen, clickOutsideRef]);
|
|
41
|
+
return /* @__PURE__ */ o("div", { className: BASE_CLASS, children: children ? /* @__PURE__ */ o(k, { children: [
|
|
42
|
+
/* @__PURE__ */ o(
|
|
43
|
+
BaseButton,
|
|
25
44
|
{
|
|
26
|
-
className:
|
|
27
|
-
disabled:
|
|
28
|
-
|
|
29
|
-
"aria-
|
|
30
|
-
"aria-
|
|
31
|
-
|
|
32
|
-
|
|
45
|
+
className: cx(CONTAINER_CLASS, CONTAINER_BUTTON_CLASS, { [CONTAINER_FILLED_CLASS]: filled }),
|
|
46
|
+
disabled: isOpen,
|
|
47
|
+
fullWidth,
|
|
48
|
+
"aria-controls": CONTAINER_OVERLAY_ID,
|
|
49
|
+
"aria-expanded": isOpen,
|
|
50
|
+
"aria-hidden": isOpen,
|
|
51
|
+
onClick: toggleIsOpen,
|
|
52
|
+
ref: expandButtonRef,
|
|
33
53
|
"data-testid": "expand-button",
|
|
54
|
+
...listeners,
|
|
34
55
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ o("span", { className: "adyen-pe-sr-only", children: i18n.get("expandableCard.expand") }),
|
|
57
|
+
/* @__PURE__ */ o("div", { className: cx(CONTENT_CLASS, CONTENT_EXPANDABLE_CLASS), children: renderHeader }),
|
|
58
|
+
/* @__PURE__ */ o("div", { className: CHEVRON_CLASS, children: /* @__PURE__ */ o(ChevronDown, { role: "presentation" }) })
|
|
38
59
|
]
|
|
39
60
|
}
|
|
40
61
|
),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
|
|
62
|
+
/* @__PURE__ */ o(
|
|
63
|
+
BaseButton,
|
|
43
64
|
{
|
|
44
|
-
id:
|
|
45
|
-
className:
|
|
46
|
-
[
|
|
47
|
-
[
|
|
65
|
+
id: CONTAINER_OVERLAY_ID,
|
|
66
|
+
className: cx(CONTAINER_CLASS, CONTAINER_BUTTON_CLASS, CONTAINER_OVERLAY_CLASS, {
|
|
67
|
+
[CONTAINER_FILLED_CLASS]: filled,
|
|
68
|
+
[CONTAINER_HIDDEN_CLASS]: !isOpen
|
|
48
69
|
}),
|
|
49
|
-
disabled: !
|
|
50
|
-
|
|
51
|
-
"aria-
|
|
52
|
-
"aria-
|
|
53
|
-
|
|
54
|
-
|
|
70
|
+
disabled: !isOpen,
|
|
71
|
+
fullWidth,
|
|
72
|
+
"aria-controls": CONTAINER_OVERLAY_ID,
|
|
73
|
+
"aria-expanded": isOpen,
|
|
74
|
+
"aria-hidden": !isOpen,
|
|
75
|
+
onClick: toggleIsOpen,
|
|
76
|
+
ref: clickOutsideRef,
|
|
55
77
|
"data-testid": "collapse-button",
|
|
78
|
+
...listeners,
|
|
56
79
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ o("span", { className: "adyen-pe-sr-only", children: i18n.get("expandableCard.collapse") }),
|
|
81
|
+
/* @__PURE__ */ o("div", { className: cx(CONTENT_CLASS, CONTENT_EXPANDABLE_CLASS), children: [
|
|
82
|
+
renderHeader,
|
|
83
|
+
/* @__PURE__ */ o("div", { children })
|
|
61
84
|
] }),
|
|
62
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ o("div", { className: CHEVRON_CLASS, children: /* @__PURE__ */ o(ChevronUp, { role: "presentation" }) })
|
|
63
86
|
]
|
|
64
87
|
}
|
|
65
88
|
)
|
|
66
|
-
] }) : /* @__PURE__ */
|
|
89
|
+
] }) : /* @__PURE__ */ o("div", { className: cx(CONTAINER_CLASS, { [CONTAINER_FILLED_CLASS]: filled }), ...listeners, children: /* @__PURE__ */ o("div", { className: CONTENT_CLASS, children: renderHeader }) }) });
|
|
67
90
|
};
|
|
68
91
|
export {
|
|
69
|
-
|
|
92
|
+
ExpandableCard as default
|
|
70
93
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { o } from "../../../../jsxRuntime.module-69493d81.mjs";
|
|
2
|
+
import { w as waitForWrapper, s as screen, r as render } from "../../../../index-2c0f6175.mjs";
|
|
3
|
+
import ExpandableCard from "./ExpandableCard.js";
|
|
4
|
+
import { CONTAINER_HIDDEN_CLASS } from "./constants.js";
|
|
5
|
+
import { d as describe, b as beforeEach, t as test, g as globalExpect } from "../../../../vendor-vi.a3ff54b1-5e924357.mjs";
|
|
6
|
+
describe("ExpandableCard component", () => {
|
|
7
|
+
const testExpandBehaviour = async () => {
|
|
8
|
+
const expandButton = screen.getByTestId("expand-button");
|
|
9
|
+
const collapseButton = screen.getByTestId("collapse-button");
|
|
10
|
+
expandButton.click();
|
|
11
|
+
await waitForWrapper(() => {
|
|
12
|
+
globalExpect(collapseButton).not.toHaveClass(CONTAINER_HIDDEN_CLASS);
|
|
13
|
+
globalExpect(collapseButton).toHaveFocus();
|
|
14
|
+
});
|
|
15
|
+
return { expandButton, collapseButton };
|
|
16
|
+
};
|
|
17
|
+
beforeEach(() => {
|
|
18
|
+
render(
|
|
19
|
+
/* @__PURE__ */ o("div", { children: [
|
|
20
|
+
/* @__PURE__ */ o("button", { "data-testid": "outside-element", children: "Click" }),
|
|
21
|
+
/* @__PURE__ */ o(ExpandableCard, { renderHeader: "Header", children: "Body" })
|
|
22
|
+
] })
|
|
23
|
+
);
|
|
24
|
+
});
|
|
25
|
+
test("should show and focus collapse button when expand button is clicked", async () => {
|
|
26
|
+
await testExpandBehaviour();
|
|
27
|
+
});
|
|
28
|
+
test("should hide collapse button and focus expand button when collapse button is clicked", async () => {
|
|
29
|
+
const { collapseButton, expandButton } = await testExpandBehaviour();
|
|
30
|
+
collapseButton.click();
|
|
31
|
+
await waitForWrapper(() => {
|
|
32
|
+
globalExpect(collapseButton).toHaveClass(CONTAINER_HIDDEN_CLASS);
|
|
33
|
+
globalExpect(expandButton).toHaveFocus();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
test("should hide collapse button and not focus expand button when clicking outside of the collapse button", async () => {
|
|
37
|
+
const outsideElement = screen.getByTestId("outside-element");
|
|
38
|
+
const { collapseButton, expandButton } = await testExpandBehaviour();
|
|
39
|
+
outsideElement.click();
|
|
40
|
+
await waitForWrapper(() => {
|
|
41
|
+
globalExpect(collapseButton).toHaveClass(CONTAINER_HIDDEN_CLASS);
|
|
42
|
+
globalExpect(expandButton).not.toHaveFocus();
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
const
|
|
1
|
+
const BASE_CLASS = "adyen-pe-expandable-card";
|
|
2
|
+
const CONTAINER_CLASS = BASE_CLASS + "__container";
|
|
3
|
+
const CONTAINER_BUTTON_CLASS = CONTAINER_CLASS + "--button";
|
|
4
|
+
const CONTAINER_FILLED_CLASS = CONTAINER_CLASS + "--filled";
|
|
5
|
+
const CONTAINER_HIDDEN_CLASS = CONTAINER_CLASS + "--hidden";
|
|
6
|
+
const CONTAINER_OVERLAY_CLASS = CONTAINER_CLASS + "--overlay";
|
|
7
|
+
const CONTAINER_OVERLAY_ID = CONTAINER_OVERLAY_CLASS;
|
|
8
|
+
const CONTENT_CLASS = BASE_CLASS + "__content";
|
|
9
|
+
const CONTENT_EXPANDABLE_CLASS = CONTENT_CLASS + "--expandable";
|
|
10
|
+
const CHEVRON_CLASS = BASE_CLASS + "__chevron";
|
|
2
11
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
BASE_CLASS,
|
|
13
|
+
CHEVRON_CLASS,
|
|
14
|
+
CONTAINER_BUTTON_CLASS,
|
|
15
|
+
CONTAINER_CLASS,
|
|
16
|
+
CONTAINER_FILLED_CLASS,
|
|
17
|
+
CONTAINER_HIDDEN_CLASS,
|
|
18
|
+
CONTAINER_OVERLAY_CLASS,
|
|
19
|
+
CONTAINER_OVERLAY_ID,
|
|
20
|
+
CONTENT_CLASS,
|
|
21
|
+
CONTENT_EXPANDABLE_CLASS
|
|
13
22
|
};
|
|
@@ -1,15 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import '../../../../FilterBar.css';
|
|
2
|
+
import { o } from "../../../../jsxRuntime.module-69493d81.mjs";
|
|
3
|
+
import { useMediaQuery, mediaQueries } from "../../external/TransactionsOverview/hooks/useMediaQuery.js";
|
|
4
|
+
import { B as ButtonVariant } from "../../../../types-7ad6576a.mjs";
|
|
5
|
+
import Close from "../SVGIcons/Close.js";
|
|
6
|
+
import Filter from "../SVGIcons/Filter.js";
|
|
7
|
+
import { T as Typography, b as TypographyVariant } from "../../../../Typography-11b95870.mjs";
|
|
8
|
+
import useCoreContext from "../../../core/Context/useCoreContext.js";
|
|
9
|
+
import cx from "classnames";
|
|
10
|
+
import { h, p } from "../../../../hooks.module-8565d716.mjs";
|
|
11
|
+
import Button from "../Button/Button.js";
|
|
12
|
+
import { k } from "../../../../preact.module-38e5a571.mjs";
|
|
13
|
+
const FilterBar$1 = "";
|
|
14
|
+
function FilterBar(props) {
|
|
15
|
+
const { i18n } = useCoreContext();
|
|
16
|
+
const isSmViewport = useMediaQuery(mediaQueries.down.xs);
|
|
17
|
+
const [showFilters, setShowFilters] = h(!isSmViewport);
|
|
18
|
+
p(() => {
|
|
19
|
+
setShowFilters(!isSmViewport);
|
|
20
|
+
}, [isSmViewport]);
|
|
21
|
+
return /* @__PURE__ */ o(k, { children: [
|
|
22
|
+
isSmViewport && /* @__PURE__ */ o("div", { className: "adyen-pe-filter-bar__header", children: [
|
|
23
|
+
/* @__PURE__ */ o(Typography, { variant: TypographyVariant.SUBTITLE, children: i18n.get("transactions") }),
|
|
24
|
+
/* @__PURE__ */ o(
|
|
25
|
+
Button,
|
|
26
|
+
{
|
|
27
|
+
className: "adyen-pe-filter-bar__header-icon",
|
|
28
|
+
variant: ButtonVariant.SECONDARY,
|
|
29
|
+
iconButton: true,
|
|
30
|
+
onClick: () => setShowFilters((prevState) => !prevState),
|
|
31
|
+
children: showFilters ? /* @__PURE__ */ o(Close, {}) : /* @__PURE__ */ o(Filter, {})
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
] }),
|
|
35
|
+
showFilters && /* @__PURE__ */ o(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
"aria-label": i18n.get("filterBar"),
|
|
39
|
+
className: cx("adyen-pe-filter-bar", { "adyen-pe-filter-bar__content--mobile": isSmViewport }),
|
|
40
|
+
children: [
|
|
41
|
+
props.children,
|
|
42
|
+
props.canResetFilters && !!props.resetFilters && /* @__PURE__ */ o(Button, { variant: ButtonVariant.TERTIARY, onClick: props.resetFilters, children: i18n.get("button.clearAll") })
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
)
|
|
11
46
|
] });
|
|
12
47
|
}
|
|
13
48
|
export {
|
|
14
|
-
|
|
49
|
+
FilterBar as default
|
|
15
50
|
};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { parseClassName
|
|
6
|
-
import { parseBoolean
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
|
|
1
|
+
import '../../../../../../FilterButton.css';
|
|
2
|
+
import { o } from "../../../../../../jsxRuntime.module-69493d81.mjs";
|
|
3
|
+
import useButton from "../../../Button/hooks/useButton.js";
|
|
4
|
+
import { T as Typography, a as TypographyElement, b as TypographyVariant } from "../../../../../../Typography-11b95870.mjs";
|
|
5
|
+
import { parseClassName } from "../../../../../utils/class-name-utils.js";
|
|
6
|
+
import { parseBoolean } from "../../../../../utils/common/index.js";
|
|
7
|
+
import { k } from "../../../../../../compat.module-a4d537ff.mjs";
|
|
8
|
+
import { F } from "../../../../../../hooks.module-8565d716.mjs";
|
|
9
|
+
const FilterButton$2 = "";
|
|
10
|
+
const DEFAULT_FILTER_BUTTON_CLASSNAME = "adyen-pe-filter-button";
|
|
11
|
+
function FilterButton({ className, classNameModifiers = [], children, disabled, onClick, ...restAttributes }, ref) {
|
|
12
|
+
const classNameValue = F(() => parseClassName("", className) || "", [className]);
|
|
13
|
+
const disabledValue = F(() => parseBoolean(disabled), [disabled]);
|
|
14
|
+
const { classes, click } = useButton(classNameValue, classNameModifiers, DEFAULT_FILTER_BUTTON_CLASSNAME, disabledValue, onClick);
|
|
15
|
+
return /* @__PURE__ */ o("button", { className: classes, ref, onClick: click, ...restAttributes, children: /* @__PURE__ */ o(Typography, { el: TypographyElement.SPAN, variant: TypographyVariant.BODY, stronger: true, children }) });
|
|
14
16
|
}
|
|
15
|
-
const
|
|
17
|
+
const FilterButton$1 = k(FilterButton);
|
|
16
18
|
export {
|
|
17
|
-
|
|
19
|
+
FilterButton$1 as default
|
|
18
20
|
};
|