@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
package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { default as default2 } from "./MultiSelectionFilter.js";
|
|
2
|
-
import { useMultiSelectionFilter, useMultiSelectionFilterWithoutValues } from "./useMultiSelectionFilter/useMultiSelectionFilter.js";
|
|
3
|
-
import { DEFAULT_TRANSACTIONS_OVERVIEW_MULTI_SELECTION_FILTER_PARAMS, TRANSACTIONS_OVERVIEW_MULTI_SELECTION_FILTERS, TRANSACTION_CATEGORIES, TRANSACTION_STATUSES } from "./useMultiSelectionFilter/constants.js";
|
|
4
|
-
import { listFrom, selectionOptionsFor } from "./useMultiSelectionFilter/utils.js";
|
|
5
|
-
export {
|
|
6
|
-
DEFAULT_TRANSACTIONS_OVERVIEW_MULTI_SELECTION_FILTER_PARAMS,
|
|
7
|
-
TRANSACTIONS_OVERVIEW_MULTI_SELECTION_FILTERS,
|
|
8
|
-
TRANSACTION_CATEGORIES,
|
|
9
|
-
TRANSACTION_STATUSES,
|
|
10
|
-
default2 as default,
|
|
11
|
-
listFrom,
|
|
12
|
-
selectionOptionsFor,
|
|
13
|
-
useMultiSelectionFilter,
|
|
14
|
-
useMultiSelectionFilterWithoutValues
|
|
15
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useMultiSelectionFilter, useMultiSelectionFilterWithoutValues } from "./useMultiSelectionFilter.js";
|
|
2
|
-
import { DEFAULT_TRANSACTIONS_OVERVIEW_MULTI_SELECTION_FILTER_PARAMS, TRANSACTIONS_OVERVIEW_MULTI_SELECTION_FILTERS, TRANSACTION_CATEGORIES, TRANSACTION_STATUSES } from "./constants.js";
|
|
3
|
-
import { listFrom, selectionOptionsFor } from "./utils.js";
|
|
4
|
-
export {
|
|
5
|
-
DEFAULT_TRANSACTIONS_OVERVIEW_MULTI_SELECTION_FILTER_PARAMS,
|
|
6
|
-
TRANSACTIONS_OVERVIEW_MULTI_SELECTION_FILTERS,
|
|
7
|
-
TRANSACTION_CATEGORIES,
|
|
8
|
-
TRANSACTION_STATUSES,
|
|
9
|
-
useMultiSelectionFilter as default,
|
|
10
|
-
listFrom,
|
|
11
|
-
selectionOptionsFor,
|
|
12
|
-
useMultiSelectionFilterWithoutValues
|
|
13
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TransactionsElement } from "./TransactionsOverview/TransactionsOverviewElement.js";
|
|
2
|
-
import { T } from "../../../types-e4bbd37f.mjs";
|
|
3
|
-
import { TransactionsElement as TransactionsElement2 } from "./TransactionDetails/TransactionDetails.js";
|
|
4
|
-
export {
|
|
5
|
-
T as TransactionFilterParam,
|
|
6
|
-
TransactionsElement2 as TransactionsDetails,
|
|
7
|
-
TransactionsElement as TransactionsOverview
|
|
8
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import '../../index.css';
|
|
2
|
-
import { TransactionsElement } from "./external/TransactionsOverview/TransactionsOverviewElement.js";
|
|
3
|
-
import { T } from "../../types-e4bbd37f.mjs";
|
|
4
|
-
import { TransactionsElement as TransactionsElement2 } from "./external/TransactionDetails/TransactionDetails.js";
|
|
5
|
-
const index = "";
|
|
6
|
-
const shared = "";
|
|
7
|
-
export {
|
|
8
|
-
T as TransactionFilterParam,
|
|
9
|
-
TransactionsElement2 as TransactionsDetails,
|
|
10
|
-
TransactionsElement as TransactionsOverview
|
|
11
|
-
};
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
var __accessCheck = (obj, member, msg) => {
|
|
2
|
-
if (!member.has(obj))
|
|
3
|
-
throw TypeError("Cannot " + msg);
|
|
4
|
-
};
|
|
5
|
-
var __privateGet = (obj, member, getter) => {
|
|
6
|
-
__accessCheck(obj, member, "read from private field");
|
|
7
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
8
|
-
};
|
|
9
|
-
var __privateAdd = (obj, member, value) => {
|
|
10
|
-
if (member.has(obj))
|
|
11
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
12
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
13
|
-
};
|
|
14
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
15
|
-
__accessCheck(obj, member, "write to private field");
|
|
16
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
17
|
-
return value;
|
|
18
|
-
};
|
|
19
|
-
var __privateMethod = (obj, member, method) => {
|
|
20
|
-
__accessCheck(obj, member, "access private method");
|
|
21
|
-
return method;
|
|
22
|
-
};
|
|
23
|
-
var _currentDayTimestamp, _fromTimestamp, _toTimestamp, _numberOfBlocks, _selectionFromTimestamp, _selectionToTimestamp, _lineWidth, _getBlockTimestampOffsetFromOrigin, getBlockTimestampOffsetFromOrigin_fn, _getStartForTimestamp, getStartForTimestamp_fn, _updateSelectionTimestamps, updateSelectionTimestamps_fn;
|
|
24
|
-
import TimeFrame from "./TimeFrame.js";
|
|
25
|
-
import { computeTimestampOffset, getEdgesDistance } from "../../utils.js";
|
|
26
|
-
import { YEAR_MONTHS } from "../../constants.js";
|
|
27
|
-
import { isInfinite, struct, isBitSafeInteger, structFrom } from "../../../../../../utils/common/index.js";
|
|
28
|
-
import { T as TimeFlag } from "../../../../../../../flags-41c36e13.mjs";
|
|
29
|
-
import { isString } from "../../../../../../utils/validator-utils.js";
|
|
30
|
-
import { immutableProxyHandlers } from "../../../../../../utils/common/constants.js";
|
|
31
|
-
class YearFrame extends TimeFrame {
|
|
32
|
-
constructor() {
|
|
33
|
-
super();
|
|
34
|
-
__privateAdd(this, _getBlockTimestampOffsetFromOrigin);
|
|
35
|
-
__privateAdd(this, _getStartForTimestamp);
|
|
36
|
-
__privateAdd(this, _updateSelectionTimestamps);
|
|
37
|
-
__privateAdd(this, _currentDayTimestamp, void 0);
|
|
38
|
-
__privateAdd(this, _fromTimestamp, -Infinity);
|
|
39
|
-
__privateAdd(this, _toTimestamp, Infinity);
|
|
40
|
-
__privateAdd(this, _numberOfBlocks, Infinity);
|
|
41
|
-
__privateAdd(this, _selectionFromTimestamp, void 0);
|
|
42
|
-
__privateAdd(this, _selectionToTimestamp, void 0);
|
|
43
|
-
__privateAdd(this, _lineWidth, 4);
|
|
44
|
-
this.initialize();
|
|
45
|
-
}
|
|
46
|
-
get fromTimestamp() {
|
|
47
|
-
return __privateGet(this, _fromTimestamp);
|
|
48
|
-
}
|
|
49
|
-
get toTimestamp() {
|
|
50
|
-
return __privateGet(this, _toTimestamp);
|
|
51
|
-
}
|
|
52
|
-
get numberOfBlocks() {
|
|
53
|
-
return __privateGet(this, _numberOfBlocks);
|
|
54
|
-
}
|
|
55
|
-
get currentDayTimestamp() {
|
|
56
|
-
return __privateGet(this, _currentDayTimestamp);
|
|
57
|
-
}
|
|
58
|
-
get rowspan() {
|
|
59
|
-
return __privateGet(this, _lineWidth);
|
|
60
|
-
}
|
|
61
|
-
getCursorBlockOriginTimestampOffset(timestamp) {
|
|
62
|
-
return new Date(timestamp).getMonth();
|
|
63
|
-
}
|
|
64
|
-
getDayOfWeekAtIndex() {
|
|
65
|
-
return void 0;
|
|
66
|
-
}
|
|
67
|
-
getEdgeBlockOffsetsFromOrigin() {
|
|
68
|
-
return [__privateMethod(this, _getBlockTimestampOffsetFromOrigin, getBlockTimestampOffsetFromOrigin_fn).call(this, __privateGet(this, _fromTimestamp)), __privateMethod(this, _getBlockTimestampOffsetFromOrigin, getBlockTimestampOffsetFromOrigin_fn).call(this, __privateGet(this, _toTimestamp))];
|
|
69
|
-
}
|
|
70
|
-
getFormattedDataForBlockCell(time) {
|
|
71
|
-
const date = new Date(time);
|
|
72
|
-
return [date.toLocaleDateString(this.locale, { month: "short" }), date.toISOString().slice(0, 7)];
|
|
73
|
-
}
|
|
74
|
-
getFormattedDataForFrameBlock(time) {
|
|
75
|
-
const date = new Date(time);
|
|
76
|
-
return [date.toLocaleDateString(this.locale, { year: "numeric" }), date.toISOString().slice(0, 7)];
|
|
77
|
-
}
|
|
78
|
-
getFrameBlockAtIndex(index) {
|
|
79
|
-
const startIndex = index * YEAR_MONTHS;
|
|
80
|
-
const endIndex = startIndex + YEAR_MONTHS - 1;
|
|
81
|
-
const numberOfUnits = endIndex - startIndex + 1;
|
|
82
|
-
const sharedStruct = struct({
|
|
83
|
-
from: { value: startIndex },
|
|
84
|
-
to: { value: endIndex },
|
|
85
|
-
units: { value: numberOfUnits }
|
|
86
|
-
});
|
|
87
|
-
const proxyForIndexPropertyAccess = new Proxy(struct(), {
|
|
88
|
-
...immutableProxyHandlers,
|
|
89
|
-
get: (target, property, receiver) => {
|
|
90
|
-
if (isString(property)) {
|
|
91
|
-
const offset = +property;
|
|
92
|
-
if (isBitSafeInteger(offset) && offset >= 0 && offset < numberOfUnits) {
|
|
93
|
-
const index2 = startIndex + offset;
|
|
94
|
-
const timestamp = this.getTimestampAtIndex(index2);
|
|
95
|
-
const lineIndex = index2 % __privateGet(this, _lineWidth);
|
|
96
|
-
let flags = TimeFlag.WITHIN_BLOCK;
|
|
97
|
-
if (index2 === startIndex)
|
|
98
|
-
flags |= TimeFlag.BLOCK_START;
|
|
99
|
-
else if (index2 === endIndex)
|
|
100
|
-
flags |= TimeFlag.BLOCK_END;
|
|
101
|
-
if (lineIndex === 0)
|
|
102
|
-
flags |= TimeFlag.LINE_START;
|
|
103
|
-
else if (lineIndex === __privateGet(this, _lineWidth) - 1)
|
|
104
|
-
flags |= TimeFlag.LINE_END;
|
|
105
|
-
if (index2 === this.cursor)
|
|
106
|
-
flags |= TimeFlag.CURSOR;
|
|
107
|
-
if (timestamp === this.currentDayTimestamp)
|
|
108
|
-
flags |= TimeFlag.CURRENT;
|
|
109
|
-
if (timestamp >= this.fromTimestamp && timestamp <= this.toTimestamp) {
|
|
110
|
-
if (timestamp === this.fromTimestamp)
|
|
111
|
-
flags |= TimeFlag.RANGE_START;
|
|
112
|
-
if (timestamp === this.toTimestamp)
|
|
113
|
-
flags |= TimeFlag.RANGE_END;
|
|
114
|
-
flags |= TimeFlag.WITHIN_RANGE;
|
|
115
|
-
}
|
|
116
|
-
if (timestamp >= __privateGet(this, _selectionFromTimestamp) && timestamp <= __privateGet(this, _selectionToTimestamp)) {
|
|
117
|
-
if (timestamp === __privateGet(this, _selectionFromTimestamp))
|
|
118
|
-
flags |= TimeFlag.SELECTION_START;
|
|
119
|
-
if (timestamp === __privateGet(this, _selectionToTimestamp))
|
|
120
|
-
flags |= TimeFlag.SELECTION_END;
|
|
121
|
-
flags |= TimeFlag.WITHIN_SELECTION;
|
|
122
|
-
}
|
|
123
|
-
return [timestamp, flags];
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return Reflect.get(target, property, receiver);
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
return structFrom(proxyForIndexPropertyAccess, {
|
|
130
|
-
inner: { value: sharedStruct },
|
|
131
|
-
month: { value: 0 },
|
|
132
|
-
outer: { value: sharedStruct },
|
|
133
|
-
year: { value: this.origin + index }
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
getUnitsForFrameBlockAtIndex() {
|
|
137
|
-
return YEAR_MONTHS;
|
|
138
|
-
}
|
|
139
|
-
getUnitsOffsetForTimestamp(startTimestamp, timestamp) {
|
|
140
|
-
const offset = getEdgesDistance(startTimestamp, timestamp);
|
|
141
|
-
return timestamp < startTimestamp ? 0 - offset : offset;
|
|
142
|
-
}
|
|
143
|
-
reoriginate() {
|
|
144
|
-
const date = new Date(this.originTimestamp);
|
|
145
|
-
this.origin = date.getFullYear();
|
|
146
|
-
this.originTimestamp = date.setMonth(0, 1);
|
|
147
|
-
}
|
|
148
|
-
reslice() {
|
|
149
|
-
__privateMethod(this, _updateSelectionTimestamps, updateSelectionTimestamps_fn).call(this);
|
|
150
|
-
__privateSet(this, _fromTimestamp, __privateMethod(this, _getStartForTimestamp, getStartForTimestamp_fn).call(this, super.fromTimestamp));
|
|
151
|
-
__privateSet(this, _toTimestamp, __privateMethod(this, _getStartForTimestamp, getStartForTimestamp_fn).call(this, super.toTimestamp));
|
|
152
|
-
__privateSet(this, _numberOfBlocks, isInfinite(super.numberOfBlocks) ? super.numberOfBlocks : Math.ceil((new Date(super.fromTimestamp).getMonth() + super.numberOfBlocks) / YEAR_MONTHS));
|
|
153
|
-
}
|
|
154
|
-
shiftOrigin(offset) {
|
|
155
|
-
this.originTimestamp = new Date(this.originTimestamp).setFullYear(this.origin + offset);
|
|
156
|
-
this.reoriginate();
|
|
157
|
-
}
|
|
158
|
-
clearSelection() {
|
|
159
|
-
super.clearSelection();
|
|
160
|
-
__privateMethod(this, _updateSelectionTimestamps, updateSelectionTimestamps_fn).call(this);
|
|
161
|
-
this.refreshFrame(true);
|
|
162
|
-
}
|
|
163
|
-
getTimestampAtIndex(indexOffset) {
|
|
164
|
-
return new Date(this.originTimestamp).setMonth(indexOffset);
|
|
165
|
-
}
|
|
166
|
-
updateSelection(time, selection) {
|
|
167
|
-
super.updateSelection(time, selection);
|
|
168
|
-
__privateMethod(this, _updateSelectionTimestamps, updateSelectionTimestamps_fn).call(this);
|
|
169
|
-
this.refreshFrame(true);
|
|
170
|
-
}
|
|
171
|
-
withCurrentDayTimestamp(timestamp) {
|
|
172
|
-
__privateSet(this, _currentDayTimestamp, __privateMethod(this, _getStartForTimestamp, getStartForTimestamp_fn).call(this, timestamp));
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
_currentDayTimestamp = new WeakMap();
|
|
176
|
-
_fromTimestamp = new WeakMap();
|
|
177
|
-
_toTimestamp = new WeakMap();
|
|
178
|
-
_numberOfBlocks = new WeakMap();
|
|
179
|
-
_selectionFromTimestamp = new WeakMap();
|
|
180
|
-
_selectionToTimestamp = new WeakMap();
|
|
181
|
-
_lineWidth = new WeakMap();
|
|
182
|
-
_getBlockTimestampOffsetFromOrigin = new WeakSet();
|
|
183
|
-
getBlockTimestampOffsetFromOrigin_fn = function(timestamp) {
|
|
184
|
-
return isInfinite(timestamp) ? timestamp : new Date(timestamp).getFullYear() - this.origin;
|
|
185
|
-
};
|
|
186
|
-
_getStartForTimestamp = new WeakSet();
|
|
187
|
-
getStartForTimestamp_fn = function(timestamp) {
|
|
188
|
-
return timestamp === void 0 || isInfinite(timestamp) ? timestamp : new Date(timestamp - computeTimestampOffset(timestamp)).setDate(1);
|
|
189
|
-
};
|
|
190
|
-
_updateSelectionTimestamps = new WeakSet();
|
|
191
|
-
updateSelectionTimestamps_fn = function() {
|
|
192
|
-
__privateSet(this, _selectionFromTimestamp, __privateMethod(this, _getStartForTimestamp, getStartForTimestamp_fn).call(this, this.selectionStart));
|
|
193
|
-
__privateSet(this, _selectionToTimestamp, __privateMethod(this, _getStartForTimestamp, getStartForTimestamp_fn).call(this, this.selectionEnd));
|
|
194
|
-
};
|
|
195
|
-
export {
|
|
196
|
-
YearFrame as default
|
|
197
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { default as default2 } from "./frames/MonthFrame.js";
|
|
2
|
-
import { default as default3 } from "./frames/TimeFrame.js";
|
|
3
|
-
import { default as default4 } from "./frames/YearFrame.js";
|
|
4
|
-
export {
|
|
5
|
-
default2 as MonthFrame,
|
|
6
|
-
default3 as TimeFrame,
|
|
7
|
-
default4 as YearFrame
|
|
8
|
-
};
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import "../../../../../core/Localization/datetime/restamper/restamper.js";
|
|
2
|
-
import { SYSTEM_TIMEZONE } from "../../../../../core/Localization/datetime/restamper/constants.js";
|
|
3
|
-
import "../../../../../utils/common/index.js";
|
|
4
|
-
import createRangeTimestampsFactory from "./factory.js";
|
|
5
|
-
import { d as describe, t as test, g as globalExpect } from "../../../../../../vendor-vi.a3ff54b1-5e924357.mjs";
|
|
6
|
-
describe("createRangeTimestampsFactory", () => {
|
|
7
|
-
const DATE_NOW = Date.now();
|
|
8
|
-
const NOW_DATE = new Date(DATE_NOW).getDate();
|
|
9
|
-
const DAY_OFFSETS = Object.freeze([0, 0, 1, 0, 0, 0, -1]);
|
|
10
|
-
const DAY_OFFSETS_INVERTED = Object.freeze(DAY_OFFSETS.map((x) => -x));
|
|
11
|
-
const DAY_START = new Date(DATE_NOW).setHours(0, 0, 0, 0);
|
|
12
|
-
const DAY_END = new Date(DAY_START).setDate(NOW_DATE + 1) - 1;
|
|
13
|
-
const ZONE_OFFSET = new Date(DATE_NOW).getTimezoneOffset();
|
|
14
|
-
(/* @__PURE__ */ new Map([
|
|
15
|
-
["from and to timestamps", { from: DAY_START, to: DAY_END }],
|
|
16
|
-
["from timestamp and offset", { from: DAY_START, offsets: DAY_OFFSETS }],
|
|
17
|
-
["to timestamp and offset", { to: DAY_END, offsets: DAY_OFFSETS }]
|
|
18
|
-
])).forEach((config, description) => {
|
|
19
|
-
test(`should return a range timestamps factory (config => ${description})`, () => {
|
|
20
|
-
const factory = createRangeTimestampsFactory(config);
|
|
21
|
-
const todayTimestamps = factory();
|
|
22
|
-
globalExpect(factory).toBeTypeOf("function");
|
|
23
|
-
globalExpect(factory).toHaveLength(0);
|
|
24
|
-
globalExpect(todayTimestamps).toHaveProperty("from");
|
|
25
|
-
globalExpect(todayTimestamps).toHaveProperty("now");
|
|
26
|
-
globalExpect(todayTimestamps).toHaveProperty("timezone");
|
|
27
|
-
globalExpect(todayTimestamps).toHaveProperty("to");
|
|
28
|
-
globalExpect(todayTimestamps.from).toBeTypeOf("number");
|
|
29
|
-
globalExpect(todayTimestamps.now).toBeTypeOf("number");
|
|
30
|
-
globalExpect(todayTimestamps.timezone).toBeTypeOf("string");
|
|
31
|
-
globalExpect(todayTimestamps.to).toBeTypeOf("number");
|
|
32
|
-
globalExpect(todayTimestamps.from).toBe(DAY_START);
|
|
33
|
-
globalExpect(todayTimestamps.to).toBe(DAY_END);
|
|
34
|
-
globalExpect(todayTimestamps.timezone).toBe(SYSTEM_TIMEZONE);
|
|
35
|
-
globalExpect(todayTimestamps.now).toBeCloseTo(DATE_NOW, -3);
|
|
36
|
-
globalExpect(todayTimestamps.now).not.toBe(DATE_NOW);
|
|
37
|
-
todayTimestamps.now = DATE_NOW;
|
|
38
|
-
globalExpect(todayTimestamps.now).toBe(DATE_NOW);
|
|
39
|
-
todayTimestamps.now = -Infinity;
|
|
40
|
-
globalExpect(todayTimestamps.now).toBe(DATE_NOW);
|
|
41
|
-
todayTimestamps.now = null;
|
|
42
|
-
globalExpect(todayTimestamps.now).not.toBe(DATE_NOW);
|
|
43
|
-
globalExpect(todayTimestamps.now).toBeCloseTo(Date.now(), -3);
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
(/* @__PURE__ */ new Map([
|
|
47
|
-
["from and to timestamps", { from: DAY_END, to: DAY_START }],
|
|
48
|
-
["from timestamp and offset", { from: DAY_END, offsets: DAY_OFFSETS_INVERTED }],
|
|
49
|
-
["to timestamp and offset", { to: DAY_START, offsets: DAY_OFFSETS_INVERTED }]
|
|
50
|
-
])).forEach((config, description) => {
|
|
51
|
-
test(`should correctly order inverted timestamps (config => ${description})`, () => {
|
|
52
|
-
const todayTimestamps = createRangeTimestampsFactory(config)();
|
|
53
|
-
globalExpect(todayTimestamps.from).toBe(DAY_START);
|
|
54
|
-
globalExpect(todayTimestamps.to).toBe(DAY_END);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
test("should return a range timestamps factory with additional context properties", () => {
|
|
58
|
-
const FROM = "FROM";
|
|
59
|
-
const LABEL = "today";
|
|
60
|
-
const additionalContextPropDescriptors = {
|
|
61
|
-
from: { enumerable: true, value: FROM },
|
|
62
|
-
// will be discarded since it conflicts with the from timestamp property
|
|
63
|
-
label: { enumerable: true, value: LABEL },
|
|
64
|
-
offset: { enumerable: true, get: () => (/* @__PURE__ */ new Date()).getTimezoneOffset() }
|
|
65
|
-
};
|
|
66
|
-
const config = { from: DAY_START, to: DAY_END };
|
|
67
|
-
const factory = createRangeTimestampsFactory(config, additionalContextPropDescriptors);
|
|
68
|
-
const todayTimestamps = factory();
|
|
69
|
-
globalExpect(todayTimestamps).toHaveProperty("from");
|
|
70
|
-
globalExpect(todayTimestamps).toHaveProperty("now");
|
|
71
|
-
globalExpect(todayTimestamps).toHaveProperty("timezone");
|
|
72
|
-
globalExpect(todayTimestamps).toHaveProperty("to");
|
|
73
|
-
globalExpect(todayTimestamps).toHaveProperty("label");
|
|
74
|
-
globalExpect(todayTimestamps).toHaveProperty("offset");
|
|
75
|
-
globalExpect(todayTimestamps.from).toBeTypeOf("number");
|
|
76
|
-
globalExpect(todayTimestamps.now).toBeTypeOf("number");
|
|
77
|
-
globalExpect(todayTimestamps.timezone).toBeTypeOf("string");
|
|
78
|
-
globalExpect(todayTimestamps.to).toBeTypeOf("number");
|
|
79
|
-
globalExpect(todayTimestamps.label).toBeTypeOf(typeof LABEL);
|
|
80
|
-
globalExpect(todayTimestamps.offset).toBeTypeOf("number");
|
|
81
|
-
globalExpect(todayTimestamps.from).toBe(DAY_START);
|
|
82
|
-
globalExpect(todayTimestamps.from).not.toBe(FROM);
|
|
83
|
-
globalExpect(todayTimestamps.to).toBe(DAY_END);
|
|
84
|
-
globalExpect(todayTimestamps.timezone).toBe(SYSTEM_TIMEZONE);
|
|
85
|
-
globalExpect(todayTimestamps.label).toBe(LABEL);
|
|
86
|
-
globalExpect(todayTimestamps.offset).toBe(ZONE_OFFSET);
|
|
87
|
-
});
|
|
88
|
-
test("should use correct config context for callable config properties", () => {
|
|
89
|
-
const todayTimestamps = createRangeTimestampsFactory({
|
|
90
|
-
from: DAY_START,
|
|
91
|
-
to: ({ now, systemToTimezone, timezone, timezoneToSystem, timezoneOffset }) => {
|
|
92
|
-
globalExpect(now).toBeTypeOf("number");
|
|
93
|
-
globalExpect(timezone).toBeTypeOf("string");
|
|
94
|
-
globalExpect(systemToTimezone).toBeTypeOf("function");
|
|
95
|
-
globalExpect(timezoneToSystem).toBeTypeOf("function");
|
|
96
|
-
globalExpect(timezoneOffset).toBeTypeOf("function");
|
|
97
|
-
globalExpect(timezone).toBe(SYSTEM_TIMEZONE);
|
|
98
|
-
globalExpect(systemToTimezone(now)).toBeTypeOf("number");
|
|
99
|
-
globalExpect(timezoneToSystem(now)).toBeTypeOf("number");
|
|
100
|
-
globalExpect(timezoneOffset(now)).toBe(0);
|
|
101
|
-
return now;
|
|
102
|
-
}
|
|
103
|
-
})();
|
|
104
|
-
globalExpect(todayTimestamps.from).toBe(DAY_START);
|
|
105
|
-
globalExpect(todayTimestamps.to).toBe(todayTimestamps.now);
|
|
106
|
-
[
|
|
107
|
-
DATE_NOW,
|
|
108
|
-
-Infinity,
|
|
109
|
-
// invalid value (now will be unchanged)
|
|
110
|
-
null
|
|
111
|
-
// reset value (now will be Date.now())
|
|
112
|
-
].forEach((NOW) => {
|
|
113
|
-
todayTimestamps.now = NOW;
|
|
114
|
-
globalExpect(todayTimestamps.from).toBe(DAY_START);
|
|
115
|
-
globalExpect(todayTimestamps.to).toBe(todayTimestamps.now);
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
test("should use config object as `this` binding where possible for callable config properties", () => {
|
|
119
|
-
const todayTimestamps = createRangeTimestampsFactory({
|
|
120
|
-
from(context) {
|
|
121
|
-
return new Date(this.to(context)).setHours(0, 0, 0, 0);
|
|
122
|
-
},
|
|
123
|
-
to: ({ now }) => now
|
|
124
|
-
})();
|
|
125
|
-
globalExpect(todayTimestamps.from).toBe(DAY_START);
|
|
126
|
-
globalExpect(todayTimestamps.to).toBe(todayTimestamps.now);
|
|
127
|
-
[
|
|
128
|
-
DATE_NOW,
|
|
129
|
-
-Infinity,
|
|
130
|
-
// invalid value (now will be unchanged)
|
|
131
|
-
null
|
|
132
|
-
// reset value (now will be Date.now())
|
|
133
|
-
].forEach((NOW) => {
|
|
134
|
-
todayTimestamps.now = NOW;
|
|
135
|
-
globalExpect(todayTimestamps.from).toBe(DAY_START);
|
|
136
|
-
globalExpect(todayTimestamps.to).toBe(todayTimestamps.now);
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { default as default2 } from "./lastMonth.js";
|
|
2
|
-
import { default as default3 } from "./lastNDays.js";
|
|
3
|
-
import { default as default4 } from "./lastWeek.js";
|
|
4
|
-
import { default as default5 } from "./thisMonth.js";
|
|
5
|
-
import { default as default6 } from "./thisWeek.js";
|
|
6
|
-
import { default as default7 } from "./yearToDate.js";
|
|
7
|
-
export {
|
|
8
|
-
default2 as lastMonth,
|
|
9
|
-
default3 as lastNDays,
|
|
10
|
-
default4 as lastWeek,
|
|
11
|
-
default5 as thisMonth,
|
|
12
|
-
default6 as thisWeek,
|
|
13
|
-
default7 as yearToDate
|
|
14
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { getDateRangeContext, TIMEZONE_TESTS_TIMESTAMPS } from "./testing/fixtures.js";
|
|
2
|
-
import { asTimestamp, getMonthDays } from "./testing/helpers.js";
|
|
3
|
-
import lastMonth from "./lastMonth.js";
|
|
4
|
-
import { d as describe, t as test, g as globalExpect } from "../../../../../../../vendor-vi.a3ff54b1-5e924357.mjs";
|
|
5
|
-
describe("last month", () => {
|
|
6
|
-
test("should be previous month", () => {
|
|
7
|
-
const { fromDate, nowDate, toDate } = getDateRangeContext(lastMonth);
|
|
8
|
-
const fromMonth = fromDate.getMonth();
|
|
9
|
-
const fromYear = fromDate.getFullYear();
|
|
10
|
-
const fromMonthDays = getMonthDays(fromMonth, fromYear);
|
|
11
|
-
const nowMonth = nowDate.getMonth();
|
|
12
|
-
const nowYear = nowDate.getFullYear();
|
|
13
|
-
const toMonth = toDate.getMonth();
|
|
14
|
-
const toYear = toDate.getFullYear();
|
|
15
|
-
globalExpect(fromYear).toBe(toYear);
|
|
16
|
-
globalExpect(fromMonth).toBe(toMonth);
|
|
17
|
-
globalExpect(fromDate.getDate()).toBe(1);
|
|
18
|
-
globalExpect(toDate.getDate()).toBe(fromMonthDays);
|
|
19
|
-
if (nowMonth === 0) {
|
|
20
|
-
globalExpect(fromMonth).toBe(11);
|
|
21
|
-
globalExpect(fromYear).toBe(nowYear - 1);
|
|
22
|
-
} else {
|
|
23
|
-
globalExpect(fromMonth).toBe(nowMonth - 1);
|
|
24
|
-
globalExpect(fromYear).toBe(nowYear);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
test("should have precise timestamps", () => {
|
|
28
|
-
const { fromDate, nowDate, from, to } = getDateRangeContext(lastMonth);
|
|
29
|
-
const nowMonth = nowDate.getMonth();
|
|
30
|
-
const fromMonth = fromDate.getMonth();
|
|
31
|
-
const monthAfter = new Date(to + 1).getMonth();
|
|
32
|
-
const monthBefore = new Date(from - 1).getMonth();
|
|
33
|
-
globalExpect(monthAfter).toBe(nowMonth);
|
|
34
|
-
fromMonth === 0 ? globalExpect(monthBefore).toBe(11) : globalExpect(monthBefore).toBe(fromMonth - 1);
|
|
35
|
-
});
|
|
36
|
-
test("should have precise timestamps for timezone", () => {
|
|
37
|
-
const range = getDateRangeContext(lastMonth);
|
|
38
|
-
const { now: initialNow, timezone: initialTimezone } = range;
|
|
39
|
-
const TIMEZONES = /* @__PURE__ */ new Map([
|
|
40
|
-
[
|
|
41
|
-
"America/Toronto",
|
|
42
|
-
[
|
|
43
|
-
asTimestamp(["Mar 1, 2022, 12:00 AM GMT-5", "Mar 31, 2022, 23:59:59.999 GMT-4"]),
|
|
44
|
-
asTimestamp(["Nov 1, 2023, 12:00 AM GMT-4", "Nov 30, 2023, 23:59:59.999 GMT-5"]),
|
|
45
|
-
asTimestamp(["Nov 1, 2023, 12:00 AM GMT-4", "Nov 30, 2023, 23:59:59.999 GMT-5"])
|
|
46
|
-
]
|
|
47
|
-
],
|
|
48
|
-
[
|
|
49
|
-
"Asia/Tokyo",
|
|
50
|
-
[
|
|
51
|
-
asTimestamp(["Mar 1, 2022, 12:00 AM GMT+9", "Mar 31, 2022, 23:59:59.999 GMT+9"]),
|
|
52
|
-
asTimestamp(["Dec 1, 2023, 12:00 AM GMT+9", "Dec 31, 2023, 23:59:59.999 GMT+9"]),
|
|
53
|
-
asTimestamp(["Dec 1, 2023, 12:00 AM GMT+9", "Dec 31, 2023, 23:59:59.999 GMT+9"])
|
|
54
|
-
]
|
|
55
|
-
]
|
|
56
|
-
]);
|
|
57
|
-
TIMEZONES.forEach((timestamps, timezone) => {
|
|
58
|
-
range.timezone = timezone;
|
|
59
|
-
TIMEZONE_TESTS_TIMESTAMPS.forEach((timestamp, index) => {
|
|
60
|
-
const [fromTimestamp, toTimestamp] = timestamps[index];
|
|
61
|
-
range.now = timestamp;
|
|
62
|
-
globalExpect(range.from).toBe(fromTimestamp);
|
|
63
|
-
globalExpect(range.to).toBe(toTimestamp);
|
|
64
|
-
});
|
|
65
|
-
range.now = initialNow;
|
|
66
|
-
range.timezone = initialTimezone;
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
});
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { getDateRangeContext, TIMEZONE_TESTS_TIMESTAMPS } from "./testing/fixtures.js";
|
|
2
|
-
import { asTimestamp } from "./testing/helpers.js";
|
|
3
|
-
import lastNDays, { DEFAULT_NUM_DAYS } from "./lastNDays.js";
|
|
4
|
-
import { d as describe, t as test, g as globalExpect, v as vi } from "../../../../../../../vendor-vi.a3ff54b1-5e924357.mjs";
|
|
5
|
-
describe("last {n} days", () => {
|
|
6
|
-
test("should use normalized (clamped) numberOfDays integer", () => {
|
|
7
|
-
const ABOVE_MAX_VALUES = [10240, 720, 366];
|
|
8
|
-
const BELOW_MIN_VALUES = [-5120, -256, -1, -0, 0];
|
|
9
|
-
const DECIMAL_VALUES = [-3564.456, -37.3671, -1.5, 0.4775, 23.5783, 38858.343];
|
|
10
|
-
const INVALID_VALUES = [NaN, Infinity, -Infinity, () => {
|
|
11
|
-
}, {}, [43]];
|
|
12
|
-
(/* @__PURE__ */ new Map([
|
|
13
|
-
[ABOVE_MAX_VALUES, DEFAULT_NUM_DAYS],
|
|
14
|
-
[BELOW_MIN_VALUES, DEFAULT_NUM_DAYS],
|
|
15
|
-
[DECIMAL_VALUES, DEFAULT_NUM_DAYS],
|
|
16
|
-
[INVALID_VALUES, DEFAULT_NUM_DAYS]
|
|
17
|
-
])).forEach((numberOfDays2, values) => {
|
|
18
|
-
values.forEach((N) => {
|
|
19
|
-
globalExpect(getDateRangeContext(() => lastNDays(N)).numberOfDays).toBe(numberOfDays2);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
const lastNDaysTimestamps = getDateRangeContext(lastNDays);
|
|
24
|
-
const numberOfDays = [
|
|
25
|
-
/* default */
|
|
26
|
-
void 0,
|
|
27
|
-
3,
|
|
28
|
-
7,
|
|
29
|
-
10,
|
|
30
|
-
25,
|
|
31
|
-
100
|
|
32
|
-
];
|
|
33
|
-
test.each(numberOfDays)(`should be {N} days before now day (N => %i)`, (numberOfDaysParam) => {
|
|
34
|
-
lastNDaysTimestamps.numberOfDays = numberOfDaysParam;
|
|
35
|
-
const { numberOfDays: numberOfDays2, fromDate, now } = lastNDaysTimestamps;
|
|
36
|
-
const date = new Date(fromDate);
|
|
37
|
-
const withinLastNDays = vi.fn();
|
|
38
|
-
while (date.getTime() <= now) {
|
|
39
|
-
withinLastNDays();
|
|
40
|
-
date.setDate(date.getDate() + 1);
|
|
41
|
-
}
|
|
42
|
-
globalExpect(withinLastNDays).toHaveBeenCalledTimes(numberOfDays2);
|
|
43
|
-
});
|
|
44
|
-
test.each(numberOfDays)(`should have precise timestamps (N => %i)`, (numberOfDaysParam) => {
|
|
45
|
-
lastNDaysTimestamps.numberOfDays = numberOfDaysParam;
|
|
46
|
-
const { from, fromDate, now, to } = lastNDaysTimestamps;
|
|
47
|
-
const dateBefore = new Date(from - 1);
|
|
48
|
-
globalExpect(to).toBe(now);
|
|
49
|
-
globalExpect(dateBefore.getDay()).toBe((fromDate.getDay() + 6) % 7);
|
|
50
|
-
});
|
|
51
|
-
test("should have precise timestamps for timezone (N => 7)", () => {
|
|
52
|
-
const range = getDateRangeContext(() => lastNDays(7));
|
|
53
|
-
const { now: initialNow, timezone: initialTimezone } = range;
|
|
54
|
-
const TIMEZONES = /* @__PURE__ */ new Map([
|
|
55
|
-
["America/Toronto", asTimestamp(["Apr 9, 2022, 12:00 AM GMT-4", "Dec 25, 2023, 12:00 AM GMT-5", "Dec 25, 2023, 12:00 AM GMT-5"])],
|
|
56
|
-
["Asia/Tokyo", asTimestamp(["Apr 9, 2022, 12:00 AM GMT+9", "Dec 26, 2023, 12:00 AM GMT+9", "Dec 26, 2023, 12:00 AM GMT+9"])]
|
|
57
|
-
]);
|
|
58
|
-
TIMEZONES.forEach((timestamps, timezone) => {
|
|
59
|
-
range.timezone = timezone;
|
|
60
|
-
TIMEZONE_TESTS_TIMESTAMPS.forEach((timestamp, index) => {
|
|
61
|
-
range.now = timestamp;
|
|
62
|
-
globalExpect(range.from).toBe(timestamps[index]);
|
|
63
|
-
globalExpect(range.to).toBe(timestamp);
|
|
64
|
-
});
|
|
65
|
-
range.now = initialNow;
|
|
66
|
-
range.timezone = initialTimezone;
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
});
|