@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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useId } from "react";
|
|
3
|
+
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
4
|
+
export const IconToggleLarge = ({ className, size, title, description, focusable = false }) => {
|
|
5
|
+
const uniqueId = useId();
|
|
6
|
+
const classes = useMemo(() => classNames(["zen-icon", size ? `zen-icon--${size}` : "", className !== null && className !== void 0 ? className : ""]), [size, className]);
|
|
7
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", focusable: focusable ? "true" : undefined, tabIndex: focusable ? 0 : undefined, role: focusable || title || description ? undefined : "presentation", className: classes, "aria-labelledby": title && focusable ? uniqueId : undefined, "data-name": "IconToggleLarge", children: [title ? _jsx("title", { id: uniqueId, children: title }) : null, description ? _jsx("desc", { children: description }) : null, _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1 12C1 8.68629 3.68629 6 7 6H17C20.3137 6 23 8.68629 23 12C23 15.3137 20.3137 18 17 18H7C3.68629 18 1 15.3137 1 12ZM17 16C19.2091 16 21 14.2091 21 12C21 9.79086 19.2091 8 17 8C14.7909 8 13 9.79086 13 12C13 14.2091 14.7909 16 17 16ZM12.5278 8C11.5777 9.06151 11 10.4633 11 12C11 13.5367 11.5777 14.9385 12.5278 16H7C4.79086 16 3 14.2091 3 12C3 9.79086 4.79086 8 7 8H12.5278Z" })] }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useId } from "react";
|
|
3
|
+
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
4
|
+
export const IconToggleSmall = ({ className, size, title, description, focusable = false }) => {
|
|
5
|
+
const uniqueId = useId();
|
|
6
|
+
const classes = useMemo(() => classNames(["zen-icon", size ? `zen-icon--${size}` : "", className !== null && className !== void 0 ? className : ""]), [size, className]);
|
|
7
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", focusable: focusable ? "true" : undefined, tabIndex: focusable ? 0 : undefined, role: focusable || title || description ? undefined : "presentation", className: classes, "aria-labelledby": title && focusable ? uniqueId : undefined, "data-name": "IconToggleSmall", children: [title ? _jsx("title", { id: uniqueId, children: title }) : null, description ? _jsx("desc", { children: description }) : null, _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1 12C1 8.13401 4.13401 5 8 5H16C19.866 5 23 8.13401 23 12C23 15.866 19.866 19 16 19H8C4.13401 19 1 15.866 1 12ZM8 7C5.23858 7 3 9.23858 3 12C3 14.7614 5.23858 17 8 17H16C18.7614 17 21 14.7614 21 12C21 9.23858 18.7614 7 16 7H8ZM12 12C12 9.79086 13.7909 8 16 8C18.2091 8 20 9.79086 20 12C20 14.2091 18.2091 16 16 16C13.7909 16 12 14.2091 12 12ZM16 10C14.8954 10 14 10.8954 14 12C14 13.1046 14.8954 14 16 14C17.1046 14 18 13.1046 18 12C18 10.8954 17.1046 10 16 10Z" })] }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useId } from "react";
|
|
3
|
+
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
4
|
+
export const IconTrendNeutral = ({ className, size, title, description, focusable = false }) => {
|
|
5
|
+
const uniqueId = useId();
|
|
6
|
+
const classes = useMemo(() => classNames(["zen-icon", size ? `zen-icon--${size}` : "", className !== null && className !== void 0 ? className : ""]), [size, className]);
|
|
7
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", focusable: focusable ? "true" : undefined, tabIndex: focusable ? 0 : undefined, role: focusable || title || description ? undefined : "presentation", className: classes, "aria-labelledby": title && focusable ? uniqueId : undefined, "data-name": "IconTrendNeutral", children: [title ? _jsx("title", { id: uniqueId, children: title }) : null, description ? _jsx("desc", { children: description }) : null, _jsx("path", { fillRule: "evenodd", d: "M7 12a1 1 0 0 1 1-1h8a1 1 0 1 1 0 2H8a1 1 0 0 1-1-1", clipRule: "evenodd" })] }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useId } from "react";
|
|
3
|
+
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
4
|
+
export const IconTruck = ({ className, size, title, description, focusable = false }) => {
|
|
5
|
+
const uniqueId = useId();
|
|
6
|
+
const classes = useMemo(() => classNames(["zen-icon", size ? `zen-icon--${size}` : "", className !== null && className !== void 0 ? className : ""]), [size, className]);
|
|
7
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", focusable: focusable ? "true" : undefined, tabIndex: focusable ? 0 : undefined, role: focusable || title || description ? undefined : "presentation", className: classes, "aria-labelledby": title && focusable ? uniqueId : undefined, "data-name": "IconTruck", children: [title ? _jsx("title", { id: uniqueId, children: title }) : null, description ? _jsx("desc", { children: description }) : null, _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8 5C8 4.44772 8.44772 4 9 4H21C21.5523 4 22 4.44772 22 5V16C22 16.5523 21.5523 17 21 17H19.9646C19.7219 18.6961 18.2632 20 16.5 20C14.7368 20 13.2781 18.6961 13.0354 17H10.9646C10.7219 18.6961 9.26324 20 7.5 20C5.73676 20 4.27806 18.6961 4.03544 17H3C2.44772 17 2 16.5523 2 16V10C2 9.80258 2.05844 9.60957 2.16795 9.4453L4.16795 6.4453C4.35342 6.1671 4.66565 6 5 6H8V5ZM8 8H5.53518L4 10.3028V15H4.33682C4.89855 13.8175 6.1038 13 7.5 13C7.66976 13 7.8367 13.0121 8 13.0354V8ZM9.94949 14C10.2424 14.2871 10.4851 14.6252 10.6632 15H13.3368C13.8985 13.8175 15.1038 13 16.5 13C17.8962 13 19.1015 13.8175 19.6632 15H20V6H10V14H9.94949ZM7.5 15C6.67157 15 6 15.6716 6 16.5C6 17.3284 6.67157 18 7.5 18C8.32843 18 9 17.3284 9 16.5C9 15.6716 8.32843 15 7.5 15ZM16.5 15C15.6716 15 15 15.6716 15 16.5C15 17.3284 15.6716 18 16.5 18C17.3284 18 18 17.3284 18 16.5C18 15.6716 17.3284 15 16.5 15Z" })] }));
|
|
8
|
+
};
|
package/esm/index.d.ts
CHANGED
|
@@ -174,6 +174,7 @@ export { type IHeaderButton, HeaderButtonDisplayName, HeaderButton } from "./hea
|
|
|
174
174
|
export { type IHeaderMenu, HeaderMenuDisplayName, HeaderMenu } from "./header/headerMenu";
|
|
175
175
|
export { useCustomMenu } from "./header/hooks/useCustomMenu";
|
|
176
176
|
export { type IIcon } from "./icons/icon";
|
|
177
|
+
export { IconAce } from "./icons/iconAce";
|
|
177
178
|
export { IconActivity } from "./icons/iconActivity";
|
|
178
179
|
export { IconAddPeople } from "./icons/iconAddPeople";
|
|
179
180
|
export { IconAiImages } from "./icons/iconAiImages";
|
|
@@ -243,6 +244,7 @@ export { IconBookmarkFill } from "./icons/iconBookmarkFill";
|
|
|
243
244
|
export { IconBookmarkPlus } from "./icons/iconBookmarkPlus";
|
|
244
245
|
export { IconBookmarkSelectedHover } from "./icons/iconBookmarkSelectedHover";
|
|
245
246
|
export { IconBranches } from "./icons/iconBranches";
|
|
247
|
+
export { IconBreak } from "./icons/iconBreak";
|
|
246
248
|
export { IconBrokenLink } from "./icons/iconBrokenLink";
|
|
247
249
|
export { IconBrowser } from "./icons/iconBrowser";
|
|
248
250
|
export { IconBrush } from "./icons/iconBrush";
|
|
@@ -294,6 +296,7 @@ export { IconChevronLeft } from "./icons/iconChevronLeft";
|
|
|
294
296
|
export { IconChevronLeftSmall } from "./icons/iconChevronLeftSmall";
|
|
295
297
|
export { IconChevronRight } from "./icons/iconChevronRight";
|
|
296
298
|
export { IconChevronRightSmall } from "./icons/iconChevronRightSmall";
|
|
299
|
+
export { IconChevronStepper } from "./icons/iconChevronStepper";
|
|
297
300
|
export { IconChevronTop } from "./icons/iconChevronTop";
|
|
298
301
|
export { IconChevronTopSmall } from "./icons/iconChevronTopSmall";
|
|
299
302
|
export { IconChromecast } from "./icons/iconChromecast";
|
|
@@ -567,6 +570,7 @@ export { IconPlusCircle } from "./icons/iconPlusCircle";
|
|
|
567
570
|
export { IconPlusFile } from "./icons/iconPlusFile";
|
|
568
571
|
export { IconPlusLines } from "./icons/iconPlusLines";
|
|
569
572
|
export { IconPlusSquare } from "./icons/iconPlusSquare";
|
|
573
|
+
export { IconPotato } from "./icons/iconPotato";
|
|
570
574
|
export { IconPound } from "./icons/iconPound";
|
|
571
575
|
export { IconPrinter } from "./icons/iconPrinter";
|
|
572
576
|
export { IconProcessor } from "./icons/iconProcessor";
|
|
@@ -647,7 +651,11 @@ export { IconThermograph } from "./icons/iconThermograph";
|
|
|
647
651
|
export { IconThermometer } from "./icons/iconThermometer";
|
|
648
652
|
export { IconThumbsDown } from "./icons/iconThumbsDown";
|
|
649
653
|
export { IconThumbsUp } from "./icons/iconThumbsUp";
|
|
654
|
+
export { IconToggleLarge } from "./icons/iconToggleLarge";
|
|
655
|
+
export { IconToggleSmall } from "./icons/iconToggleSmall";
|
|
650
656
|
export { IconTrailer } from "./icons/iconTrailer";
|
|
657
|
+
export { IconTrendNeutral } from "./icons/iconTrendNeutral";
|
|
658
|
+
export { IconTruck } from "./icons/iconTruck";
|
|
651
659
|
export { IconUmbrella } from "./icons/iconUmbrella";
|
|
652
660
|
export { IconUnderline } from "./icons/iconUnderline";
|
|
653
661
|
export { IconUndo } from "./icons/iconUndo";
|
package/esm/index.js
CHANGED
|
@@ -163,6 +163,7 @@ export { HeaderBackDisplayName, HeaderBack } from "./header/headerBack";
|
|
|
163
163
|
export { HeaderButtonDisplayName, HeaderButton } from "./header/headerButton";
|
|
164
164
|
export { HeaderMenuDisplayName, HeaderMenu } from "./header/headerMenu";
|
|
165
165
|
export { useCustomMenu } from "./header/hooks/useCustomMenu";
|
|
166
|
+
export { IconAce } from "./icons/iconAce";
|
|
166
167
|
export { IconActivity } from "./icons/iconActivity";
|
|
167
168
|
export { IconAddPeople } from "./icons/iconAddPeople";
|
|
168
169
|
export { IconAiImages } from "./icons/iconAiImages";
|
|
@@ -232,6 +233,7 @@ export { IconBookmarkFill } from "./icons/iconBookmarkFill";
|
|
|
232
233
|
export { IconBookmarkPlus } from "./icons/iconBookmarkPlus";
|
|
233
234
|
export { IconBookmarkSelectedHover } from "./icons/iconBookmarkSelectedHover";
|
|
234
235
|
export { IconBranches } from "./icons/iconBranches";
|
|
236
|
+
export { IconBreak } from "./icons/iconBreak";
|
|
235
237
|
export { IconBrokenLink } from "./icons/iconBrokenLink";
|
|
236
238
|
export { IconBrowser } from "./icons/iconBrowser";
|
|
237
239
|
export { IconBrush } from "./icons/iconBrush";
|
|
@@ -283,6 +285,7 @@ export { IconChevronLeft } from "./icons/iconChevronLeft";
|
|
|
283
285
|
export { IconChevronLeftSmall } from "./icons/iconChevronLeftSmall";
|
|
284
286
|
export { IconChevronRight } from "./icons/iconChevronRight";
|
|
285
287
|
export { IconChevronRightSmall } from "./icons/iconChevronRightSmall";
|
|
288
|
+
export { IconChevronStepper } from "./icons/iconChevronStepper";
|
|
286
289
|
export { IconChevronTop } from "./icons/iconChevronTop";
|
|
287
290
|
export { IconChevronTopSmall } from "./icons/iconChevronTopSmall";
|
|
288
291
|
export { IconChromecast } from "./icons/iconChromecast";
|
|
@@ -556,6 +559,7 @@ export { IconPlusCircle } from "./icons/iconPlusCircle";
|
|
|
556
559
|
export { IconPlusFile } from "./icons/iconPlusFile";
|
|
557
560
|
export { IconPlusLines } from "./icons/iconPlusLines";
|
|
558
561
|
export { IconPlusSquare } from "./icons/iconPlusSquare";
|
|
562
|
+
export { IconPotato } from "./icons/iconPotato";
|
|
559
563
|
export { IconPound } from "./icons/iconPound";
|
|
560
564
|
export { IconPrinter } from "./icons/iconPrinter";
|
|
561
565
|
export { IconProcessor } from "./icons/iconProcessor";
|
|
@@ -635,7 +639,11 @@ export { IconThermograph } from "./icons/iconThermograph";
|
|
|
635
639
|
export { IconThermometer } from "./icons/iconThermometer";
|
|
636
640
|
export { IconThumbsDown } from "./icons/iconThumbsDown";
|
|
637
641
|
export { IconThumbsUp } from "./icons/iconThumbsUp";
|
|
642
|
+
export { IconToggleLarge } from "./icons/iconToggleLarge";
|
|
643
|
+
export { IconToggleSmall } from "./icons/iconToggleSmall";
|
|
638
644
|
export { IconTrailer } from "./icons/iconTrailer";
|
|
645
|
+
export { IconTrendNeutral } from "./icons/iconTrendNeutral";
|
|
646
|
+
export { IconTruck } from "./icons/iconTruck";
|
|
639
647
|
export { IconUmbrella } from "./icons/iconUmbrella";
|
|
640
648
|
export { IconUnderline } from "./icons/iconUnderline";
|
|
641
649
|
export { IconUndo } from "./icons/iconUndo";
|
package/esm/layout/layout.d.ts
CHANGED
|
@@ -22,5 +22,6 @@ interface ILayoutComponents {
|
|
|
22
22
|
FullScreenButton: React.FC<IFullScreenButton>;
|
|
23
23
|
}
|
|
24
24
|
export declare const getContentPaddings: (isMobile: boolean, startWithToolbar: boolean) => number;
|
|
25
|
-
|
|
25
|
+
declare const LayoutInner: ({ id, className, pageScrolling, children }: ILayout) => import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export declare const Layout: typeof LayoutInner & ILayoutComponents;
|
|
26
27
|
export {};
|
|
@@ -2,6 +2,7 @@ import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
|
2
2
|
import type { ChartData, ChartOptions, Plugin, PluginOptionsByType } from "chart.js/auto";
|
|
3
3
|
import "../react-chartjs/dateAdapter";
|
|
4
4
|
import { ILegendOptions } from "./plugins/htmlLegend";
|
|
5
|
+
import "./lineChart.less";
|
|
5
6
|
interface ILineChartPluginOptions extends Partial<PluginOptionsByType<"line">> {
|
|
6
7
|
htmlLegend?: ILegendOptions;
|
|
7
8
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
1
|
+
import { injectString } from "../utils/localization/translationsDictionary";
|
|
2
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
6
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
11
9
|
};
|
|
12
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
11
|
import { useContext, useEffect, useMemo } from "react";
|
|
@@ -20,73 +18,135 @@ import { LEGEND_PLUGIN_ID } from "./plugins/htmlLegend";
|
|
|
20
18
|
import { useDrive } from "../utils/theme/useDrive";
|
|
21
19
|
import { useMobile } from "../commonHelpers/hooks/useMobile";
|
|
22
20
|
import { themeContext } from "../utils/theme/themeContext";
|
|
21
|
+
import { useLanguage } from "../utils/localization/useLanguage";
|
|
22
|
+
injectString("cs", "Line chart", "Spojnicov\xFD graf");
|
|
23
|
+
injectString("da-DK", "Line chart", "Linjediagram");
|
|
24
|
+
injectString("de", "Line chart", "Liniendiagramm");
|
|
25
|
+
injectString("en", "Line chart", "Line chart");
|
|
26
|
+
injectString("es", "Line chart", "Gr\xE1fico de l\xEDneas");
|
|
27
|
+
injectString("fi-FI", "Line chart", "Viivakaavio");
|
|
28
|
+
injectString("fr", "Line chart", "Graphique lin\xE9aire");
|
|
29
|
+
injectString("fr-FR", "Line chart", "Graphique lin\xE9aire");
|
|
30
|
+
injectString("hu-HU", "Line chart", "Vonaldiagram");
|
|
31
|
+
injectString("id", "Line chart", "Bagan garis");
|
|
32
|
+
injectString("it", "Line chart", "Grafico a linee");
|
|
33
|
+
injectString("ja", "Line chart", "\u6298\u308C\u7DDA\u30B0\u30E9\u30D5");
|
|
34
|
+
injectString("ko-KR", "Line chart", "\uC120\uD615 \uCC28\uD2B8");
|
|
35
|
+
injectString("ms", "Line chart", "Carta garisan");
|
|
36
|
+
injectString("nb-NO", "Line chart", "Linjediagram");
|
|
37
|
+
injectString("nl", "Line chart", "Lijndiagram");
|
|
38
|
+
injectString("pl", "Line chart", "Wykres liniowy");
|
|
39
|
+
injectString("pt-BR", "Line chart", "Gr\xE1fico de linhas");
|
|
40
|
+
injectString("pt-PT", "Line chart", "Gr\xE1fico de linhas");
|
|
41
|
+
injectString("sk-SK", "Line chart", "\u010Ciarov\xFD graf");
|
|
42
|
+
injectString("sv", "Line chart", "Linjediagram");
|
|
43
|
+
injectString("th", "Line chart", "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E40\u0E2A\u0E49\u0E19");
|
|
44
|
+
injectString("tr", "Line chart", "\xC7izgi grafik");
|
|
45
|
+
injectString("zh-Hans", "Line chart", "\u6298\u7EBF\u56FE");
|
|
46
|
+
injectString("zh-TW", "Line chart", "\u6298\u7DDA\u5716");
|
|
47
|
+
injectString("ro-RO", "Line chart", "Grafic liniar");
|
|
48
|
+
injectString("ar", "Line chart", "\u0645\u062E\u0637\u0637 \u062E\u0637\u064A");
|
|
49
|
+
injectString("lt-LT", "Line chart", "Linijin\u0117 diagrama");
|
|
50
|
+
injectString("lv-LV", "Line chart", "L\u012Bniju diagramma");
|
|
51
|
+
injectString("ka-GE", "Line chart", "\u10EE\u10D0\u10D6\u10DD\u10D5\u10D0\u10DC\u10D8 \u10E1\u10E5\u10D4\u10DB\u10D0");
|
|
52
|
+
injectString("el-GR", "Line chart", "\u0393\u03C1\u03AC\u03C6\u03B7\u03BC\u03B1 \u03B3\u03C1\u03B1\u03BC\u03BC\u03CE\u03BD");
|
|
53
|
+
injectString("et-EE", "Line chart", "Joondiagramm");
|
|
54
|
+
injectString("bg-BG", "Line chart", "\u041B\u0438\u043D\u0435\u0439\u043D\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u0430");
|
|
23
55
|
ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend, Filler, TimeScale);
|
|
24
56
|
const defaultGridStyle = {
|
|
25
|
-
|
|
26
|
-
|
|
57
|
+
drawTicks: false,
|
|
58
|
+
color: "#C0CCD8"
|
|
27
59
|
};
|
|
28
60
|
const defaultGridBorderStyle = {
|
|
29
|
-
|
|
30
|
-
|
|
61
|
+
display: false,
|
|
62
|
+
dash: [2, 2]
|
|
31
63
|
};
|
|
32
64
|
const defTicksStyle = {
|
|
33
|
-
|
|
65
|
+
padding: 10
|
|
34
66
|
};
|
|
35
|
-
const getDefaultOptions =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
const getDefaultOptions = fontSize => {
|
|
68
|
+
const defTitleStyle = {
|
|
69
|
+
display: true,
|
|
70
|
+
font: {
|
|
71
|
+
size: fontSize,
|
|
72
|
+
weight: "400"
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
responsive: true,
|
|
77
|
+
maintainAspectRatio: false,
|
|
78
|
+
scales: {
|
|
79
|
+
x: {
|
|
80
|
+
grid: defaultGridStyle,
|
|
81
|
+
border: defaultGridBorderStyle,
|
|
82
|
+
ticks: defTicksStyle,
|
|
83
|
+
title: defTitleStyle
|
|
84
|
+
},
|
|
85
|
+
y: {
|
|
86
|
+
grid: defaultGridStyle,
|
|
87
|
+
border: defaultGridBorderStyle,
|
|
88
|
+
ticks: defTicksStyle,
|
|
89
|
+
title: defTitleStyle
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
plugins: {
|
|
93
|
+
legend: {
|
|
94
|
+
display: false
|
|
95
|
+
},
|
|
96
|
+
tooltip: {
|
|
97
|
+
enabled: true
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
69
101
|
};
|
|
70
102
|
/**
|
|
71
103
|
* @deprecated - will be removed in the next releases.
|
|
72
104
|
*/
|
|
73
|
-
export const LineChart =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
105
|
+
export const LineChart = _a => {
|
|
106
|
+
var {
|
|
107
|
+
data,
|
|
108
|
+
options = {},
|
|
109
|
+
plugins,
|
|
110
|
+
className
|
|
111
|
+
} = _a,
|
|
112
|
+
rest = __rest(_a, ["data", "options", "plugins", "className"]);
|
|
113
|
+
const {
|
|
114
|
+
translate
|
|
115
|
+
} = useLanguage();
|
|
116
|
+
const isDrive = useDrive();
|
|
117
|
+
const isMobile = useMobile();
|
|
118
|
+
const memoizedFontSize = useMemo(() => isDrive ? isMobile ? 14 : 16 : 12, [isDrive, isMobile]);
|
|
119
|
+
const {
|
|
120
|
+
dark
|
|
121
|
+
} = useContext(themeContext);
|
|
122
|
+
useEffect(() => {
|
|
123
|
+
ChartJS.defaults.font = {
|
|
124
|
+
family: "Roboto",
|
|
125
|
+
size: memoizedFontSize
|
|
126
|
+
};
|
|
127
|
+
ChartJS.defaults.color = dark ? "#FFFFFF" : "#1F2833";
|
|
128
|
+
}, [memoizedFontSize, dark]);
|
|
129
|
+
const adaptedData = Object.assign({}, data);
|
|
130
|
+
const memoizedDefaultOptions = useMemo(() => getDefaultOptions(memoizedFontSize), [memoizedFontSize]);
|
|
131
|
+
const adaptedOptions = deepMerge(memoizedDefaultOptions, options);
|
|
132
|
+
adaptedData.datasets = adaptedData.datasets.map((ds, i) => getDefaultDatasetStyle(ds, i));
|
|
133
|
+
const memoizedPlagins = useMemo(() => plugins === null || plugins === void 0 ? void 0 : plugins.map(el => el.id === LEGEND_PLUGIN_ID ? Object.assign(Object.assign({}, el), {
|
|
134
|
+
isDrive: isDrive
|
|
135
|
+
}) : el), [isDrive, plugins]);
|
|
136
|
+
return _jsx("div", {
|
|
137
|
+
className: "zen-line-chart",
|
|
138
|
+
tabIndex: 0,
|
|
139
|
+
style: {
|
|
140
|
+
width: "100%",
|
|
141
|
+
height: "100%"
|
|
142
|
+
},
|
|
143
|
+
role: "figure",
|
|
144
|
+
"aria-label": translate("Line chart"),
|
|
145
|
+
children: _jsx(Line, Object.assign({
|
|
146
|
+
options: adaptedOptions,
|
|
147
|
+
data: adaptedData,
|
|
148
|
+
plugins: memoizedPlagins,
|
|
149
|
+
className: className
|
|
150
|
+
}, rest))
|
|
151
|
+
});
|
|
152
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
2
2
|
import type { ChartData, ChartOptions } from "chart.js/auto";
|
|
3
|
+
import "./lineChartMini.less";
|
|
3
4
|
export interface ILineChartMini extends IZenComponentProps {
|
|
4
5
|
data: ChartData<"line">;
|
|
5
6
|
options?: ChartOptions<"line">;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
1
|
+
import { injectString } from "../utils/localization/translationsDictionary";
|
|
2
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
6
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
11
9
|
};
|
|
12
10
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { useContext, useEffect, useMemo } from "react";
|
|
11
|
+
import { useContext, useEffect, useId, useMemo } from "react";
|
|
14
12
|
import { Line } from "../react-chartjs/typedCharts";
|
|
15
13
|
import { Chart as ChartJS, CategoryScale, LinearScale, PointElement, LineElement, Filler } from "chart.js/auto";
|
|
16
14
|
import { deepMerge } from "../commonHelpers/utils";
|
|
@@ -20,76 +18,141 @@ import { useMobile } from "../commonHelpers/hooks/useMobile";
|
|
|
20
18
|
import { themeContext } from "../utils/theme/themeContext";
|
|
21
19
|
import { useIsRTL } from "../utils/localization/useIsRTL";
|
|
22
20
|
import { AccessibleChart } from "../chart/accessibleChart/accessibleChart";
|
|
21
|
+
import { useLanguage } from "../utils/localization/useLanguage";
|
|
22
|
+
injectString("cs", "Line chart", "Spojnicov\xFD graf");
|
|
23
|
+
injectString("da-DK", "Line chart", "Linjediagram");
|
|
24
|
+
injectString("de", "Line chart", "Liniendiagramm");
|
|
25
|
+
injectString("en", "Line chart", "Line chart");
|
|
26
|
+
injectString("es", "Line chart", "Gr\xE1fico de l\xEDneas");
|
|
27
|
+
injectString("fi-FI", "Line chart", "Viivakaavio");
|
|
28
|
+
injectString("fr", "Line chart", "Graphique lin\xE9aire");
|
|
29
|
+
injectString("fr-FR", "Line chart", "Graphique lin\xE9aire");
|
|
30
|
+
injectString("hu-HU", "Line chart", "Vonaldiagram");
|
|
31
|
+
injectString("id", "Line chart", "Bagan garis");
|
|
32
|
+
injectString("it", "Line chart", "Grafico a linee");
|
|
33
|
+
injectString("ja", "Line chart", "\u6298\u308C\u7DDA\u30B0\u30E9\u30D5");
|
|
34
|
+
injectString("ko-KR", "Line chart", "\uC120\uD615 \uCC28\uD2B8");
|
|
35
|
+
injectString("ms", "Line chart", "Carta garisan");
|
|
36
|
+
injectString("nb-NO", "Line chart", "Linjediagram");
|
|
37
|
+
injectString("nl", "Line chart", "Lijndiagram");
|
|
38
|
+
injectString("pl", "Line chart", "Wykres liniowy");
|
|
39
|
+
injectString("pt-BR", "Line chart", "Gr\xE1fico de linhas");
|
|
40
|
+
injectString("pt-PT", "Line chart", "Gr\xE1fico de linhas");
|
|
41
|
+
injectString("sk-SK", "Line chart", "\u010Ciarov\xFD graf");
|
|
42
|
+
injectString("sv", "Line chart", "Linjediagram");
|
|
43
|
+
injectString("th", "Line chart", "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E40\u0E2A\u0E49\u0E19");
|
|
44
|
+
injectString("tr", "Line chart", "\xC7izgi grafik");
|
|
45
|
+
injectString("zh-Hans", "Line chart", "\u6298\u7EBF\u56FE");
|
|
46
|
+
injectString("zh-TW", "Line chart", "\u6298\u7DDA\u5716");
|
|
47
|
+
injectString("ro-RO", "Line chart", "Grafic liniar");
|
|
48
|
+
injectString("ar", "Line chart", "\u0645\u062E\u0637\u0637 \u062E\u0637\u064A");
|
|
49
|
+
injectString("lt-LT", "Line chart", "Linijin\u0117 diagrama");
|
|
50
|
+
injectString("lv-LV", "Line chart", "L\u012Bniju diagramma");
|
|
51
|
+
injectString("ka-GE", "Line chart", "\u10EE\u10D0\u10D6\u10DD\u10D5\u10D0\u10DC\u10D8 \u10E1\u10E5\u10D4\u10DB\u10D0");
|
|
52
|
+
injectString("el-GR", "Line chart", "\u0393\u03C1\u03AC\u03C6\u03B7\u03BC\u03B1 \u03B3\u03C1\u03B1\u03BC\u03BC\u03CE\u03BD");
|
|
53
|
+
injectString("et-EE", "Line chart", "Joondiagramm");
|
|
54
|
+
injectString("bg-BG", "Line chart", "\u041B\u0438\u043D\u0435\u0439\u043D\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u0430");
|
|
23
55
|
ChartJS.defaults.font = {
|
|
24
|
-
|
|
25
|
-
|
|
56
|
+
family: "Roboto",
|
|
57
|
+
size: 12
|
|
26
58
|
};
|
|
27
59
|
ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Filler);
|
|
28
60
|
const defaultGridStyle = {
|
|
29
|
-
|
|
61
|
+
display: false
|
|
30
62
|
};
|
|
31
63
|
const defaultGridBorderStyle = {
|
|
32
|
-
|
|
64
|
+
display: false
|
|
33
65
|
};
|
|
34
|
-
const getDefaultOptions =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
66
|
+
const getDefaultOptions = isRtl => ({
|
|
67
|
+
responsive: true,
|
|
68
|
+
maintainAspectRatio: false,
|
|
69
|
+
layout: {
|
|
70
|
+
padding: {
|
|
71
|
+
left: isRtl ? 16 : 0,
|
|
72
|
+
right: isRtl ? 0 : 16
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
scales: {
|
|
76
|
+
x: {
|
|
77
|
+
grid: defaultGridStyle,
|
|
78
|
+
border: defaultGridBorderStyle,
|
|
79
|
+
reverse: isRtl,
|
|
80
|
+
offset: false
|
|
42
81
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
display: false
|
|
56
|
-
}
|
|
57
|
-
}
|
|
82
|
+
y: {
|
|
83
|
+
grid: defaultGridStyle,
|
|
84
|
+
border: defaultGridBorderStyle,
|
|
85
|
+
position: isRtl ? "right" : "left",
|
|
86
|
+
ticks: {
|
|
87
|
+
display: false
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
plugins: {
|
|
92
|
+
legend: {
|
|
93
|
+
display: false
|
|
58
94
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
display: false
|
|
62
|
-
},
|
|
63
|
-
tooltip: {
|
|
64
|
-
enabled: false
|
|
65
|
-
}
|
|
95
|
+
tooltip: {
|
|
96
|
+
enabled: false
|
|
66
97
|
}
|
|
98
|
+
}
|
|
67
99
|
});
|
|
68
|
-
export const LineChartMini =
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
100
|
+
export const LineChartMini = _a => {
|
|
101
|
+
var _b, _c;
|
|
102
|
+
var {
|
|
103
|
+
data,
|
|
104
|
+
options = {}
|
|
105
|
+
} = _a,
|
|
106
|
+
rest = __rest(_a, ["data", "options"]);
|
|
107
|
+
const {
|
|
108
|
+
translate
|
|
109
|
+
} = useLanguage();
|
|
110
|
+
const narrativeId = useId();
|
|
111
|
+
const isDrive = useDrive();
|
|
112
|
+
const isMobile = useMobile();
|
|
113
|
+
const memoizedFontSize = useMemo(() => isDrive ? isMobile ? 14 : 16 : 12, [isDrive, isMobile]);
|
|
114
|
+
const {
|
|
115
|
+
dark
|
|
116
|
+
} = useContext(themeContext);
|
|
117
|
+
const isRtl = useIsRTL();
|
|
118
|
+
useEffect(() => {
|
|
119
|
+
ChartJS.defaults.font = {
|
|
120
|
+
family: "Roboto",
|
|
121
|
+
size: memoizedFontSize
|
|
122
|
+
};
|
|
123
|
+
ChartJS.defaults.color = dark ? "#FFFFFF" : "#1F2833";
|
|
124
|
+
}, [memoizedFontSize, dark]);
|
|
125
|
+
const adaptedData = Object.assign({}, data);
|
|
126
|
+
const defaultOptions = useMemo(() => getDefaultOptions(isRtl), [isRtl]);
|
|
127
|
+
const adaptedOptions = deepMerge(defaultOptions, options);
|
|
128
|
+
if (((_b = adaptedData.labels) === null || _b === void 0 ? void 0 : _b.length) === 2) {
|
|
129
|
+
const maxLabelsCount = Math.max(...data.datasets.map(ds => ds.data.length));
|
|
130
|
+
const newLabels = Array(maxLabelsCount).fill("");
|
|
131
|
+
newLabels[0] = (_c = data.labels) === null || _c === void 0 ? void 0 : _c[0];
|
|
132
|
+
newLabels[newLabels.length - 1] = data.labels ? data.labels[data.labels.length - 1] : "";
|
|
133
|
+
adaptedData.labels = newLabels;
|
|
134
|
+
}
|
|
135
|
+
adaptedData.datasets = adaptedData.datasets.map((ds, i) => getDefaultDatasetStyle(ds, i, true));
|
|
136
|
+
return _jsxs(_Fragment, {
|
|
137
|
+
children: [_jsx("div", {
|
|
138
|
+
className: "zen-line-chart-mini",
|
|
139
|
+
tabIndex: 0,
|
|
140
|
+
style: {
|
|
141
|
+
width: "100%",
|
|
142
|
+
height: "100%"
|
|
143
|
+
},
|
|
144
|
+
role: "figure",
|
|
145
|
+
"aria-label": translate("Line chart"),
|
|
146
|
+
"aria-describedby": narrativeId,
|
|
147
|
+
children: _jsx(Line, Object.assign({
|
|
148
|
+
options: adaptedOptions,
|
|
149
|
+
data: adaptedData,
|
|
150
|
+
"aria-hidden": true
|
|
151
|
+
}, rest))
|
|
152
|
+
}), _jsx(AccessibleChart, {
|
|
153
|
+
type: "line-mini",
|
|
154
|
+
data: adaptedData,
|
|
155
|
+
narrativeId: narrativeId
|
|
156
|
+
})]
|
|
157
|
+
});
|
|
158
|
+
};
|