@geotab/zenith 3.16.0-beta.1 → 3.16.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -10
- package/dist/absolute/absolute.js +1 -1
- package/dist/advancedGroupsFilter/advancedGroupsFilter.js +3 -3
- package/dist/advancedGroupsFilter/advancedGroupsFilterForm.js +2 -2
- package/dist/advancedGroupsFilter/advancedGroupsFilterFormSection.js +7 -7
- package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +1 -1
- package/dist/alertRaw/alertRaw.js +1 -1
- package/dist/banner/bannerMultipLine.js +1 -1
- package/dist/banner/bannerSingleLine.js +1 -1
- package/dist/banner/utils/useSummaryBannerProp.js +1 -1
- package/dist/betaPill/betaPill.js +4 -4
- package/dist/bookmark/bookmark.js +2 -2
- package/dist/bulkEditControl/bulkEditControl.js +5 -5
- package/dist/calendar/calendar.js +30 -30
- package/dist/calendar/calendarUtils.js +6 -6
- package/dist/card/card.js +1 -1
- package/dist/chart/accessibleChart/accessibleChartNarrative.js +13 -13
- package/dist/chart/accessibleChart/accessibleChartTable.js +5 -5
- package/dist/chart/accessibleChart/generatePieNarrative.js +6 -6
- package/dist/chart/barChart.js +1 -1
- package/dist/chart/chart.js +1 -1
- package/dist/chart/chartAxis/chartAxis.js +2 -2
- package/dist/chart/lineChart.js +1 -1
- package/dist/chart/pieChart.js +1 -1
- package/dist/chart/plugins/linePlugin/getInterpolatedValue.d.ts +2 -2
- package/dist/chart/plugins/linePlugin/getInterpolatedValue.js +3 -2
- package/dist/chart/plugins/linePlugin/linePlugin.js +2 -1
- package/dist/chart/utils/getFormattedLabel.js +5 -1
- package/dist/checkbox/checkbox.d.ts +2 -1
- package/dist/checkbox/checkbox.js +2 -2
- package/dist/checkboxListWithAction/checkboxListWithAction.js +5 -4
- package/dist/chip/chip.js +1 -1
- package/dist/columnsSelector/columnsSelector.js +2 -2
- package/dist/columnsSelector/columnsTab/columnsTab.js +1 -1
- package/dist/columnsSelector/columnsTabGroup/columnsTabGroup.js +1 -1
- package/dist/commonHelpers/hooks/useTrapFocus.d.ts +0 -9
- package/dist/commonHelpers/hooks/useTrapFocus.js +14 -66
- package/dist/controlledPopup/controlledPopup.d.ts +1 -1
- package/dist/controlledPopup/controlledPopup.js +17 -3
- package/dist/dataFeed/feedExpandControl/feedExpandControl.js +2 -2
- package/dist/dataGrid/columns/checkboxColumn/checkboxCell.d.ts +2 -1
- package/dist/dataGrid/columns/checkboxColumn/checkboxCell.js +1 -1
- package/dist/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.d.ts +4 -2
- package/dist/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.js +10 -1
- package/dist/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +1 -1
- package/dist/dataGrid/dataGrid.js +1 -1
- package/dist/dataGrid/emptySearchList/emptySearchList.js +1 -1
- package/dist/dataGrid/entitiesListActions/actions/columnsListButton.js +1 -1
- package/dist/dataGrid/entitiesListActions/actions/fullscreenButton.js +2 -2
- package/dist/dataGrid/row/row.js +3 -2
- package/dist/dataGrid/withFlexibleColumns/components/columnSettings.js +2 -2
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +1 -1
- package/dist/dataGrid/withFlexibleColumns/withFlexibleColumns.js +1 -1
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +5 -5
- package/dist/dataGrid/withSelectableRows/withSelectableRows.js +77 -16
- package/dist/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +2 -2
- package/dist/dateInputInner/dateInputInner.js +7 -7
- package/dist/dateInputInner/dateInputInnerControlBlock.js +2 -2
- package/dist/dateInputRaw/dateInputRaw.js +3 -3
- package/dist/dateInputRaw/utils/getLabel.js +2 -2
- package/dist/dateRangeInner/dateRangeInner.js +1 -1
- package/dist/dateRangeRaw/dateRangeRaw.js +10 -10
- package/dist/dateRangeRaw/utils/dateRangeUtils.js +17 -17
- package/dist/dateSelectionWrapper/dateSelectionWrapper.js +4 -4
- package/dist/dialog/dialogContent.js +1 -1
- package/dist/dropdown/dropdownTrigger.d.ts +1 -1
- package/dist/dropdownRaw/dropdownList.js +9 -9
- package/dist/dropdownRaw/dropdownPopup.js +3 -3
- package/dist/dropdownRaw/dropdownRaw.js +249 -3
- package/dist/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
- package/dist/dropdownRaw/dropdownSearchableTrigger.js +8 -6
- package/dist/dropdownRaw/dropdownTrigger.d.ts +2 -1
- package/dist/dropdownRaw/dropdownTrigger.js +2 -2
- package/dist/dropdownRaw/types.d.ts +7 -0
- package/dist/favoriteButton/favoriteButton.js +1 -1
- package/dist/fileUpload/components/dropZoneContent.js +4 -4
- package/dist/fileUpload/components/templateDownloadSection.js +1 -1
- package/dist/fileUpload/components/uploadedFilesSection.js +2 -2
- package/dist/fileUpload/fileUpload.js +6 -6
- package/dist/filters/components/filtersContainer.js +3 -3
- package/dist/filters/components/filtersEmptyState.js +2 -2
- package/dist/filters/components/filtersSaveModal.js +5 -5
- package/dist/filters/components/filtersSavedChipComponent.js +11 -11
- package/dist/filters/components/filtersSearchItemData.js +1 -1
- package/dist/filters/components/filtersSearchList.js +9 -9
- package/dist/filters/components/filtersSelect.js +1 -1
- package/dist/filters/components/filtersSelectListItem.js +2 -2
- package/dist/filters/components/filtersSidePanel.js +8 -8
- package/dist/filters/filters.js +4 -3
- package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +18 -18
- package/dist/filtersBar/components/resetComponentButton.js +1 -1
- package/dist/filtersBar/filtersBarActions/filtersBarActions.js +4 -4
- package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +2 -2
- package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +5 -5
- package/dist/filtersBar/filtersContainer/filtersContainer.js +2 -2
- package/dist/formField/hooks/useError.js +3 -3
- package/dist/formGroup/components/reviewListToggle/reviewListToggle.js +2 -2
- package/dist/formGroup/hooks/useToggle.js +1 -1
- package/dist/formLayout/hooks/useError.js +3 -3
- package/dist/formLayout/hooks/useFormButtons.js +3 -3
- package/dist/formSection/hooks/useError.js +3 -3
- package/dist/formStepper/components/formStep.js +1 -1
- package/dist/formStepper/formStepper.js +2 -2
- package/dist/formStepperButtons/formStepperButtons.js +4 -4
- package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +4 -4
- package/dist/groupsFilterRaw/groupsFilterBox.js +3 -3
- package/dist/groupsFilterRaw/groupsFilterCommon.js +2 -2
- package/dist/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +5 -5
- package/dist/groupsFilterRaw/groupsFilterHelper.js +2 -2
- package/dist/groupsFilterRaw/groupsFilterInitialState.js +8 -8
- package/dist/groupsFilterRaw/groupsFilterMenu.js +3 -3
- package/dist/groupsFilterRaw/groupsFilterRaw.js +8 -8
- package/dist/groupsFilterRaw/groupsFilterTrigger.js +2 -2
- package/dist/groupsFilterRaw/groupsHelper.js +22 -22
- package/dist/header/components/collapsedItemsControl/collapsedItemsControl.js +1 -1
- package/dist/header/components/mobileFilterControl/mobileFilterControl.js +1 -1
- package/dist/header/components/mobileSearchControl/mobileSearchControl.js +3 -3
- package/dist/header/headerBack.js +1 -1
- package/dist/index.css +90 -84
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -3
- package/dist/lineChart/lineChart.js +1 -1
- package/dist/lineChartMini/lineChartMini.js +1 -1
- package/dist/list/itemData/itemDataInternal.js +2 -2
- package/dist/list/listItem/listItem.js +2 -2
- package/dist/menu/components/menuErrorItem.js +2 -2
- package/dist/mobileSheet/mobileSheet.js +2 -2
- package/dist/modal/modal.js +1 -1
- package/dist/nav/navFooter/navEditFooter/navEditFooter.js +2 -2
- package/dist/nav/navFooter/navFooter.js +1 -1
- package/dist/nav/navFooter/navFooterAction/navFooterAction.js +1 -1
- package/dist/nav/navHeader/navHeader.js +2 -2
- package/dist/nav/navHeader/navHeaderSearch/navHeaderSearch.js +2 -2
- package/dist/nav/navMobileBar/navMobileBar.js +1 -1
- package/dist/notification/notification.js +1 -1
- package/dist/pagination/paginationArrow.js +2 -2
- package/dist/pagination/paginationText/paginationText.js +1 -1
- package/dist/pill/components/pillNonActionable/pillNonActionable.js +1 -1
- package/dist/pillBox/components/pillBoxItem.js +1 -1
- package/dist/pillBox/pillBox.js +3 -3
- package/dist/pillExpandable/pillExpandable.js +1 -1
- package/dist/pillExpandable/pillExpandableAlignments.js +65 -48
- package/dist/progressIndicator/progressIndicator.d.ts +4 -4
- package/dist/progressIndicator/progressIndicator.js +4 -4
- package/dist/rangeRaw/rangeRaw.js +7 -7
- package/dist/rangeRaw/utils/rangeHelper.js +7 -7
- package/dist/searchInputRaw/searchInputRaw.js +2 -2
- package/dist/selectList/selectList.js +2 -2
- package/dist/skeleton/skeleton.js +1 -1
- package/dist/sortControl/sortControl.js +5 -5
- package/dist/stepperRaw/stepperRaw.js +2 -2
- package/dist/summary/summary.js +2 -2
- package/dist/summaryTile/summaryTile.js +1 -1
- package/dist/table/actions/actionsMenu.js +2 -2
- package/dist/table/detailPanel/detailPanel.js +1 -1
- package/dist/table/detailPanel/detailPanelHeader.js +2 -2
- package/dist/table/flexible/columnSettings.js +2 -2
- package/dist/table/flexible/columnsPopup.js +1 -1
- package/dist/table/nested/useNestedRows.js +2 -2
- package/dist/table/selectable/interfaces.d.ts +9 -13
- package/dist/table/selectable/selectableHeader.js +5 -5
- package/dist/table/selectable/useDragSelection.d.ts +10 -0
- package/dist/table/selectable/useDragSelection.js +139 -0
- package/dist/table/selectable/useSelectableRows.d.ts +2 -2
- package/dist/table/selectable/useSelectableRows.js +61 -51
- package/dist/table/selectable/utils/calculateSelectionState.js +0 -35
- package/dist/table/selectable/utils/getDragSelectionRows.d.ts +15 -0
- package/dist/table/selectable/utils/getDragSelectionRows.js +28 -0
- package/dist/table/selectable/utils/getRangeIds.d.ts +2 -0
- package/dist/table/selectable/utils/getRangeIds.js +21 -0
- package/dist/table/selectable/utils/isRowChecked.js +1 -12
- package/dist/table/sortable/mobileSortControl.js +3 -3
- package/dist/table/sortable/sortableHeader.js +2 -2
- package/dist/table/table.d.ts +4 -0
- package/dist/table/table.js +11 -7
- package/dist/tabs/tabs.js +2 -2
- package/dist/tag/tag.d.ts +3 -2
- package/dist/tag/tag.js +3 -2
- package/dist/timePickerRaw/timePickerRaw.js +7 -7
- package/dist/toastRaw/toastRaw.js +1 -1
- package/dist/toggleButtonRaw/toggleButtonRaw.js +2 -2
- package/dist/tooltip/tooltip.js +5 -2
- package/dist/utils/formatDate.js +37 -37
- package/dist/utils/localization/flipAlignment.js +5 -1
- package/dist/utils/localization/getSupportedLanguage.d.ts +1 -1
- package/dist/utils/localization/getSupportedLanguage.js +8 -2
- package/dist/utils/localization/getTextDirection.js +1 -1
- package/dist/utils/localization/languageContext.d.ts +1 -1
- package/dist/utils/localization/translations/{ar.json → ar-001.json} +54 -53
- package/dist/utils/localization/translationsDictionary.js +1 -1
- package/dist/utils/localization/useRTLAlignment.d.ts +6 -0
- package/dist/utils/localization/useRTLAlignment.js +6 -0
- package/esm/absolute/absolute.js +1 -1
- package/esm/advancedGroupsFilter/advancedGroupsFilter.js +3 -3
- package/esm/advancedGroupsFilter/advancedGroupsFilterForm.js +2 -2
- package/esm/advancedGroupsFilter/advancedGroupsFilterFormSection.js +7 -7
- package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +1 -1
- package/esm/alertRaw/alertRaw.js +1 -1
- package/esm/banner/bannerMultipLine.js +1 -1
- package/esm/banner/bannerSingleLine.js +1 -1
- package/esm/banner/utils/useSummaryBannerProp.js +1 -1
- package/esm/betaPill/betaPill.js +4 -4
- package/esm/bookmark/bookmark.js +2 -2
- package/esm/bulkEditControl/bulkEditControl.js +5 -5
- package/esm/calendar/calendar.js +30 -30
- package/esm/calendar/calendarUtils.js +6 -6
- package/esm/card/card.js +1 -1
- package/esm/chart/accessibleChart/accessibleChartNarrative.js +13 -13
- package/esm/chart/accessibleChart/accessibleChartTable.js +5 -5
- package/esm/chart/accessibleChart/generatePieNarrative.js +6 -6
- package/esm/chart/barChart.js +1 -1
- package/esm/chart/chart.js +1 -1
- package/esm/chart/chartAxis/chartAxis.js +2 -2
- package/esm/chart/lineChart.js +1 -1
- package/esm/chart/pieChart.js +1 -1
- package/esm/chart/plugins/linePlugin/getInterpolatedValue.d.ts +2 -2
- package/esm/chart/plugins/linePlugin/getInterpolatedValue.js +3 -2
- package/esm/chart/plugins/linePlugin/linePlugin.js +2 -1
- package/esm/chart/utils/getFormattedLabel.js +5 -1
- package/esm/checkbox/checkbox.d.ts +2 -1
- package/esm/checkbox/checkbox.js +2 -2
- package/esm/checkboxListWithAction/checkboxListWithAction.js +5 -4
- package/esm/chip/chip.js +1 -1
- package/esm/columnsSelector/columnsSelector.js +2 -2
- package/esm/columnsSelector/columnsTab/columnsTab.js +1 -1
- package/esm/columnsSelector/columnsTabGroup/columnsTabGroup.js +1 -1
- package/esm/commonHelpers/hooks/useTrapFocus.d.ts +0 -9
- package/esm/commonHelpers/hooks/useTrapFocus.js +15 -67
- package/esm/controlledPopup/controlledPopup.d.ts +1 -1
- package/esm/controlledPopup/controlledPopup.js +17 -3
- package/esm/dataFeed/feedExpandControl/feedExpandControl.js +2 -2
- package/esm/dataGrid/columns/checkboxColumn/checkboxCell.d.ts +2 -1
- package/esm/dataGrid/columns/checkboxColumn/checkboxCell.js +1 -1
- package/esm/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.d.ts +4 -2
- package/esm/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.js +10 -1
- package/esm/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +1 -1
- package/esm/dataGrid/dataGrid.js +1 -1
- package/esm/dataGrid/emptySearchList/emptySearchList.js +1 -1
- package/esm/dataGrid/entitiesListActions/actions/columnsListButton.js +1 -1
- package/esm/dataGrid/entitiesListActions/actions/fullscreenButton.js +2 -2
- package/esm/dataGrid/row/row.js +3 -2
- package/esm/dataGrid/withFlexibleColumns/components/columnSettings.js +2 -2
- package/esm/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +1 -1
- package/esm/dataGrid/withFlexibleColumns/withFlexibleColumns.js +1 -1
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +5 -5
- package/esm/dataGrid/withSelectableRows/withSelectableRows.js +77 -16
- package/esm/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +2 -2
- package/esm/dateInputInner/dateInputInner.js +7 -7
- package/esm/dateInputInner/dateInputInnerControlBlock.js +2 -2
- package/esm/dateInputRaw/dateInputRaw.js +3 -3
- package/esm/dateInputRaw/utils/getLabel.js +2 -2
- package/esm/dateRangeInner/dateRangeInner.js +1 -1
- package/esm/dateRangeRaw/dateRangeRaw.js +10 -10
- package/esm/dateRangeRaw/utils/dateRangeUtils.js +17 -17
- package/esm/dateSelectionWrapper/dateSelectionWrapper.js +4 -4
- package/esm/dialog/dialogContent.js +1 -1
- package/esm/dropdown/dropdownTrigger.d.ts +1 -1
- package/esm/dropdownRaw/dropdownList.js +9 -9
- package/esm/dropdownRaw/dropdownPopup.js +3 -3
- package/esm/dropdownRaw/dropdownRaw.js +249 -3
- package/esm/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
- package/esm/dropdownRaw/dropdownSearchableTrigger.js +8 -6
- package/esm/dropdownRaw/dropdownTrigger.d.ts +2 -1
- package/esm/dropdownRaw/dropdownTrigger.js +2 -2
- package/esm/dropdownRaw/types.d.ts +7 -0
- package/esm/favoriteButton/favoriteButton.js +1 -1
- package/esm/fileUpload/components/dropZoneContent.js +4 -4
- package/esm/fileUpload/components/templateDownloadSection.js +1 -1
- package/esm/fileUpload/components/uploadedFilesSection.js +2 -2
- package/esm/fileUpload/fileUpload.js +6 -6
- package/esm/filters/components/filtersContainer.js +3 -3
- package/esm/filters/components/filtersEmptyState.js +2 -2
- package/esm/filters/components/filtersSaveModal.js +5 -5
- package/esm/filters/components/filtersSavedChipComponent.js +11 -11
- package/esm/filters/components/filtersSearchItemData.js +1 -1
- package/esm/filters/components/filtersSearchList.js +9 -9
- package/esm/filters/components/filtersSelect.js +1 -1
- package/esm/filters/components/filtersSelectListItem.js +2 -2
- package/esm/filters/components/filtersSidePanel.js +8 -8
- package/esm/filters/filters.js +4 -3
- package/esm/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +18 -18
- package/esm/filtersBar/components/resetComponentButton.js +1 -1
- package/esm/filtersBar/filtersBarActions/filtersBarActions.js +4 -4
- package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +2 -2
- package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +5 -5
- package/esm/filtersBar/filtersContainer/filtersContainer.js +2 -2
- package/esm/formField/hooks/useError.js +3 -3
- package/esm/formGroup/components/reviewListToggle/reviewListToggle.js +2 -2
- package/esm/formGroup/hooks/useToggle.js +1 -1
- package/esm/formLayout/hooks/useError.js +3 -3
- package/esm/formLayout/hooks/useFormButtons.js +3 -3
- package/esm/formSection/hooks/useError.js +3 -3
- package/esm/formStepper/components/formStep.js +1 -1
- package/esm/formStepper/formStepper.js +2 -2
- package/esm/formStepperButtons/formStepperButtons.js +4 -4
- package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +4 -4
- package/esm/groupsFilterRaw/groupsFilterBox.js +3 -3
- package/esm/groupsFilterRaw/groupsFilterCommon.js +2 -2
- package/esm/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +5 -5
- package/esm/groupsFilterRaw/groupsFilterHelper.js +2 -2
- package/esm/groupsFilterRaw/groupsFilterInitialState.js +8 -8
- package/esm/groupsFilterRaw/groupsFilterMenu.js +3 -3
- package/esm/groupsFilterRaw/groupsFilterRaw.js +8 -8
- package/esm/groupsFilterRaw/groupsFilterTrigger.js +2 -2
- package/esm/groupsFilterRaw/groupsHelper.js +22 -22
- package/esm/header/components/collapsedItemsControl/collapsedItemsControl.js +1 -1
- package/esm/header/components/mobileFilterControl/mobileFilterControl.js +1 -1
- package/esm/header/components/mobileSearchControl/mobileSearchControl.js +3 -3
- package/esm/header/headerBack.js +1 -1
- package/esm/index.d.ts +3 -0
- package/esm/index.js +2 -0
- package/esm/lineChart/lineChart.js +1 -1
- package/esm/lineChartMini/lineChartMini.js +1 -1
- package/esm/list/itemData/itemDataInternal.js +2 -2
- package/esm/list/listItem/listItem.js +2 -2
- package/esm/menu/components/menuErrorItem.js +2 -2
- package/esm/mobileSheet/mobileSheet.js +2 -2
- package/esm/modal/modal.js +1 -1
- package/esm/nav/navFooter/navEditFooter/navEditFooter.js +2 -2
- package/esm/nav/navFooter/navFooter.js +1 -1
- package/esm/nav/navFooter/navFooterAction/navFooterAction.js +1 -1
- package/esm/nav/navHeader/navHeader.js +2 -2
- package/esm/nav/navHeader/navHeaderSearch/navHeaderSearch.js +2 -2
- package/esm/nav/navMobileBar/navMobileBar.js +1 -1
- package/esm/notification/notification.js +1 -1
- package/esm/pagination/paginationArrow.js +2 -2
- package/esm/pagination/paginationText/paginationText.js +1 -1
- package/esm/pill/components/pillNonActionable/pillNonActionable.js +1 -1
- package/esm/pillBox/components/pillBoxItem.js +1 -1
- package/esm/pillBox/pillBox.js +3 -3
- package/esm/pillExpandable/pillExpandable.js +1 -1
- package/esm/pillExpandable/pillExpandableAlignments.js +65 -48
- package/esm/progressIndicator/progressIndicator.d.ts +4 -4
- package/esm/progressIndicator/progressIndicator.js +4 -4
- package/esm/rangeRaw/rangeRaw.js +7 -7
- package/esm/rangeRaw/utils/rangeHelper.js +7 -7
- package/esm/searchInputRaw/searchInputRaw.js +2 -2
- package/esm/selectList/selectList.js +2 -2
- package/esm/skeleton/skeleton.js +1 -1
- package/esm/sortControl/sortControl.js +5 -5
- package/esm/stepperRaw/stepperRaw.js +2 -2
- package/esm/summary/summary.js +2 -2
- package/esm/summaryTile/summaryTile.js +1 -1
- package/esm/table/actions/actionsMenu.js +2 -2
- package/esm/table/detailPanel/detailPanel.js +1 -1
- package/esm/table/detailPanel/detailPanelHeader.js +2 -2
- package/esm/table/flexible/columnSettings.js +2 -2
- package/esm/table/flexible/columnsPopup.js +1 -1
- package/esm/table/nested/useNestedRows.js +2 -2
- package/esm/table/selectable/interfaces.d.ts +9 -13
- package/esm/table/selectable/selectableHeader.js +5 -5
- package/esm/table/selectable/useDragSelection.d.ts +10 -0
- package/esm/table/selectable/useDragSelection.js +135 -0
- package/esm/table/selectable/useSelectableRows.d.ts +2 -2
- package/esm/table/selectable/useSelectableRows.js +61 -51
- package/esm/table/selectable/utils/calculateSelectionState.js +0 -35
- package/esm/table/selectable/utils/getDragSelectionRows.d.ts +15 -0
- package/esm/table/selectable/utils/getDragSelectionRows.js +24 -0
- package/esm/table/selectable/utils/getRangeIds.d.ts +2 -0
- package/esm/table/selectable/utils/getRangeIds.js +17 -0
- package/esm/table/selectable/utils/isRowChecked.js +1 -12
- package/esm/table/sortable/mobileSortControl.js +3 -3
- package/esm/table/sortable/sortableHeader.js +2 -2
- package/esm/table/table.d.ts +4 -0
- package/esm/table/table.js +10 -6
- package/esm/tabs/tabs.js +2 -2
- package/esm/tag/tag.d.ts +3 -2
- package/esm/tag/tag.js +3 -2
- package/esm/timePickerRaw/timePickerRaw.js +7 -7
- package/esm/toastRaw/toastRaw.js +1 -1
- package/esm/toggleButtonRaw/toggleButtonRaw.js +2 -2
- package/esm/tooltip/tooltip.js +5 -2
- package/esm/utils/formatDate.js +37 -37
- package/esm/utils/localization/flipAlignment.js +5 -1
- package/esm/utils/localization/getSupportedLanguage.d.ts +1 -1
- package/esm/utils/localization/getSupportedLanguage.js +8 -2
- package/esm/utils/localization/getTextDirection.js +1 -1
- package/esm/utils/localization/languageContext.d.ts +1 -1
- package/esm/utils/localization/translations/{ar.json → ar-001.json} +54 -53
- package/esm/utils/localization/translationsDictionary.js +1 -1
- package/esm/utils/localization/useRTLAlignment.d.ts +6 -0
- package/esm/utils/localization/useRTLAlignment.js +6 -0
- package/package.json +1 -1
|
@@ -34,7 +34,7 @@ injectString("tr", "Today", "Bug\xFCn");
|
|
|
34
34
|
injectString("zh-Hans", "Today", "\u4ECA\u65E5");
|
|
35
35
|
injectString("zh-TW", "Today", "\u4ECA\u5929");
|
|
36
36
|
injectString("ro-RO", "Today", "Ast\u0103zi");
|
|
37
|
-
injectString("ar", "Today", "\u0627\u0644\u064A\u0648\u0645");
|
|
37
|
+
injectString("ar-001", "Today", "\u0627\u0644\u064A\u0648\u0645");
|
|
38
38
|
injectString("lt-LT", "Today", "\u0160iandien");
|
|
39
39
|
injectString("lv-LV", "Today", "\u0160odien");
|
|
40
40
|
injectString("ka-GE", "Today", "\u10D3\u10E6\u10D4\u10E1");
|
|
@@ -67,7 +67,7 @@ injectString("tr", "Yesterday", "D\xFCn");
|
|
|
67
67
|
injectString("zh-Hans", "Yesterday", "\u6628\u5929");
|
|
68
68
|
injectString("zh-TW", "Yesterday", "\u6628\u5929");
|
|
69
69
|
injectString("ro-RO", "Yesterday", "Ieri");
|
|
70
|
-
injectString("ar", "Yesterday", "\u0623\u0645\u0633");
|
|
70
|
+
injectString("ar-001", "Yesterday", "\u0623\u0645\u0633");
|
|
71
71
|
injectString("lt-LT", "Yesterday", "Vakar");
|
|
72
72
|
injectString("lv-LV", "Yesterday", "Vakar");
|
|
73
73
|
injectString("ka-GE", "Yesterday", "\u10D2\u10E3\u10E8\u10D8\u10DC");
|
|
@@ -100,7 +100,7 @@ injectString("tr", "This week", "Bu hafta");
|
|
|
100
100
|
injectString("zh-Hans", "This week", "\u672C\u5468");
|
|
101
101
|
injectString("zh-TW", "This week", "\u672C\u9031");
|
|
102
102
|
injectString("ro-RO", "This week", "S\u0103pt\u0103m\xE2na aceasta");
|
|
103
|
-
injectString("ar", "This week", "\u0647\u0630\u0627 \u0627\u0644\u0623\u0633\u0628\u0648\u0639");
|
|
103
|
+
injectString("ar-001", "This week", "\u0647\u0630\u0627 \u0627\u0644\u0623\u0633\u0628\u0648\u0639");
|
|
104
104
|
injectString("lt-LT", "This week", "\u0160i\u0105 savait\u0119");
|
|
105
105
|
injectString("lv-LV", "This week", "\u0160aj\u0101 ned\u0113\u013C\u0101");
|
|
106
106
|
injectString("ka-GE", "This week", "\u10D0\u10DB \u10D9\u10D5\u10D8\u10E0\u10D0\u10E8\u10D8");
|
|
@@ -133,7 +133,7 @@ injectString("tr", "Next week", "Gelecek hafta");
|
|
|
133
133
|
injectString("zh-Hans", "Next week", "\u4E0B\u5468");
|
|
134
134
|
injectString("zh-TW", "Next week", "\u4E0B\u9031");
|
|
135
135
|
injectString("ro-RO", "Next week", "S\u0103pt\u0103m\xE2na viitoare");
|
|
136
|
-
injectString("ar", "Next week", "\u0627\u0644\u0623\u0633\u0628\u0648\u0639 \u0627\u0644\u0642\u0627\u062F\u0645");
|
|
136
|
+
injectString("ar-001", "Next week", "\u0627\u0644\u0623\u0633\u0628\u0648\u0639 \u0627\u0644\u0642\u0627\u062F\u0645");
|
|
137
137
|
injectString("lt-LT", "Next week", "Kit\u0105 savait\u0119");
|
|
138
138
|
injectString("lv-LV", "Next week", "N\u0101kamaj\u0101 ned\u0113\u013C\u0101");
|
|
139
139
|
injectString("ka-GE", "Next week", "\u10DB\u10DD\u10DB\u10D3\u10D4\u10D5\u10DC\u10DD \u10D9\u10D5\u10D8\u10E0\u10D0\u10E8\u10D8");
|
|
@@ -166,7 +166,7 @@ injectString("tr", "Last week", "Ge\xE7en hafta");
|
|
|
166
166
|
injectString("zh-Hans", "Last week", "\u4E0A\u5468");
|
|
167
167
|
injectString("zh-TW", "Last week", "\u4E0A\u9031");
|
|
168
168
|
injectString("ro-RO", "Last week", "S\u0103pt\u0103m\xE2na trecut\u0103");
|
|
169
|
-
injectString("ar", "Last week", "\u0627\u0644\u0623\u0633\u0628\u0648\u0639 \u0627\u0644\u0645\u0627\u0636\u064A");
|
|
169
|
+
injectString("ar-001", "Last week", "\u0627\u0644\u0623\u0633\u0628\u0648\u0639 \u0627\u0644\u0645\u0627\u0636\u064A");
|
|
170
170
|
injectString("lt-LT", "Last week", "Pra\u0117jusi\u0105 savait\u0119");
|
|
171
171
|
injectString("lv-LV", "Last week", "Pag\u0101ju\u0161aj\u0101 ned\u0113\u013C\u0101");
|
|
172
172
|
injectString("ka-GE", "Last week", "\u10D2\u10D0\u10E1\u10E3\u10DA \u10D9\u10D5\u10D8\u10E0\u10D0\u10E8\u10D8");
|
|
@@ -199,7 +199,7 @@ injectString("tr", "This month", "Bu ay");
|
|
|
199
199
|
injectString("zh-Hans", "This month", "\u672C\u6708");
|
|
200
200
|
injectString("zh-TW", "This month", "\u672C\u6708");
|
|
201
201
|
injectString("ro-RO", "This month", "Luna aceasta");
|
|
202
|
-
injectString("ar", "This month", "\u0647\u0630\u0627 \u0627\u0644\u0634\u0647\u0631");
|
|
202
|
+
injectString("ar-001", "This month", "\u0647\u0630\u0627 \u0627\u0644\u0634\u0647\u0631");
|
|
203
203
|
injectString("lt-LT", "This month", "\u0160\u012F m\u0117nes\u012F");
|
|
204
204
|
injectString("lv-LV", "This month", "\u0160aj\u0101 m\u0113nes\u012B");
|
|
205
205
|
injectString("ka-GE", "This month", "\u10D0\u10DB \u10D7\u10D5\u10D4\u10E8\u10D8");
|
|
@@ -232,7 +232,7 @@ injectString("tr", "Next month", "Gelecek ay");
|
|
|
232
232
|
injectString("zh-Hans", "Next month", "\u4E0B\u6708");
|
|
233
233
|
injectString("zh-TW", "Next month", "\u4E0B\u500B\u6708");
|
|
234
234
|
injectString("ro-RO", "Next month", "Luna urm\u0103toare");
|
|
235
|
-
injectString("ar", "Next month", "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u062A\u0627\u0644\u064A");
|
|
235
|
+
injectString("ar-001", "Next month", "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u062A\u0627\u0644\u064A");
|
|
236
236
|
injectString("lt-LT", "Next month", "Kitas m\u0117nuo");
|
|
237
237
|
injectString("lv-LV", "Next month", "N\u0101kamais m\u0113nesis");
|
|
238
238
|
injectString("ka-GE", "Next month", "\u10E8\u10D4\u10DB\u10D3\u10D4\u10D2\u10D8 \u10D7\u10D5\u10D4");
|
|
@@ -265,7 +265,7 @@ injectString("tr", "Last month", "Ge\xE7en ay");
|
|
|
265
265
|
injectString("zh-Hans", "Last month", "\u4E0A\u4E2A\u6708");
|
|
266
266
|
injectString("zh-TW", "Last month", "\u4E0A\u500B\u6708");
|
|
267
267
|
injectString("ro-RO", "Last month", "Luna trecut\u0103");
|
|
268
|
-
injectString("ar", "Last month", "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0645\u0627\u0636\u064A");
|
|
268
|
+
injectString("ar-001", "Last month", "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0645\u0627\u0636\u064A");
|
|
269
269
|
injectString("lt-LT", "Last month", "Pra\u0117jus\u012F m\u0117nes\u012F");
|
|
270
270
|
injectString("lv-LV", "Last month", "Pag\u0101ju\u0161aj\u0101 m\u0113nes\u012B");
|
|
271
271
|
injectString("ka-GE", "Last month", "\u10D2\u10D0\u10E1\u10E3\u10DA \u10D7\u10D5\u10D4\u10E8\u10D8");
|
|
@@ -298,7 +298,7 @@ injectString("tr", "Last 7 days", "Son 7 g\xFCn");
|
|
|
298
298
|
injectString("zh-Hans", "Last 7 days", "\u6700\u8FD1 7 \u5929");
|
|
299
299
|
injectString("zh-TW", "Last 7 days", "\u904E\u53BB 7 \u5929");
|
|
300
300
|
injectString("ro-RO", "Last 7 days", "Ultimele 7 zile");
|
|
301
|
-
injectString("ar", "Last 7 days", "\u0622\u062E\u0631 7 \u0623\u064A\u0627\u0645");
|
|
301
|
+
injectString("ar-001", "Last 7 days", "\u0622\u062E\u0631 7 \u0623\u064A\u0627\u0645");
|
|
302
302
|
injectString("lt-LT", "Last 7 days", "Paskutin\u0117s 7 dienos");
|
|
303
303
|
injectString("lv-LV", "Last 7 days", "P\u0113d\u0113j\u0101s 7 dienas");
|
|
304
304
|
injectString("ka-GE", "Last 7 days", "\u10D1\u10DD\u10DA\u10DD 7 \u10D3\u10E6\u10D4");
|
|
@@ -331,7 +331,7 @@ injectString("tr", "Last 30 days", "Son 30 g\xFCn");
|
|
|
331
331
|
injectString("zh-Hans", "Last 30 days", "\u6700\u8FD1 30 \u5929");
|
|
332
332
|
injectString("zh-TW", "Last 30 days", "\u904E\u53BB 30 \u5929");
|
|
333
333
|
injectString("ro-RO", "Last 30 days", "Ultimele 30 de zile");
|
|
334
|
-
injectString("ar", "Last 30 days", "\u0622\u062E\u0631 30 \u064A\u0648\u0645\u064B\u0627");
|
|
334
|
+
injectString("ar-001", "Last 30 days", "\u0622\u062E\u0631 30 \u064A\u0648\u0645\u064B\u0627");
|
|
335
335
|
injectString("lt-LT", "Last 30 days", "Paskutin\u0117s 30 dien\u0173");
|
|
336
336
|
injectString("lv-LV", "Last 30 days", "P\u0113d\u0113j\u0101s 30 dienas");
|
|
337
337
|
injectString("ka-GE", "Last 30 days", "\u10D1\u10DD\u10DA\u10DD 30 \u10D3\u10E6\u10D4");
|
|
@@ -364,7 +364,7 @@ injectString("tr", "Year to date", "Y\u0131lba\u015F\u0131ndan bug\xFCne kadar")
|
|
|
364
364
|
injectString("zh-Hans", "Year to date", "\u5E74\u521D\u81F3\u4ECA");
|
|
365
365
|
injectString("zh-TW", "Year to date", "\u5E74\u521D\u81F3\u4ECA");
|
|
366
366
|
injectString("ro-RO", "Year to date", "P\xE2n\u0103 \xEEn prezent");
|
|
367
|
-
injectString("ar", "Year to date", "\u0645\u0646\u0630 \u0628\u062F\u0627\u064A\u0629 \u0627\u0644\u0639\u0627\u0645 \u062D\u062A\u0649 \u0627\u0644\u064A\u0648\u0645");
|
|
367
|
+
injectString("ar-001", "Year to date", "\u0645\u0646\u0630 \u0628\u062F\u0627\u064A\u0629 \u0627\u0644\u0639\u0627\u0645 \u062D\u062A\u0649 \u0627\u0644\u064A\u0648\u0645");
|
|
368
368
|
injectString("lt-LT", "Year to date", "Nuo met\u0173 prad\u017Eios");
|
|
369
369
|
injectString("lv-LV", "Year to date", "No gada s\u0101kuma");
|
|
370
370
|
injectString("ka-GE", "Year to date", "\u10EC\u10DA\u10D8\u10E1 \u10D3\u10D0\u10E1\u10D0\u10EC\u10E7\u10D8\u10E1\u10D8\u10D3\u10D0\u10DC");
|
|
@@ -397,7 +397,7 @@ injectString("tr", "Last 12 months", "Son 12 ay");
|
|
|
397
397
|
injectString("zh-Hans", "Last 12 months", "\u6700\u8FD1 12 \u4E2A\u6708");
|
|
398
398
|
injectString("zh-TW", "Last 12 months", "\u904E\u53BB 12 \u500B\u6708");
|
|
399
399
|
injectString("ro-RO", "Last 12 months", "Ultimele 12 luni");
|
|
400
|
-
injectString("ar", "Last 12 months", "\u0622\u062E\u0631 12 \u0634\u0647\u0631\u064B\u0627");
|
|
400
|
+
injectString("ar-001", "Last 12 months", "\u0622\u062E\u0631 12 \u0634\u0647\u0631\u064B\u0627");
|
|
401
401
|
injectString("lt-LT", "Last 12 months", "Paskutiniai 12 m\u0117nesi\u0173");
|
|
402
402
|
injectString("lv-LV", "Last 12 months", "P\u0113d\u0113jie 12 m\u0113ne\u0161i");
|
|
403
403
|
injectString("ka-GE", "Last 12 months", "\u10D1\u10DD\u10DA\u10DD 12 \u10D7\u10D5\u10D4");
|
|
@@ -430,7 +430,7 @@ injectString("tr", "Last 3 months", "Son 3 ay");
|
|
|
430
430
|
injectString("zh-Hans", "Last 3 months", "\u6700\u8FD1 3 \u4E2A\u6708");
|
|
431
431
|
injectString("zh-TW", "Last 3 months", "\u904E\u53BB 3 \u500B\u6708");
|
|
432
432
|
injectString("ro-RO", "Last 3 months", "Ultimele 3 luni");
|
|
433
|
-
injectString("ar", "Last 3 months", "\u0622\u062E\u0631 3 \u0623\u0634\u0647\u0631");
|
|
433
|
+
injectString("ar-001", "Last 3 months", "\u0622\u062E\u0631 3 \u0623\u0634\u0647\u0631");
|
|
434
434
|
injectString("lt-LT", "Last 3 months", "Paskutiniai 3 m\u0117nesiai");
|
|
435
435
|
injectString("lv-LV", "Last 3 months", "P\u0113d\u0113jie 3 m\u0113ne\u0161i");
|
|
436
436
|
injectString("ka-GE", "Last 3 months", "\u10D1\u10DD\u10DA\u10DD 3 \u10D7\u10D5\u10D4");
|
|
@@ -463,7 +463,7 @@ injectString("tr", "Last quarter", "Son \xE7eyrek");
|
|
|
463
463
|
injectString("zh-Hans", "Last quarter", "\u4E0A\u4E00\u5B63\u5EA6");
|
|
464
464
|
injectString("zh-TW", "Last quarter", "\u4E0A\u4E00\u5B63");
|
|
465
465
|
injectString("ro-RO", "Last quarter", "Ultimul trimestru");
|
|
466
|
-
injectString("ar", "Last quarter", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0645\u0627\u0636\u064A");
|
|
466
|
+
injectString("ar-001", "Last quarter", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0645\u0627\u0636\u064A");
|
|
467
467
|
injectString("lt-LT", "Last quarter", "Paskutinis ketvirtis");
|
|
468
468
|
injectString("lv-LV", "Last quarter", "P\u0113d\u0113jais ceturksnis");
|
|
469
469
|
injectString("ka-GE", "Last quarter", "\u10D1\u10DD\u10DA\u10DD \u10D9\u10D5\u10D0\u10E0\u10E2\u10D0\u10DA\u10D8");
|
|
@@ -496,7 +496,7 @@ injectString("tr", "This quarter", "Bu \xE7eyrek");
|
|
|
496
496
|
injectString("zh-Hans", "This quarter", "\u672C\u5B63\u5EA6");
|
|
497
497
|
injectString("zh-TW", "This quarter", "\u672C\u5B63");
|
|
498
498
|
injectString("ro-RO", "This quarter", "Trimestrul acesta");
|
|
499
|
-
injectString("ar", "This quarter", "\u0647\u0630\u0627 \u0627\u0644\u0631\u0628\u0639");
|
|
499
|
+
injectString("ar-001", "This quarter", "\u0647\u0630\u0627 \u0627\u0644\u0631\u0628\u0639");
|
|
500
500
|
injectString("lt-LT", "This quarter", "\u0160is ketvirtis");
|
|
501
501
|
injectString("lv-LV", "This quarter", "\u0160is ceturksnis");
|
|
502
502
|
injectString("ka-GE", "This quarter", "\u10D4\u10E1 \u10D9\u10D5\u10D0\u10E0\u10E2\u10D0\u10DA\u10D8");
|
|
@@ -529,7 +529,7 @@ injectString("tr", "Last year", "Ge\xE7en y\u0131l");
|
|
|
529
529
|
injectString("zh-Hans", "Last year", "\u53BB\u5E74");
|
|
530
530
|
injectString("zh-TW", "Last year", "\u53BB\u5E74");
|
|
531
531
|
injectString("ro-RO", "Last year", "Anul trecut");
|
|
532
|
-
injectString("ar", "Last year", "\u0627\u0644\u0639\u0627\u0645 \u0627\u0644\u0645\u0627\u0636\u064A");
|
|
532
|
+
injectString("ar-001", "Last year", "\u0627\u0644\u0639\u0627\u0645 \u0627\u0644\u0645\u0627\u0636\u064A");
|
|
533
533
|
injectString("lt-LT", "Last year", "Pra\u0117jusiais metais");
|
|
534
534
|
injectString("lv-LV", "Last year", "Pag\u0101ju\u0161aj\u0101 gad\u0101");
|
|
535
535
|
injectString("ka-GE", "Last year", "\u10D2\u10D0\u10E1\u10E3\u10DA \u10EC\u10D4\u10DA\u10E1");
|
|
@@ -562,7 +562,7 @@ injectString("tr", "This year", "Bu y\u0131l");
|
|
|
562
562
|
injectString("zh-Hans", "This year", "\u4ECA\u5E74");
|
|
563
563
|
injectString("zh-TW", "This year", "\u4ECA\u5E74");
|
|
564
564
|
injectString("ro-RO", "This year", "Anul acesta");
|
|
565
|
-
injectString("ar", "This year", "\u0647\u0630\u0627 \u0627\u0644\u0639\u0627\u0645");
|
|
565
|
+
injectString("ar-001", "This year", "\u0647\u0630\u0627 \u0627\u0644\u0639\u0627\u0645");
|
|
566
566
|
injectString("lt-LT", "This year", "\u0160iais metais");
|
|
567
567
|
injectString("lv-LV", "This year", "\u0160aj\u0101 gad\u0101");
|
|
568
568
|
injectString("ka-GE", "This year", "\u10D0\u10DB \u10EC\u10D4\u10DA\u10E1");
|
|
@@ -34,7 +34,7 @@ injectString("tr", "Cancel", "\u0130ptal");
|
|
|
34
34
|
injectString("zh-Hans", "Cancel", "\u53D6\u6D88");
|
|
35
35
|
injectString("zh-TW", "Cancel", "\u53D6\u6D88");
|
|
36
36
|
injectString("ro-RO", "Cancel", "Anula\u021Bi");
|
|
37
|
-
injectString("ar", "Cancel", "\u0625\u0644\u063A\u0627\u0621");
|
|
37
|
+
injectString("ar-001", "Cancel", "\u0625\u0644\u063A\u0627\u0621");
|
|
38
38
|
injectString("lt-LT", "Cancel", "At\u0161aukti");
|
|
39
39
|
injectString("lv-LV", "Cancel", "Atcelt");
|
|
40
40
|
injectString("ka-GE", "Cancel", "\u10D2\u10D0\u10E3\u10E5\u10DB\u10D4\u10D1\u10D0");
|
|
@@ -67,7 +67,7 @@ injectString("tr", "Clear", "Temizle");
|
|
|
67
67
|
injectString("zh-Hans", "Clear", "\u6E05\u9664");
|
|
68
68
|
injectString("zh-TW", "Clear", "\u6E05\u9664");
|
|
69
69
|
injectString("ro-RO", "Clear", "\u0218terge\u021Bi");
|
|
70
|
-
injectString("ar", "Clear", "\u0645\u0633\u062D");
|
|
70
|
+
injectString("ar-001", "Clear", "\u0645\u0633\u062D");
|
|
71
71
|
injectString("lt-LT", "Clear", "I\u0161valyti");
|
|
72
72
|
injectString("lv-LV", "Clear", "Not\u012Br\u012Bt");
|
|
73
73
|
injectString("ka-GE", "Clear", "\u10D2\u10D0\u10E1\u10E3\u10E4\u10D7\u10D0\u10D5\u10D4\u10D1\u10D0");
|
|
@@ -100,7 +100,7 @@ injectString("tr", "Reset", "S\u0131f\u0131rla");
|
|
|
100
100
|
injectString("zh-Hans", "Reset", "\u91CD\u7F6E");
|
|
101
101
|
injectString("zh-TW", "Reset", "\u91CD\u8A2D");
|
|
102
102
|
injectString("ro-RO", "Reset", "Reseta\u021Bi");
|
|
103
|
-
injectString("ar", "Reset", "\u0625\u0639\u0627\u062F\u0629 \u062A\u0639\u064A\u064A\u0646");
|
|
103
|
+
injectString("ar-001", "Reset", "\u0625\u0639\u0627\u062F\u0629 \u062A\u0639\u064A\u064A\u0646");
|
|
104
104
|
injectString("lt-LT", "Reset", "I\u0161 naujo nustatyti");
|
|
105
105
|
injectString("lv-LV", "Reset", "Atiestat\u012Bt");
|
|
106
106
|
injectString("ka-GE", "Reset", "\u10D2\u10D0\u10D3\u10D0\u10E7\u10D4\u10DC\u10D4\u10D1\u10D0");
|
|
@@ -133,7 +133,7 @@ injectString("tr", "Apply", "Uygula");
|
|
|
133
133
|
injectString("zh-Hans", "Apply", "\u5E94\u7528");
|
|
134
134
|
injectString("zh-TW", "Apply", "\u5957\u7528");
|
|
135
135
|
injectString("ro-RO", "Apply", "Aplica\u021Bi");
|
|
136
|
-
injectString("ar", "Apply", "\u062A\u0637\u0628\u064A\u0642");
|
|
136
|
+
injectString("ar-001", "Apply", "\u062A\u0637\u0628\u064A\u0642");
|
|
137
137
|
injectString("lt-LT", "Apply", "Taikyti");
|
|
138
138
|
injectString("lv-LV", "Apply", "Lietot");
|
|
139
139
|
injectString("ka-GE", "Apply", "\u10D2\u10D0\u10DB\u10DD\u10E7\u10D4\u10DC\u10D4\u10D1\u10D0");
|
|
@@ -36,7 +36,7 @@ injectString("tr", "Close", "Kapat");
|
|
|
36
36
|
injectString("zh-Hans", "Close", "\u5173\u95ED");
|
|
37
37
|
injectString("zh-TW", "Close", "\u95DC\u9589");
|
|
38
38
|
injectString("ro-RO", "Close", "\xCEnchide");
|
|
39
|
-
injectString("ar", "Close", "\u0625\u063A\u0644\u0627\u0642");
|
|
39
|
+
injectString("ar-001", "Close", "\u0625\u063A\u0644\u0627\u0642");
|
|
40
40
|
injectString("lt-LT", "Close", "U\u017Edaryti");
|
|
41
41
|
injectString("lv-LV", "Close", "Aizv\u0113rt");
|
|
42
42
|
injectString("ka-GE", "Close", "\u10D3\u10D0\u10EE\u10E3\u10E0\u10D5\u10D0");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const DropdownTrigger: ({ name, onBlur, isActive, id, triggerRef, searchField, placeholder, disabled, fullWidth, currentSelection, handleClick, inputValue, className, onSearchChange, width, title, triggerAriaLabel, count, inputRef, buttonType, isError, popupId, handleFocusOnPopup, allyPattern, dataAnalyticsId, ...otherProps }: import("../dropdownRaw/dropdownTrigger").IDropdownTrigger) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare const DropdownTrigger: ({ name, onBlur, isActive, id, triggerRef, searchField, placeholder, disabled, fullWidth, currentSelection, handleClick, inputValue, className, onSearchChange, width, title, triggerAriaLabel, count, inputRef, autocomplete, buttonType, isError, popupId, handleFocusOnPopup, allyPattern, dataAnalyticsId, ...otherProps }: import("../dropdownRaw/dropdownTrigger").IDropdownTrigger) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -75,7 +75,7 @@ injectString("tr", "Error Loading Items", "Error Loading Items");
|
|
|
75
75
|
injectString("zh-Hans", "Error Loading Items", "Error Loading Items");
|
|
76
76
|
injectString("zh-TW", "Error Loading Items", "Error Loading Items");
|
|
77
77
|
injectString("ro-RO", "Error Loading Items", "Eroare la \xEEnc\u0103rcarea articolelor");
|
|
78
|
-
injectString("ar", "Error Loading Items", "\u062E\u0637\u0623 \u0641\u064A \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0639\u0646\u0627\u0635\u0631");
|
|
78
|
+
injectString("ar-001", "Error Loading Items", "\u062E\u0637\u0623 \u0641\u064A \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0639\u0646\u0627\u0635\u0631");
|
|
79
79
|
injectString("lt-LT", "Error Loading Items", "Element\u0173 \u012Fk\u0117limo klaida");
|
|
80
80
|
injectString("lv-LV", "Error Loading Items", "K\u013C\u016Bda iel\u0101d\u0113jot vienumus");
|
|
81
81
|
injectString("ka-GE", "Error Loading Items", "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D4\u10D1\u10D8\u10E1 \u10E9\u10D0\u10E2\u10D5\u10D8\u10E0\u10D7\u10D5\u10D8\u10E1 \u10E8\u10D4\u10EA\u10D3\u10DD\u10DB\u10D0");
|
|
@@ -108,7 +108,7 @@ injectString("tr", "No data", "Veri yok");
|
|
|
108
108
|
injectString("zh-Hans", "No data", "\u65E0\u6570\u636E");
|
|
109
109
|
injectString("zh-TW", "No data", "\u7121\u8CC7\u6599");
|
|
110
110
|
injectString("ro-RO", "No data", "Nu exist\u0103 date");
|
|
111
|
-
injectString("ar", "No data", "\u0644\u0627 \u062A\u0648\u062C\u062F \u0628\u064A\u0627\u0646\u0627\u062A");
|
|
111
|
+
injectString("ar-001", "No data", "\u0644\u0627 \u062A\u0648\u062C\u062F \u0628\u064A\u0627\u0646\u0627\u062A");
|
|
112
112
|
injectString("lt-LT", "No data", "N\u0117ra duomen\u0173");
|
|
113
113
|
injectString("lv-LV", "No data", "Nav datu");
|
|
114
114
|
injectString("ka-GE", "No data", "\u10DB\u10DD\u10DC\u10D0\u10EA\u10D4\u10DB\u10D4\u10D1\u10D8 \u10D0\u10E0 \u10D0\u10E0\u10D8\u10E1");
|
|
@@ -141,7 +141,7 @@ injectString("tr", "Clear", "Temizle");
|
|
|
141
141
|
injectString("zh-Hans", "Clear", "\u6E05\u9664");
|
|
142
142
|
injectString("zh-TW", "Clear", "\u6E05\u9664");
|
|
143
143
|
injectString("ro-RO", "Clear", "\u0218terge\u021Bi");
|
|
144
|
-
injectString("ar", "Clear", "\u0645\u0633\u062D");
|
|
144
|
+
injectString("ar-001", "Clear", "\u0645\u0633\u062D");
|
|
145
145
|
injectString("lt-LT", "Clear", "I\u0161valyti");
|
|
146
146
|
injectString("lv-LV", "Clear", "Not\u012Br\u012Bt");
|
|
147
147
|
injectString("ka-GE", "Clear", "\u10D2\u10D0\u10E1\u10E3\u10E4\u10D7\u10D0\u10D5\u10D4\u10D1\u10D0");
|
|
@@ -174,7 +174,7 @@ injectString("tr", "Cancel", "\u0130ptal");
|
|
|
174
174
|
injectString("zh-Hans", "Cancel", "\u53D6\u6D88");
|
|
175
175
|
injectString("zh-TW", "Cancel", "\u53D6\u6D88");
|
|
176
176
|
injectString("ro-RO", "Cancel", "Anula\u021Bi");
|
|
177
|
-
injectString("ar", "Cancel", "\u0625\u0644\u063A\u0627\u0621");
|
|
177
|
+
injectString("ar-001", "Cancel", "\u0625\u0644\u063A\u0627\u0621");
|
|
178
178
|
injectString("lt-LT", "Cancel", "At\u0161aukti");
|
|
179
179
|
injectString("lv-LV", "Cancel", "Atcelt");
|
|
180
180
|
injectString("ka-GE", "Cancel", "\u10D2\u10D0\u10E3\u10E5\u10DB\u10D4\u10D1\u10D0");
|
|
@@ -207,7 +207,7 @@ injectString("tr", "Apply", "Uygula");
|
|
|
207
207
|
injectString("zh-Hans", "Apply", "\u5E94\u7528");
|
|
208
208
|
injectString("zh-TW", "Apply", "\u5957\u7528");
|
|
209
209
|
injectString("ro-RO", "Apply", "Aplica\u021Bi");
|
|
210
|
-
injectString("ar", "Apply", "\u062A\u0637\u0628\u064A\u0642");
|
|
210
|
+
injectString("ar-001", "Apply", "\u062A\u0637\u0628\u064A\u0642");
|
|
211
211
|
injectString("lt-LT", "Apply", "Taikyti");
|
|
212
212
|
injectString("lv-LV", "Apply", "Lietot");
|
|
213
213
|
injectString("ka-GE", "Apply", "\u10D2\u10D0\u10DB\u10DD\u10E7\u10D4\u10DC\u10D4\u10D1\u10D0");
|
|
@@ -240,7 +240,7 @@ injectString("tr", "Deselect all", "T\xFCm\xFCn\xFCn se\xE7imini iptal et");
|
|
|
240
240
|
injectString("zh-Hans", "Deselect all", "\u53D6\u6D88\u5168\u9009");
|
|
241
241
|
injectString("zh-TW", "Deselect all", "\u53D6\u6D88\u5168\u9078");
|
|
242
242
|
injectString("ro-RO", "Deselect all", "Deselecta\u021Bi tot");
|
|
243
|
-
injectString("ar", "Deselect all", "\u0625\u0644\u063A\u0627\u0621 \u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644");
|
|
243
|
+
injectString("ar-001", "Deselect all", "\u0625\u0644\u063A\u0627\u0621 \u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644");
|
|
244
244
|
injectString("lt-LT", "Deselect all", "At\u017Eym\u0117ti visus");
|
|
245
245
|
injectString("lv-LV", "Deselect all", "Atcelt visas atlases");
|
|
246
246
|
injectString("ka-GE", "Deselect all", "\u10E7\u10D5\u10D4\u10DA\u10D0\u10E1 \u10DB\u10DD\u10EE\u10E1\u10DC\u10D0");
|
|
@@ -273,7 +273,7 @@ injectString("tr", "Select all", "T\xFCm\xFCn\xFC se\xE7");
|
|
|
273
273
|
injectString("zh-Hans", "Select all", "\u5168\u9009");
|
|
274
274
|
injectString("zh-TW", "Select all", "\u5168\u9078");
|
|
275
275
|
injectString("ro-RO", "Select all", "Selecta\u021Bi tot");
|
|
276
|
-
injectString("ar", "Select all", "\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644");
|
|
276
|
+
injectString("ar-001", "Select all", "\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644");
|
|
277
277
|
injectString("lt-LT", "Select all", "Pasirinkti visus");
|
|
278
278
|
injectString("lv-LV", "Select all", "Atlas\u012Bt visus");
|
|
279
279
|
injectString("ka-GE", "Select all", "\u10E7\u10D5\u10D4\u10DA\u10D0\u10E1 \u10D0\u10E0\u10E9\u10D4\u10D5\u10D0");
|
|
@@ -306,7 +306,7 @@ injectString("tr", "Select option", "Se\xE7enek belirleyin");
|
|
|
306
306
|
injectString("zh-Hans", "Select option", "\u9009\u62E9\u9009\u9879");
|
|
307
307
|
injectString("zh-TW", "Select option", "\u9078\u53D6\u9078\u9805");
|
|
308
308
|
injectString("ro-RO", "Select option", "Selecta\u021Bi op\u021Biunea");
|
|
309
|
-
injectString("ar", "Select option", "\u062A\u062D\u062F\u064A\u062F \u062E\u064A\u0627\u0631");
|
|
309
|
+
injectString("ar-001", "Select option", "\u062A\u062D\u062F\u064A\u062F \u062E\u064A\u0627\u0631");
|
|
310
310
|
injectString("lt-LT", "Select option", "Pasirinkti parinkt\u012F");
|
|
311
311
|
injectString("lv-LV", "Select option", "Atlas\u012Bt opciju");
|
|
312
312
|
injectString("ka-GE", "Select option", "\u10DE\u10D0\u10E0\u10D0\u10DB\u10D4\u10E2\u10E0\u10D8\u10E1 \u10D0\u10E0\u10E9\u10D4\u10D5\u10D0");
|
|
@@ -339,7 +339,7 @@ injectString("tr", "Back", "Geri");
|
|
|
339
339
|
injectString("zh-Hans", "Back", "\u8FD4\u56DE");
|
|
340
340
|
injectString("zh-TW", "Back", "\u8FD4\u56DE");
|
|
341
341
|
injectString("ro-RO", "Back", "\xCEnapoi");
|
|
342
|
-
injectString("ar", "Back", "\u0631\u062C\u0648\u0639");
|
|
342
|
+
injectString("ar-001", "Back", "\u0631\u062C\u0648\u0639");
|
|
343
343
|
injectString("lt-LT", "Back", "Atgal");
|
|
344
344
|
injectString("lv-LV", "Back", "Atpaka\u013C");
|
|
345
345
|
injectString("ka-GE", "Back", "\u10E3\u10D9\u10D0\u10DC");
|
|
@@ -46,7 +46,7 @@ injectString("tr", "Filter by group", "Gruba g\xF6re filtrele");
|
|
|
46
46
|
injectString("zh-Hans", "Filter by group", "\u6309\u7EC4\u8FC7\u6EE4");
|
|
47
47
|
injectString("zh-TW", "Filter by group", "\u4F9D\u7FA4\u7D44\u7BE9\u9078");
|
|
48
48
|
injectString("ro-RO", "Filter by group", "Filtra\u021Bi dup\u0103 grup");
|
|
49
|
-
injectString("ar", "Filter by group", "\u0627\u0644\u062A\u0635\u0641\u064A\u0629 \u062D\u0633\u0628 \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629");
|
|
49
|
+
injectString("ar-001", "Filter by group", "\u0627\u0644\u062A\u0635\u0641\u064A\u0629 \u062D\u0633\u0628 \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629");
|
|
50
50
|
injectString("lt-LT", "Filter by group", "Filtruoti pagal grup\u0119");
|
|
51
51
|
injectString("lv-LV", "Filter by group", "Filtr\u0113t p\u0113c grupas");
|
|
52
52
|
injectString("ka-GE", "Filter by group", "\u10EF\u10D2\u10E3\u10E4\u10D8\u10E1 \u10DB\u10D8\u10EE\u10D4\u10D3\u10D5\u10D8\u10D7 \u10E4\u10D8\u10DA\u10E2\u10E0\u10D0\u10EA\u10D8\u10D0");
|
|
@@ -79,7 +79,7 @@ injectString("tr", "Apply", "Uygula");
|
|
|
79
79
|
injectString("zh-Hans", "Apply", "\u5E94\u7528");
|
|
80
80
|
injectString("zh-TW", "Apply", "\u5957\u7528");
|
|
81
81
|
injectString("ro-RO", "Apply", "Aplica\u021Bi");
|
|
82
|
-
injectString("ar", "Apply", "\u062A\u0637\u0628\u064A\u0642");
|
|
82
|
+
injectString("ar-001", "Apply", "\u062A\u0637\u0628\u064A\u0642");
|
|
83
83
|
injectString("lt-LT", "Apply", "Taikyti");
|
|
84
84
|
injectString("lv-LV", "Apply", "Lietot");
|
|
85
85
|
injectString("ka-GE", "Apply", "\u10D2\u10D0\u10DB\u10DD\u10E7\u10D4\u10DC\u10D4\u10D1\u10D0");
|
|
@@ -112,7 +112,7 @@ injectString("tr", "Clear", "Temizle");
|
|
|
112
112
|
injectString("zh-Hans", "Clear", "\u6E05\u9664");
|
|
113
113
|
injectString("zh-TW", "Clear", "\u6E05\u9664");
|
|
114
114
|
injectString("ro-RO", "Clear", "\u0218terge\u021Bi");
|
|
115
|
-
injectString("ar", "Clear", "\u0645\u0633\u062D");
|
|
115
|
+
injectString("ar-001", "Clear", "\u0645\u0633\u062D");
|
|
116
116
|
injectString("lt-LT", "Clear", "I\u0161valyti");
|
|
117
117
|
injectString("lv-LV", "Clear", "Not\u012Br\u012Bt");
|
|
118
118
|
injectString("ka-GE", "Clear", "\u10D2\u10D0\u10E1\u10E3\u10E4\u10D7\u10D0\u10D5\u10D4\u10D1\u10D0");
|
|
@@ -36,7 +36,7 @@ injectString("tr", "Filter by group", "Gruba g\xF6re filtrele");
|
|
|
36
36
|
injectString("zh-Hans", "Filter by group", "\u6309\u7EC4\u8FC7\u6EE4");
|
|
37
37
|
injectString("zh-TW", "Filter by group", "\u4F9D\u7FA4\u7D44\u7BE9\u9078");
|
|
38
38
|
injectString("ro-RO", "Filter by group", "Filtra\u021Bi dup\u0103 grup");
|
|
39
|
-
injectString("ar", "Filter by group", "\u0627\u0644\u062A\u0635\u0641\u064A\u0629 \u062D\u0633\u0628 \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629");
|
|
39
|
+
injectString("ar-001", "Filter by group", "\u0627\u0644\u062A\u0635\u0641\u064A\u0629 \u062D\u0633\u0628 \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629");
|
|
40
40
|
injectString("lt-LT", "Filter by group", "Filtruoti pagal grup\u0119");
|
|
41
41
|
injectString("lv-LV", "Filter by group", "Filtr\u0113t p\u0113c grupas");
|
|
42
42
|
injectString("ka-GE", "Filter by group", "\u10EF\u10D2\u10E3\u10E4\u10D8\u10E1 \u10DB\u10D8\u10EE\u10D4\u10D3\u10D5\u10D8\u10D7 \u10E4\u10D8\u10DA\u10E2\u10E0\u10D0\u10EA\u10D8\u10D0");
|
|
@@ -71,6 +71,23 @@ const dropdown_1 = require("../dropdown/dropdown");
|
|
|
71
71
|
const zen_1 = require("../utils/zen");
|
|
72
72
|
const isChildOf_1 = require("../utils/isChildOf");
|
|
73
73
|
const keyboardHelpers_1 = require("../utils/keyboardHelpers");
|
|
74
|
+
const useIsomorphicLayoutEffect_1 = require("../commonHelpers/hooks/useIsomorphicLayoutEffect");
|
|
75
|
+
/**
|
|
76
|
+
* Returns the first groupsMap key whose `name` exactly matches `text` (case-insensitive),
|
|
77
|
+
* restricted to leaf items (no children) and excluding the internal ROOT_GROUP_ID sentinel.
|
|
78
|
+
* Only matching leaves prevents accidentally dispatching a group-container ID for grouped
|
|
79
|
+
* dropdowns where a continent/category name might equal the AutoFill text.
|
|
80
|
+
*/
|
|
81
|
+
function findAutoFillMatch(groupsMap, text) {
|
|
82
|
+
return Object.keys(groupsMap).find(id => {
|
|
83
|
+
var _a;
|
|
84
|
+
if (id === stateReducer_1.ROOT_GROUP_ID) return false;
|
|
85
|
+
const item = groupsMap[id];
|
|
86
|
+
// Skip group-container nodes — only selectable leaf items should be auto-selected.
|
|
87
|
+
if ((_a = item === null || item === void 0 ? void 0 : item.children) === null || _a === void 0 ? void 0 : _a.length) return false;
|
|
88
|
+
return (item === null || item === void 0 ? void 0 : item.name) && item.name.toLocaleLowerCase() === text.toLocaleLowerCase();
|
|
89
|
+
});
|
|
90
|
+
}
|
|
74
91
|
const DropdownRaw = props => {
|
|
75
92
|
var _a, _b;
|
|
76
93
|
const {
|
|
@@ -89,6 +106,7 @@ const DropdownRaw = props => {
|
|
|
89
106
|
triggerAriaLabel,
|
|
90
107
|
id: propId,
|
|
91
108
|
inputId,
|
|
109
|
+
autocomplete,
|
|
92
110
|
filterName,
|
|
93
111
|
showCounterPill = true,
|
|
94
112
|
showSelection,
|
|
@@ -166,6 +184,19 @@ const DropdownRaw = props => {
|
|
|
166
184
|
const comboboxRef = (0, react_1.useRef)(null);
|
|
167
185
|
const inputRef = (0, react_1.useRef)(null);
|
|
168
186
|
const contentRef = (0, react_1.useRef)(null);
|
|
187
|
+
// Tracks isOpenCombo without stale closures in native DOM event handlers
|
|
188
|
+
const isOpenComboRef = (0, react_1.useRef)(false);
|
|
189
|
+
// Stores the value set by browser AutoFill so onSearchChange can detect and consume it
|
|
190
|
+
const pendingAutoFillValueRef = (0, react_1.useRef)(null);
|
|
191
|
+
// Tracks the last AutoFill value that was directly dispatched by the native listener.
|
|
192
|
+
// Prevents double-dispatch when Chrome/Firefox fire both 'input' and 'change' for the same fill.
|
|
193
|
+
const autoFillJustHandledRef = (0, react_1.useRef)(null);
|
|
194
|
+
// Mirror of state.groupsMap kept current by useLayoutEffect so callbacks that need
|
|
195
|
+
// it don't depend on state directly (avoids memoisation busting on every data fetch)
|
|
196
|
+
const groupsMapRef = (0, react_1.useRef)(state.groupsMap);
|
|
197
|
+
// Mirror of state.selectedIds for the native listener and deferred effect, which run
|
|
198
|
+
// outside React's event cycle and cannot read state directly without stale closure risk.
|
|
199
|
+
const selectedIdsRef = (0, react_1.useRef)(state.selectedIds);
|
|
169
200
|
const prevSelectedIds = (0, react_1.useRef)({
|
|
170
201
|
selected: [],
|
|
171
202
|
isAllSelected: undefined,
|
|
@@ -375,6 +406,12 @@ const DropdownRaw = props => {
|
|
|
375
406
|
(focusable[0] || triggerRef.current).focus();
|
|
376
407
|
}, []);
|
|
377
408
|
const handleEscape = (0, react_1.useCallback)(() => {
|
|
409
|
+
// Clear any pending AutoFill. The user escaped — they don't want an auto-selection,
|
|
410
|
+
// regardless of whether groupsMap is already populated or not. Clearing here makes
|
|
411
|
+
// the AutoFill lifecycle explicit: the pending intent is cancelled on every close,
|
|
412
|
+
// preventing the deferred effect from selecting an item after a user dismissal.
|
|
413
|
+
pendingAutoFillValueRef.current = null;
|
|
414
|
+
autoFillJustHandledRef.current = null;
|
|
378
415
|
dispatchState({
|
|
379
416
|
type: stateActionType_1.StateActionType.SetIsOpenCombo,
|
|
380
417
|
payload: false
|
|
@@ -690,15 +727,216 @@ const DropdownRaw = props => {
|
|
|
690
727
|
controlData(currentAbort.signal, state.inputValue, state.isChecked);
|
|
691
728
|
}, [controlData, state.inputValue, state.isChecked, isCheckboxMode]);
|
|
692
729
|
(0, useEscape_1.useEscape)(triggerRef, handleEscape, state.isOpenCombo);
|
|
730
|
+
// useIsomorphicLayoutEffect (falls back to useEffect on SSR) keeps the refs current
|
|
731
|
+
// before any paint so there is no one-render gap where a same-frame AutoFill event
|
|
732
|
+
// could read stale values. The isomorphic variant avoids React's SSR warning.
|
|
733
|
+
(0, useIsomorphicLayoutEffect_1.useIsomorphicLayoutEffect)(() => {
|
|
734
|
+
isOpenComboRef.current = state.isOpenCombo;
|
|
735
|
+
}, [state.isOpenCombo]);
|
|
736
|
+
(0, useIsomorphicLayoutEffect_1.useIsomorphicLayoutEffect)(() => {
|
|
737
|
+
groupsMapRef.current = state.groupsMap;
|
|
738
|
+
}, [state.groupsMap]);
|
|
739
|
+
(0, useIsomorphicLayoutEffect_1.useIsomorphicLayoutEffect)(() => {
|
|
740
|
+
selectedIdsRef.current = state.selectedIds;
|
|
741
|
+
}, [state.selectedIds]);
|
|
742
|
+
// Handle browser AutoFill on searchable dropdown triggers.
|
|
743
|
+
// We listen to BOTH 'input' and 'change' because browser behaviour varies:
|
|
744
|
+
// • Chrome/Firefox fire 'input' then 'change' for autofill
|
|
745
|
+
// • Safari fires only 'change' (React's onChange, mapped to 'input', never fires)
|
|
746
|
+
// By listening to both and dispatching directly when data is available, we handle all
|
|
747
|
+
// browsers without depending on React's synthetic onChange reaching onSearchChange.
|
|
748
|
+
//
|
|
749
|
+
// Double-dispatch guard (Chrome/Firefox): autoFillJustHandledRef records the value that
|
|
750
|
+
// was just dispatched. The second event of the same autofill pair sees the same value and
|
|
751
|
+
// skips, then resets the guard for the next autofill.
|
|
752
|
+
//
|
|
753
|
+
// Known limitation — browser text-autocomplete history (per-field suggestions shown when
|
|
754
|
+
// a user re-visits a field they have typed into before) also fires these events while the
|
|
755
|
+
// popup is closed, making it indistinguishable from real AutoFill. There is no cross-browser
|
|
756
|
+
// API to distinguish the two cases reliably; this is an accepted trade-off for the AutoFill UX.
|
|
757
|
+
(0, react_1.useEffect)(() => {
|
|
758
|
+
// inputRef uses a non-null cast (MutableRefObject<HTMLInputElement>), so we need an
|
|
759
|
+
// explicit nullable cast to safely guard against the ref not yet being populated.
|
|
760
|
+
const input = inputRef.current;
|
|
761
|
+
// isReadOnly renders ReviewTextControl instead of the trigger input — the input element
|
|
762
|
+
// doesn't exist. Including isReadOnly in the deps ensures the listener re-attaches
|
|
763
|
+
// when a view/edit toggle transitions the dropdown from read-only to editable.
|
|
764
|
+
if (!input || !searchField || chip || isMobile || isReadOnly) {
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
|
+
const handleNativeAutoFill = e => {
|
|
768
|
+
const autoFillValue = e.target.value;
|
|
769
|
+
if (!autoFillValue || isOpenComboRef.current) return;
|
|
770
|
+
// Double-dispatch guard: skip the second event of the same autofill pair
|
|
771
|
+
// (Chrome/Firefox fire both 'input' and 'change' for one fill).
|
|
772
|
+
if (autoFillJustHandledRef.current === autoFillValue) {
|
|
773
|
+
// Do NOT re-set pendingAutoFillValueRef here. Doing so would leave it alive
|
|
774
|
+
// after the immediate dispatch and allow a later state.groupsMap change (e.g.
|
|
775
|
+
// an external data refresh) to wake the deferred effect and re-dispatch
|
|
776
|
+
// ChangeSelection — toggling a multiselect item back off.
|
|
777
|
+
// Do NOT clear autoFillJustHandledRef here either. Clearing it would allow the
|
|
778
|
+
// native 'change' listener of this same pair to fall through and dispatch a second
|
|
779
|
+
// time (in Chrome/Firefox the guard fires for the 'change' event; if cleared, the
|
|
780
|
+
// listener would treat it as a new autofill and dispatch again — toggle-off bug).
|
|
781
|
+
// Known limitation: if the browser re-fills the same value without any popup
|
|
782
|
+
// interaction between fills, autoFillJustHandledRef is still set and the refill
|
|
783
|
+
// is silently dropped. handleEscape and handleTriggerClick clear the guard for
|
|
784
|
+
// the common case; a timestamp-based expiry could address the edge case later.
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
// Always record the pending value so onSearchChange can skip controlData
|
|
788
|
+
// and the deferred effect can retry if data isn't loaded yet.
|
|
789
|
+
pendingAutoFillValueRef.current = autoFillValue;
|
|
790
|
+
const currentGroupsMap = groupsMapRef.current;
|
|
791
|
+
if (Object.keys(currentGroupsMap).length === 0) {
|
|
792
|
+
// getData hasn't resolved yet — deferred useEffect handles it once data arrives.
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
795
|
+
const matchedId = findAutoFillMatch(currentGroupsMap, autoFillValue);
|
|
796
|
+
if (matchedId) {
|
|
797
|
+
// Dispatch directly so selection works even when React's onChange doesn't fire
|
|
798
|
+
// (Safari autofill fires 'change' but not 'input', so onSearchChange may not run).
|
|
799
|
+
autoFillJustHandledRef.current = autoFillValue; // guard for onSearchChange + second event
|
|
800
|
+
// Clear pendingRef immediately after dispatch. In Safari, onSearchChange never
|
|
801
|
+
// runs after a native 'change', so pendingRef would remain set indefinitely. A
|
|
802
|
+
// later state.groupsMap change (e.g. external data refresh) would then re-trigger
|
|
803
|
+
// the deferred effect, which dispatches ChangeSelection again — toggling a
|
|
804
|
+
// multiselect item back off. Clearing here prevents that ghost re-dispatch.
|
|
805
|
+
pendingAutoFillValueRef.current = null;
|
|
806
|
+
if (multiselect) {
|
|
807
|
+
// ChangeSelection has toggle semantics — dispatching when the item is already
|
|
808
|
+
// selected would deselect it, emitting an incorrect onChange in edit forms.
|
|
809
|
+
// AutoFill must be idempotent: if the item is already selected, no-op.
|
|
810
|
+
if (!selectedIdsRef.current.includes(matchedId)) {
|
|
811
|
+
dispatchState({
|
|
812
|
+
type: stateActionType_1.StateActionType.ChangeSelection,
|
|
813
|
+
payload: {
|
|
814
|
+
value: true,
|
|
815
|
+
itemId: matchedId
|
|
816
|
+
}
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
} else {
|
|
820
|
+
// Dispatch directly instead of via handleSingleSelection to avoid the
|
|
821
|
+
// focus hijack: handleSingleSelection → handleEscape → triggerRef.focus()
|
|
822
|
+
// steals browser focus mid-form fill and disrupts tab order for the user.
|
|
823
|
+
dispatchState({
|
|
824
|
+
type: stateActionType_1.StateActionType.ChangeSingleSelection,
|
|
825
|
+
payload: {
|
|
826
|
+
value: matchedId,
|
|
827
|
+
reset: false
|
|
828
|
+
}
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
// Clear the AutoFill text from the search input (same for both modes).
|
|
832
|
+
dispatchState({
|
|
833
|
+
type: stateActionType_1.StateActionType.SetInputValue,
|
|
834
|
+
payload: ""
|
|
835
|
+
});
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
// No match: pendingAutoFillValueRef stays set; onSearchChange will clear it and
|
|
839
|
+
// return early without calling controlData, leaving the text visible for the user.
|
|
840
|
+
};
|
|
841
|
+
input.addEventListener("input", handleNativeAutoFill);
|
|
842
|
+
input.addEventListener("change", handleNativeAutoFill);
|
|
843
|
+
// eslint-disable-next-line consistent-return
|
|
844
|
+
return () => {
|
|
845
|
+
input.removeEventListener("input", handleNativeAutoFill);
|
|
846
|
+
input.removeEventListener("change", handleNativeAutoFill);
|
|
847
|
+
};
|
|
848
|
+
// inputRef is a stable MutableRefObject (never changes identity), so it is not listed
|
|
849
|
+
// as a dep. isReadOnly is listed so the effect re-runs when a view/edit toggle
|
|
850
|
+
// transitions the dropdown to editable — without it the listener never attaches.
|
|
851
|
+
// multiselect is listed because the listener dispatches different actions for each mode.
|
|
852
|
+
}, [searchField, chip, isMobile, isReadOnly, multiselect]);
|
|
853
|
+
// Deferred AutoFill: for getData-based dropdowns, groupsMap may be empty when AutoFill
|
|
854
|
+
// fires on page load (data hasn't resolved yet). onSearchChange keeps pendingAutoFillValueRef
|
|
855
|
+
// alive in that case and sets inputValue as a placeholder. This effect retries the lookup
|
|
856
|
+
// every time groupsMap is updated; it exits immediately when there is nothing pending.
|
|
857
|
+
(0, react_1.useEffect)(() => {
|
|
858
|
+
// Defensive guard matching the native listener: only process deferred AutoFill for
|
|
859
|
+
// searchable non-chip desktop triggers. isReadOnly is included so the deferred effect
|
|
860
|
+
// does not dispatch when the component renders in read-only mode (no input mounted).
|
|
861
|
+
if (!searchField || chip || isMobile || isReadOnly) return;
|
|
862
|
+
const pendingValue = pendingAutoFillValueRef.current;
|
|
863
|
+
if (!pendingValue || Object.keys(groupsMapRef.current).length === 0) return;
|
|
864
|
+
pendingAutoFillValueRef.current = null;
|
|
865
|
+
const matchedId = findAutoFillMatch(groupsMapRef.current, pendingValue);
|
|
866
|
+
if (matchedId) {
|
|
867
|
+
if (multiselect) {
|
|
868
|
+
// Same idempotency guard as the native listener: skip if already selected to
|
|
869
|
+
// avoid toggling the item off in an edit form that pre-populates the value.
|
|
870
|
+
if (!selectedIdsRef.current.includes(matchedId)) {
|
|
871
|
+
dispatchState({
|
|
872
|
+
type: stateActionType_1.StateActionType.ChangeSelection,
|
|
873
|
+
payload: {
|
|
874
|
+
value: true,
|
|
875
|
+
itemId: matchedId
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
} else {
|
|
880
|
+
dispatchState({
|
|
881
|
+
type: stateActionType_1.StateActionType.ChangeSingleSelection,
|
|
882
|
+
payload: {
|
|
883
|
+
value: matchedId,
|
|
884
|
+
reset: false
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
// Clear the placeholder inputValue that onSearchChange set while data was loading.
|
|
889
|
+
dispatchState({
|
|
890
|
+
type: stateActionType_1.StateActionType.SetInputValue,
|
|
891
|
+
payload: ""
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
// No match: leave inputValue at the AutoFill text so the user can see what was tried.
|
|
895
|
+
// onSearchChange already set it to pendingValue; not clearing it is intentional.
|
|
896
|
+
}, [state.groupsMap, multiselect, searchField, chip, isMobile, isReadOnly]);
|
|
693
897
|
const onSearchChange = (0, react_1.useCallback)(event => {
|
|
694
|
-
|
|
898
|
+
// Use event.target (not currentTarget) to match the native listener which also
|
|
899
|
+
// reads e.target.value — the two must read the same property when comparing.
|
|
900
|
+
const newValue = event ? event.target.value : "";
|
|
901
|
+
// AutoFill path — two distinct cases, checked in order:
|
|
902
|
+
//
|
|
903
|
+
// 1. Native listener dispatched (data was available, autoFillJustHandledRef set):
|
|
904
|
+
// Skip SetInputValue entirely — the listener already sent SetInputValue("") and
|
|
905
|
+
// pendingRef was cleared right after dispatch. React 18 batches same-tick dispatches
|
|
906
|
+
// and the last wins, so dispatching the autofill text here would override "".
|
|
907
|
+
// This branch fires for every onChange that belongs to the same autofill pair
|
|
908
|
+
// (e.g. from 'input' then 'change' in Chrome/Firefox).
|
|
909
|
+
// Note — hasApplyButton: AutoFill bypasses the staged-selection flow because user
|
|
910
|
+
// intent is unambiguous. The "when change inside" effect already gates onChangeInner
|
|
911
|
+
// behind hasApplyButton, so external onChange is still withheld until Apply is clicked.
|
|
912
|
+
if (autoFillJustHandledRef.current === newValue) {
|
|
913
|
+
// Do NOT clear autoFillJustHandledRef — the guard in handleNativeAutoFill
|
|
914
|
+
// still needs it for the second native event (Chrome/Firefox 'change' after 'input').
|
|
915
|
+
// It is cleared by handleEscape / handleTriggerClick on the next user interaction.
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
// 2. getData pending or no-match (pendingRef set by native listener, no dispatch yet):
|
|
919
|
+
// Keep pendingRef alive for the deferred useEffect; show the autofill text and
|
|
920
|
+
// skip controlData to avoid an unexpected search API call with the raw text.
|
|
921
|
+
if (pendingAutoFillValueRef.current !== null && pendingAutoFillValueRef.current === newValue) {
|
|
922
|
+
dispatchState({
|
|
923
|
+
type: stateActionType_1.StateActionType.SetInputValue,
|
|
924
|
+
payload: newValue
|
|
925
|
+
});
|
|
926
|
+
return;
|
|
927
|
+
}
|
|
928
|
+
// Normal search path (not an AutoFill event).
|
|
929
|
+
pendingAutoFillValueRef.current = null;
|
|
695
930
|
dispatchState({
|
|
696
931
|
type: stateActionType_1.StateActionType.SetInputValue,
|
|
697
932
|
payload: newValue
|
|
698
933
|
});
|
|
699
934
|
const currentAbort = abortToken.current;
|
|
700
935
|
controlData(currentAbort.signal, newValue, state.isChecked);
|
|
701
|
-
},
|
|
936
|
+
},
|
|
937
|
+
// state.groupsMap and multiselect intentionally omitted: lookup and dispatch now happen
|
|
938
|
+
// in the native listener. This callback only needs to skip controlData cleanly.
|
|
939
|
+
[controlData, state.isChecked]);
|
|
702
940
|
const onInputChange = (0, react_1.useCallback)(newValue => {
|
|
703
941
|
dispatchState({
|
|
704
942
|
type: stateActionType_1.StateActionType.SetInputValue,
|
|
@@ -720,6 +958,13 @@ const DropdownRaw = props => {
|
|
|
720
958
|
controlData(currentAbort.signal, state.inputValue, isChecked);
|
|
721
959
|
}, [controlData, state.inputValue]);
|
|
722
960
|
const handleTriggerClick = (0, react_1.useCallback)(newVal => {
|
|
961
|
+
if (newVal) {
|
|
962
|
+
// User is manually opening the dropdown to browse. Cancel any pending AutoFill
|
|
963
|
+
// so the deferred useEffect doesn't auto-select once getData resolves — the user
|
|
964
|
+
// is now in control and an invisible selection would be surprising.
|
|
965
|
+
pendingAutoFillValueRef.current = null;
|
|
966
|
+
autoFillJustHandledRef.current = null;
|
|
967
|
+
}
|
|
723
968
|
const currentAbort = abortToken.current;
|
|
724
969
|
dispatchState({
|
|
725
970
|
type: stateActionType_1.StateActionType.SetCurrentId,
|
|
@@ -985,6 +1230,7 @@ const DropdownRaw = props => {
|
|
|
985
1230
|
triggerAriaLabel: triggerAriaLabel,
|
|
986
1231
|
triggerRef: triggerRef,
|
|
987
1232
|
inputRef: inputRef,
|
|
1233
|
+
autocomplete: autocomplete,
|
|
988
1234
|
buttonType: buttonType,
|
|
989
1235
|
handleFocusOnPopup: handleFocusOnPopup,
|
|
990
1236
|
popupId: memoizedAllyPattern === "selectOnlyCombobox" ? selectListId : popupId,
|