@geotab/zenith 3.14.1 → 3.15.0-beta.1
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 +28 -2
- package/dist/advancedGroupsFilter/advancedGroupsFilterFormSection.js +17 -7
- package/dist/alert/banner.d.ts +2 -3
- package/dist/alert/hooks/useAlertState.d.ts +0 -1
- package/dist/banner/bannerMultipLine.d.ts +0 -1
- package/dist/banner/bannerSingleLine.d.ts +0 -1
- package/dist/banner/utils/isSummaryErrorElement.d.ts +1 -2
- package/dist/calendar/dateUtils.js +2 -2
- package/dist/card/card.js +17 -7
- package/dist/card/components/content.d.ts +0 -1
- package/dist/cardContainer/helpers/getSizeClass.js +1 -2
- package/dist/chart/accessibleChart/accessibleChart.js +1 -1
- package/dist/chart/accessibleChart/accessibleChartNarrative.d.ts +1 -1
- package/dist/chart/accessibleChart/accessibleChartNarrative.js +11 -5
- package/dist/chart/accessibleChart/generatePieNarrative.d.ts +7 -0
- package/dist/chart/accessibleChart/generatePieNarrative.js +179 -0
- package/dist/chart/accessibleChart/interfaces.d.ts +1 -0
- package/dist/chart/barChart/getDefaultOptions.js +5 -6
- package/dist/chart/barChart.js +152 -50
- package/dist/chart/interfaces.d.ts +0 -1
- package/dist/chart/lineChart/getDefaultOptions.js +5 -6
- package/dist/chart/lineChart/useChartTicks.d.ts +0 -1
- package/dist/chart/lineChart/useSummary.d.ts +7 -8
- package/dist/chart/lineChart.js +167 -59
- package/dist/chart/pieChart.js +174 -76
- package/dist/chart/plugins/linePlugin/getInterpolatedValue.js +10 -2
- package/dist/chart/utils/convertDates.d.ts +1 -1
- package/dist/chart/utils/getFormattedLabel.js +1 -2
- package/dist/chart/utils/getNiceAxisRange.d.ts +21 -0
- package/dist/chart/utils/getNiceAxisRange.js +76 -0
- package/dist/chart/utils/getRange.js +2 -2
- package/dist/chart/utils/getYAxisMeta.d.ts +2 -5
- package/dist/chart/utils/getYAxisMeta.js +17 -2
- package/dist/chart/utils/getYAxisTickCount.d.ts +15 -0
- package/dist/chart/utils/getYAxisTickCount.js +19 -0
- package/dist/chart/utils/resampleArrayEvenly.js +1 -2
- package/dist/checkbox/checkbox.js +17 -7
- package/dist/checkboxListWithAction/checkboxListWithAction.d.ts +0 -1
- package/dist/chip/chip.d.ts +0 -1
- package/dist/chip/utils/useChip.d.ts +0 -1
- package/dist/commonHelpers/HOC/reducerLogger/reducerLogger.d.ts +1 -1
- package/dist/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.d.ts +0 -1
- package/dist/commonHelpers/arrowNavigation/hooks/useHoldOnScroll.d.ts +0 -1
- package/dist/commonHelpers/generateId.js +1 -2
- package/dist/commonHelpers/hooks/breakpoints.d.ts +4 -0
- package/dist/commonHelpers/hooks/breakpoints.js +7 -0
- package/dist/commonHelpers/hooks/fetch.reducer.d.ts +1 -1
- package/dist/commonHelpers/hooks/fetch.reducer.js +1 -2
- package/dist/commonHelpers/hooks/useDebouncedMemo.d.ts +0 -1
- package/dist/commonHelpers/hooks/useDebouncedMemo.js +1 -2
- package/dist/commonHelpers/hooks/useDeviceType.js +2 -2
- package/dist/commonHelpers/hooks/useEscape.d.ts +1 -1
- package/dist/commonHelpers/hooks/useGridSize.d.ts +0 -1
- package/dist/commonHelpers/hooks/useMobileOrTablet.d.ts +1 -0
- package/dist/commonHelpers/hooks/useMobileOrTablet.js +21 -0
- package/dist/commonHelpers/hooks/usePillSize.d.ts +0 -1
- package/dist/{gridLayout → commonHelpers}/hooks/useTablet.js +8 -11
- package/dist/commonHelpers/utils.js +3 -3
- package/dist/commonStyles/colors/colors.less +1 -0
- package/dist/dataFeed/dataFeed.d.ts +1 -1
- package/dist/dataFeed/dataFeed.js +2 -2
- package/dist/dataFeed/dataFeedCell/dataFeedCell.d.ts +3 -1
- package/dist/dataFeed/dataFeedColumnsItems.d.ts +2 -2
- package/dist/dataGrid/cell/cell.d.ts +3 -1
- package/dist/dataGrid/columns/actionsColumn/actionsButton.js +1 -2
- package/dist/dataGrid/columns/actionsColumn/actionsColumn.d.ts +3 -3
- package/dist/dataGrid/dataGrid.d.ts +13 -1
- package/dist/dataGrid/dataGrid.js +48 -3
- package/dist/dataGrid/emptySearchList/emptySearchList.d.ts +0 -1
- package/dist/dataGrid/row/row.d.ts +3 -1
- package/dist/dataGrid/withActions/withActions.d.ts +1 -1
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsList.js +1 -2
- package/dist/dataGrid/withFlexibleColumns/withFlexibleColumns.d.ts +1 -1
- package/dist/dataGrid/withLoading/withLoading.d.ts +1 -1
- package/dist/dataGrid/withSelectableRows/withLimitedSelectableRows.d.ts +1 -1
- package/dist/dataGrid/withSelectableRows/withSelectableRows.d.ts +1 -1
- package/dist/dataGrid/withSortableColumns/withSortableColumns.d.ts +1 -1
- package/dist/dateInputInner/dateInputInnerReducer.js +2 -2
- package/dist/dateRangeRaw/utils/areMapsEqual.js +1 -2
- package/dist/dialog/dialog.d.ts +0 -1
- package/dist/dropdown/dropdown.js +1 -1
- package/dist/dropdown/useDropdownState.d.ts +0 -1
- package/dist/dropdownRaw/dropdownHelper.js +2 -2
- package/dist/dropdownRaw/dropdownList.d.ts +3 -2
- package/dist/dropdownRaw/dropdownList.js +31 -49
- package/dist/dropdownRaw/dropdownRaw.js +34 -13
- package/dist/dropdownRaw/stateReducer/stateReducer.d.ts +4 -1
- package/dist/dropdownRaw/stateReducer/stateReducer.js +33 -23
- package/dist/dropdownRaw/stateReducer/stateReducerHelper.d.ts +1 -2
- package/dist/dropdownRaw/stateReducer/stateReducerHelper.js +8 -13
- package/dist/dropdownRaw/types.d.ts +20 -0
- package/dist/feedbackContainer/feedbackContainer.js +17 -7
- package/dist/feedbackContainer/hooks/useFeedbackAlert.d.ts +0 -1
- package/dist/feedbackContainer/hooks/useFeedbackToast.d.ts +0 -1
- package/dist/filters/components/filtersDropdown.js +2 -2
- package/dist/filters/components/filtersItem.d.ts +2 -2
- package/dist/filters/components/filtersSearchList.d.ts +0 -1
- package/dist/filters/components/filtersSelect.d.ts +0 -1
- package/dist/filters/components/filtersSelectCompact.d.ts +0 -1
- package/dist/filters/components/filtersSelectListItem.d.ts +0 -1
- package/dist/filters/components/filtersSelectUnfoldingPill.d.ts +0 -1
- package/dist/filters/components/filtersSidePanelItem.js +17 -7
- package/dist/filters/filtersHelper.d.ts +1 -1
- package/dist/filters/filtersHelper.js +5 -5
- package/dist/filters/filtersHooks.d.ts +0 -1
- package/dist/filtersBar/components/filtersBarDropdownWithCheckbox/filtersBarDropdownWithCheckbox.js +1 -1
- package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +2 -2
- package/dist/filtersBar/filtersBar.js +2 -2
- package/dist/filtersBar/filtersBarActions/filtersBarActions.d.ts +0 -1
- package/dist/filtersBar/filtersBarInterfaces.d.ts +0 -1
- package/dist/filtersBar/filtersBarReducer.js +2 -2
- package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelDropdownWithCheckbox/filtersBarSidePanelDropdownWithCheckbox.d.ts +4 -10
- package/dist/filtersBar/filtersBarSidePanel/sidePanelReducer.js +2 -2
- package/dist/filtersBar/utils/getNumberOfChangedFilters.js +1 -2
- package/dist/footerButtons/footerButtons.js +17 -7
- package/dist/formField/components/formFieldAdditionalInfo.d.ts +0 -1
- package/dist/formField/components/formFieldCounter.d.ts +0 -1
- package/dist/formField/components/formFieldLoading.d.ts +0 -1
- package/dist/formField/components/formFieldSkeleton.d.ts +0 -1
- package/dist/formField/components/formFieldWithLabel.d.ts +0 -1
- package/dist/formField/components/formFieldWithoutLabel.d.ts +0 -1
- package/dist/formField/formField.d.ts +1 -1
- package/dist/formField/hooks/useBanner.d.ts +0 -1
- package/dist/formField/hooks/useDisabled.d.ts +1 -1
- package/dist/formGroup/components/customRow/customRow.d.ts +0 -1
- package/dist/formGroup/formGroup.js +17 -7
- package/dist/formGroup/hooks/listHooks/useStateToElements.d.ts +0 -1
- package/dist/formGroup/hooks/listHooks/useStateToElements.js +1 -1
- package/dist/formGroup/utils/formGroupProvider.d.ts +0 -1
- package/dist/formGroup/utils/isFormLabel.d.ts +1 -1
- package/dist/formGroupItem/formGroupItem.d.ts +0 -1
- package/dist/formLayout/components/layoutColumn/layoutColum.d.ts +0 -1
- package/dist/formLayout/hooks/useFormButtons.d.ts +1 -1
- package/dist/formLayout/types.d.ts +0 -1
- package/dist/formLayout/utils/attachHeadings.d.ts +1 -1
- package/dist/formLayout/utils/attachSeparators.d.ts +0 -1
- package/dist/formLayout/utils/getChildrenWithCustomColumns.d.ts +1 -2
- package/dist/formLayout/utils/getChildrenWithCustomColumns.js +2 -2
- package/dist/formLayout/utils/getFieldLabel.js +5 -5
- package/dist/formSection/components/actions.d.ts +0 -1
- package/dist/formSection/components/additional.d.ts +0 -1
- package/dist/formSection/utils/isFormSection.d.ts +2 -4
- package/dist/formStepper/components/formStepRaw.d.ts +0 -1
- package/dist/formStepper/formStepper.d.ts +0 -1
- package/dist/formStepper/formStepper.js +5 -5
- package/dist/formStepperButtons/formStepperButtons.js +3 -3
- package/dist/gridLayout/hooks/useStretch.js +1 -1
- package/dist/gridLayout/utils/convertStateToClasses.js +1 -2
- package/dist/gridLayout/utils/gridLayoutProvider.d.ts +0 -1
- package/dist/gridLayout/utils/gridLayoutProvider.js +1 -1
- package/dist/gridLayout/utils/isGridItem.d.ts +1 -1
- package/dist/groupsFilter/groupsHelper.d.ts +5 -5
- package/dist/groupsFilterRaw/groupsFilterHelper.js +16 -16
- package/dist/groupsFilterRaw/groupsHelper.d.ts +1 -1
- package/dist/groupsFilterRaw/groupsHelper.js +4 -4
- package/dist/groupsFilterRaw/stateReducer/stateReducer.d.ts +1 -1
- package/dist/groupsFilterRaw/stateReducer/stateReducer.js +2 -2
- package/dist/groupsFilterRaw/testData.js +3 -4
- package/dist/groupsFilterRaw/uiStateReducer/uiStateReducer.js +2 -2
- package/dist/header/components/collapsedItemsControl/utils/handleCustomMenuWrapper.js +5 -0
- package/dist/header/components/mobileFilterControl/mobileFilterControl.d.ts +0 -1
- package/dist/header/components/mobileSearchControl/mobileSearchControl.d.ts +0 -1
- package/dist/header/header.js +17 -7
- package/dist/header/headerButton.d.ts +0 -1
- package/dist/header/headerContext.d.ts +1 -2
- package/dist/header/headerHelpers.d.ts +5 -5
- package/dist/header/headerHelpers.js +17 -7
- package/dist/header/hooks/useNonFittingElements.d.ts +3 -4
- package/dist/headerTitle/headerTitle.d.ts +0 -1
- package/dist/icons/iconAce.d.ts +3 -0
- package/dist/icons/iconAce.js +12 -0
- package/dist/icons/iconBreak.d.ts +3 -0
- package/dist/icons/iconBreak.js +12 -0
- package/dist/icons/iconChevronStepper.d.ts +3 -0
- package/dist/icons/iconChevronStepper.js +12 -0
- package/dist/icons/iconPotato.d.ts +3 -0
- package/dist/icons/iconPotato.js +12 -0
- package/dist/icons/iconToggleLarge.d.ts +3 -0
- package/dist/icons/iconToggleLarge.js +12 -0
- package/dist/icons/iconToggleSmall.d.ts +3 -0
- package/dist/icons/iconToggleSmall.js +12 -0
- package/dist/icons/iconTrendNeutral.d.ts +3 -0
- package/dist/icons/iconTrendNeutral.js +12 -0
- package/dist/icons/iconTruck.d.ts +3 -0
- package/dist/icons/iconTruck.js +12 -0
- package/dist/index.css +234 -33
- package/dist/index.d.ts +8 -0
- package/dist/index.js +30 -13
- package/dist/layout/layout.d.ts +2 -1
- package/dist/layout/layout.js +17 -7
- package/dist/layout/layoutBanner.d.ts +0 -1
- package/dist/lineChart/lineChart.d.ts +1 -0
- package/dist/lineChart/lineChart.js +135 -70
- package/dist/lineChartMini/lineChartMini.d.ts +1 -0
- package/dist/lineChartMini/lineChartMini.js +141 -73
- package/dist/list/itemData/itemData.d.ts +2 -1
- package/dist/list/itemData/itemDataInternal.d.ts +2 -1
- package/dist/list/list.d.ts +0 -1
- package/dist/list/utils/changeOrder.js +1 -2
- package/dist/list/utils/isDataListitem.d.ts +1 -1
- package/dist/list/viewportProvider/viewportContext.d.ts +0 -1
- package/dist/menu/components/controlledMenuList/controlledMenuList.d.ts +2 -4
- package/dist/menu/components/controlledMenuList/controlledMenuList.js +3 -1
- package/dist/menu/components/createControlledMenuList.js +1 -2
- package/dist/menu/components/createMenuItem.js +1 -2
- package/dist/menu/contexts/usePathContext.js +1 -2
- package/dist/menu/utils/buildMenuContent.js +1 -2
- package/dist/menu/utils/findPrevFocusable.js +1 -2
- package/dist/menu/utils/useDisplayContent.d.ts +21 -0
- package/dist/menu/utils/useDisplayContent.js +35 -0
- package/dist/menu/utils/useMenuItemKeyboardNav.js +1 -2
- package/dist/miniTabs/miniTabsHelper.js +17 -7
- package/dist/mobileSheet/components/mobileSheetTitle.d.ts +0 -1
- package/dist/modal/modal.js +17 -7
- package/dist/nav/context/nav.context.d.ts +0 -1
- package/dist/nav/navFooter/navEditFooter/navEditFooter.d.ts +0 -1
- package/dist/nav/navFooter/navFooter.d.ts +1 -1
- package/dist/nav/navFooter/navFooterAction/navFooterAction.d.ts +2 -1
- package/dist/nav/navFooter/navFooterAction/navFooterAction.js +3 -1
- package/dist/nav/navItem/navItem.d.ts +2 -0
- package/dist/nav/navItem/navItem.js +56 -47
- package/dist/nav/navItem/navItemContent.d.ts +19 -0
- package/dist/nav/navItem/navItemContent.js +21 -0
- package/dist/nav/navItem/navItemType.d.ts +7 -0
- package/dist/nav/navItem/navItemType.js +9 -0
- package/dist/nav/utils/navUtils.d.ts +2 -4
- package/dist/nav/utils/navUtils.js +2 -2
- package/dist/overview/overview.d.ts +0 -1
- package/dist/pageHeader/pageHeader.d.ts +1 -1
- package/dist/pageHeader/pageHeaderButton.d.ts +0 -1
- package/dist/pageHeader/pageHeaderHelpers.d.ts +1 -1
- package/dist/pageHeader/pageHeaderMenu.d.ts +0 -1
- package/dist/pagination/paginationArrow.d.ts +0 -1
- package/dist/pill/interfaces/pill.interface.d.ts +0 -1
- package/dist/pillBox/components/pillBoxItem.d.ts +1 -2
- package/dist/popup/popup.js +17 -7
- package/dist/progressIndicator/progressIndicator.d.ts +39 -0
- package/dist/progressIndicator/progressIndicator.js +30 -0
- package/dist/progressIndicator/progressIndicatorUtils.d.ts +12 -0
- package/dist/progressIndicator/progressIndicatorUtils.js +30 -0
- package/dist/radioGroupRaw/radioGroupRaw.js +17 -7
- package/dist/radioGroupRaw/types.d.ts +0 -1
- package/dist/react-chartjs/dateFns/dateFns.js +10 -11
- package/dist/react-chartjs/utils.d.ts +3 -3
- package/dist/react-chartjs/utils.js +8 -9
- package/dist/searchInputRaw/searchInputRaw.js +17 -7
- package/dist/searchInputRaw/types.d.ts +0 -1
- package/dist/selectField/selectField.d.ts +2 -3
- package/dist/selectList/selectList.d.ts +0 -1
- package/dist/selectRaw/hooks/usePopupWidth.js +17 -7
- package/dist/selectRaw/selectRaw.js +20 -7
- package/dist/sidePanel/sidePanelCell/sidePanelCell.d.ts +0 -1
- package/dist/summaries/utils/splitIntoPairs.js +1 -2
- package/dist/summaryTile/summaryTile.js +17 -7
- package/dist/summaryTile/summaryTileTrigger.js +17 -7
- package/dist/table/actions/actionsMenu.d.ts +0 -1
- package/dist/table/children/useTableChildren.d.ts +7 -7
- package/dist/table/detailPanel/interfaces.d.ts +0 -1
- package/dist/table/flexible/columnsList.js +1 -2
- package/dist/table/loading/useLoading.d.ts +10 -10
- package/dist/table/nested/nestedData.d.ts +3 -1
- package/dist/table/nested/useNestedRows.d.ts +2 -2
- package/dist/table/selectable/selectableHeader.d.ts +2 -1
- package/dist/table/selectable/selectableHeader.js +4 -3
- package/dist/table/selectable/useSelectableRows.d.ts +1 -1
- package/dist/table/selectable/useSelectableRows.js +7 -4
- package/dist/table/table.d.ts +16 -1
- package/dist/table/table.js +101 -5
- package/dist/tag/tag.d.ts +19 -0
- package/dist/tag/tag.js +14 -0
- package/dist/textIconButton/textIconButton.js +17 -7
- package/dist/toastRaw/toastRaw.d.ts +1 -1
- package/dist/toastRaw/toastRaw.js +3 -1
- package/dist/toggleButtonRaw/toggleButtonRaw.js +17 -7
- package/dist/toggleButtonRaw/types.d.ts +0 -1
- package/dist/tooltip/tooltip.js +17 -7
- package/dist/tooltipInfo/tooltipInfo.d.ts +0 -1
- package/dist/utils/compareElementsUtils/isArraysEqualDeeply.js +1 -2
- package/dist/utils/compareElementsUtils/isElementsEqual.js +2 -2
- package/dist/utils/escapeHtml.js +1 -2
- package/dist/utils/localization/directionContext.d.ts +0 -1
- package/dist/utils/localization/languageContext.d.ts +0 -1
- package/dist/utils/localization/translations/en.json +12 -1
- package/dist/utils/theme/themeContext.d.ts +0 -1
- package/dist/utils/topWindow/topWindowContext.d.ts +0 -1
- package/dist/utils/useFadeComponent.d.ts +0 -1
- package/dist/utils/userFormat/userFormatContext.d.ts +0 -1
- package/dist/waiting/waiting.d.ts +2 -1
- package/dist/waiting/waiting.js +23 -6
- package/esm/alert/banner.d.ts +2 -3
- package/esm/alert/hooks/useAlertState.d.ts +0 -1
- package/esm/banner/bannerMultipLine.d.ts +0 -1
- package/esm/banner/bannerSingleLine.d.ts +0 -1
- package/esm/banner/utils/isSummaryErrorElement.d.ts +1 -2
- package/esm/card/components/content.d.ts +0 -1
- package/esm/chart/accessibleChart/accessibleChart.js +1 -1
- package/esm/chart/accessibleChart/accessibleChartNarrative.d.ts +1 -1
- package/esm/chart/accessibleChart/accessibleChartNarrative.js +8 -2
- package/esm/chart/accessibleChart/generatePieNarrative.d.ts +7 -0
- package/esm/chart/accessibleChart/generatePieNarrative.js +167 -0
- package/esm/chart/accessibleChart/interfaces.d.ts +1 -0
- package/esm/chart/barChart/getDefaultOptions.js +5 -6
- package/esm/chart/barChart.js +147 -50
- package/esm/chart/interfaces.d.ts +0 -1
- package/esm/chart/lineChart/getDefaultOptions.js +5 -6
- package/esm/chart/lineChart/useChartTicks.d.ts +0 -1
- package/esm/chart/lineChart/useSummary.d.ts +7 -8
- package/esm/chart/lineChart.js +162 -59
- package/esm/chart/pieChart.js +169 -76
- package/esm/chart/plugins/linePlugin/getInterpolatedValue.js +9 -0
- package/esm/chart/utils/convertDates.d.ts +1 -1
- package/esm/chart/utils/getNiceAxisRange.d.ts +21 -0
- package/esm/chart/utils/getNiceAxisRange.js +72 -0
- package/esm/chart/utils/getRange.js +2 -2
- package/esm/chart/utils/getYAxisMeta.d.ts +2 -5
- package/esm/chart/utils/getYAxisMeta.js +17 -2
- package/esm/chart/utils/getYAxisTickCount.d.ts +15 -0
- package/esm/chart/utils/getYAxisTickCount.js +15 -0
- package/esm/checkboxListWithAction/checkboxListWithAction.d.ts +0 -1
- package/esm/chip/chip.d.ts +0 -1
- package/esm/chip/utils/useChip.d.ts +0 -1
- package/esm/commonHelpers/HOC/reducerLogger/reducerLogger.d.ts +1 -1
- package/esm/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.d.ts +0 -1
- package/esm/commonHelpers/arrowNavigation/hooks/useHoldOnScroll.d.ts +0 -1
- package/esm/commonHelpers/hooks/breakpoints.d.ts +4 -0
- package/esm/commonHelpers/hooks/breakpoints.js +4 -0
- package/esm/commonHelpers/hooks/fetch.reducer.d.ts +1 -1
- package/esm/commonHelpers/hooks/useDebouncedMemo.d.ts +0 -1
- package/esm/commonHelpers/hooks/useDeviceType.js +2 -2
- package/esm/commonHelpers/hooks/useEscape.d.ts +1 -1
- package/esm/commonHelpers/hooks/useGridSize.d.ts +0 -1
- package/esm/commonHelpers/hooks/useMobileOrTablet.d.ts +1 -0
- package/esm/commonHelpers/hooks/useMobileOrTablet.js +17 -0
- package/esm/commonHelpers/hooks/usePillSize.d.ts +0 -1
- package/esm/commonHelpers/hooks/useTablet.js +17 -0
- package/esm/dataFeed/dataFeed.d.ts +1 -1
- package/esm/dataFeed/dataFeed.js +2 -2
- package/esm/dataFeed/dataFeedCell/dataFeedCell.d.ts +3 -1
- package/esm/dataFeed/dataFeedColumnsItems.d.ts +2 -2
- package/esm/dataGrid/cell/cell.d.ts +3 -1
- package/esm/dataGrid/columns/actionsColumn/actionsColumn.d.ts +3 -3
- package/esm/dataGrid/dataGrid.d.ts +13 -1
- package/esm/dataGrid/dataGrid.js +48 -3
- package/esm/dataGrid/emptySearchList/emptySearchList.d.ts +0 -1
- package/esm/dataGrid/row/row.d.ts +3 -1
- package/esm/dataGrid/withActions/withActions.d.ts +1 -1
- package/esm/dataGrid/withFlexibleColumns/withFlexibleColumns.d.ts +1 -1
- package/esm/dataGrid/withLoading/withLoading.d.ts +1 -1
- package/esm/dataGrid/withSelectableRows/withLimitedSelectableRows.d.ts +1 -1
- package/esm/dataGrid/withSelectableRows/withSelectableRows.d.ts +1 -1
- package/esm/dataGrid/withSortableColumns/withSortableColumns.d.ts +1 -1
- package/esm/dialog/dialog.d.ts +0 -1
- package/esm/dropdown/dropdown.js +1 -1
- package/esm/dropdown/useDropdownState.d.ts +0 -1
- package/esm/dropdownRaw/dropdownList.d.ts +3 -2
- package/esm/dropdownRaw/dropdownList.js +14 -42
- package/esm/dropdownRaw/dropdownRaw.js +35 -14
- package/esm/dropdownRaw/stateReducer/stateReducer.d.ts +4 -1
- package/esm/dropdownRaw/stateReducer/stateReducer.js +32 -22
- package/esm/dropdownRaw/stateReducer/stateReducerHelper.d.ts +1 -2
- package/esm/dropdownRaw/stateReducer/stateReducerHelper.js +5 -10
- package/esm/dropdownRaw/types.d.ts +20 -0
- package/esm/feedbackContainer/hooks/useFeedbackAlert.d.ts +0 -1
- package/esm/feedbackContainer/hooks/useFeedbackToast.d.ts +0 -1
- package/esm/filters/components/filtersItem.d.ts +2 -2
- package/esm/filters/components/filtersSearchList.d.ts +0 -1
- package/esm/filters/components/filtersSelect.d.ts +0 -1
- package/esm/filters/components/filtersSelectCompact.d.ts +0 -1
- package/esm/filters/components/filtersSelectListItem.d.ts +0 -1
- package/esm/filters/components/filtersSelectUnfoldingPill.d.ts +0 -1
- package/esm/filters/filtersHelper.d.ts +1 -1
- package/esm/filters/filtersHooks.d.ts +0 -1
- package/esm/filtersBar/components/filtersBarDropdownWithCheckbox/filtersBarDropdownWithCheckbox.js +1 -1
- package/esm/filtersBar/filtersBar.js +2 -2
- package/esm/filtersBar/filtersBarActions/filtersBarActions.d.ts +0 -1
- package/esm/filtersBar/filtersBarInterfaces.d.ts +0 -1
- package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelDropdownWithCheckbox/filtersBarSidePanelDropdownWithCheckbox.d.ts +4 -10
- package/esm/formField/components/formFieldAdditionalInfo.d.ts +0 -1
- package/esm/formField/components/formFieldCounter.d.ts +0 -1
- package/esm/formField/components/formFieldLoading.d.ts +0 -1
- package/esm/formField/components/formFieldSkeleton.d.ts +0 -1
- package/esm/formField/components/formFieldWithLabel.d.ts +0 -1
- package/esm/formField/components/formFieldWithoutLabel.d.ts +0 -1
- package/esm/formField/formField.d.ts +1 -1
- package/esm/formField/hooks/useBanner.d.ts +0 -1
- package/esm/formField/hooks/useDisabled.d.ts +1 -1
- package/esm/formGroup/components/customRow/customRow.d.ts +0 -1
- package/esm/formGroup/hooks/listHooks/useStateToElements.d.ts +0 -1
- package/esm/formGroup/hooks/listHooks/useStateToElements.js +1 -1
- package/esm/formGroup/utils/formGroupProvider.d.ts +0 -1
- package/esm/formGroup/utils/isFormLabel.d.ts +1 -1
- package/esm/formGroupItem/formGroupItem.d.ts +0 -1
- package/esm/formLayout/components/layoutColumn/layoutColum.d.ts +0 -1
- package/esm/formLayout/hooks/useFormButtons.d.ts +1 -1
- package/esm/formLayout/types.d.ts +0 -1
- package/esm/formLayout/utils/attachHeadings.d.ts +1 -1
- package/esm/formLayout/utils/attachSeparators.d.ts +0 -1
- package/esm/formLayout/utils/getChildrenWithCustomColumns.d.ts +1 -2
- package/esm/formLayout/utils/getChildrenWithCustomColumns.js +2 -2
- package/esm/formLayout/utils/getFieldLabel.js +5 -5
- package/esm/formSection/components/actions.d.ts +0 -1
- package/esm/formSection/components/additional.d.ts +0 -1
- package/esm/formSection/utils/isFormSection.d.ts +2 -4
- package/esm/formStepper/components/formStepRaw.d.ts +0 -1
- package/esm/formStepper/formStepper.d.ts +0 -1
- package/esm/formStepper/formStepper.js +5 -5
- package/esm/formStepperButtons/formStepperButtons.js +3 -3
- package/esm/gridLayout/hooks/useStretch.js +1 -1
- package/esm/gridLayout/utils/gridLayoutProvider.d.ts +0 -1
- package/esm/gridLayout/utils/gridLayoutProvider.js +1 -1
- package/esm/gridLayout/utils/isGridItem.d.ts +1 -1
- package/esm/groupsFilter/groupsHelper.d.ts +5 -5
- package/esm/groupsFilterRaw/groupsHelper.d.ts +1 -1
- package/esm/groupsFilterRaw/stateReducer/stateReducer.d.ts +1 -1
- package/esm/groupsFilterRaw/testData.js +1 -2
- package/esm/header/components/collapsedItemsControl/utils/handleCustomMenuWrapper.js +5 -0
- package/esm/header/components/mobileFilterControl/mobileFilterControl.d.ts +0 -1
- package/esm/header/components/mobileSearchControl/mobileSearchControl.d.ts +0 -1
- package/esm/header/headerButton.d.ts +0 -1
- package/esm/header/headerContext.d.ts +1 -2
- package/esm/header/headerHelpers.d.ts +5 -5
- package/esm/header/hooks/useNonFittingElements.d.ts +3 -4
- package/esm/headerTitle/headerTitle.d.ts +0 -1
- package/esm/icons/iconAce.d.ts +3 -0
- package/esm/icons/iconAce.js +8 -0
- package/esm/icons/iconBreak.d.ts +3 -0
- package/esm/icons/iconBreak.js +8 -0
- package/esm/icons/iconChevronStepper.d.ts +3 -0
- package/esm/icons/iconChevronStepper.js +8 -0
- package/esm/icons/iconPotato.d.ts +3 -0
- package/esm/icons/iconPotato.js +8 -0
- package/esm/icons/iconToggleLarge.d.ts +3 -0
- package/esm/icons/iconToggleLarge.js +8 -0
- package/esm/icons/iconToggleSmall.d.ts +3 -0
- package/esm/icons/iconToggleSmall.js +8 -0
- package/esm/icons/iconTrendNeutral.d.ts +3 -0
- package/esm/icons/iconTrendNeutral.js +8 -0
- package/esm/icons/iconTruck.d.ts +3 -0
- package/esm/icons/iconTruck.js +8 -0
- package/esm/index.d.ts +8 -0
- package/esm/index.js +8 -0
- package/esm/layout/layout.d.ts +2 -1
- package/esm/layout/layoutBanner.d.ts +0 -1
- package/esm/lineChart/lineChart.d.ts +1 -0
- package/esm/lineChart/lineChart.js +129 -69
- package/esm/lineChartMini/lineChartMini.d.ts +1 -0
- package/esm/lineChartMini/lineChartMini.js +136 -73
- package/esm/list/itemData/itemData.d.ts +2 -1
- package/esm/list/itemData/itemDataInternal.d.ts +2 -1
- package/esm/list/list.d.ts +0 -1
- package/esm/list/utils/isDataListitem.d.ts +1 -1
- package/esm/list/viewportProvider/viewportContext.d.ts +0 -1
- package/esm/menu/components/controlledMenuList/controlledMenuList.d.ts +2 -4
- package/esm/menu/components/controlledMenuList/controlledMenuList.js +3 -1
- package/esm/menu/utils/useDisplayContent.d.ts +21 -0
- package/esm/menu/utils/useDisplayContent.js +31 -0
- package/esm/mobileSheet/components/mobileSheetTitle.d.ts +0 -1
- package/esm/nav/context/nav.context.d.ts +0 -1
- package/esm/nav/navFooter/navEditFooter/navEditFooter.d.ts +0 -1
- package/esm/nav/navFooter/navFooter.d.ts +1 -1
- package/esm/nav/navFooter/navFooterAction/navFooterAction.d.ts +2 -1
- package/esm/nav/navFooter/navFooterAction/navFooterAction.js +3 -1
- package/esm/nav/navItem/navItem.d.ts +2 -0
- package/esm/nav/navItem/navItem.js +57 -48
- package/esm/nav/navItem/navItemContent.d.ts +19 -0
- package/esm/nav/navItem/navItemContent.js +17 -0
- package/esm/nav/navItem/navItemType.d.ts +7 -0
- package/esm/nav/navItem/navItemType.js +6 -0
- package/esm/nav/utils/navUtils.d.ts +2 -4
- package/esm/overview/overview.d.ts +0 -1
- package/esm/pageHeader/pageHeader.d.ts +1 -1
- package/esm/pageHeader/pageHeaderButton.d.ts +0 -1
- package/esm/pageHeader/pageHeaderHelpers.d.ts +1 -1
- package/esm/pageHeader/pageHeaderMenu.d.ts +0 -1
- package/esm/pagination/paginationArrow.d.ts +0 -1
- package/esm/pill/interfaces/pill.interface.d.ts +0 -1
- package/esm/pillBox/components/pillBoxItem.d.ts +1 -2
- package/esm/progressIndicator/progressIndicator.d.ts +39 -0
- package/esm/progressIndicator/progressIndicator.js +26 -0
- package/esm/progressIndicator/progressIndicatorUtils.d.ts +12 -0
- package/esm/progressIndicator/progressIndicatorUtils.js +25 -0
- package/esm/radioGroupRaw/types.d.ts +0 -1
- package/esm/react-chartjs/utils.d.ts +3 -3
- package/esm/searchInputRaw/types.d.ts +0 -1
- package/esm/selectField/selectField.d.ts +2 -3
- package/esm/selectList/selectList.d.ts +0 -1
- package/esm/selectRaw/selectRaw.js +3 -0
- package/esm/sidePanel/sidePanelCell/sidePanelCell.d.ts +0 -1
- package/esm/table/actions/actionsMenu.d.ts +0 -1
- package/esm/table/children/useTableChildren.d.ts +7 -7
- package/esm/table/detailPanel/interfaces.d.ts +0 -1
- package/esm/table/loading/useLoading.d.ts +10 -10
- package/esm/table/nested/nestedData.d.ts +3 -1
- package/esm/table/nested/useNestedRows.d.ts +2 -2
- package/esm/table/selectable/selectableHeader.d.ts +2 -1
- package/esm/table/selectable/selectableHeader.js +4 -3
- package/esm/table/selectable/useSelectableRows.d.ts +1 -1
- package/esm/table/selectable/useSelectableRows.js +7 -4
- package/esm/table/table.d.ts +16 -1
- package/esm/table/table.js +102 -6
- package/esm/tag/tag.d.ts +19 -0
- package/esm/tag/tag.js +10 -0
- package/esm/testHelpers/geotab-axe/index.d.ts +0 -1
- package/esm/toastRaw/toastRaw.d.ts +1 -1
- package/esm/toastRaw/toastRaw.js +3 -1
- package/esm/toggleButtonRaw/types.d.ts +0 -1
- package/esm/tooltipInfo/tooltipInfo.d.ts +0 -1
- package/esm/utils/localization/directionContext.d.ts +0 -1
- package/esm/utils/localization/languageContext.d.ts +0 -1
- package/esm/utils/localization/translations/en.json +12 -1
- package/esm/utils/theme/themeContext.d.ts +0 -1
- package/esm/utils/topWindow/topWindowContext.d.ts +0 -1
- package/esm/utils/useFadeComponent.d.ts +0 -1
- package/esm/utils/userFormat/userFormatContext.d.ts +0 -1
- package/esm/waiting/waiting.d.ts +2 -1
- package/esm/waiting/waiting.js +24 -7
- package/package.json +13 -6
- package/esm/gridLayout/hooks/useTablet.js +0 -20
- /package/dist/{gridLayout → commonHelpers}/hooks/useTablet.d.ts +0 -0
- /package/esm/{gridLayout → commonHelpers}/hooks/useTablet.d.ts +0 -0
package/dist/table/table.js
CHANGED
|
@@ -28,6 +28,57 @@ const tableBulkActions_1 = require("./children/tableBulkActions");
|
|
|
28
28
|
const tablePagination_1 = require("./children/tablePagination");
|
|
29
29
|
const tableEmpty_1 = require("./children/tableEmpty");
|
|
30
30
|
const tableFooter_1 = require("./children/tableFooter");
|
|
31
|
+
injectString("da-DK", "Loading more rows", "Indl\xE6ser flere r\xE6kker");
|
|
32
|
+
injectString("en", "Loading more rows", "Loading more rows");
|
|
33
|
+
injectString("fi-FI", "Loading more rows", "Ladataan lis\xE4\xE4 rivej\xE4");
|
|
34
|
+
injectString("hu-HU", "Loading more rows", "Tov\xE1bbi sorok bet\xF6lt\xE9se");
|
|
35
|
+
injectString("ms", "Loading more rows", "Memuatkan lebih banyak baris");
|
|
36
|
+
injectString("nb-NO", "Loading more rows", "Laster inn flere rader");
|
|
37
|
+
injectString("nl", "Loading more rows", "Meer rijen laden");
|
|
38
|
+
injectString("pt-BR", "Loading more rows", "Carregando mais linhas");
|
|
39
|
+
injectString("sk-SK", "Loading more rows", "Na\u010D\xEDtavanie \u010Fal\u0161\xEDch riadkov");
|
|
40
|
+
injectString("sv", "Loading more rows", "Laddar fler rader");
|
|
41
|
+
injectString("ar", "Loading more rows", "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u0635\u0641\u0648\u0641");
|
|
42
|
+
injectString("lt-LT", "Loading more rows", "\u012Ekeliama daugiau eilu\u010Di\u0173");
|
|
43
|
+
injectString("lv-LV", "Loading more rows", "Iel\u0101d\u0113 vair\u0101k rindu");
|
|
44
|
+
injectString("ka-GE", "Loading more rows", "\u10DB\u10D4\u10E2\u10D8 \u10E1\u10E2\u10E0\u10D8\u10E5\u10DD\u10DC\u10D8\u10E1 \u10E9\u10D0\u10E2\u10D5\u10D8\u10E0\u10D7\u10D5\u10D0");
|
|
45
|
+
injectString("el-GR", "Loading more rows", "\u03A6\u03CC\u03C1\u03C4\u03C9\u03C3\u03B7 \u03C0\u03B5\u03C1\u03B9\u03C3\u03C3\u03CC\u03C4\u03B5\u03C1\u03C9\u03BD \u03B3\u03C1\u03B1\u03BC\u03BC\u03CE\u03BD");
|
|
46
|
+
injectString("et-EE", "Loading more rows", "Laen rohkem ridu");
|
|
47
|
+
injectString("bg-BG", "Loading more rows", "\u0417\u0430\u0440\u0435\u0436\u0434\u0430\u043D\u0435 \u043D\u0430 \u043E\u0449\u0435 \u0440\u0435\u0434\u043E\u0432\u0435");
|
|
48
|
+
injectString("da-DK", "1 more row loaded", "1 ekstra r\xE6kke indl\xE6st");
|
|
49
|
+
injectString("en", "1 more row loaded", "1 more row loaded");
|
|
50
|
+
injectString("fi-FI", "1 more row loaded", "1 rivi lis\xE4\xE4 ladattu");
|
|
51
|
+
injectString("hu-HU", "1 more row loaded", "1 tov\xE1bbi sor bet\xF6ltve");
|
|
52
|
+
injectString("ms", "1 more row loaded", "1 baris lagi dimuatkan");
|
|
53
|
+
injectString("nb-NO", "1 more row loaded", "1 ekstra rad lastet inn");
|
|
54
|
+
injectString("nl", "1 more row loaded", "1 extra rij geladen");
|
|
55
|
+
injectString("pt-BR", "1 more row loaded", "1 linha adicional carregada");
|
|
56
|
+
injectString("sk-SK", "1 more row loaded", "1 \u010Fal\u0161\xED riadok na\u010D\xEDtan\xFD");
|
|
57
|
+
injectString("sv", "1 more row loaded", "1 ytterligare rad laddad");
|
|
58
|
+
injectString("ar", "1 more row loaded", "\u062A\u0645 \u062A\u062D\u0645\u064A\u0644 \u0635\u0641 \u0648\u0627\u062D\u062F \u0625\u0636\u0627\u0641\u064A");
|
|
59
|
+
injectString("lt-LT", "1 more row loaded", "\u012Ekelta dar 1 eilut\u0117");
|
|
60
|
+
injectString("lv-LV", "1 more row loaded", "Iel\u0101d\u0113ta v\u0113l 1 rinda");
|
|
61
|
+
injectString("ka-GE", "1 more row loaded", "\u10E9\u10D0\u10D8\u10E2\u10D5\u10D8\u10E0\u10D7\u10D0 \u10D9\u10D8\u10D3\u10D4\u10D5 1 \u10E1\u10E2\u10E0\u10D8\u10E5\u10DD\u10DC\u10D8");
|
|
62
|
+
injectString("el-GR", "1 more row loaded", "\u03A6\u03BF\u03C1\u03C4\u03CE\u03B8\u03B7\u03BA\u03B5 1 \u03B1\u03BA\u03CC\u03BC\u03B7 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE");
|
|
63
|
+
injectString("et-EE", "1 more row loaded", "1 rida juurde laaditud");
|
|
64
|
+
injectString("bg-BG", "1 more row loaded", "\u0417\u0430\u0440\u0435\u0434\u0435\u043D \u0435 1 \u043D\u043E\u0432 \u0440\u0435\u0434");
|
|
65
|
+
injectString("da-DK", "{count} more rows loaded", "{count} ekstra r\xE6kker indl\xE6st");
|
|
66
|
+
injectString("en", "{count} more rows loaded", "{count} more rows loaded");
|
|
67
|
+
injectString("fi-FI", "{count} more rows loaded", "{count} rivi\xE4 lis\xE4\xE4 ladattu");
|
|
68
|
+
injectString("hu-HU", "{count} more rows loaded", "{count} tov\xE1bbi sor bet\xF6ltve");
|
|
69
|
+
injectString("ms", "{count} more rows loaded", "{count} baris lagi dimuatkan");
|
|
70
|
+
injectString("nb-NO", "{count} more rows loaded", "{count} ekstra rader lastet inn");
|
|
71
|
+
injectString("nl", "{count} more rows loaded", "{count} extra rijen geladen");
|
|
72
|
+
injectString("pt-BR", "{count} more rows loaded", "{count} linhas adicionais carregadas");
|
|
73
|
+
injectString("sk-SK", "{count} more rows loaded", "{count} \u010Fal\u0161\xEDch riadkov na\u010D\xEDtan\xFDch");
|
|
74
|
+
injectString("sv", "{count} more rows loaded", "{count} ytterligare rader laddade");
|
|
75
|
+
injectString("ar", "{count} more rows loaded", "\u062A\u0645 \u062A\u062D\u0645\u064A\u0644 {count} \u0635\u0641\u0648\u0641 \u0625\u0636\u0627\u0641\u064A\u0629");
|
|
76
|
+
injectString("lt-LT", "{count} more rows loaded", "\u012Ekeltos dar {count} eilut\u0117s");
|
|
77
|
+
injectString("lv-LV", "{count} more rows loaded", "Iel\u0101d\u0113tas v\u0113l {count} rindas");
|
|
78
|
+
injectString("ka-GE", "{count} more rows loaded", "\u10E9\u10D0\u10D8\u10E2\u10D5\u10D8\u10E0\u10D7\u10D0 \u10D9\u10D8\u10D3\u10D4\u10D5 {count} \u10E1\u10E2\u10E0\u10D8\u10E5\u10DD\u10DC\u10D8");
|
|
79
|
+
injectString("el-GR", "{count} more rows loaded", "\u03A6\u03BF\u03C1\u03C4\u03CE\u03B8\u03B7\u03BA\u03B1\u03BD {count} \u03B1\u03BA\u03CC\u03BC\u03B7 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AD\u03C2");
|
|
80
|
+
injectString("et-EE", "{count} more rows loaded", "{count} rida juurde laaditud");
|
|
81
|
+
injectString("bg-BG", "{count} more rows loaded", "\u0417\u0430\u0440\u0435\u0434\u0435\u043D\u0438 \u0441\u0430 {count} \u043D\u043E\u0432\u0438 \u0440\u0435\u0434\u0430");
|
|
31
82
|
injectString("cs", "Selection panel", "Selection panel");
|
|
32
83
|
injectString("da-DK", "Selection panel", "Valgpanel");
|
|
33
84
|
injectString("de", "Selection panel", "Selection panel");
|
|
@@ -154,6 +205,12 @@ const getGridClasses_1 = require("../gridLayout/utils/getGridClasses");
|
|
|
154
205
|
const useNestedRows_1 = require("./nested/useNestedRows");
|
|
155
206
|
const tableDetailPanel_1 = require("./children/tableDetailPanel");
|
|
156
207
|
const useLanguage_1 = require("../utils/localization/useLanguage");
|
|
208
|
+
// Interpolation placeholder used in the "{count} more rows loaded" translation key.
|
|
209
|
+
// `translate()` has no interpolation overload, so the count is substituted at runtime via
|
|
210
|
+
// `.replace()`. The translation KEY must stay a string literal (the build-time translation
|
|
211
|
+
// injector statically extracts literal keys — see build-utils/translations/translation-injector.js),
|
|
212
|
+
// so this constant is only the replacement token, keeping the `.replace()` call from hard-coding it.
|
|
213
|
+
const ROW_COUNT_TOKEN = "{count}";
|
|
157
214
|
const TableInner = ({
|
|
158
215
|
entities,
|
|
159
216
|
columns,
|
|
@@ -166,6 +223,7 @@ const TableInner = ({
|
|
|
166
223
|
className,
|
|
167
224
|
height,
|
|
168
225
|
onFeedEnd,
|
|
226
|
+
onScrollEnd,
|
|
169
227
|
rowClassName,
|
|
170
228
|
feedExpandable,
|
|
171
229
|
expandedRows,
|
|
@@ -190,6 +248,34 @@ const TableInner = ({
|
|
|
190
248
|
}
|
|
191
249
|
setSelectMode(value);
|
|
192
250
|
}, [isMobile, setSelectMode]);
|
|
251
|
+
const feedEndCallback = onScrollEnd !== null && onScrollEnd !== void 0 ? onScrollEnd : onFeedEnd;
|
|
252
|
+
// Desktop infinite scroll is active when onScrollEnd is wired. In that mode there are no pages:
|
|
253
|
+
// pagination is hidden and "Select current page" is suppressed (the checkbox selects all instead).
|
|
254
|
+
const isInfinite = !!onScrollEnd;
|
|
255
|
+
// Announce loading/loaded state to screen readers (the skeleton rows are not perceivable to them).
|
|
256
|
+
// Scoped to infinite scroll only: paged tables also pass `isLoading` for initial-fetch skeletons,
|
|
257
|
+
// and "Loading more rows" / "N more rows loaded" are semantically wrong outside infinite scroll.
|
|
258
|
+
const [liveMessage, setLiveMessage] = (0, react_1.useState)("");
|
|
259
|
+
const prevEntitiesCountRef = (0, react_1.useRef)(entities.length);
|
|
260
|
+
(0, react_1.useEffect)(() => {
|
|
261
|
+
if (!isInfinite) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (isLoading) {
|
|
265
|
+
setLiveMessage(translate("Loading more rows"));
|
|
266
|
+
} else if (entities.length > prevEntitiesCountRef.current) {
|
|
267
|
+
// Announce the delta (newly appended rows), not the running total — hearing
|
|
268
|
+
// "500 rows loaded" on a later page is confusing when only a page just arrived.
|
|
269
|
+
// Separate singular key because `translate()` has no plural support, so a raw
|
|
270
|
+
// "1 more rows loaded" would be ungrammatical for screen-reader users.
|
|
271
|
+
const appendedCount = entities.length - prevEntitiesCountRef.current;
|
|
272
|
+
const message = appendedCount === 1 ? translate("1 more row loaded") : translate("{count} more rows loaded").replace(ROW_COUNT_TOKEN, String(appendedCount));
|
|
273
|
+
setLiveMessage(message);
|
|
274
|
+
} else {
|
|
275
|
+
setLiveMessage("");
|
|
276
|
+
}
|
|
277
|
+
prevEntitiesCountRef.current = entities.length;
|
|
278
|
+
}, [isInfinite, isLoading, entities.length, translate]);
|
|
193
279
|
const {
|
|
194
280
|
expanded,
|
|
195
281
|
onExpandedChange,
|
|
@@ -199,7 +285,7 @@ const TableInner = ({
|
|
|
199
285
|
const {
|
|
200
286
|
selectableColumns,
|
|
201
287
|
selectableFeedWrapper
|
|
202
|
-
} = (0, useSelectableRows_1.useSelectableRows)(nestedColumns, entities, isMobile, selectMode, setMobileSelectMode, isLoading ? undefined : selectable);
|
|
288
|
+
} = (0, useSelectableRows_1.useSelectableRows)(nestedColumns, entities, isMobile, selectMode, setMobileSelectMode, isLoading ? undefined : selectable, isInfinite);
|
|
203
289
|
const {
|
|
204
290
|
sortableColumns,
|
|
205
291
|
feedSortControl
|
|
@@ -263,7 +349,9 @@ const TableInner = ({
|
|
|
263
349
|
const handleOnHidePanel = (0, react_1.useCallback)(() => setSelectMode(false), []);
|
|
264
350
|
const handleOnTriggerClick = (0, react_1.useCallback)(() => setSelectMode(prev => !prev), []);
|
|
265
351
|
const hasPostActions = (0, react_1.useMemo)(() => columnsPopup || isMobile && selectable || !isMobile && fullscreenButton || isFeedVisible, [columnsPopup, fullscreenButton, isFeedVisible, isMobile, selectable]);
|
|
266
|
-
|
|
352
|
+
// Pagination is desktop-only and is hidden in infinite-scroll mode (no pages).
|
|
353
|
+
const showPagination = !!pagination && !isMobile && !isInfinite;
|
|
354
|
+
const hasToolbar = (0, react_1.useMemo)(() => bulkActions || feedSortControl || showPagination || other.length || columnsPopup || !isMobile && fullscreenButton || isFeedVisible, [bulkActions, columnsPopup, feedSortControl, fullscreenButton, isFeedVisible, isMobile, other.length, showPagination]);
|
|
267
355
|
const gridAutoHeight = (0, react_1.useMemo)(() => contentHeight ? `${contentHeight}px` : undefined, [contentHeight]);
|
|
268
356
|
const minHeight = "400px";
|
|
269
357
|
const gridHeight = (0, react_1.useMemo)(() => height || gridAutoHeight || minHeight, [gridAutoHeight, height]);
|
|
@@ -283,10 +371,10 @@ const TableInner = ({
|
|
|
283
371
|
gridType: isMobile ? deviceType_1.DeviceType.Mobile : deviceType_1.DeviceType.Desktop,
|
|
284
372
|
children: [(0, jsx_runtime_1.jsxs)(entitiesListActions_1.EntitiesListActions.Actions, {
|
|
285
373
|
children: [!isMobile && bulkActions && selectionQty > 0 ? bulkActions : null, feedSortControl]
|
|
286
|
-
}),
|
|
374
|
+
}), showPagination || other.length > 0 ? (0, jsx_runtime_1.jsxs)(entitiesListActions_1.EntitiesListActions.Pagination, {
|
|
287
375
|
children: [(0, jsx_runtime_1.jsx)(entitiesListActions_1.EntitiesListActions.CustomElements, {
|
|
288
376
|
children: other
|
|
289
|
-
}),
|
|
377
|
+
}), showPagination ? pagination : null]
|
|
290
378
|
}) : null, hasPostActions ? (0, jsx_runtime_1.jsxs)(entitiesListActions_1.EntitiesListActions.PostActions, {
|
|
291
379
|
children: [columnsPopup ? (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, {
|
|
292
380
|
children: [(0, jsx_runtime_1.jsx)(columnsListButton_1.ColumnsListButton, {
|
|
@@ -304,6 +392,11 @@ const TableInner = ({
|
|
|
304
392
|
children: bulkActions
|
|
305
393
|
}) : null, !isMobile ? fullscreenButton : null]
|
|
306
394
|
}) : null]
|
|
395
|
+
}) : null, isInfinite ? (0, jsx_runtime_1.jsx)("div", {
|
|
396
|
+
className: "zen-visually-hidden",
|
|
397
|
+
role: "status",
|
|
398
|
+
"aria-live": "polite",
|
|
399
|
+
children: liveMessage
|
|
307
400
|
}) : null, (0, jsx_runtime_1.jsxs)("div", {
|
|
308
401
|
className: "zen-table__content",
|
|
309
402
|
children: [(0, jsx_runtime_1.jsx)("div", {
|
|
@@ -317,7 +410,7 @@ const TableInner = ({
|
|
|
317
410
|
entities: loadingEntities,
|
|
318
411
|
expanded: isFeedExpanded,
|
|
319
412
|
options: {
|
|
320
|
-
onFeedEnd:
|
|
413
|
+
onFeedEnd: feedEndCallback,
|
|
321
414
|
visibleColumns
|
|
322
415
|
},
|
|
323
416
|
actions: actions,
|
|
@@ -330,6 +423,7 @@ const TableInner = ({
|
|
|
330
423
|
activePage: activePage,
|
|
331
424
|
active: activeIdForRow,
|
|
332
425
|
onClick: onClickForRow,
|
|
426
|
+
isLoading: isLoading,
|
|
333
427
|
children: [emptyList || (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), footer || (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})]
|
|
334
428
|
}) : (0, jsx_runtime_1.jsxs)(dataGrid_1.DataGrid, {
|
|
335
429
|
columns: loadingColumns,
|
|
@@ -340,6 +434,8 @@ const TableInner = ({
|
|
|
340
434
|
onExpandedChange: onExpandedChange,
|
|
341
435
|
active: activeIdForRow,
|
|
342
436
|
onClick: onClickForRow,
|
|
437
|
+
onScrollEnd: onScrollEnd,
|
|
438
|
+
isLoading: isLoading,
|
|
343
439
|
children: [emptyList || (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), footer || (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})]
|
|
344
440
|
})
|
|
345
441
|
}), detailPanel !== null && detailPanel !== void 0 ? detailPanel : null]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "./tag.less";
|
|
2
|
+
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
3
|
+
export type TTagColor = "red" | "yellow" | "green" | "blue" | "grey";
|
|
4
|
+
export interface ITag extends IZenComponentProps {
|
|
5
|
+
/** Status dot color, mapped to the categorical data tokens (`--data--categorical-*`). */
|
|
6
|
+
color: TTagColor;
|
|
7
|
+
/** Label text displayed next to the dot. */
|
|
8
|
+
children: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A small status indicator: a categorical color dot followed by a label.
|
|
12
|
+
*
|
|
13
|
+
* Presentational and grid-agnostic — use it standalone, inside a table cell
|
|
14
|
+
* (via a column's inline `render`), a detail panel, or a mobile card.
|
|
15
|
+
*/
|
|
16
|
+
export declare const Tag: {
|
|
17
|
+
({ color, className, children }: ITag): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
package/dist/tag/tag.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Tag = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
6
|
+
/**
|
|
7
|
+
* A small status indicator: a categorical color dot followed by a label.
|
|
8
|
+
*
|
|
9
|
+
* Presentational and grid-agnostic — use it standalone, inside a table cell
|
|
10
|
+
* (via a column's inline `render`), a detail panel, or a mobile card.
|
|
11
|
+
*/
|
|
12
|
+
const Tag = ({ color, className, children }) => ((0, jsx_runtime_1.jsxs)("span", { className: (0, classNames_1.classNames)(["zen-tag", className !== null && className !== void 0 ? className : ""]), children: [(0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)(["zen-tag__dot", `zen-tag__dot--${color}`]), "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("span", { className: "zen-tag__label", children: children })] }));
|
|
13
|
+
exports.Tag = Tag;
|
|
14
|
+
exports.Tag.displayName = "Tag";
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
36
|
var t = {};
|
|
27
37
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -4,7 +4,7 @@ import { ReactNode, RefObject } from "react";
|
|
|
4
4
|
import { TAnimationType } from "../feedbackContainer/types";
|
|
5
5
|
import { IIcon } from "../icons/icon";
|
|
6
6
|
import { TButtonIconPosition } from "../textIconButton/textIconButton";
|
|
7
|
-
export type TToastType = "info" | "success";
|
|
7
|
+
export type TToastType = "info" | "success" | "error";
|
|
8
8
|
export interface IAction {
|
|
9
9
|
text: string;
|
|
10
10
|
onClick?: () => void;
|
|
@@ -44,6 +44,7 @@ injectString("bg-BG", "Close", "\u0417\u0430\u0442\u0432\u0430\u0440\u044F\u043D
|
|
|
44
44
|
const toastAnimation_1 = require("./components/toastAnimation");
|
|
45
45
|
const iconCheckRadio_1 = require("../icons/iconCheckRadio");
|
|
46
46
|
const iconInfoCircle_1 = require("../icons/iconInfoCircle");
|
|
47
|
+
const iconWarning_1 = require("../icons/iconWarning");
|
|
47
48
|
const react_1 = require("react");
|
|
48
49
|
const useDrive_1 = require("../utils/theme/useDrive");
|
|
49
50
|
const button_1 = require("../button/button");
|
|
@@ -56,7 +57,8 @@ const themeContext_1 = require("../utils/theme/themeContext");
|
|
|
56
57
|
const textIconButton_1 = require("../textIconButton/textIconButton");
|
|
57
58
|
const typedIcons = {
|
|
58
59
|
success: iconCheckRadio_1.IconCheckRadio,
|
|
59
|
-
info: iconInfoCircle_1.IconInfoCircle
|
|
60
|
+
info: iconInfoCircle_1.IconInfoCircle,
|
|
61
|
+
error: iconWarning_1.IconWarning
|
|
60
62
|
};
|
|
61
63
|
const getIcon = t => typedIcons[t];
|
|
62
64
|
exports.TOAST_CLASSNAME = "zen-toast";
|
|
@@ -27,13 +27,23 @@ var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? fun
|
|
|
27
27
|
} : function (o, v) {
|
|
28
28
|
o["default"] = v;
|
|
29
29
|
});
|
|
30
|
-
var __importStar = this && this.__importStar || function (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
30
|
+
var __importStar = this && this.__importStar || function () {
|
|
31
|
+
var ownKeys = function (o) {
|
|
32
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
+
var ar = [];
|
|
34
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
+
return ar;
|
|
36
|
+
};
|
|
37
|
+
return ownKeys(o);
|
|
38
|
+
};
|
|
39
|
+
return function (mod) {
|
|
40
|
+
if (mod && mod.__esModule) return mod;
|
|
41
|
+
var result = {};
|
|
42
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
+
__setModuleDefault(result, mod);
|
|
44
|
+
return result;
|
|
45
|
+
};
|
|
46
|
+
}();
|
|
37
47
|
Object.defineProperty(exports, "__esModule", {
|
|
38
48
|
value: true
|
|
39
49
|
});
|
package/dist/tooltip/tooltip.js
CHANGED
|
@@ -27,13 +27,23 @@ var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? fun
|
|
|
27
27
|
} : function (o, v) {
|
|
28
28
|
o["default"] = v;
|
|
29
29
|
});
|
|
30
|
-
var __importStar = this && this.__importStar || function (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
30
|
+
var __importStar = this && this.__importStar || function () {
|
|
31
|
+
var ownKeys = function (o) {
|
|
32
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
+
var ar = [];
|
|
34
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
+
return ar;
|
|
36
|
+
};
|
|
37
|
+
return ownKeys(o);
|
|
38
|
+
};
|
|
39
|
+
return function (mod) {
|
|
40
|
+
if (mod && mod.__esModule) return mod;
|
|
41
|
+
var result = {};
|
|
42
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
+
__setModuleDefault(result, mod);
|
|
44
|
+
return result;
|
|
45
|
+
};
|
|
46
|
+
}();
|
|
37
47
|
Object.defineProperty(exports, "__esModule", {
|
|
38
48
|
value: true
|
|
39
49
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isArraysEqualDeeply =
|
|
3
|
+
exports.isArraysEqualDeeply = isArraysEqualDeeply;
|
|
4
4
|
const isArraysEqualShallow_1 = require("./isArraysEqualShallow");
|
|
5
5
|
const isBothArraysShallow_1 = require("./isBothArraysShallow");
|
|
6
6
|
const isElementsEqual_1 = require("./isElementsEqual");
|
|
@@ -16,4 +16,3 @@ function isArraysEqualDeeply(a, b) {
|
|
|
16
16
|
}
|
|
17
17
|
return (0, isElementsEqual_1.isPropertiesEqual)(a, b);
|
|
18
18
|
}
|
|
19
|
-
exports.isArraysEqualDeeply = isArraysEqualDeeply;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isPropertiesEqual = exports.isObjectsNotEqualShallow = exports.isPrimitivesNotEqual = exports.isArraysNotEqual = exports.isBothObjectsShallow = exports.isBothFunctions = exports.isBothArrays = exports.isBothObjects = void 0;
|
|
4
|
+
exports.isElementsEqual = isElementsEqual;
|
|
4
5
|
const isArraysEqualDeeply_1 = require("./isArraysEqualDeeply");
|
|
5
6
|
const isArraysEqualShallow_1 = require("./isArraysEqualShallow");
|
|
6
7
|
const isBothArraysShallow_1 = require("./isBothArraysShallow");
|
|
@@ -95,4 +96,3 @@ function isElementsEqual(...args) {
|
|
|
95
96
|
}
|
|
96
97
|
return (0, exports.isPropertiesEqual)(elem1, elem2);
|
|
97
98
|
}
|
|
98
|
-
exports.isElementsEqual = isElementsEqual;
|
package/dist/utils/escapeHtml.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.htmlEscape =
|
|
3
|
+
exports.htmlEscape = htmlEscape;
|
|
4
4
|
function htmlEscape(str) {
|
|
5
5
|
return String(str || "")
|
|
6
6
|
.replace(/&/g, "&")
|
|
@@ -9,4 +9,3 @@ function htmlEscape(str) {
|
|
|
9
9
|
.replace(/</g, "<")
|
|
10
10
|
.replace(/>/g, ">");
|
|
11
11
|
}
|
|
12
|
-
exports.htmlEscape = htmlEscape;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const languageContext: import("react").Context<"it" | "th" | "tr" | "ms" | "id" | "ar" | "en" | "es" | "de" | "cs" | "fr-FR" | "fr" | "ja" | "nl" | "pl" | "pt-BR" | "sv" | "zh-Hans" | "ko-KR" | "zh-TW" | "da-DK" | "fi-FI" | "hu-HU" | "nb-NO" | "sk-SK" | "pt-PT" | "ro-RO" | "bg-BG" | "et-EE" | "el-GR" | "lv-LV" | "lt-LT" | "ka-GE">;
|
|
@@ -344,5 +344,16 @@
|
|
|
344
344
|
"Customize view": "Customize view",
|
|
345
345
|
"Select menu": "Select menu",
|
|
346
346
|
"Increase value": "Increase value",
|
|
347
|
-
"Decrease value": "Decrease value"
|
|
347
|
+
"Decrease value": "Decrease value",
|
|
348
|
+
"Loading more rows": "Loading more rows",
|
|
349
|
+
"1 more row loaded": "1 more row loaded",
|
|
350
|
+
"{count} more rows loaded": "{count} more rows loaded",
|
|
351
|
+
"Line chart": "Line chart",
|
|
352
|
+
"Bar chart": "Bar chart",
|
|
353
|
+
"Pie chart": "Pie chart",
|
|
354
|
+
"Summary: {COUNT} slices.": "Summary: {COUNT} slices.",
|
|
355
|
+
"Largest:": "Largest:",
|
|
356
|
+
"Smallest:": "Smallest:",
|
|
357
|
+
"Rest: {COUNT} other slices account for {PCT}%.": "Rest: {COUNT} other slices account for {PCT}%.",
|
|
358
|
+
"Details, {COUNT} items:": "Details, {COUNT} items:"
|
|
348
359
|
}
|
|
@@ -5,5 +5,6 @@ export interface IWaiting extends IZenComponentProps {
|
|
|
5
5
|
delay?: number;
|
|
6
6
|
hideOverlay?: boolean;
|
|
7
7
|
description?: string;
|
|
8
|
+
label?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const Waiting: ({ isLoading, delay, hideOverlay, className, description }: IWaiting) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export declare const Waiting: ({ isLoading, delay, hideOverlay, className, description, label }: IWaiting) => import("react/jsx-runtime").JSX.Element | null;
|
package/dist/waiting/waiting.js
CHANGED
|
@@ -6,23 +6,40 @@ const react_1 = require("react");
|
|
|
6
6
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
7
7
|
const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
|
|
8
8
|
const zen_1 = require("../utils/zen");
|
|
9
|
-
const Waiting = ({ isLoading = false, delay = 400, hideOverlay = false, className = "", description }) => {
|
|
9
|
+
const Waiting = ({ isLoading = false, delay = 400, hideOverlay = false, className = "", description, label }) => {
|
|
10
10
|
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
11
|
+
const [statusText, setStatusText] = (0, react_1.useState)("");
|
|
11
12
|
const spinnerDriveClassName = (0, useDriveClassName_1.useDriveClassName)("zen-waiting__spinner");
|
|
13
|
+
const showWaiting = isLoading && (delay <= 0 || visible);
|
|
12
14
|
(0, react_1.useEffect)(() => {
|
|
13
15
|
var _a;
|
|
14
16
|
let timer;
|
|
15
|
-
if (isLoading) {
|
|
16
|
-
|
|
17
|
+
if (!isLoading) {
|
|
18
|
+
setVisible(false);
|
|
19
|
+
}
|
|
20
|
+
else if (delay <= 0) {
|
|
21
|
+
setVisible(true);
|
|
17
22
|
}
|
|
18
23
|
else {
|
|
19
|
-
setVisible(
|
|
24
|
+
timer = (_a = zen_1.zen.setTimeout) === null || _a === void 0 ? void 0 : _a.call(zen_1.zen, () => setVisible(true), delay);
|
|
25
|
+
}
|
|
26
|
+
return () => {
|
|
27
|
+
var _a;
|
|
28
|
+
timer && ((_a = zen_1.zen.clearTimeout) === null || _a === void 0 ? void 0 : _a.call(zen_1.zen, timer));
|
|
29
|
+
};
|
|
30
|
+
}, [isLoading, delay]);
|
|
31
|
+
(0, react_1.useEffect)(() => {
|
|
32
|
+
var _a;
|
|
33
|
+
let timer;
|
|
34
|
+
setStatusText("");
|
|
35
|
+
if (isLoading && showWaiting) {
|
|
36
|
+
timer = (_a = zen_1.zen.setTimeout) === null || _a === void 0 ? void 0 : _a.call(zen_1.zen, () => setStatusText(description || label || ""), 0);
|
|
20
37
|
}
|
|
21
38
|
return () => {
|
|
22
39
|
var _a;
|
|
23
40
|
timer && ((_a = zen_1.zen.clearTimeout) === null || _a === void 0 ? void 0 : _a.call(zen_1.zen, timer));
|
|
24
41
|
};
|
|
25
|
-
}, [isLoading,
|
|
26
|
-
return
|
|
42
|
+
}, [isLoading, showWaiting, description, label]);
|
|
43
|
+
return isLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { role: "status", className: "zen-waiting__status", children: statusText ? (0, jsx_runtime_1.jsx)("span", { className: "zen-visually-hidden", children: statusText }) : null }), showWaiting ? ((0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-waiting", className]), children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-waiting__overlay", hideOverlay ? "zen-waiting__overlay--hidden" : ""]) }), (0, jsx_runtime_1.jsxs)("div", { className: "zen-waiting__spinner-container", children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-waiting__spinner", spinnerDriveClassName || ""]), children: (0, jsx_runtime_1.jsxs)("svg", { viewBox: "0 0 64 64", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsxs)("linearGradient", { id: "spinnerGradient", x1: "0", y1: "0", x2: "1", y2: "0", gradientUnits: "objectBoundingBox", children: [(0, jsx_runtime_1.jsx)("stop", { offset: "0%", stopColor: "var(--borders-form-field--active)", stopOpacity: "1" }), (0, jsx_runtime_1.jsx)("stop", { offset: "33.33%", stopColor: "var(--borders-form-field--active)", stopOpacity: "0.8" }), (0, jsx_runtime_1.jsx)("stop", { offset: "50%", stopColor: "var(--borders-form-field--active)", stopOpacity: "0.5" }), (0, jsx_runtime_1.jsx)("stop", { offset: "66.67%", stopColor: "var(--borders-form-field--active)", stopOpacity: "0.2" }), (0, jsx_runtime_1.jsx)("stop", { offset: "100%", stopColor: "var(--borders-form-field--active)", stopOpacity: "0" })] }) }), (0, jsx_runtime_1.jsx)("path", { className: "zen-waiting__spinner-animation", stroke: "url(#spinnerGradient)", strokeWidth: "6", strokeLinecap: "round", d: "M 32 4 A 28 28 0 1 1 32 60 A 28 28 0 1 1 32 4 Z" })] }) }), description && (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-waiting__spinner-text"]), children: description })] })] })) : null] })) : null;
|
|
27
44
|
};
|
|
28
45
|
exports.Waiting = Waiting;
|
package/esm/alert/banner.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
ErrorSummary: import("react").FC<import("../banner/bannerErrorSummary").IBannerErrorSummary>;
|
|
1
|
+
export declare const Banner: import("react").FC<import("..").IBanner> & {
|
|
2
|
+
ErrorSummary: typeof import("../banner/bannerErrorSummary").BannerErrorSummary;
|
|
4
3
|
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IBannerErrorSummary } from "../bannerErrorSummary";
|
|
3
|
-
export declare const isSummaryErrorElement: (child: React.ReactNode) => child is
|
|
2
|
+
export declare const isSummaryErrorElement: (child: React.ReactNode) => child is React.ReactElement<IBannerErrorSummary>;
|
|
@@ -2,4 +2,4 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { UserFormatProvider } from "../../utils/userFormat/userFormatProvider";
|
|
3
3
|
import { AccessibleChartNarrative } from "./accessibleChartNarrative";
|
|
4
4
|
import { AccessibleChartTable } from "./accessibleChartTable";
|
|
5
|
-
export const AccessibleChart = (props) => (_jsxs(UserFormatProvider, { dateFormat: "d MMMM yyyy", children: [
|
|
5
|
+
export const AccessibleChart = (props) => (_jsxs(UserFormatProvider, { dateFormat: "d MMMM yyyy", children: [_jsx(AccessibleChartNarrative, Object.assign({}, props)), _jsx(AccessibleChartTable, Object.assign({}, props))] }));
|
|
@@ -3,4 +3,4 @@ import { IBarChartOptions } from "../barChart/interfaces";
|
|
|
3
3
|
import { ILineChartOptions, ILineChartPoint } from "../lineChart/interfaces";
|
|
4
4
|
export declare function collectAllPoints(dataset: AccessibleChartDataset, dateFormatter: (d: Date | string, format?: string) => string, miniChartLabels?: string[], options?: ILineChartOptions | IBarChartOptions): IAccessiblePoint[];
|
|
5
5
|
export declare function simplifyData(data: ILineChartPoint[]): ILineChartPoint[];
|
|
6
|
-
export declare const AccessibleChartNarrative: ({ data, options }: IAccessibleChart) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const AccessibleChartNarrative: ({ data, type, options, narrativeId }: IAccessibleChart) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,6 +9,7 @@ import { getFormattedLabel } from "../utils/getFormattedLabel";
|
|
|
9
9
|
import { truncateDecimals } from "../../utils/truncateDecimals";
|
|
10
10
|
import { calculateMinTruncationPrecision } from "../utils/calculateMinTruncationPrecision";
|
|
11
11
|
import { removeTrendDataFromDatasets } from "../utils/removeTrendDataFromDatasets";
|
|
12
|
+
import { generatePieNarrative } from "./generatePieNarrative";
|
|
12
13
|
injectString("cs", "Data", "Data");
|
|
13
14
|
injectString("da-DK", "Data", "Data");
|
|
14
15
|
injectString("de", "Data", "Daten");
|
|
@@ -1025,7 +1026,9 @@ function detectDatasetTrend(dataset, translate, dateFormatter, miniChartLabels,
|
|
|
1025
1026
|
}
|
|
1026
1027
|
export const AccessibleChartNarrative = ({
|
|
1027
1028
|
data,
|
|
1028
|
-
|
|
1029
|
+
type,
|
|
1030
|
+
options,
|
|
1031
|
+
narrativeId
|
|
1029
1032
|
}) => {
|
|
1030
1033
|
const {
|
|
1031
1034
|
translate
|
|
@@ -1037,6 +1040,7 @@ export const AccessibleChartNarrative = ({
|
|
|
1037
1040
|
} = useContext(userFormatContext);
|
|
1038
1041
|
const dateFormatter = useCallback((d, format = dateFormat) => formatDate(toLocalDateTime(d), format, translate), [toLocalDateTime, dateFormat, translate]);
|
|
1039
1042
|
const filteredDatasets = removeTrendDataFromDatasets(data.datasets);
|
|
1043
|
+
const pieAnalysis = useMemo(() => type === "pie" ? generatePieNarrative(data, translate) : null, [type, data, translate]);
|
|
1040
1044
|
const datasetsWithAnalysis = useMemo(() => filteredDatasets.map(dataset => {
|
|
1041
1045
|
const datasetObj = Object.assign({}, dataset);
|
|
1042
1046
|
try {
|
|
@@ -1048,9 +1052,11 @@ export const AccessibleChartNarrative = ({
|
|
|
1048
1052
|
return errMsg;
|
|
1049
1053
|
}
|
|
1050
1054
|
}), [filteredDatasets, translate, dateFormatter, miniChartLabels, options]);
|
|
1055
|
+
const lines = pieAnalysis !== null && pieAnalysis !== void 0 ? pieAnalysis : datasetsWithAnalysis;
|
|
1051
1056
|
return _jsx("div", {
|
|
1057
|
+
id: narrativeId,
|
|
1052
1058
|
className: "screen-reader-only",
|
|
1053
|
-
children:
|
|
1059
|
+
children: lines.map((analysis, index) => _jsx("div", {
|
|
1054
1060
|
children: analysis
|
|
1055
1061
|
}, index))
|
|
1056
1062
|
});
|