@adyen/adyen-platform-experience-web 1.0.0-beta → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ModalContent-88fdb6f4.js +2 -0
- package/dist/ModalContent-88fdb6f4.js.map +1 -0
- package/dist/cjs/index.js +1 -35
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/components/external/BaseElement.js +48 -88
- package/dist/es/components/external/EventEmitter.js +17 -28
- package/dist/es/components/external/TransactionDetails/TransactionDetails.js +15 -20
- package/dist/es/components/external/TransactionDetails/components/TransactionData.js +41 -42
- package/dist/es/components/external/TransactionDetails/components/TransactionDataSkeleton.js +13 -13
- package/dist/es/components/external/TransactionDetails/components/TransactionDetails.js +28 -39
- package/dist/es/components/external/TransactionDetails/components/TransactionDetails.scss.js +4 -0
- package/dist/es/components/external/TransactionsOverview/TransactionsOverviewElement.js +25 -31
- package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.js +7 -10
- package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.scss.js +4 -0
- package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/constants.js +4 -6
- package/dist/es/components/external/TransactionsOverview/components/BalanceAccountSelector/BalanceAccountSelector.js +21 -22
- package/dist/es/components/external/TransactionsOverview/components/BalanceAccountSelector/BalanceAccountSelector.scss.js +4 -0
- package/dist/es/components/external/TransactionsOverview/components/BalanceAccountSelector/useBalanceAccountSelection.js +13 -21
- package/dist/es/components/external/TransactionsOverview/components/BalanceItem/BalanceItem.js +22 -25
- package/dist/es/components/external/TransactionsOverview/components/Balances/Balances.js +36 -47
- package/dist/es/components/external/TransactionsOverview/components/Balances/constants.js +2 -2
- package/dist/es/components/external/TransactionsOverview/components/Category/Category.js +8 -9
- package/dist/es/components/external/TransactionsOverview/components/ModalContent.js +9 -9
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.js +23 -25
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/constants.js +13 -16
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.js +16 -26
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.js +7 -9
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +42 -50
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.scss.js +4 -0
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.js +18 -19
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/constants.js +8 -14
- package/dist/es/components/external/TransactionsOverview/components/TransactionListError/TransactionListError.js +16 -16
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotalItem/TransactionTotalItem.js +37 -42
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.js +36 -39
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.js +48 -60
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.scss.js +4 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/constants.js +3 -4
- package/dist/es/components/external/TransactionsOverview/components/TransactionsDisplay/TransactionsDisplay.js +62 -73
- package/dist/es/components/external/TransactionsOverview/components/TransactionsDisplay/TransactionsDisplay.scss.js +4 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsDisplay/constants.js +3 -4
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +133 -152
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.scss.js +4 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/constants.js +4 -6
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverviewContainer/TransactionsOverviewContainer.js +32 -40
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverviewContainer/TransactionsOverviewContainer.scss.js +4 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverviewContainer/constants.js +3 -4
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverviewDateFilter.js +49 -53
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionTable.scss.js +4 -0
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +75 -84
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/constants.js +6 -10
- package/dist/es/components/external/TransactionsOverview/components/utils.js +6 -12
- package/dist/es/components/external/TransactionsOverview/hooks/useDefaultTransactionsOverviewFilterParams.js +21 -39
- package/dist/es/components/external/TransactionsOverview/hooks/useMaxWidths.js +9 -10
- package/dist/es/components/external/TransactionsOverview/hooks/useMediaQuery.js +23 -28
- package/dist/es/components/external/TransactionsOverview/hooks/useTransactionsOverviewMultiSelectionFilters.js +24 -28
- package/dist/es/components/external/TransactionsOverview/types.js +4 -0
- package/dist/es/components/external/UIElement.js +38 -51
- package/dist/es/components/internal/BaseButton/BaseButton.js +18 -21
- package/dist/es/components/internal/BaseButton/BaseButton.scss.js +4 -0
- package/dist/es/components/internal/BaseButton/constants.js +2 -2
- package/dist/es/components/internal/BaseList/BaseList.js +5 -8
- package/dist/es/components/internal/BaseList/BaseList.scss.js +4 -0
- package/dist/es/components/internal/BaseList/constants.js +2 -2
- package/dist/es/components/internal/Button/Button.js +39 -41
- package/dist/es/components/internal/Button/Button.scss.js +4 -0
- package/dist/es/components/internal/Button/ButtonActions/ButtonActions.js +27 -8
- package/dist/es/components/internal/Button/ButtonActions/ButtonActions.scss.js +4 -0
- package/dist/es/components/internal/Button/ButtonActions/types.js +7 -0
- package/dist/es/components/internal/Button/constants.js +9 -16
- package/dist/es/components/internal/Button/hooks/useButton.js +13 -17
- package/dist/es/components/internal/Button/types.js +4 -0
- package/dist/es/components/internal/Calendar/Calendar.js +20 -21
- package/dist/es/components/internal/Calendar/Calendar.scss.js +4 -0
- package/dist/es/components/internal/Calendar/calendar/constants.js +35 -70
- package/dist/es/components/internal/Calendar/calendar/facade/Calendar.js +322 -552
- package/dist/es/components/internal/Calendar/calendar/facade/index.js +37 -46
- package/dist/es/components/internal/Calendar/calendar/shared/indexed/index.js +34 -46
- package/dist/es/components/internal/Calendar/calendar/timeframe/common/flags.js +31 -5
- package/dist/es/components/internal/Calendar/calendar/timeframe/common/utils.js +14 -16
- package/dist/es/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.js +122 -221
- package/dist/es/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.js +238 -418
- package/dist/es/components/internal/Calendar/calendar/timerange/factory.js +40 -63
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastMonth.js +3 -3
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastNDays.js +16 -27
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastWeek.js +3 -3
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetMonth.js +14 -23
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetWeek.js +21 -29
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/thisMonth.js +3 -3
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/thisWeek.js +3 -3
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/yearToDate.js +9 -13
- package/dist/es/components/internal/Calendar/calendar/timerange/utils.js +49 -83
- package/dist/es/components/internal/Calendar/calendar/timeslice/TimeSlice.js +38 -61
- package/dist/es/components/internal/Calendar/calendar/timeslice/index.js +17 -21
- package/dist/es/components/internal/Calendar/calendar/types.js +15 -0
- package/dist/es/components/internal/Calendar/calendar/utils.js +15 -22
- package/dist/es/components/internal/Calendar/clock/clock.js +23 -41
- package/dist/es/components/internal/Calendar/clock/today.js +37 -57
- package/dist/es/components/internal/Calendar/components/CalendarControls/CalendarControls.js +7 -12
- package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGrid.js +26 -28
- package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDate.js +33 -58
- package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDayOfWeek.js +30 -40
- package/dist/es/components/internal/Calendar/components/CalendarGrid/utils.js +44 -49
- package/dist/es/components/internal/Calendar/hooks/useCalendar.js +84 -115
- package/dist/es/components/internal/Calendar/hooks/useCalendarControlsRendering.js +35 -40
- package/dist/es/components/internal/Calendar/hooks/useTimezone.js +24 -46
- package/dist/es/components/internal/Calendar/types.js +4 -0
- package/dist/es/components/internal/CopyText/CopyText.js +26 -31
- package/dist/es/components/internal/CopyText/CopyText.scss.js +4 -0
- package/dist/es/components/internal/DataGrid/DataGrid.js +93 -10
- package/dist/es/components/internal/DataGrid/DataGrid.scss.js +4 -0
- package/dist/es/components/internal/DataGrid/DataGridCell.js +4 -4
- package/dist/es/components/internal/DataGrid/components/InteractiveBody.js +38 -8
- package/dist/es/components/internal/DataGrid/components/SkeletonBody.js +15 -17
- package/dist/es/components/internal/DataGrid/components/TableBody.js +19 -19
- package/dist/es/components/internal/DataGrid/components/TableCells.js +19 -25
- package/dist/es/components/internal/DataGrid/hooks/useInteractiveDataGrid.js +76 -5
- package/dist/es/components/internal/DataGrid/types.js +4 -0
- package/dist/es/components/internal/DatePicker/DatePicker.js +45 -62
- package/dist/es/components/internal/DatePicker/DatePicker.scss.js +4 -0
- package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.js +26 -43
- package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js +56 -85
- package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.js +45 -53
- package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.scss.js +4 -0
- package/dist/es/components/internal/ExpandableCard/ExpandableCard.js +56 -75
- package/dist/es/components/internal/ExpandableCard/ExpandableCard.scss.js +4 -0
- package/dist/es/components/internal/ExpandableCard/constants.js +11 -20
- package/dist/es/components/internal/FilterBar/FilterBar.js +32 -35
- package/dist/es/components/internal/FilterBar/FilterBar.scss.js +4 -0
- package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.js +15 -17
- package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.scss.js +4 -0
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/AmountFilter.js +41 -63
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/AmountFilter.scss.js +4 -0
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/RangeSelection.js +53 -68
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/constants.js +2 -2
- package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.js +104 -153
- package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilter.js +118 -10
- package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilter.scss.js +4 -0
- package/dist/es/components/internal/FilterBar/filters/DateFilter/types.js +4 -0
- package/dist/es/components/internal/FormFields/FormFields.scss.js +4 -0
- package/dist/es/components/internal/FormFields/InputBase.js +53 -66
- package/dist/es/components/internal/FormFields/InputText.js +6 -6
- package/dist/es/components/internal/FormFields/Select/Select.js +187 -246
- package/dist/es/components/internal/FormFields/Select/Select.scss.js +4 -0
- package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +68 -72
- package/dist/es/components/internal/FormFields/Select/components/SelectList.js +62 -71
- package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +37 -41
- package/dist/es/components/internal/FormFields/Select/constants.js +27 -49
- package/dist/es/components/internal/FormFields/Select/hooks/useSelect.js +27 -35
- package/dist/es/components/internal/Image/Image.js +10 -10
- package/dist/es/components/internal/Img/Img.js +18 -32
- package/dist/es/components/internal/Img/Img.scss.js +4 -0
- package/dist/es/components/internal/Modal/Modal.js +58 -77
- package/dist/es/components/internal/Modal/Modal.scss.js +4 -0
- package/dist/es/components/internal/Pagination/Pagination.js +52 -58
- package/dist/es/components/internal/Pagination/Pagination.scss.js +4 -0
- package/dist/es/components/internal/Pagination/constants.js +4 -6
- package/dist/es/components/internal/Pagination/hooks/useCursorPaginatedRecords.js +7 -8
- package/dist/es/components/internal/Pagination/hooks/useCursorPagination.js +18 -30
- package/dist/es/components/internal/Pagination/hooks/useOffsetPagination.js +14 -21
- package/dist/es/components/internal/Pagination/hooks/usePageLimit.js +52 -60
- package/dist/es/components/internal/Pagination/hooks/usePaginatedRecords.js +80 -11
- package/dist/es/components/internal/Pagination/hooks/usePaginatedRecordsFilters.js +12 -13
- package/dist/es/components/internal/Pagination/hooks/usePagination.js +43 -87
- package/dist/es/components/internal/Pagination/types.js +5 -0
- package/dist/es/components/internal/Pagination/utils.js +5 -5
- package/dist/es/components/internal/Popover/Popover.js +106 -139
- package/dist/es/components/internal/Popover/Popover.scss.js +4 -0
- package/dist/es/components/internal/Popover/PopoverDismissButton/PopoverDismissButton.js +18 -22
- package/dist/es/components/internal/Popover/PopoverDismissButton/PopoverDismissButton.scss.js +4 -0
- package/dist/es/components/internal/Popover/PopoverTitle/PopoverTitle.js +8 -10
- package/dist/es/components/internal/Popover/constants.js +9 -16
- package/dist/es/components/internal/Popover/types.js +6 -0
- package/dist/es/components/internal/Popover/utils/popoverUtil.js +27 -45
- package/dist/es/components/internal/Popover/utils/utils.js +23 -29
- package/dist/es/components/internal/SVGIcons/CheckedBox.js +6 -6
- package/dist/es/components/internal/SVGIcons/Checkmark.js +7 -7
- 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 +4 -4
- package/dist/es/components/internal/SVGIcons/Copy.js +3 -3
- package/dist/es/components/internal/SVGIcons/Filter.js +4 -4
- package/dist/es/components/internal/SVGIcons/UncheckedBox.js +6 -6
- package/dist/es/components/internal/Spinner/Spinner.js +4 -5
- package/dist/es/components/internal/Spinner/Spinner.scss.js +4 -0
- package/dist/es/components/internal/Tag/Tag.js +19 -5
- package/dist/es/components/internal/Tag/Tag.scss.js +4 -0
- package/dist/es/components/internal/Tag/types.js +4 -0
- package/dist/es/components/internal/Tooltip/Tooltip.js +31 -38
- package/dist/es/components/internal/Tooltip/Tooltip.scss.js +4 -0
- package/dist/es/components/internal/Tooltip/useTooltipListeners.js +17 -20
- package/dist/es/components/internal/Typography/Typography.js +33 -7
- package/dist/es/components/internal/Typography/Typography.scss.js +4 -0
- package/dist/es/components/internal/Typography/constants.js +2 -2
- package/dist/es/components/internal/Typography/types.js +6 -0
- package/dist/es/components/shared.scss.js +4 -0
- package/dist/es/components/types.js +4 -0
- package/dist/es/components/utils/transactionResourceErrorCodes.js +14 -15
- package/dist/es/constants.js +2 -2
- package/dist/es/core/Auth/AuthContext.js +7 -7
- package/dist/es/core/Auth/AuthProvider.js +15 -23
- 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 +17 -23
- package/dist/es/core/Context/useCoreContext.js +4 -4
- package/dist/es/core/Errors/AdyenPlatformExperienceError.js +12 -17
- package/dist/es/core/Errors/constants.js +2 -4
- package/dist/es/core/Localization/Localization.js +155 -12
- package/dist/es/core/Localization/amount/amount-util.js +19 -42
- 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 +5 -7
- package/dist/es/core/Localization/constants/localization.js +6 -9
- package/dist/es/core/Localization/datetime/restamper/constants.js +20 -29
- package/dist/es/core/Localization/datetime/restamper/restamper.js +32 -44
- package/dist/es/core/Localization/datetime/restamper/utils.js +26 -44
- package/dist/es/core/Localization/localization-utils.js +31 -7
- package/dist/es/core/Localization/translations/ar.json.js +4 -0
- package/dist/es/core/Localization/translations/cs-CZ.json.js +4 -0
- package/dist/es/core/Localization/translations/da-DK.json.js +4 -0
- package/dist/es/core/Localization/translations/de-DE.json.js +4 -0
- package/dist/es/core/Localization/translations/el-GR.json.js +4 -0
- package/dist/es/core/Localization/translations/en-US.json.js +371 -0
- package/dist/es/core/Localization/translations/es-ES.json.js +255 -0
- package/dist/es/core/Localization/translations/fi-FI.json.js +4 -0
- package/dist/es/core/Localization/translations/fr-FR.json.js +4 -0
- package/dist/es/core/Localization/translations/hr-HR.json.js +4 -0
- package/dist/es/core/Localization/translations/hu-HU.json.js +4 -0
- package/dist/es/core/Localization/translations/index.js +79 -356
- package/dist/es/core/Localization/translations/it-IT.json.js +4 -0
- package/dist/es/core/Localization/translations/ja-JP.json.js +4 -0
- package/dist/es/core/Localization/translations/ko-KR.json.js +4 -0
- package/dist/es/core/Localization/translations/nl-NL.json.js +4 -0
- package/dist/es/core/Localization/translations/no-NO.json.js +4 -0
- package/dist/es/core/Localization/translations/pl-PL.json.js +4 -0
- package/dist/es/core/Localization/translations/pt-BR.json.js +4 -0
- package/dist/es/core/Localization/translations/pt-PT.json.js +4 -0
- package/dist/es/core/Localization/translations/ro-RO.json.js +4 -0
- package/dist/es/core/Localization/translations/ru-RU.json.js +4 -0
- package/dist/es/core/Localization/translations/sk-SK.json.js +4 -0
- package/dist/es/core/Localization/translations/sl-SI.json.js +4 -0
- package/dist/es/core/Localization/translations/sv-SE.json.js +4 -0
- package/dist/es/core/Localization/translations/zh-CN.json.js +4 -0
- package/dist/es/core/Localization/translations/zh-TW.json.js +4 -0
- package/dist/es/core/Localization/utils.js +44 -72
- package/dist/es/core/Services/requests/http.js +31 -49
- package/dist/es/core/Services/requests/utils.js +34 -49
- 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 +23 -38
- package/dist/es/core/Session/utils.js +5 -5
- package/dist/es/core/config.js +2 -6
- package/dist/es/core/core.js +44 -85
- package/dist/es/core/utils.js +8 -10
- package/dist/es/external/preact/compat/dist/compat.module.js +253 -0
- package/dist/es/external/preact/dist/preact.module.js +316 -0
- package/dist/es/external/preact/hooks/dist/hooks.module.js +161 -0
- package/dist/es/external/preact/jsx-runtime/dist/jsxRuntime.module.js +19 -0
- package/dist/es/hooks/element/useClickOutside.js +32 -73
- package/dist/es/hooks/element/useDetachedRender.js +15 -17
- package/dist/es/hooks/element/useFocusCursor.js +14 -19
- package/dist/es/hooks/element/useFocusTrap.js +48 -91
- package/dist/es/hooks/element/usePopoverPositioner.js +105 -5
- package/dist/es/hooks/element/useUniqueIdentifier.js +13 -17
- package/dist/es/hooks/useBooleanState/useBooleanState.js +6 -8
- package/dist/es/hooks/useCommitAction/types.js +4 -0
- package/dist/es/hooks/useCommitAction/useCommitAction.js +27 -38
- package/dist/es/hooks/useFetch/useFetch.js +27 -37
- package/dist/es/hooks/useImageUrl/useImageUrl.js +22 -26
- package/dist/es/hooks/useModalDetails/types.js +6 -0
- package/dist/es/hooks/useModalDetails/useModalDetails.js +28 -37
- package/dist/es/hooks/useMounted/useMounted.js +8 -14
- package/dist/es/hooks/useReactiveState/useReactiveState.js +27 -53
- package/dist/es/hooks/useReflex/constants.js +2 -2
- package/dist/es/hooks/useReflex/core/reflex.js +47 -66
- package/dist/es/hooks/useReflex/core/registry.js +46 -68
- package/dist/es/hooks/useReflex/core/utils.js +16 -18
- package/dist/es/hooks/useReflex/errors.js +6 -6
- package/dist/es/hooks/useReflex/hooks/useReflex.js +7 -12
- package/dist/es/hooks/useSessionAwareRequest/useSessionAwareRequest.js +22 -36
- package/dist/es/hooks/useSetupEndpoint/useSetupEndpoint.js +20 -26
- package/dist/es/images/no-data-female.svg.js +4 -0
- package/dist/es/images/no-results.svg.js +4 -0
- package/dist/es/index.js +41 -45
- package/dist/es/style/index.scss.js +4 -0
- package/dist/es/utils/Storage.js +17 -21
- package/dist/es/utils/class-name-utils.js +5 -11
- package/dist/es/utils/common/constants.js +6 -10
- package/dist/es/utils/common/index.js +32 -59
- package/dist/es/utils/fixedForwardRef.js +3 -3
- package/dist/es/utils/get-image.js +11 -12
- package/dist/es/utils/idGenerator.js +3 -6
- package/dist/es/utils/memoComparator/memoComparator.js +17 -26
- package/dist/es/utils/tabbable.js +71 -110
- package/dist/es/utils/uuid.js +5 -5
- package/dist/es/utils/validator-utils.js +3 -44
- package/dist/es/utils/watchable/constants.js +2 -2
- package/dist/es/utils/watchable/core/Watchable.js +45 -83
- package/dist/es/utils/watchable/core/helpers.js +19 -26
- package/dist/es/utils/watchable/core/syncEffect.js +15 -19
- package/dist/es/utils/watchable/index.js +16 -17
- package/dist/index-7e2df524.js +12 -0
- package/dist/index-7e2df524.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/components/external/TransactionDetails/TransactionDetails.d.ts +1 -1
- package/dist/types/components/external/TransactionDetails/TransactionDetails.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/components/TransactionData.d.ts +1 -1
- package/dist/types/components/external/TransactionDetails/components/TransactionData.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/types.d.ts +3 -3
- package/dist/types/components/external/TransactionDetails/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/BalanceAccountSelector/useBalanceAccountSelection.d.ts +2 -2
- package/dist/types/components/external/TransactionsOverview/components/BalanceAccountSelector/useBalanceAccountSelection.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/BalanceItem/BalanceItem.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/BalanceItem/BalanceItem.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/BalanceItem/types.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/BalanceItem/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/Balances/Balances.d.ts +3 -3
- package/dist/types/components/external/TransactionsOverview/components/Balances/Balances.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/Category/Category.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/Category/Category.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/Category/types.d.ts +2 -2
- package/dist/types/components/external/TransactionsOverview/components/Category/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/ModalContent.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/ModalContent.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.d.ts +2 -2
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/constants.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/constants.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/types.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/types.d.ts +2 -2
- package/dist/types/components/external/TransactionsOverview/components/SummaryItem/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionListError/TransactionListError.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionListError/TransactionListError.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotalItem/TransactionTotalItem.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotalItem/TransactionTotalItem.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotalItem/types.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotalItem/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.d.ts +3 -3
- package/dist/types/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsDisplay/TransactionsDisplay.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsDisplay/TransactionsDisplay.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsDisplay/types.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsDisplay/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts +2 -2
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverviewDateFilter.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverviewDateFilter.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts +4 -4
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/hooks/useDefaultTransactionsOverviewFilterParams.d.ts +1 -0
- package/dist/types/components/external/TransactionsOverview/hooks/useDefaultTransactionsOverviewFilterParams.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/hooks/useMediaQuery.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/hooks/useMediaQuery.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/hooks/useTransactionsOverviewMultiSelectionFilters.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/hooks/useTransactionsOverviewMultiSelectionFilters.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/types.d.ts +2 -1
- package/dist/types/components/external/TransactionsOverview/types.d.ts.map +1 -1
- package/dist/types/components/external/UIElement.d.ts +1 -1
- package/dist/types/components/external/UIElement.d.ts.map +1 -1
- package/dist/types/components/internal/BaseList/BaseList.d.ts +1 -1
- package/dist/types/components/internal/BaseList/BaseList.d.ts.map +1 -1
- package/dist/types/components/internal/Button/ButtonActions/ButtonActions.d.ts +1 -1
- package/dist/types/components/internal/Button/ButtonActions/ButtonActions.d.ts.map +1 -1
- package/dist/types/components/internal/Button/ButtonActions/types.d.ts +1 -1
- package/dist/types/components/internal/Button/ButtonActions/types.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/calendar/shared/indexed/index.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.d.ts +1 -1
- package/dist/types/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/calendar/timerange/types.d.ts +1 -1
- package/dist/types/components/internal/Calendar/calendar/timerange/types.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/calendar/timerange/utils.d.ts +1 -1
- package/dist/types/components/internal/Calendar/calendar/timerange/utils.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/calendar/types.d.ts +1 -1
- package/dist/types/components/internal/Calendar/calendar/types.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/clock/today.d.ts +1 -1
- package/dist/types/components/internal/Calendar/clock/today.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/clock/types.d.ts +2 -2
- package/dist/types/components/internal/Calendar/clock/types.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/components/CalendarGrid/utils.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/hooks/useCalendar.d.ts +1 -1
- package/dist/types/components/internal/Calendar/hooks/useCalendar.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/hooks/useTimezone.d.ts +1 -1
- package/dist/types/components/internal/Calendar/hooks/useTimezone.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 -2
- package/dist/types/components/internal/DataGrid/components/TableCells.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/hooks/useInteractiveDataGrid.d.ts +1 -1
- package/dist/types/components/internal/DataGrid/types.d.ts +2 -2
- package/dist/types/components/internal/DataGrid/types.d.ts.map +1 -1
- package/dist/types/components/internal/DatePicker/DatePicker.d.ts +1 -1
- package/dist/types/components/internal/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.d.ts +3 -3
- package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.d.ts.map +1 -1
- package/dist/types/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.d.ts +1 -1
- package/dist/types/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/filters/AmountFilter/types.d.ts +2 -2
- package/dist/types/components/internal/FilterBar/filters/AmountFilter/types.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/filters/BaseFilter/types.d.ts +2 -2
- package/dist/types/components/internal/FilterBar/filters/BaseFilter/types.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/filters/DateFilter/types.d.ts +1 -1
- package/dist/types/components/internal/FilterBar/filters/DateFilter/types.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/types.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/types.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/hooks/types.d.ts +1 -1
- package/dist/types/components/internal/Pagination/hooks/types.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/hooks/usePaginatedRecordsFilters.d.ts +1 -1
- package/dist/types/components/internal/Pagination/hooks/usePaginatedRecordsFilters.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/types.d.ts +1 -1
- package/dist/types/components/internal/Pagination/types.d.ts.map +1 -1
- package/dist/types/components/internal/Popover/Popover.d.ts +1 -1
- package/dist/types/components/internal/Popover/Popover.d.ts.map +1 -1
- package/dist/types/components/internal/Popover/types.d.ts +1 -1
- package/dist/types/components/internal/Popover/types.d.ts.map +1 -1
- package/dist/types/components/internal/Tooltip/types.d.ts +2 -2
- package/dist/types/components/internal/Tooltip/types.d.ts.map +1 -1
- package/dist/types/components/utils/transactionResourceErrorCodes.d.ts +2 -2
- package/dist/types/components/utils/transactionResourceErrorCodes.d.ts.map +1 -1
- package/dist/types/core/Auth/AuthContext.d.ts +1 -1
- package/dist/types/core/Auth/AuthContext.d.ts.map +1 -1
- package/dist/types/core/Auth/AuthProvider.d.ts +1 -1
- package/dist/types/core/Auth/AuthProvider.d.ts.map +1 -1
- package/dist/types/core/Auth/types.d.ts +1 -1
- package/dist/types/core/Auth/types.d.ts.map +1 -1
- package/dist/types/core/Context/CoreContext.d.ts +1 -1
- package/dist/types/core/Context/CoreContext.d.ts.map +1 -1
- package/dist/types/core/Context/types.d.ts +1 -1
- package/dist/types/core/Context/types.d.ts.map +1 -1
- package/dist/types/core/Errors/AdyenPlatformExperienceError.d.ts +1 -1
- package/dist/types/core/Errors/AdyenPlatformExperienceError.d.ts.map +1 -1
- package/dist/types/core/Localization/localization-utils.d.ts.map +1 -1
- package/dist/types/core/Localization/types.d.ts +3 -3
- package/dist/types/core/Localization/types.d.ts.map +1 -1
- package/dist/types/core/Session/types.d.ts +1 -1
- package/dist/types/core/Session/types.d.ts.map +1 -1
- package/dist/types/hooks/element/useClickOutside.d.ts +2 -2
- package/dist/types/hooks/element/useClickOutside.d.ts.map +1 -1
- package/dist/types/hooks/element/usePopoverPositioner.d.ts +1 -1
- package/dist/types/hooks/element/usePopoverPositioner.d.ts.map +1 -1
- package/dist/types/hooks/useCommitAction/types.d.ts +1 -1
- package/dist/types/hooks/useCommitAction/types.d.ts.map +1 -1
- package/dist/types/hooks/useFetch/useFetch.d.ts +1 -1
- package/dist/types/hooks/useFetch/useFetch.d.ts.map +1 -1
- package/dist/types/hooks/useModalDetails/types.d.ts +2 -2
- package/dist/types/hooks/useModalDetails/types.d.ts.map +1 -1
- package/dist/types/hooks/useSessionAwareRequest/useSessionAwareRequest.d.ts +1 -1
- package/dist/types/hooks/useSessionAwareRequest/useSessionAwareRequest.d.ts.map +1 -1
- package/dist/types/hooks/useSetupEndpoint/useSetupEndpoint.d.ts +2 -2
- package/dist/types/hooks/useSetupEndpoint/useSetupEndpoint.d.ts.map +1 -1
- package/dist/types/utils/Validator/types.d.ts +1 -1
- package/dist/types/utils/Validator/types.d.ts.map +1 -1
- package/dist/types/utils/useForm/types.d.ts +1 -1
- package/dist/types/utils/useForm/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/AmountSkeleton.css +0 -23
- package/dist/BalanceAccountSelector.css +0 -4
- package/dist/BaseButton.css +0 -14
- package/dist/BaseList.css +0 -5
- package/dist/Button.css +0 -114
- package/dist/ButtonActions-eb064f69.mjs +0 -46
- package/dist/ButtonActions.css +0 -28
- package/dist/CalendarGrid.css +0 -113
- package/dist/CopyText.css +0 -18
- package/dist/DatePicker.css +0 -64
- package/dist/ErrorMessageDisplay.css +0 -20
- package/dist/ErrorPanel.css +0 -15
- package/dist/ExpandableCard.css +0 -71
- package/dist/FilterBar.css +0 -40
- package/dist/FilterButton.css +0 -48
- package/dist/Img.css +0 -7
- package/dist/InputBase.css +0 -175
- package/dist/Modal.css +0 -110
- package/dist/Pagination.css +0 -25
- package/dist/Popover.css +0 -127
- package/dist/PopoverDismissButton.css +0 -12
- package/dist/RangeSelection.css +0 -26
- package/dist/Select.css +0 -149
- package/dist/SkeletonBody.css +0 -154
- package/dist/Spinner.css +0 -50
- package/dist/SummaryItem.css +0 -37
- package/dist/Tag-6d02fd64.mjs +0 -32
- package/dist/Tag.css +0 -34
- package/dist/Tooltip.css +0 -7
- package/dist/TotalsCard.css +0 -14
- package/dist/TransactionDetails.css +0 -74
- package/dist/TransactionsDisplay.css +0 -4
- package/dist/TransactionsOverview.css +0 -29
- package/dist/TransactionsOverviewContainer.css +0 -3
- package/dist/TransactionsTable.css +0 -18
- package/dist/Typography-11b95870.mjs +0 -68
- package/dist/Typography.css +0 -57
- package/dist/cjs/ModalContent-f4990141.js +0 -10
- package/dist/cjs/ModalContent-f4990141.js.map +0 -1
- package/dist/cjs/index-8c098f20.js +0 -10401
- package/dist/cjs/index-8c098f20.js.map +0 -1
- package/dist/cjs/index.css +0 -1709
- package/dist/compat.module-a4d537ff.mjs +0 -237
- package/dist/en-US-1daadfc1.mjs +0 -371
- package/dist/es/components/external/FormElement.js +0 -78
- package/dist/es/components/external/TransactionDetails/index.js +0 -4
- package/dist/es/components/external/TransactionsOverview/components/BalanceAccountSelector/index.js +0 -6
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/index.js +0 -15
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/index.js +0 -13
- package/dist/es/components/external/TransactionsOverview/index.js +0 -6
- package/dist/es/components/external/index.js +0 -8
- package/dist/es/components/index.js +0 -11
- package/dist/es/components/internal/BaseButton/index.js +0 -4
- package/dist/es/components/internal/Button/index.js +0 -4
- package/dist/es/components/internal/Calendar/calendar/index.js +0 -4
- package/dist/es/components/internal/Calendar/calendar/timeframe/frames/YearFrame.js +0 -197
- package/dist/es/components/internal/Calendar/calendar/timeframe/index.js +0 -8
- package/dist/es/components/internal/Calendar/calendar/timerange/factory.test.js +0 -139
- package/dist/es/components/internal/Calendar/calendar/timerange/index.js +0 -4
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/index.js +0 -14
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastMonth.test.js +0 -69
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastNDays.test.js +0 -69
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastWeek.test.js +0 -108
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/testing/fixtures.js +0 -15
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/testing/helpers.js +0 -19
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/thisMonth.test.js +0 -46
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/thisWeek.test.js +0 -85
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/yearToDate.test.js +0 -49
- package/dist/es/components/internal/Calendar/clock/clock.test.js +0 -43
- package/dist/es/components/internal/Calendar/clock/index.js +0 -7
- package/dist/es/components/internal/Calendar/clock/testing/fixtures.js +0 -60
- package/dist/es/components/internal/Calendar/clock/today.test.js +0 -98
- package/dist/es/components/internal/Calendar/components/CalendarControls/index.js +0 -4
- package/dist/es/components/internal/Calendar/components/CalendarGrid/index.js +0 -4
- package/dist/es/components/internal/Calendar/index.js +0 -4
- package/dist/es/components/internal/DataGrid/index.js +0 -4
- package/dist/es/components/internal/DataGrid/tests/DataGrid.test.js +0 -190
- package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/index.js +0 -7
- package/dist/es/components/internal/DatePicker/index.js +0 -4
- package/dist/es/components/internal/ExpandableCard/ExpandableCard.test.js +0 -45
- package/dist/es/components/internal/FilterBar/filters/BaseFilter/index.js +0 -4
- package/dist/es/components/internal/FilterBar/filters/DateFilter/index.js +0 -4
- package/dist/es/components/internal/FilterBar/filters/TextFilter/TextFilter.js +0 -8
- package/dist/es/components/internal/FilterBar/filters/TextFilter/index.js +0 -4
- package/dist/es/components/internal/FilterBar/index.js +0 -4
- package/dist/es/components/internal/FormFields/Select/index.js +0 -4
- package/dist/es/components/internal/FormFields/index.js +0 -18
- package/dist/es/components/internal/FormFields/utils.js +0 -4
- package/dist/es/components/internal/Img/index.js +0 -4
- package/dist/es/components/internal/Modal/index.js +0 -4
- package/dist/es/components/internal/Pagination/components/LimitSelect.js +0 -1
- package/dist/es/components/internal/Pagination/hooks/index.js +0 -6
- package/dist/es/components/internal/Pagination/hooks/useOffsetPaginatedRecords.js +0 -10
- package/dist/es/components/internal/Pagination/index.js +0 -4
- package/dist/es/components/internal/Popover/Popover.test.js +0 -119
- package/dist/es/components/internal/Spinner/index.js +0 -4
- package/dist/es/components/utils/utils.js +0 -34
- package/dist/es/core/Analytics/Analytics.js +0 -63
- package/dist/es/core/Analytics/EventsQueue.js +0 -22
- package/dist/es/core/Analytics/index.js +0 -4
- package/dist/es/core/Errors/ErrorPanel.js +0 -19
- package/dist/es/core/Localization/Localization.test.js +0 -70
- package/dist/es/core/Localization/amount/amount-util.test.js +0 -54
- package/dist/es/core/Localization/datetime/restamper/index.js +0 -9
- package/dist/es/core/Localization/datetime/restamper/restamper.test.js +0 -179
- package/dist/es/core/Localization/datetime/restamper/testing/fixtures.js +0 -21
- package/dist/es/core/Localization/datetime/restamper/testing/helpers.js +0 -27
- package/dist/es/core/Localization/index.js +0 -32
- package/dist/es/core/Localization/utils.test.js +0 -215
- package/dist/es/core/ProcessResponse/index.js +0 -4
- package/dist/es/core/ProcessResponse/process-response.js +0 -40
- package/dist/es/core/Services/analytics/collect-id.js +0 -37
- package/dist/es/core/Services/analytics/log-event.js +0 -14
- package/dist/es/core/Services/analytics/post-telemetry.js +0 -22
- package/dist/es/core/Services/data-set.js +0 -1
- package/dist/es/core/Services/get-dataset.js +0 -13
- package/dist/es/core/Services/requests/endpoints.js +0 -9
- package/dist/es/core/Session/index.js +0 -4
- package/dist/es/core/index.js +0 -36
- package/dist/es/hooks/element/useIdentifierString.js +0 -61
- package/dist/es/hooks/useBooleanState/index.js +0 -4
- package/dist/es/hooks/useCommitAction/index.js +0 -6
- package/dist/es/hooks/useDefinedValue/index.js +0 -4
- package/dist/es/hooks/useDefinedValue/useDefinedValue.js +0 -16
- package/dist/es/hooks/useMounted/index.js +0 -4
- package/dist/es/hooks/useReactiveState/index.js +0 -4
- package/dist/es/hooks/useReflex/core/reflex.test.js +0 -170
- package/dist/es/hooks/useReflex/core/registry.test.js +0 -114
- package/dist/es/hooks/useReflex/core/utils.test.js +0 -59
- package/dist/es/hooks/useReflex/index.js +0 -8
- package/dist/es/utils/Validator/ValidationRuleResult.js +0 -28
- package/dist/es/utils/Validator/Validator.js +0 -67
- package/dist/es/utils/Validator/Validator.test.js +0 -27
- package/dist/es/utils/Validator/defaultRules.js +0 -12
- package/dist/es/utils/Validator/index.js +0 -4
- package/dist/es/utils/get-image.test.js +0 -38
- package/dist/es/utils/memoComparator/index.js +0 -4
- package/dist/es/utils/regex.js +0 -6
- package/dist/es/utils/useForm/index.js +0 -4
- package/dist/es/utils/useForm/reducer.js +0 -153
- package/dist/es/utils/useForm/useForm.js +0 -85
- package/dist/es/utils/useForm/useForm.test.js +0 -107
- package/dist/es/utils/uuid.test.js +0 -13
- package/dist/es/utils/watchable/core/Watchable.test.js +0 -103
- package/dist/es/utils/watchable/core/helpers.test.js +0 -106
- package/dist/es/utils/watchable/core/syncEffect.test.js +0 -103
- package/dist/flags-41c36e13.mjs +0 -83
- package/dist/hooks.module-8565d716.mjs +0 -161
- package/dist/index-2c0f6175.mjs +0 -12069
- package/dist/index-6e47f755.mjs +0 -231
- package/dist/index-944be685.mjs +0 -6609
- package/dist/index-c88cd37e.mjs +0 -243
- package/dist/index-f5bc0382.mjs +0 -155
- package/dist/index.css +0 -65
- package/dist/index2.css +0 -4
- package/dist/jsxRuntime.module-69493d81.mjs +0 -15
- package/dist/magic-string.es-219c273f.mjs +0 -1146
- package/dist/preact.module-38e5a571.mjs +0 -323
- package/dist/types-0027b7c2.mjs +0 -9
- package/dist/types-0aaff3aa.mjs +0 -19
- package/dist/types-7ad6576a.mjs +0 -10
- package/dist/types-e4bbd37f.mjs +0 -13
- package/dist/types-e6a6a3ff.mjs +0 -9
- package/dist/usePaginatedRecords-63a69bf1.mjs +0 -131
- package/dist/usePopoverPositioner-882fea89.mjs +0 -182
- package/dist/vendor-vi.a3ff54b1-5e924357.mjs +0 -22389
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { L as Localization } from "../../../index-c88cd37e.mjs";
|
|
2
|
-
import { es_ES } from "./translations/index.js";
|
|
3
|
-
import "../../utils/common/index.js";
|
|
4
|
-
import { d as describe, t as test, g as globalExpect } from "../../../vendor-vi.a3ff54b1-5e924357.mjs";
|
|
5
|
-
describe("Localization", () => {
|
|
6
|
-
describe("constructor", () => {
|
|
7
|
-
test("sets up locale and customTranslations", () => {
|
|
8
|
-
const lang = new Localization("es-ES", [es_ES]);
|
|
9
|
-
lang.customTranslations = {
|
|
10
|
-
"es-ES": { account: "es" }
|
|
11
|
-
};
|
|
12
|
-
lang.ready.then(() => {
|
|
13
|
-
globalExpect(lang.locale).toBe("es-ES");
|
|
14
|
-
globalExpect(lang.customTranslations["es-ES"]).toBeDefined();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
test("sets up locale without country code and customTranslations without countryCode", () => {
|
|
18
|
-
const lang = new Localization("es", [es_ES]);
|
|
19
|
-
lang.customTranslations = {
|
|
20
|
-
es: { paymentId: "es" }
|
|
21
|
-
};
|
|
22
|
-
lang.ready.then(() => {
|
|
23
|
-
globalExpect(lang.locale).toBe("es-ES");
|
|
24
|
-
globalExpect(lang.customTranslations["es-ES"]).toBeDefined();
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
test("sets up a custom locale and customTranslations", () => {
|
|
28
|
-
const lang = new Localization("ca-CA");
|
|
29
|
-
lang.customTranslations = {
|
|
30
|
-
"ca-CA": { paymentId: "ca" }
|
|
31
|
-
};
|
|
32
|
-
lang.ready.then(() => {
|
|
33
|
-
globalExpect(lang.locale).toBe("ca-CA");
|
|
34
|
-
globalExpect(lang.customTranslations["ca-CA"]).toBeDefined();
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
test("sets up a custom locale without countryCode and customTranslations", () => {
|
|
38
|
-
const lang = new Localization("ca");
|
|
39
|
-
lang.customTranslations = {
|
|
40
|
-
"ca-CA": { paymentId: "ca" }
|
|
41
|
-
};
|
|
42
|
-
lang.ready.then(() => {
|
|
43
|
-
globalExpect(lang.locale).toBe("ca-CA");
|
|
44
|
-
globalExpect(lang.customTranslations["ca-CA"]).toBeDefined();
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
test("falls back to FALLBACK_LOCALE and removes customTranslations that do not match a language/language_country code", () => {
|
|
48
|
-
const lang = new Localization("FAKE");
|
|
49
|
-
lang.customTranslations = {
|
|
50
|
-
FAKE: { paymentId: "ca" }
|
|
51
|
-
};
|
|
52
|
-
lang.ready.then(() => {
|
|
53
|
-
globalExpect(lang.locale).toBe("en-US");
|
|
54
|
-
globalExpect(lang.customTranslations).toEqual({});
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
describe("get", () => {
|
|
59
|
-
test("gets a string even if it is empty", () => {
|
|
60
|
-
const lang = new Localization("en-US");
|
|
61
|
-
const translationKey = "paymentId";
|
|
62
|
-
lang.customTranslations = {
|
|
63
|
-
"en-US": { paymentId: "" }
|
|
64
|
-
};
|
|
65
|
-
lang.ready.then(() => {
|
|
66
|
-
globalExpect(lang.get(translationKey)).toBe(translationKey);
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
});
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { isValidCurrencyCode, getDivider, getCurrencyCode, getLocalisedAmount, getLocalisedPercentage } from "./amount-util.js";
|
|
2
|
-
import { d as describe, t as test, g as globalExpect, a as beforeAll, e as afterEach, c as afterAll, v as vi } from "../../../../vendor-vi.a3ff54b1-5e924357.mjs";
|
|
3
|
-
describe("isValidCurrencyCode", () => {
|
|
4
|
-
test("should return true for BYN", () => {
|
|
5
|
-
globalExpect(isValidCurrencyCode("BYN")).toBe(true);
|
|
6
|
-
});
|
|
7
|
-
test("should return true for existing keys", () => {
|
|
8
|
-
globalExpect(isValidCurrencyCode("USD")).toBe(true);
|
|
9
|
-
});
|
|
10
|
-
});
|
|
11
|
-
describe("getDivider", () => {
|
|
12
|
-
test("should return the divider for a currency", () => {
|
|
13
|
-
globalExpect(getDivider("USD")).toBe(100);
|
|
14
|
-
globalExpect(getDivider("JPY")).toBe(1);
|
|
15
|
-
globalExpect(getDivider("BHD")).toBe(1e3);
|
|
16
|
-
globalExpect(getDivider("MRO")).toBe(10);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
describe("getCurrencyCode", () => {
|
|
20
|
-
test("should return a currency symbol for existing keys", () => {
|
|
21
|
-
globalExpect(getCurrencyCode("USD")).toBe("$");
|
|
22
|
-
globalExpect(getCurrencyCode("BYN")).toBe("Br");
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
describe("getLocalisedAmount", () => {
|
|
26
|
-
let spyOnToLocaleString;
|
|
27
|
-
beforeAll(() => {
|
|
28
|
-
spyOnToLocaleString = vi.spyOn(Number.prototype, "toLocaleString");
|
|
29
|
-
});
|
|
30
|
-
afterEach(() => {
|
|
31
|
-
spyOnToLocaleString.mockClear();
|
|
32
|
-
});
|
|
33
|
-
afterAll(() => {
|
|
34
|
-
spyOnToLocaleString.mockRestore();
|
|
35
|
-
});
|
|
36
|
-
test("should return a formatted EUR amount", () => {
|
|
37
|
-
getLocalisedAmount(1e3, "nl-NL", "EUR");
|
|
38
|
-
globalExpect(spyOnToLocaleString).toHaveBeenCalledWith("nl-NL", { currency: "EUR", currencyDisplay: "symbol", style: "currency" });
|
|
39
|
-
});
|
|
40
|
-
test("should return a formatted USD amount", () => {
|
|
41
|
-
getLocalisedAmount(1e3, "en-US", "USD");
|
|
42
|
-
globalExpect(spyOnToLocaleString).toHaveBeenCalledWith("en-US", { currency: "USD", currencyDisplay: "symbol", style: "currency" });
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
describe("getLocalisedPercentage", () => {
|
|
46
|
-
test("should return a percentage formatted string", () => {
|
|
47
|
-
globalExpect(getLocalisedPercentage(1e3, "en-US")).toBe("10%");
|
|
48
|
-
globalExpect(getLocalisedPercentage(100, "en-US")).toBe("1%");
|
|
49
|
-
globalExpect(getLocalisedPercentage(10, "en-US")).toBe("0.1%");
|
|
50
|
-
globalExpect(getLocalisedPercentage(1, "en-US")).toBe("0.01%");
|
|
51
|
-
globalExpect(getLocalisedPercentage(1234, "en-US")).toBe("12.34%");
|
|
52
|
-
globalExpect(getLocalisedPercentage(-2500, "en-US")).toBe("-25%");
|
|
53
|
-
});
|
|
54
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { default as default2 } from "./restamper.js";
|
|
2
|
-
import { SYSTEM_TIMEZONE } from "./constants.js";
|
|
3
|
-
import { systemToTimezone, timezoneToSystem } from "./utils.js";
|
|
4
|
-
export {
|
|
5
|
-
SYSTEM_TIMEZONE,
|
|
6
|
-
default2 as default,
|
|
7
|
-
systemToTimezone,
|
|
8
|
-
timezoneToSystem
|
|
9
|
-
};
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { h as getWorkerState, c as afterAll, e as afterEach, j as assert, a as beforeAll, b as beforeEach, k as bench, l as chai, m as createExpect, d as describe, g as globalExpect, i as it, o as onTestFailed, s as setupChaiConfig, n as should, p as suite, t as test, v as vi, q as vitest } from "../../../../../vendor-vi.a3ff54b1-5e924357.mjs";
|
|
2
|
-
import { REGEX_TZ_OFFSET } from "./constants.js";
|
|
3
|
-
import restamper from "./restamper.js";
|
|
4
|
-
import { NON_DST_TIMEZONES, DST_TIMEZONES } from "./testing/fixtures.js";
|
|
5
|
-
import { getPastDatesMapForEachMonthInYear, runTimezoneTestRoutine } from "./testing/helpers.js";
|
|
6
|
-
const filesCount = /* @__PURE__ */ new Map();
|
|
7
|
-
const cache = /* @__PURE__ */ new Map();
|
|
8
|
-
function runOnce(fn, key) {
|
|
9
|
-
const filepath = getWorkerState().filepath || "__unknown_files__";
|
|
10
|
-
if (!key) {
|
|
11
|
-
filesCount.set(filepath, (filesCount.get(filepath) || 0) + 1);
|
|
12
|
-
key = String(filesCount.get(filepath));
|
|
13
|
-
}
|
|
14
|
-
const id = `${filepath}:${key}`;
|
|
15
|
-
if (!cache.has(id))
|
|
16
|
-
cache.set(id, fn());
|
|
17
|
-
return cache.get(id);
|
|
18
|
-
}
|
|
19
|
-
function isFirstRun() {
|
|
20
|
-
let firstRun = false;
|
|
21
|
-
runOnce(() => {
|
|
22
|
-
firstRun = true;
|
|
23
|
-
}, "__vitest_first_run__");
|
|
24
|
-
return firstRun;
|
|
25
|
-
}
|
|
26
|
-
function getRunningMode() {
|
|
27
|
-
return process.env.VITEST_MODE === "WATCH" ? "watch" : "run";
|
|
28
|
-
}
|
|
29
|
-
function isWatchMode() {
|
|
30
|
-
return getRunningMode() === "watch";
|
|
31
|
-
}
|
|
32
|
-
var dist = {};
|
|
33
|
-
(function(exports) {
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.expectTypeOf = void 0;
|
|
36
|
-
const fn = () => true;
|
|
37
|
-
const expectTypeOf2 = (_actual) => {
|
|
38
|
-
const nonFunctionProperties = [
|
|
39
|
-
"parameters",
|
|
40
|
-
"returns",
|
|
41
|
-
"resolves",
|
|
42
|
-
"not",
|
|
43
|
-
"items",
|
|
44
|
-
"constructorParameters",
|
|
45
|
-
"instance",
|
|
46
|
-
"guards",
|
|
47
|
-
"asserts"
|
|
48
|
-
];
|
|
49
|
-
const obj = {
|
|
50
|
-
/* eslint-disable mmkal/@typescript-eslint/no-unsafe-assignment */
|
|
51
|
-
toBeAny: fn,
|
|
52
|
-
toBeUnknown: fn,
|
|
53
|
-
toBeNever: fn,
|
|
54
|
-
toBeFunction: fn,
|
|
55
|
-
toBeObject: fn,
|
|
56
|
-
toBeArray: fn,
|
|
57
|
-
toBeString: fn,
|
|
58
|
-
toBeNumber: fn,
|
|
59
|
-
toBeBoolean: fn,
|
|
60
|
-
toBeVoid: fn,
|
|
61
|
-
toBeSymbol: fn,
|
|
62
|
-
toBeNull: fn,
|
|
63
|
-
toBeUndefined: fn,
|
|
64
|
-
toBeNullable: fn,
|
|
65
|
-
toMatchTypeOf: fn,
|
|
66
|
-
toEqualTypeOf: fn,
|
|
67
|
-
toBeCallableWith: fn,
|
|
68
|
-
toBeConstructibleWith: fn,
|
|
69
|
-
/* eslint-enable mmkal/@typescript-eslint/no-unsafe-assignment */
|
|
70
|
-
extract: exports.expectTypeOf,
|
|
71
|
-
exclude: exports.expectTypeOf,
|
|
72
|
-
toHaveProperty: exports.expectTypeOf,
|
|
73
|
-
parameter: exports.expectTypeOf
|
|
74
|
-
};
|
|
75
|
-
const getterProperties = nonFunctionProperties;
|
|
76
|
-
getterProperties.forEach((prop) => Object.defineProperty(obj, prop, { get: () => (0, exports.expectTypeOf)({}) }));
|
|
77
|
-
return obj;
|
|
78
|
-
};
|
|
79
|
-
exports.expectTypeOf = expectTypeOf2;
|
|
80
|
-
})(dist);
|
|
81
|
-
function noop() {
|
|
82
|
-
}
|
|
83
|
-
const assertType = noop;
|
|
84
|
-
/* @__PURE__ */ Object.freeze({
|
|
85
|
-
__proto__: null,
|
|
86
|
-
afterAll,
|
|
87
|
-
afterEach,
|
|
88
|
-
assert,
|
|
89
|
-
assertType,
|
|
90
|
-
beforeAll,
|
|
91
|
-
beforeEach,
|
|
92
|
-
bench,
|
|
93
|
-
chai,
|
|
94
|
-
createExpect,
|
|
95
|
-
describe,
|
|
96
|
-
expect: globalExpect,
|
|
97
|
-
expectTypeOf: dist.expectTypeOf,
|
|
98
|
-
getRunningMode,
|
|
99
|
-
isFirstRun,
|
|
100
|
-
isWatchMode,
|
|
101
|
-
it,
|
|
102
|
-
onTestFailed,
|
|
103
|
-
runOnce,
|
|
104
|
-
setupChaiConfig,
|
|
105
|
-
should,
|
|
106
|
-
suite,
|
|
107
|
-
test,
|
|
108
|
-
vi,
|
|
109
|
-
vitest
|
|
110
|
-
});
|
|
111
|
-
var expectTypeOf = dist.expectTypeOf;
|
|
112
|
-
describe("restamper", () => {
|
|
113
|
-
beforeEach((context) => {
|
|
114
|
-
const _restamper = restamper();
|
|
115
|
-
Object.defineProperties(context, {
|
|
116
|
-
currentOffset: { value: _restamper().offset, enumerable: true },
|
|
117
|
-
restamper: { value: _restamper, enumerable: true },
|
|
118
|
-
timezone: { value: _restamper.tz, enumerable: true }
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
test("should return restamp instance", ({ restamper: restamper2, timezone }) => {
|
|
122
|
-
const { system: systemTimezone } = timezone;
|
|
123
|
-
const invalidTimezone = "Unknown/Invalid_TZ";
|
|
124
|
-
const validTimezone = "Asia/Tokyo";
|
|
125
|
-
expectTypeOf(restamper2);
|
|
126
|
-
expectTypeOf(restamper2());
|
|
127
|
-
expectTypeOf(restamper2(/* @__PURE__ */ new Date("2012-08-22")));
|
|
128
|
-
expectTypeOf(timezone);
|
|
129
|
-
globalExpect(restamper2).toHaveProperty("tz");
|
|
130
|
-
globalExpect(timezone).toHaveProperty("current");
|
|
131
|
-
globalExpect(timezone).toHaveProperty("system");
|
|
132
|
-
globalExpect(timezone.system).toBeTypeOf("string");
|
|
133
|
-
globalExpect(timezone.current).toBeTypeOf("string");
|
|
134
|
-
globalExpect(timezone.current).toBe(timezone.system);
|
|
135
|
-
restamper2.tz = validTimezone;
|
|
136
|
-
globalExpect(timezone.current).toBe(validTimezone);
|
|
137
|
-
globalExpect(timezone.system).toBe(systemTimezone);
|
|
138
|
-
restamper2.tz = invalidTimezone;
|
|
139
|
-
globalExpect(timezone.current).not.toBe(invalidTimezone);
|
|
140
|
-
globalExpect(timezone.current).toBe(validTimezone);
|
|
141
|
-
globalExpect(timezone.system).toBe(systemTimezone);
|
|
142
|
-
});
|
|
143
|
-
test("should return restamp result for current time (when argument is omitted)", ({ restamper: restamper2 }) => {
|
|
144
|
-
let result = restamper2();
|
|
145
|
-
globalExpect(result).toHaveProperty("formatted");
|
|
146
|
-
globalExpect(result).toHaveProperty("offset");
|
|
147
|
-
globalExpect(result).toHaveProperty("timestamp");
|
|
148
|
-
globalExpect(result.offset).toBeTypeOf("number");
|
|
149
|
-
globalExpect(result.offset).toBe(0);
|
|
150
|
-
globalExpect(result.timestamp).toBeTypeOf("number");
|
|
151
|
-
globalExpect(result.timestamp).toBeCloseTo(Date.now(), -2);
|
|
152
|
-
if (result.formatted !== void 0) {
|
|
153
|
-
globalExpect(result.formatted).toBeTypeOf("string");
|
|
154
|
-
globalExpect(REGEX_TZ_OFFSET.test(result.formatted)).toBe(true);
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
test("should have correct offsets for non-DST timezones for times in the past", ({ restamper: restamper2 }) => {
|
|
158
|
-
const pastDatesMap = getPastDatesMapForEachMonthInYear(restamper2);
|
|
159
|
-
NON_DST_TIMEZONES.forEach((timezoneOffset, timezone) => {
|
|
160
|
-
restamper2.tz = timezone;
|
|
161
|
-
pastDatesMap.forEach((systemTimezoneResult, date) => {
|
|
162
|
-
const result = restamper2(date);
|
|
163
|
-
runTimezoneTestRoutine(timezoneOffset, systemTimezoneResult, result);
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
test("should have correct offsets for DST timezones for times in the past", ({ restamper: restamper2 }) => {
|
|
168
|
-
const pastDatesMap = getPastDatesMapForEachMonthInYear(restamper2);
|
|
169
|
-
DST_TIMEZONES.forEach((timezoneOffsets, timezone) => {
|
|
170
|
-
restamper2.tz = timezone;
|
|
171
|
-
let index = 0;
|
|
172
|
-
for (const [date, systemTimezoneResult] of pastDatesMap) {
|
|
173
|
-
const result = restamper2(date);
|
|
174
|
-
const timezoneOffsetForCurrentTime = timezoneOffsets[index++];
|
|
175
|
-
runTimezoneTestRoutine(timezoneOffsetForCurrentTime, systemTimezoneResult, result);
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const TIMEZONE_PAST_DATES_TEST_ORIGIN_DATE = "2021-12-21 10:53:07 AM";
|
|
2
|
-
const DST_TIMEZONES = /* @__PURE__ */ new Map([
|
|
3
|
-
["America/Toronto", [-300, -300, -240, -240, -240, -240, -240, -240, -240, -240, -300, -300]],
|
|
4
|
-
["Asia/Jerusalem", [120, 120, 120, 180, 180, 180, 180, 180, 180, 180, 120, 120]],
|
|
5
|
-
["Australia/Lord_Howe", [660, 660, 660, 630, 630, 630, 630, 630, 630, 660, 660, 660]],
|
|
6
|
-
["Europe/Lisbon", [0, 0, 0, 60, 60, 60, 60, 60, 60, 60, 0, 0]],
|
|
7
|
-
["Pacific/Chatham", [825, 825, 825, 765, 765, 765, 765, 765, 765, 825, 825, 825]]
|
|
8
|
-
]);
|
|
9
|
-
const NON_DST_TIMEZONES = /* @__PURE__ */ new Map([
|
|
10
|
-
["Africa/Lagos", 60],
|
|
11
|
-
["America/Phoenix", -420],
|
|
12
|
-
["America/Sao_Paulo", -180],
|
|
13
|
-
["Asia/Kabul", 270],
|
|
14
|
-
["Asia/Tokyo", 540],
|
|
15
|
-
["Australia/Eucla", 525]
|
|
16
|
-
]);
|
|
17
|
-
export {
|
|
18
|
-
DST_TIMEZONES,
|
|
19
|
-
NON_DST_TIMEZONES,
|
|
20
|
-
TIMEZONE_PAST_DATES_TEST_ORIGIN_DATE
|
|
21
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { TIMEZONE_PAST_DATES_TEST_ORIGIN_DATE } from "./fixtures.js";
|
|
2
|
-
import { getGMTSuffixForTimezoneOffset, getSystemTimezoneGMTSuffixFromTimezoneOffsets } from "../utils.js";
|
|
3
|
-
import { g as globalExpect } from "../../../../../../vendor-vi.a3ff54b1-5e924357.mjs";
|
|
4
|
-
const getPastDatesMapForEachMonthInYear = (restamper) => {
|
|
5
|
-
const pastDate = new Date(TIMEZONE_PAST_DATES_TEST_ORIGIN_DATE);
|
|
6
|
-
return new Map(
|
|
7
|
-
Array.from({ length: 12 }, () => {
|
|
8
|
-
pastDate.setMonth(pastDate.getMonth() + 1);
|
|
9
|
-
return [pastDate.toISOString(), restamper(pastDate)];
|
|
10
|
-
})
|
|
11
|
-
);
|
|
12
|
-
};
|
|
13
|
-
const runTimezoneTestRoutine = (timezoneOffset, systemTimezoneResult, result) => {
|
|
14
|
-
if (result.formatted !== void 0) {
|
|
15
|
-
const TimezoneGMTSuffix = getGMTSuffixForTimezoneOffset(timezoneOffset);
|
|
16
|
-
globalExpect(result.formatted).toMatch(TimezoneGMTSuffix);
|
|
17
|
-
}
|
|
18
|
-
if (systemTimezoneResult.formatted !== void 0) {
|
|
19
|
-
const SystemTimezoneGMTSuffix = getSystemTimezoneGMTSuffixFromTimezoneOffsets(timezoneOffset, result.offset);
|
|
20
|
-
globalExpect(systemTimezoneResult.formatted).toMatch(SystemTimezoneGMTSuffix);
|
|
21
|
-
}
|
|
22
|
-
globalExpect(result.timestamp).toBe(systemTimezoneResult.timestamp);
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
getPastDatesMapForEachMonthInYear,
|
|
26
|
-
runTimezoneTestRoutine
|
|
27
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { L } from "../../../index-c88cd37e.mjs";
|
|
2
|
-
import { all_locales, ar, cs_CZ, da_DK, de_DE, el_GR, en_US, es_ES, fi_FI, fr_FR, hr_HR, hu_HU, it_IT, ja_JP, ko_KR, nl_NL, no_NO, pl_PL, pt_BR, pt_PT, ro_RO, ru_RU, sk_SK, sl_SI, sv_SE, zh_CN, zh_TW } from "./translations/index.js";
|
|
3
|
-
export {
|
|
4
|
-
all_locales,
|
|
5
|
-
ar,
|
|
6
|
-
cs_CZ,
|
|
7
|
-
da_DK,
|
|
8
|
-
de_DE,
|
|
9
|
-
L as default,
|
|
10
|
-
el_GR,
|
|
11
|
-
en_US,
|
|
12
|
-
es_ES,
|
|
13
|
-
fi_FI,
|
|
14
|
-
fr_FR,
|
|
15
|
-
hr_HR,
|
|
16
|
-
hu_HU,
|
|
17
|
-
it_IT,
|
|
18
|
-
ja_JP,
|
|
19
|
-
ko_KR,
|
|
20
|
-
nl_NL,
|
|
21
|
-
no_NO,
|
|
22
|
-
pl_PL,
|
|
23
|
-
pt_BR,
|
|
24
|
-
pt_PT,
|
|
25
|
-
ro_RO,
|
|
26
|
-
ru_RU,
|
|
27
|
-
sk_SK,
|
|
28
|
-
sl_SI,
|
|
29
|
-
sv_SE,
|
|
30
|
-
zh_CN,
|
|
31
|
-
zh_TW
|
|
32
|
-
};
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { parseLocale, matchLocale, formatLocale, getTranslation, formatCustomTranslations, loadTranslations, interpolateElement } from "./utils.js";
|
|
2
|
-
import { y } from "../../../preact.module-38e5a571.mjs";
|
|
3
|
-
import { SUPPORTED_LOCALES } from "./constants/localization.js";
|
|
4
|
-
import { d as describe, t as test, g as globalExpect } from "../../../vendor-vi.a3ff54b1-5e924357.mjs";
|
|
5
|
-
const defaultSupportedLocales = SUPPORTED_LOCALES;
|
|
6
|
-
describe("parseLocale()", () => {
|
|
7
|
-
test("should return the passed locale if formatted properly", () => {
|
|
8
|
-
globalExpect(parseLocale("en-US", defaultSupportedLocales)).toBe("en-US");
|
|
9
|
-
globalExpect(parseLocale("zh-TW", defaultSupportedLocales)).toBe("zh-TW");
|
|
10
|
-
globalExpect(parseLocale("zh-CN", defaultSupportedLocales)).toBe("zh-CN");
|
|
11
|
-
globalExpect(parseLocale("da-DK", defaultSupportedLocales)).toBe("da-DK");
|
|
12
|
-
});
|
|
13
|
-
test("should return a properly formatted locale if not formatted", () => {
|
|
14
|
-
const locale = "En_us";
|
|
15
|
-
globalExpect(parseLocale(locale, defaultSupportedLocales)).toBe("en-US");
|
|
16
|
-
});
|
|
17
|
-
test("should return a properly formatted locale when a partial locale is sent in", () => {
|
|
18
|
-
const locale = "nl";
|
|
19
|
-
globalExpect(parseLocale(locale, defaultSupportedLocales)).toBe("nl-NL");
|
|
20
|
-
});
|
|
21
|
-
test("should return the FALLBACK_LOCALE when an incorrect locale is sent in", () => {
|
|
22
|
-
globalExpect(parseLocale("default", defaultSupportedLocales)).toBe("en-US");
|
|
23
|
-
globalExpect(parseLocale("english", defaultSupportedLocales)).toBe("en-US");
|
|
24
|
-
globalExpect(parseLocale("spanish", defaultSupportedLocales)).toBe("en-US");
|
|
25
|
-
});
|
|
26
|
-
test("should return FALLBACK_LOCALE when an empty string is send", () => {
|
|
27
|
-
globalExpect(parseLocale("", defaultSupportedLocales)).toBe("en-US");
|
|
28
|
-
});
|
|
29
|
-
test("should return null when a locale is not matched", () => {
|
|
30
|
-
const locale = "xx_XX";
|
|
31
|
-
globalExpect(parseLocale(locale, defaultSupportedLocales)).toBe(null);
|
|
32
|
-
});
|
|
33
|
-
test("should return a formatted locale when called with an underscored locale like en_US", () => {
|
|
34
|
-
const locale = "en_US";
|
|
35
|
-
globalExpect(parseLocale(locale, defaultSupportedLocales)).toBe("en-US");
|
|
36
|
-
});
|
|
37
|
-
test("should return the matched language when called with a non-proper locale like es&ES", () => {
|
|
38
|
-
const locale = "es&ES";
|
|
39
|
-
globalExpect(parseLocale(locale, defaultSupportedLocales)).toBe("es-ES");
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
describe("matchLocale()", () => {
|
|
43
|
-
test("should match a two letter code", () => {
|
|
44
|
-
globalExpect(matchLocale("en", [...defaultSupportedLocales])).toBe("en-US");
|
|
45
|
-
globalExpect(matchLocale("es", [...defaultSupportedLocales])).toBe("es-ES");
|
|
46
|
-
});
|
|
47
|
-
test("should return null if it cannot match the locale", () => {
|
|
48
|
-
globalExpect(matchLocale("ca", [...defaultSupportedLocales])).toBe(null);
|
|
49
|
-
globalExpect(matchLocale("ne", [...defaultSupportedLocales])).toBe(null);
|
|
50
|
-
globalExpect(matchLocale("123", [...defaultSupportedLocales])).toBe(null);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
describe("formatLocale()", () => {
|
|
54
|
-
test("should not do anything if the locale is already formatted", () => {
|
|
55
|
-
globalExpect(formatLocale("en-US")).toBe("en-US");
|
|
56
|
-
globalExpect(formatLocale("es-ES")).toBe("es-ES");
|
|
57
|
-
});
|
|
58
|
-
test("should return null if the locale is missing a part or it is not properly separated", () => {
|
|
59
|
-
globalExpect(formatLocale("en")).toBe(null);
|
|
60
|
-
globalExpect(formatLocale("enUS")).toBe(null);
|
|
61
|
-
});
|
|
62
|
-
test("should return a formatted locale when called with an underscored locale like en_US", () => {
|
|
63
|
-
globalExpect(formatLocale("en_us")).toBe("en-US");
|
|
64
|
-
});
|
|
65
|
-
test("should return a formatted locale when called with a lowercase locale like en-us", () => {
|
|
66
|
-
globalExpect(formatLocale("en-us")).toBe("en-US");
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
describe("getTranslation()", () => {
|
|
70
|
-
const translations = {
|
|
71
|
-
myTranslation: "My translation",
|
|
72
|
-
myTranslation__plural: "My translations",
|
|
73
|
-
myTranslation__2: "My two translations"
|
|
74
|
-
};
|
|
75
|
-
test("should get a translation with a matching key", () => {
|
|
76
|
-
globalExpect(getTranslation(translations, "myTranslation")).toBe("My translation");
|
|
77
|
-
});
|
|
78
|
-
test("should get a translation with values", () => {
|
|
79
|
-
globalExpect(getTranslation({ myTranslation: "My %{type} translation" }, "myTranslation", { values: { type: "custom" } })).toBe(
|
|
80
|
-
"My custom translation"
|
|
81
|
-
);
|
|
82
|
-
});
|
|
83
|
-
test("should get a translation with empty values", () => {
|
|
84
|
-
globalExpect(getTranslation({ myTranslation: "My %{type} translation" }, "myTranslation")).toBe("My translation");
|
|
85
|
-
});
|
|
86
|
-
test("should get a plural translation if available", () => {
|
|
87
|
-
globalExpect(getTranslation(translations, "myTranslation", { count: 3 })).toBe("My translations");
|
|
88
|
-
});
|
|
89
|
-
test("should get a specific count translation if available", () => {
|
|
90
|
-
globalExpect(getTranslation(translations, "myTranslation", { count: 2 })).toBe("My two translations");
|
|
91
|
-
});
|
|
92
|
-
test("should get the default translation if count is not greater than 1", () => {
|
|
93
|
-
globalExpect(getTranslation(translations, "myTranslation", { count: 1 })).toBe("My translation");
|
|
94
|
-
globalExpect(getTranslation(translations, "myTranslation", { count: 0 })).toBe("My translation");
|
|
95
|
-
globalExpect(getTranslation(translations, "myTranslation", { count: -1 })).toBe("My translation");
|
|
96
|
-
});
|
|
97
|
-
test("should get the default translation if count is not provided", () => {
|
|
98
|
-
globalExpect(getTranslation(translations, "myTranslation")).toBe("My translation");
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
describe("formatCustomTranslations()", () => {
|
|
102
|
-
test("should work when no custom translations are passed", () => {
|
|
103
|
-
globalExpect(formatCustomTranslations({}, defaultSupportedLocales)).toEqual({});
|
|
104
|
-
globalExpect(formatCustomTranslations(void 0, defaultSupportedLocales)).toEqual({});
|
|
105
|
-
});
|
|
106
|
-
test("should work when custom translations are already in the defaultSupportedLocales", () => {
|
|
107
|
-
const customTranslations = {
|
|
108
|
-
"en-US": {
|
|
109
|
-
paymentId: "customString"
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
globalExpect(formatCustomTranslations(customTranslations, defaultSupportedLocales)).toEqual(customTranslations);
|
|
113
|
-
});
|
|
114
|
-
test("should work when custom translations contain a partial ", () => {
|
|
115
|
-
const customTranslations = {
|
|
116
|
-
en: {
|
|
117
|
-
paymentId: "customString"
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
const expectedCustomTranslations = {
|
|
121
|
-
"en-US": {
|
|
122
|
-
paymentId: "customString"
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
globalExpect(formatCustomTranslations(customTranslations, defaultSupportedLocales)).toEqual(expectedCustomTranslations);
|
|
126
|
-
});
|
|
127
|
-
test("should format new locales", () => {
|
|
128
|
-
const customTranslations = {
|
|
129
|
-
"es-ar": {
|
|
130
|
-
paymentId: "customString"
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
const expectedCustomTranslations = {
|
|
134
|
-
"es-AR": {
|
|
135
|
-
paymentId: "customString"
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
globalExpect(formatCustomTranslations(customTranslations, defaultSupportedLocales)).toEqual(expectedCustomTranslations);
|
|
139
|
-
});
|
|
140
|
-
test("should format new locales", () => {
|
|
141
|
-
const customTranslations = {
|
|
142
|
-
"ca-ca": {
|
|
143
|
-
paymentId: "customString"
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
const expectedCustomTranslations = {
|
|
147
|
-
"ca-CA": {
|
|
148
|
-
paymentId: "customString"
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
globalExpect(formatCustomTranslations(customTranslations, defaultSupportedLocales)).toEqual(expectedCustomTranslations);
|
|
152
|
-
});
|
|
153
|
-
test("should format new partial locales if properly added in the defaultSupportedLocales", () => {
|
|
154
|
-
const customTranslations = {
|
|
155
|
-
ca: {
|
|
156
|
-
paymentId: "customString"
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
const defaultSupportedLocales2 = ["es-ES", "ca-CA"];
|
|
160
|
-
const expectedCustomTranslations = {
|
|
161
|
-
"ca-CA": {
|
|
162
|
-
paymentId: "customString"
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
globalExpect(formatCustomTranslations(customTranslations, defaultSupportedLocales2)).toEqual(expectedCustomTranslations);
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
describe("loadTranslations()", () => {
|
|
169
|
-
test("should accept customTranslations without a countryCode for default defaultSupportedLocales", () => {
|
|
170
|
-
loadTranslations("es-ES", {
|
|
171
|
-
"es-ES": {
|
|
172
|
-
account: "es-ES account"
|
|
173
|
-
},
|
|
174
|
-
"es-AR": {
|
|
175
|
-
account: "es-AR account"
|
|
176
|
-
}
|
|
177
|
-
}).then((translations) => {
|
|
178
|
-
globalExpect(translations["account"]).toBe("es-ES account");
|
|
179
|
-
});
|
|
180
|
-
});
|
|
181
|
-
test("should return the passed locale if formatted properly", () => {
|
|
182
|
-
loadTranslations(
|
|
183
|
-
"ca-CA",
|
|
184
|
-
{
|
|
185
|
-
"es-ES": {
|
|
186
|
-
paymentId: "paymentId es-ES"
|
|
187
|
-
},
|
|
188
|
-
"ca-CA": {
|
|
189
|
-
paymentId: "paymentId ca-CA"
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
).then((translations) => {
|
|
193
|
-
globalExpect(translations["paymentId"]).toBe("paymentId ca-CA");
|
|
194
|
-
});
|
|
195
|
-
});
|
|
196
|
-
test("should return the passed locale if formatted properly", () => {
|
|
197
|
-
loadTranslations("ca-CA", {
|
|
198
|
-
"ca-CA": {
|
|
199
|
-
"status.active": "status.active ca-CA"
|
|
200
|
-
}
|
|
201
|
-
}).then((translations) => {
|
|
202
|
-
globalExpect(translations["status.active"]).toBe("status.active ca-CA");
|
|
203
|
-
});
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
describe("interpolateElement()", () => {
|
|
207
|
-
test("it should interpolate the element properly", () => {
|
|
208
|
-
const renderLink = (translation) => y("a", { href: "example.com" }, [translation]);
|
|
209
|
-
const result = interpolateElement("By clicking continue %#you%# agree with the %#term and conditions%#", [renderLink, renderLink]);
|
|
210
|
-
globalExpect(typeof result[0] === "string");
|
|
211
|
-
globalExpect(result[1] === "a");
|
|
212
|
-
globalExpect(typeof result[2] === "string");
|
|
213
|
-
globalExpect(result[3] === "a");
|
|
214
|
-
});
|
|
215
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
const processCompleteResponse = (response) => {
|
|
2
|
-
var _a;
|
|
3
|
-
switch ((_a = response.resultCode) == null ? void 0 : _a.toLowerCase()) {
|
|
4
|
-
case "refused":
|
|
5
|
-
case "error":
|
|
6
|
-
case "cancelled":
|
|
7
|
-
return { type: "error", props: { ...response, message: "error.subtitle.refused" } };
|
|
8
|
-
case "unknown":
|
|
9
|
-
return { type: "error", props: { ...response, message: "error.message.unknown" } };
|
|
10
|
-
case "pending":
|
|
11
|
-
case "received":
|
|
12
|
-
return { type: response.resultCode.toLowerCase(), props: response };
|
|
13
|
-
case "authorised":
|
|
14
|
-
return { type: "success", props: response };
|
|
15
|
-
default:
|
|
16
|
-
return { type: "success", props: response };
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
const processResponse = (response) => {
|
|
20
|
-
if (!response.type && response.resultCode) {
|
|
21
|
-
return processCompleteResponse(response);
|
|
22
|
-
}
|
|
23
|
-
if (!response.type) {
|
|
24
|
-
return { type: "error", props: response };
|
|
25
|
-
}
|
|
26
|
-
switch (response.type.toLowerCase()) {
|
|
27
|
-
case "pending":
|
|
28
|
-
return { type: "pending", props: response };
|
|
29
|
-
case "complete":
|
|
30
|
-
return processCompleteResponse(response);
|
|
31
|
-
case "validation":
|
|
32
|
-
return { type: "error", props: response };
|
|
33
|
-
default:
|
|
34
|
-
return { type: "error", props: response };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
export {
|
|
38
|
-
processResponse as default,
|
|
39
|
-
processResponse
|
|
40
|
-
};
|