@geotab/zenith 3.11.1 → 3.12.0-beta.0
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 +70 -0
- package/dist/absolute/absolute.d.ts +21 -1
- package/dist/absolute/absolute.js +46 -6
- package/dist/advancedGroupsFilter/advancedGroupsFilter.js +3 -3
- package/dist/advancedGroupsFilter/advancedGroupsFilterForm.js +2 -2
- package/dist/advancedGroupsFilter/advancedGroupsFilterFormSection.js +7 -7
- package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +1 -1
- package/dist/alert/banner.d.ts +3 -1
- package/dist/alertRaw/alertRaw.js +1 -1
- package/dist/banner/banner.d.ts +5 -2
- package/dist/banner/banner.js +13 -2
- package/dist/banner/bannerErrorSummary.d.ts +7 -0
- package/dist/banner/bannerErrorSummary.js +8 -0
- package/dist/banner/bannerMultipLine.js +1 -1
- package/dist/banner/bannerSingleLine.js +1 -1
- package/dist/banner/utils/buildSummaryErrorList.d.ts +1 -0
- package/dist/banner/utils/buildSummaryErrorList.js +16 -0
- package/dist/banner/utils/hasSummaryErrorChild.d.ts +1 -0
- package/dist/banner/utils/hasSummaryErrorChild.js +7 -0
- package/dist/banner/utils/isSummaryErrorBanner.d.ts +2 -0
- package/dist/banner/utils/isSummaryErrorBanner.js +6 -0
- package/dist/banner/utils/isSummaryErrorElement.d.ts +3 -0
- package/dist/banner/utils/isSummaryErrorElement.js +7 -0
- package/dist/banner/utils/useSummaryBannerProp.d.ts +6 -0
- package/dist/banner/utils/useSummaryBannerProp.js +34 -0
- package/dist/betaPill/betaPill.js +4 -4
- package/dist/bookmark/bookmark.js +2 -2
- package/dist/bulkEditControl/bulkEditControl.js +5 -5
- package/dist/calendar/calendar.js +37 -34
- package/dist/calendar/calendarUtils.js +6 -4
- package/dist/card/card.js +1 -1
- package/dist/card/components/title.js +4 -1
- package/dist/card/components/titleLink.js +5 -2
- package/dist/chart/accessibleChart/accessibleChartNarrative.js +13 -13
- package/dist/chart/accessibleChart/accessibleChartTable.js +5 -5
- package/dist/chart/barChart/getDefaultOptions.d.ts +2 -1
- package/dist/chart/barChart/getDefaultOptions.js +5 -2
- package/dist/chart/barChart.js +6 -4
- package/dist/chart/chart.js +1 -1
- package/dist/chart/chartAxis/chartAxis.js +2 -2
- package/dist/chart/lineChart/getDefaultOptions.d.ts +4 -1
- package/dist/chart/lineChart/getDefaultOptions.js +7 -2
- package/dist/chart/lineChart.js +7 -3
- package/dist/chart/plugins/linePlugin/linePlugin.js +5 -4
- package/dist/chart/utils/getXAxisMeta.js +8 -5
- package/dist/chart/utils/isDateRange.js +1 -1
- package/dist/chart/utils/useHidden.d.ts +1 -0
- package/dist/chart/utils/useHidden.js +1 -1
- package/dist/chart/utils/useLastVisibleXAxisMeta.d.ts +2 -0
- package/dist/chart/utils/useLastVisibleXAxisMeta.js +15 -0
- package/dist/checkboxListWithAction/checkboxListWithAction.js +8 -5
- package/dist/chip/chip.js +1 -1
- package/dist/columnsSelector/columnsSelector.js +2 -2
- package/dist/columnsSelector/columnsTab/columnsTab.js +1 -1
- package/dist/columnsSelector/columnsTabGroup/columnsTabGroup.js +1 -1
- package/dist/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +4 -1
- package/dist/commonStyles/columnsList.less +59 -0
- package/dist/commonStyles/link/link.less +1 -1
- package/dist/commonStyles/pillStyles/pillContent.less +14 -15
- package/dist/commonStyles/pillStyles/pillStyles.less +4 -5
- package/dist/commonStyles/pillStyles/pillTextContent.less +2 -2
- package/dist/commonStyles/pillStyles/pillTypes.less +1 -1
- package/dist/commonStyles/popupMixin.less +1 -1
- package/dist/commonStyles/selectButton.less +1 -1
- package/dist/commonStyles/typography/typography.less +545 -19
- package/dist/controlledPopup/controlledPopup.d.ts +1 -0
- package/dist/controlledPopup/controlledPopup.js +3 -1
- package/dist/dataFeed/feedExpandControl/feedExpandControl.js +5 -0
- package/dist/dataGrid/cell/cell.d.ts +2 -1
- package/dist/dataGrid/cell/cell.js +2 -2
- package/dist/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +1 -1
- package/dist/dataGrid/dataGrid.js +8 -5
- package/dist/dataGrid/emptySearchList/emptySearchList.js +1 -1
- package/dist/dataGrid/entitiesListActions/actions/columnsListButton.js +1 -1
- package/dist/dataGrid/entitiesListActions/actions/fullscreenButton.js +2 -2
- package/dist/dataGrid/listColumn.d.ts +2 -0
- package/dist/dataGrid/row/row.d.ts +2 -1
- package/dist/dataGrid/row/row.js +13 -9
- package/dist/dataGrid/withFlexibleColumns/components/columnSettings.js +2 -2
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsList.d.ts +1 -1
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsList.js +45 -116
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +4 -0
- package/dist/dataGrid/withFlexibleColumns/withFlexibleColumns.js +1 -1
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +4 -0
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +5 -5
- package/dist/dataGrid/withSelectableRows/withSelectableRows.js +4 -3
- package/dist/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +2 -2
- package/dist/dateInputInner/dateInputInner.js +7 -7
- package/dist/dateInputInner/dateInputInnerControlBlock.js +2 -2
- package/dist/dateInputRaw/dateInputRaw.js +4 -4
- package/dist/dateInputRaw/utils/getLabel.js +2 -2
- package/dist/dateRangeInner/dateRangeInner.js +6 -3
- package/dist/dateRangeRaw/dateRangeRaw.d.ts +1 -0
- package/dist/dateRangeRaw/dateRangeRaw.js +21 -15
- package/dist/dateRangeRaw/types.d.ts +1 -0
- package/dist/dateRangeRaw/utils/dateRangeUtils.js +17 -17
- package/dist/dateRangeRaw/utils/parseLabel.js +1 -1
- package/dist/dateSelectionWrapper/dateSelectionWrapper.js +4 -4
- package/dist/dialog/dialogContent.js +1 -1
- package/dist/dropdown/dropdownTrigger.d.ts +1 -1
- package/dist/dropdownRaw/dropdownList.js +9 -9
- package/dist/dropdownRaw/dropdownPopup.js +3 -3
- package/dist/dropdownRaw/dropdownRaw.js +34 -17
- package/dist/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
- package/dist/dropdownRaw/dropdownSearchableTrigger.js +8 -6
- package/dist/dropdownRaw/dropdownTrigger.d.ts +2 -1
- package/dist/dropdownRaw/dropdownTrigger.js +2 -2
- package/dist/dropdownRaw/types.d.ts +2 -0
- package/dist/favoriteButton/favoriteButton.js +1 -1
- package/dist/fileUpload/components/dropZoneContent.js +104 -104
- package/dist/fileUpload/components/templateDownloadSection.js +1 -1
- package/dist/fileUpload/components/uploadedFilesSection.js +2 -2
- package/dist/fileUpload/fileUpload.js +106 -106
- package/dist/filterButton/filterButton.d.ts +1 -0
- package/dist/filters/components/filtersContainer.js +2 -2
- package/dist/filters/components/filtersDropdown.d.ts +1 -1
- package/dist/filters/components/filtersEmptyState.js +2 -2
- package/dist/filters/components/filtersSaveModal.js +5 -5
- package/dist/filters/components/filtersSavedChipComponent.js +11 -11
- package/dist/filters/components/filtersSearchItemData.js +1 -1
- package/dist/filters/components/filtersSearchList.js +14 -11
- package/dist/filters/components/filtersSelect.js +1 -1
- package/dist/filters/components/filtersSelectListItem.js +2 -2
- package/dist/filters/components/filtersSidePanel.js +8 -8
- package/dist/filters/filters.js +7 -7
- package/dist/filtersBar/components/filtersBarGroupsFilter/filtersBarGroupsFilter.d.ts +1 -1
- package/dist/filtersBar/components/filtersBarPeriodPicker/filtersBarPeriodPicker.d.ts +1 -0
- package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +18 -18
- package/dist/filtersBar/components/resetComponentButton.js +1 -1
- package/dist/filtersBar/filtersBarActions/filtersBarActions.js +3 -3
- package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +2 -2
- package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +5 -5
- package/dist/filtersBar/filtersContainer/filtersContainer.js +62 -61
- package/dist/formField/hooks/useError.js +3 -3
- package/dist/formField/hooks/useFormFieldProps.d.ts +1 -1
- package/dist/formField/hooks/useFormFieldProps.js +4 -2
- package/dist/formGroup/components/reviewListToggle/reviewListToggle.js +2 -2
- package/dist/formGroup/hooks/useCustomRow.js +46 -32
- package/dist/formGroup/hooks/useRowElements.js +9 -6
- package/dist/formGroup/hooks/useToggle.js +1 -1
- package/dist/formGroup/types.d.ts +4 -0
- package/dist/formGroup/utils/normalizeFieldId.d.ts +1 -0
- package/dist/formGroup/utils/normalizeFieldId.js +5 -0
- package/dist/formGroup/utils/resolveId.d.ts +7 -0
- package/dist/formGroup/utils/resolveId.js +6 -0
- package/dist/formLayout/components/getLayoutColumns.js +4 -2
- package/dist/formLayout/hooks/useError.js +3 -3
- package/dist/formLayout/hooks/useErrorSummary.d.ts +6 -0
- package/dist/formLayout/hooks/useErrorSummary.js +34 -0
- package/dist/formLayout/hooks/useFormButtons.js +3 -3
- package/dist/formLayout/utils/applyGridPropsStatic.js +1 -1
- package/dist/formLayout/utils/flattenErrors.d.ts +5 -0
- package/dist/formLayout/utils/flattenErrors.js +14 -0
- package/dist/formLayout/utils/getChildrenWithCustomColumns.js +3 -0
- package/dist/formLayout/utils/getFieldLabel.d.ts +1 -0
- package/dist/formLayout/utils/getFieldLabel.js +26 -0
- package/dist/formSection/hooks/useError.js +3 -3
- package/dist/formStepper/components/formStep.js +1 -1
- package/dist/formStepper/formStepper.js +2 -2
- package/dist/formStepperButtons/formStepperButtons.js +8 -5
- package/dist/gridLayout/hooks/useGridClasses.js +3 -9
- package/dist/groupButtonRaw/groupButtonRaw.js +2 -2
- package/dist/groupButtonRaw/types.d.ts +1 -0
- package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +8 -5
- package/dist/groupsFilterRaw/groupsFilterBox.js +3 -3
- package/dist/groupsFilterRaw/groupsFilterCommon.js +2 -2
- package/dist/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +5 -5
- package/dist/groupsFilterRaw/groupsFilterHelper.js +2 -2
- package/dist/groupsFilterRaw/groupsFilterInitialState.js +12 -9
- package/dist/groupsFilterRaw/groupsFilterMenu.js +3 -3
- package/dist/groupsFilterRaw/groupsFilterRaw.d.ts +1 -0
- package/dist/groupsFilterRaw/groupsFilterRaw.js +15 -10
- package/dist/groupsFilterRaw/groupsFilterTrigger.d.ts +2 -1
- package/dist/groupsFilterRaw/groupsFilterTrigger.js +8 -5
- package/dist/groupsFilterRaw/groupsHelper.js +22 -22
- package/dist/groupsFilterRaw/types.d.ts +2 -0
- package/dist/header/components/collapsedItemsControl/collapsedItemsControl.js +1 -1
- package/dist/header/components/mobileFilterControl/mobileFilterControl.js +1 -1
- package/dist/header/components/mobileSearchControl/mobileSearchControl.js +3 -3
- package/dist/header/header.js +1 -1
- package/dist/header/headerBack.js +5 -2
- package/dist/header/headerHelpers.d.ts +1 -0
- package/dist/header/headerHelpers.js +10 -1
- package/dist/header/hooks/useNonFittingElements.js +1 -1
- package/dist/icons/iconAlignLeft.js +1 -3
- package/dist/icons/iconAlignmentLeft.js +1 -3
- package/dist/icons/iconAlignmentRight.js +1 -3
- package/dist/icons/iconArrowBottomLeft.js +1 -3
- package/dist/icons/iconArrowBottomRight.js +1 -3
- package/dist/icons/iconArrowLeftPath.js +1 -3
- package/dist/icons/iconArrowRight.js +1 -3
- package/dist/icons/iconArrowRightCircle.js +1 -3
- package/dist/icons/iconArrowRightPath.js +1 -3
- package/dist/icons/iconArrowTopLeft.js +1 -3
- package/dist/icons/iconArrowTopRight.js +1 -3
- package/dist/icons/iconChevronDoubleRight.js +1 -3
- package/dist/icons/iconChevronRight.js +1 -3
- package/dist/icons/iconChevronRightSmall.js +1 -3
- package/dist/icons/iconCornerDownLeft.js +1 -3
- package/dist/icons/iconCornerDownRight.js +1 -3
- package/dist/icons/iconCornerLeftDown.js +1 -3
- package/dist/icons/iconCornerLeftUp.js +1 -3
- package/dist/icons/iconCornerRightDown.js +1 -3
- package/dist/icons/iconCornerRightUp.js +1 -3
- package/dist/icons/iconCornerUpLeft.js +1 -3
- package/dist/icons/iconCornerUpRight.js +1 -3
- package/dist/index.css +3628 -3321
- package/dist/index.d.ts +1 -0
- package/dist/index.js +16 -14
- package/dist/lineChartMini/lineChartMini.js +15 -3
- package/dist/list/itemData/itemDataInternal.js +6 -3
- package/dist/list/listItem/listItem.js +6 -3
- package/dist/menu/components/controlledMenuList/controlledMenuList.js +4 -1
- package/dist/menu/components/menuButton.d.ts +2 -1
- package/dist/menu/components/menuButton.js +7 -4
- package/dist/menu/components/menuErrorItem.js +2 -2
- package/dist/menu/components/menuItem.js +4 -4
- package/dist/menu/utils/useMenuItemCore.js +4 -3
- package/dist/miniTabs/miniTabs.d.ts +1 -0
- package/dist/miniTabs/miniTabs.js +1 -1
- package/dist/miniTabs/miniTabsHeaderItem.d.ts +2 -1
- package/dist/miniTabs/miniTabsHeaderItem.js +1 -1
- package/dist/miniTabs/miniTabsItem.d.ts +1 -0
- package/dist/mobileSheet/mobileSheet.js +2 -2
- package/dist/modal/modal.js +1 -1
- package/dist/nav/navFooter/navEditFooter/navEditFooter.js +2 -2
- package/dist/nav/navFooter/navFooter.js +1 -1
- package/dist/nav/navFooter/navFooterAction/navFooterAction.js +1 -1
- package/dist/nav/navHeader/navHeader.js +2 -2
- package/dist/nav/navHeader/navHeaderSearch/navHeaderSearch.js +2 -2
- package/dist/nav/navItem/navItem.js +4 -1
- package/dist/nav/navMobileBar/navMobileBar.js +1 -1
- package/dist/notification/notification.js +1 -1
- package/dist/pagination/paginationArrow.js +12 -5
- package/dist/pagination/paginationText/paginationText.js +1 -1
- package/dist/pill/components/pillNonActionable/pillNonActionable.js +1 -1
- package/dist/pillBox/components/pillBoxItem.js +1 -1
- package/dist/pillBox/pillBox.js +3 -3
- package/dist/pillExpandable/pillContent.js +12 -3
- package/dist/pillExpandable/pillExpandable.d.ts +4 -1
- package/dist/pillExpandable/pillExpandable.js +5 -3
- package/dist/pillExpandable/pillExpandableSimple.d.ts +1 -1
- package/dist/pillExpandable/pillExpandableSimple.js +4 -4
- package/dist/radioGroupRaw/radioGroupRaw.js +2 -1
- package/dist/rangeRaw/rangeRaw.js +7 -8
- package/dist/rangeRaw/utils/rangeHelper.js +7 -7
- package/dist/searchInputRaw/searchInputRaw.js +6 -3
- package/dist/selectList/selectList.js +2 -2
- package/dist/selectList/selectListItem.js +4 -1
- package/dist/skeleton/skeleton.js +1 -1
- package/dist/sortControl/sortControl.js +6 -7
- package/dist/stepperRaw/stepperRaw.js +5 -0
- package/dist/summary/summary.js +2 -2
- package/dist/summaryTile/summaryTile.d.ts +4 -2
- package/dist/summaryTile/summaryTile.js +59 -26
- package/dist/summaryTileBar/summaryTileBar.d.ts +4 -2
- package/dist/summaryTileBar/summaryTileBar.js +2 -2
- package/dist/table/actions/actionsMenu.js +2 -2
- package/dist/table/children/useTableChildren.d.ts +1 -1
- package/dist/table/children/useTableChildren.js +3 -3
- package/dist/table/detailPanel/detailPanel.js +1 -1
- package/dist/table/detailPanel/detailPanelHeader.js +2 -2
- package/dist/table/flexible/columnSettings.js +2 -2
- package/dist/table/flexible/columnsList.js +47 -117
- package/dist/table/flexible/columnsPopup.d.ts +1 -1
- package/dist/table/flexible/columnsPopup.js +1 -1
- package/dist/table/nested/useNestedRows.js +2 -2
- package/dist/table/selectable/selectableHeader.js +5 -4
- package/dist/table/selectable/useSelectableRows.d.ts +8 -0
- package/dist/table/selectable/useSelectableRows.js +16 -8
- package/dist/table/sortable/mobileSortControl.js +1 -1
- package/dist/table/sortable/sortableHeader.js +2 -2
- package/dist/table/table.js +3 -9
- package/dist/tabs/tabItem/tabItem.d.ts +2 -1
- package/dist/tabs/tabItem/tabItem.js +7 -2
- package/dist/tabs/tabs.d.ts +2 -1
- package/dist/tabs/tabs.js +71 -61
- package/dist/tabs/tabsTestHelper.js +2 -2
- package/dist/timePickerRaw/timePickerRaw.js +11 -9
- package/dist/timePickerRaw/types.d.ts +1 -0
- package/dist/toastRaw/toastRaw.js +1 -1
- package/dist/toggleButtonRaw/toggleButtonRaw.js +7 -4
- package/dist/tooltip/tooltip.js +13 -5
- package/dist/utils/formatDate.js +37 -37
- package/dist/utils/localization/flipAlignment.js +12 -1
- package/dist/utils/localization/languageContext.d.ts +1 -1
- package/dist/utils/localization/translations/cs.json +7 -5
- package/dist/utils/localization/translations/da-DK.json +7 -5
- package/dist/utils/localization/translations/de.json +7 -5
- package/dist/utils/localization/translations/en.json +12 -1
- package/dist/utils/localization/translations/es.json +7 -5
- package/dist/utils/localization/translations/fi-FI.json +7 -5
- package/dist/utils/localization/translations/fr-FR.json +7 -5
- package/dist/utils/localization/translations/fr.json +7 -5
- package/dist/utils/localization/translations/hu-HU.json +7 -5
- package/dist/utils/localization/translations/id.json +7 -5
- package/dist/utils/localization/translations/it.json +7 -5
- package/dist/utils/localization/translations/ja.json +7 -5
- package/dist/utils/localization/translations/ko-KR.json +7 -5
- package/dist/utils/localization/translations/ms.json +7 -5
- package/dist/utils/localization/translations/nb-NO.json +7 -5
- package/dist/utils/localization/translations/nl.json +7 -5
- package/dist/utils/localization/translations/pl.json +7 -5
- package/dist/utils/localization/translations/pt-BR.json +7 -5
- package/dist/utils/localization/translations/pt-PT.json +7 -5
- package/dist/utils/localization/translations/ro-RO.json +7 -5
- package/dist/utils/localization/translations/sk-SK.json +7 -5
- package/dist/utils/localization/translations/sv.json +7 -5
- package/dist/utils/localization/translations/th.json +7 -5
- package/dist/utils/localization/translations/tr.json +7 -5
- package/dist/utils/localization/translations/zh-Hans.json +7 -5
- package/dist/utils/localization/translations/zh-TW.json +7 -5
- package/dist/utils/localization/useDirectionalIcon.d.ts +3 -0
- package/dist/utils/localization/useDirectionalIcon.js +9 -0
- package/dist/utils/positioningUtils/alignments.d.ts +2 -2
- package/dist/utils/positioningUtils/alignments.js +2 -2
- package/dist/utils/positioningUtils/calculatePosition.d.ts +2 -1
- package/dist/utils/positioningUtils/calculatePosition.js +11 -11
- package/dist/utils/positioningUtils/normalizeLogicalAlignment.d.ts +4 -0
- package/dist/utils/positioningUtils/normalizeLogicalAlignment.js +36 -0
- package/esm/absolute/absolute.d.ts +21 -1
- package/esm/absolute/absolute.js +46 -6
- package/esm/advancedGroupsFilter/advancedGroupsFilter.js +3 -3
- package/esm/advancedGroupsFilter/advancedGroupsFilterForm.js +2 -2
- package/esm/advancedGroupsFilter/advancedGroupsFilterFormSection.js +7 -7
- package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +1 -1
- package/esm/alert/banner.d.ts +3 -1
- package/esm/alertRaw/alertRaw.js +1 -1
- package/esm/banner/banner.d.ts +5 -2
- package/esm/banner/banner.js +13 -2
- package/esm/banner/bannerErrorSummary.d.ts +7 -0
- package/esm/banner/bannerErrorSummary.js +4 -0
- package/esm/banner/bannerMultipLine.js +1 -1
- package/esm/banner/bannerSingleLine.js +1 -1
- package/esm/banner/utils/buildSummaryErrorList.d.ts +1 -0
- package/esm/banner/utils/buildSummaryErrorList.js +12 -0
- package/esm/banner/utils/hasSummaryErrorChild.d.ts +1 -0
- package/esm/banner/utils/hasSummaryErrorChild.js +3 -0
- package/esm/banner/utils/isSummaryErrorBanner.d.ts +2 -0
- package/esm/banner/utils/isSummaryErrorBanner.js +2 -0
- package/esm/banner/utils/isSummaryErrorElement.d.ts +3 -0
- package/esm/banner/utils/isSummaryErrorElement.js +3 -0
- package/esm/banner/utils/useSummaryBannerProp.d.ts +6 -0
- package/esm/banner/utils/useSummaryBannerProp.js +25 -0
- package/esm/betaPill/betaPill.js +4 -4
- package/esm/bookmark/bookmark.js +2 -2
- package/esm/bulkEditControl/bulkEditControl.js +5 -5
- package/esm/calendar/calendar.js +37 -34
- package/esm/calendar/calendarUtils.js +6 -4
- package/esm/card/card.js +1 -1
- package/esm/card/components/title.js +4 -1
- package/esm/card/components/titleLink.js +5 -2
- package/esm/chart/accessibleChart/accessibleChartNarrative.js +13 -13
- package/esm/chart/accessibleChart/accessibleChartTable.js +5 -5
- package/esm/chart/barChart/getDefaultOptions.d.ts +2 -1
- package/esm/chart/barChart/getDefaultOptions.js +5 -2
- package/esm/chart/barChart.js +6 -4
- package/esm/chart/chart.js +1 -1
- package/esm/chart/chartAxis/chartAxis.js +2 -2
- package/esm/chart/lineChart/getDefaultOptions.d.ts +4 -1
- package/esm/chart/lineChart/getDefaultOptions.js +7 -2
- package/esm/chart/lineChart.js +7 -3
- package/esm/chart/plugins/linePlugin/linePlugin.js +5 -4
- package/esm/chart/utils/getXAxisMeta.js +8 -5
- package/esm/chart/utils/isDateRange.js +1 -1
- package/esm/chart/utils/useHidden.d.ts +1 -0
- package/esm/chart/utils/useHidden.js +1 -1
- package/esm/chart/utils/useLastVisibleXAxisMeta.d.ts +2 -0
- package/esm/chart/utils/useLastVisibleXAxisMeta.js +11 -0
- package/esm/checkboxListWithAction/checkboxListWithAction.js +8 -5
- package/esm/chip/chip.js +1 -1
- package/esm/columnsSelector/columnsSelector.js +2 -2
- package/esm/columnsSelector/columnsTab/columnsTab.js +1 -1
- package/esm/columnsSelector/columnsTabGroup/columnsTabGroup.js +1 -1
- package/esm/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +4 -1
- package/esm/controlledPopup/controlledPopup.d.ts +1 -0
- package/esm/controlledPopup/controlledPopup.js +3 -1
- package/esm/dataFeed/feedExpandControl/feedExpandControl.js +3 -0
- package/esm/dataGrid/cell/cell.d.ts +2 -1
- package/esm/dataGrid/cell/cell.js +2 -2
- package/esm/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +1 -1
- package/esm/dataGrid/dataGrid.js +8 -5
- package/esm/dataGrid/emptySearchList/emptySearchList.js +1 -1
- package/esm/dataGrid/entitiesListActions/actions/columnsListButton.js +1 -1
- package/esm/dataGrid/entitiesListActions/actions/fullscreenButton.js +2 -2
- package/esm/dataGrid/listColumn.d.ts +2 -0
- package/esm/dataGrid/row/row.d.ts +2 -1
- package/esm/dataGrid/row/row.js +13 -9
- package/esm/dataGrid/withFlexibleColumns/components/columnSettings.js +2 -2
- package/esm/dataGrid/withFlexibleColumns/components/columnSettingsList.d.ts +1 -1
- package/esm/dataGrid/withFlexibleColumns/components/columnSettingsList.js +44 -110
- package/esm/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +2 -0
- package/esm/dataGrid/withFlexibleColumns/withFlexibleColumns.js +1 -1
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +4 -0
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +5 -5
- package/esm/dataGrid/withSelectableRows/withSelectableRows.js +4 -3
- package/esm/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +2 -2
- package/esm/dateInputInner/dateInputInner.js +7 -7
- package/esm/dateInputInner/dateInputInnerControlBlock.js +2 -2
- package/esm/dateInputRaw/dateInputRaw.js +4 -4
- package/esm/dateInputRaw/utils/getLabel.js +2 -2
- package/esm/dateRangeInner/dateRangeInner.js +6 -3
- package/esm/dateRangeRaw/dateRangeRaw.d.ts +1 -0
- package/esm/dateRangeRaw/dateRangeRaw.js +21 -15
- package/esm/dateRangeRaw/types.d.ts +1 -0
- package/esm/dateRangeRaw/utils/dateRangeUtils.js +17 -17
- package/esm/dateRangeRaw/utils/parseLabel.js +1 -1
- package/esm/dateSelectionWrapper/dateSelectionWrapper.js +4 -4
- package/esm/dialog/dialogContent.js +1 -1
- package/esm/dropdown/dropdownTrigger.d.ts +1 -1
- package/esm/dropdownRaw/dropdownList.js +9 -9
- package/esm/dropdownRaw/dropdownPopup.js +3 -3
- package/esm/dropdownRaw/dropdownRaw.js +34 -17
- package/esm/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
- package/esm/dropdownRaw/dropdownSearchableTrigger.js +8 -6
- package/esm/dropdownRaw/dropdownTrigger.d.ts +2 -1
- package/esm/dropdownRaw/dropdownTrigger.js +2 -2
- package/esm/dropdownRaw/types.d.ts +2 -0
- package/esm/favoriteButton/favoriteButton.js +1 -1
- package/esm/fileUpload/components/dropZoneContent.js +104 -104
- package/esm/fileUpload/components/templateDownloadSection.js +1 -1
- package/esm/fileUpload/components/uploadedFilesSection.js +2 -2
- package/esm/fileUpload/fileUpload.js +106 -106
- package/esm/filterButton/filterButton.d.ts +1 -0
- package/esm/filters/components/filtersContainer.js +2 -2
- package/esm/filters/components/filtersDropdown.d.ts +1 -1
- package/esm/filters/components/filtersEmptyState.js +2 -2
- package/esm/filters/components/filtersSaveModal.js +5 -5
- package/esm/filters/components/filtersSavedChipComponent.js +11 -11
- package/esm/filters/components/filtersSearchItemData.js +1 -1
- package/esm/filters/components/filtersSearchList.js +14 -11
- package/esm/filters/components/filtersSelect.js +1 -1
- package/esm/filters/components/filtersSelectListItem.js +2 -2
- package/esm/filters/components/filtersSidePanel.js +8 -8
- package/esm/filters/filters.js +7 -7
- package/esm/filtersBar/components/filtersBarGroupsFilter/filtersBarGroupsFilter.d.ts +1 -1
- package/esm/filtersBar/components/filtersBarPeriodPicker/filtersBarPeriodPicker.d.ts +1 -0
- package/esm/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +18 -18
- package/esm/filtersBar/components/resetComponentButton.js +1 -1
- package/esm/filtersBar/filtersBarActions/filtersBarActions.js +3 -3
- package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +2 -2
- package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +5 -5
- package/esm/filtersBar/filtersContainer/filtersContainer.js +62 -61
- package/esm/formField/hooks/useError.js +3 -3
- package/esm/formField/hooks/useFormFieldProps.d.ts +1 -1
- package/esm/formField/hooks/useFormFieldProps.js +4 -2
- package/esm/formGroup/components/reviewListToggle/reviewListToggle.js +2 -2
- package/esm/formGroup/hooks/useCustomRow.js +46 -32
- package/esm/formGroup/hooks/useRowElements.js +9 -6
- package/esm/formGroup/hooks/useToggle.js +1 -1
- package/esm/formGroup/types.d.ts +4 -0
- package/esm/formGroup/utils/normalizeFieldId.d.ts +1 -0
- package/esm/formGroup/utils/normalizeFieldId.js +1 -0
- package/esm/formGroup/utils/resolveId.d.ts +7 -0
- package/esm/formGroup/utils/resolveId.js +2 -0
- package/esm/formLayout/components/getLayoutColumns.js +4 -2
- package/esm/formLayout/hooks/useError.js +3 -3
- package/esm/formLayout/hooks/useErrorSummary.d.ts +6 -0
- package/esm/formLayout/hooks/useErrorSummary.js +30 -0
- package/esm/formLayout/hooks/useFormButtons.js +3 -3
- package/esm/formLayout/utils/applyGridPropsStatic.js +1 -1
- package/esm/formLayout/utils/flattenErrors.d.ts +5 -0
- package/esm/formLayout/utils/flattenErrors.js +10 -0
- package/esm/formLayout/utils/getChildrenWithCustomColumns.js +3 -0
- package/esm/formLayout/utils/getFieldLabel.d.ts +1 -0
- package/esm/formLayout/utils/getFieldLabel.js +22 -0
- package/esm/formSection/hooks/useError.js +3 -3
- package/esm/formStepper/components/formStep.js +1 -1
- package/esm/formStepper/formStepper.js +2 -2
- package/esm/formStepperButtons/formStepperButtons.js +8 -5
- package/esm/gridLayout/hooks/useGridClasses.js +3 -9
- package/esm/groupButtonRaw/groupButtonRaw.js +2 -2
- package/esm/groupButtonRaw/types.d.ts +1 -0
- package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +8 -5
- package/esm/groupsFilterRaw/groupsFilterBox.js +3 -3
- package/esm/groupsFilterRaw/groupsFilterCommon.js +2 -2
- package/esm/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +5 -5
- package/esm/groupsFilterRaw/groupsFilterHelper.js +2 -2
- package/esm/groupsFilterRaw/groupsFilterInitialState.js +12 -9
- package/esm/groupsFilterRaw/groupsFilterMenu.js +3 -3
- package/esm/groupsFilterRaw/groupsFilterRaw.d.ts +1 -0
- package/esm/groupsFilterRaw/groupsFilterRaw.js +15 -10
- package/esm/groupsFilterRaw/groupsFilterTrigger.d.ts +2 -1
- package/esm/groupsFilterRaw/groupsFilterTrigger.js +8 -5
- package/esm/groupsFilterRaw/groupsHelper.js +22 -22
- package/esm/groupsFilterRaw/types.d.ts +2 -0
- package/esm/header/components/collapsedItemsControl/collapsedItemsControl.js +1 -1
- package/esm/header/components/mobileFilterControl/mobileFilterControl.js +1 -1
- package/esm/header/components/mobileSearchControl/mobileSearchControl.js +3 -3
- package/esm/header/header.js +2 -2
- package/esm/header/headerBack.js +5 -2
- package/esm/header/headerHelpers.d.ts +1 -0
- package/esm/header/headerHelpers.js +8 -0
- package/esm/header/hooks/useNonFittingElements.js +1 -1
- package/esm/icons/iconAlignLeft.js +1 -3
- package/esm/icons/iconAlignmentLeft.js +1 -3
- package/esm/icons/iconAlignmentRight.js +1 -3
- package/esm/icons/iconArrowBottomLeft.js +1 -3
- package/esm/icons/iconArrowBottomRight.js +1 -3
- package/esm/icons/iconArrowLeftPath.js +1 -3
- package/esm/icons/iconArrowRight.js +1 -3
- package/esm/icons/iconArrowRightCircle.js +1 -3
- package/esm/icons/iconArrowRightPath.js +1 -3
- package/esm/icons/iconArrowTopLeft.js +1 -3
- package/esm/icons/iconArrowTopRight.js +1 -3
- package/esm/icons/iconChevronDoubleRight.js +1 -3
- package/esm/icons/iconChevronRight.js +1 -3
- package/esm/icons/iconChevronRightSmall.js +1 -3
- package/esm/icons/iconCornerDownLeft.js +1 -3
- package/esm/icons/iconCornerDownRight.js +1 -3
- package/esm/icons/iconCornerLeftDown.js +1 -3
- package/esm/icons/iconCornerLeftUp.js +1 -3
- package/esm/icons/iconCornerRightDown.js +1 -3
- package/esm/icons/iconCornerRightUp.js +1 -3
- package/esm/icons/iconCornerUpLeft.js +1 -3
- package/esm/icons/iconCornerUpRight.js +1 -3
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/lineChartMini/lineChartMini.js +15 -3
- package/esm/list/itemData/itemDataInternal.js +6 -3
- package/esm/list/listItem/listItem.js +6 -3
- package/esm/menu/components/controlledMenuList/controlledMenuList.js +4 -1
- package/esm/menu/components/menuButton.d.ts +2 -1
- package/esm/menu/components/menuButton.js +7 -4
- package/esm/menu/components/menuErrorItem.js +2 -2
- package/esm/menu/components/menuItem.js +4 -4
- package/esm/menu/utils/useMenuItemCore.js +4 -3
- package/esm/miniTabs/miniTabs.d.ts +1 -0
- package/esm/miniTabs/miniTabs.js +1 -1
- package/esm/miniTabs/miniTabsHeaderItem.d.ts +2 -1
- package/esm/miniTabs/miniTabsHeaderItem.js +1 -1
- package/esm/miniTabs/miniTabsItem.d.ts +1 -0
- package/esm/mobileSheet/mobileSheet.js +2 -2
- package/esm/modal/modal.js +1 -1
- package/esm/nav/navFooter/navEditFooter/navEditFooter.js +2 -2
- package/esm/nav/navFooter/navFooter.js +1 -1
- package/esm/nav/navFooter/navFooterAction/navFooterAction.js +1 -1
- package/esm/nav/navHeader/navHeader.js +2 -2
- package/esm/nav/navHeader/navHeaderSearch/navHeaderSearch.js +2 -2
- package/esm/nav/navItem/navItem.js +4 -1
- package/esm/nav/navMobileBar/navMobileBar.js +1 -1
- package/esm/notification/notification.js +1 -1
- package/esm/pagination/paginationArrow.js +12 -5
- package/esm/pagination/paginationText/paginationText.js +1 -1
- package/esm/pill/components/pillNonActionable/pillNonActionable.js +1 -1
- package/esm/pillBox/components/pillBoxItem.js +1 -1
- package/esm/pillBox/pillBox.js +3 -3
- package/esm/pillExpandable/pillContent.js +12 -3
- package/esm/pillExpandable/pillExpandable.d.ts +4 -1
- package/esm/pillExpandable/pillExpandable.js +5 -3
- package/esm/pillExpandable/pillExpandableSimple.d.ts +1 -1
- package/esm/pillExpandable/pillExpandableSimple.js +4 -4
- package/esm/radioGroupRaw/radioGroupRaw.js +2 -1
- package/esm/rangeRaw/rangeRaw.js +7 -8
- package/esm/rangeRaw/utils/rangeHelper.js +7 -7
- package/esm/searchInputRaw/searchInputRaw.js +6 -3
- package/esm/selectList/selectList.js +2 -2
- package/esm/selectList/selectListItem.js +4 -1
- package/esm/skeleton/skeleton.js +1 -1
- package/esm/sortControl/sortControl.js +6 -7
- package/esm/stepperRaw/stepperRaw.js +3 -0
- package/esm/summary/summary.js +2 -2
- package/esm/summaryTile/summaryTile.d.ts +4 -2
- package/esm/summaryTile/summaryTile.js +59 -26
- package/esm/summaryTileBar/summaryTileBar.d.ts +4 -2
- package/esm/summaryTileBar/summaryTileBar.js +2 -2
- package/esm/table/actions/actionsMenu.js +2 -2
- package/esm/table/children/useTableChildren.d.ts +1 -1
- package/esm/table/children/useTableChildren.js +3 -3
- package/esm/table/detailPanel/detailPanel.js +1 -1
- package/esm/table/detailPanel/detailPanelHeader.js +2 -2
- package/esm/table/flexible/columnSettings.js +2 -2
- package/esm/table/flexible/columnsList.js +46 -111
- package/esm/table/flexible/columnsPopup.d.ts +1 -1
- package/esm/table/flexible/columnsPopup.js +1 -1
- package/esm/table/nested/useNestedRows.js +2 -2
- package/esm/table/selectable/selectableHeader.js +5 -4
- package/esm/table/selectable/useSelectableRows.d.ts +8 -0
- package/esm/table/selectable/useSelectableRows.js +16 -8
- package/esm/table/sortable/mobileSortControl.js +1 -1
- package/esm/table/sortable/sortableHeader.js +2 -2
- package/esm/table/table.js +3 -9
- package/esm/tabs/tabItem/tabItem.d.ts +2 -1
- package/esm/tabs/tabItem/tabItem.js +7 -2
- package/esm/tabs/tabs.d.ts +2 -1
- package/esm/tabs/tabs.js +71 -61
- package/esm/tabs/tabsTestHelper.js +2 -2
- package/esm/testHelpers/mockAbsoluteAlignment.d.ts +1 -0
- package/esm/testHelpers/mockAbsoluteAlignment.js +10 -0
- package/esm/timePickerRaw/timePickerRaw.js +11 -9
- package/esm/timePickerRaw/types.d.ts +1 -0
- package/esm/toastRaw/toastRaw.js +1 -1
- package/esm/toggleButtonRaw/toggleButtonRaw.js +7 -4
- package/esm/tooltip/tooltip.js +13 -5
- package/esm/utils/formatDate.js +37 -37
- package/esm/utils/localization/flipAlignment.js +12 -1
- package/esm/utils/localization/languageContext.d.ts +1 -1
- package/esm/utils/localization/translations/cs.json +7 -5
- package/esm/utils/localization/translations/da-DK.json +7 -5
- package/esm/utils/localization/translations/de.json +7 -5
- package/esm/utils/localization/translations/en.json +12 -1
- package/esm/utils/localization/translations/es.json +7 -5
- package/esm/utils/localization/translations/fi-FI.json +7 -5
- package/esm/utils/localization/translations/fr-FR.json +7 -5
- package/esm/utils/localization/translations/fr.json +7 -5
- package/esm/utils/localization/translations/hu-HU.json +7 -5
- package/esm/utils/localization/translations/id.json +7 -5
- package/esm/utils/localization/translations/it.json +7 -5
- package/esm/utils/localization/translations/ja.json +7 -5
- package/esm/utils/localization/translations/ko-KR.json +7 -5
- package/esm/utils/localization/translations/ms.json +7 -5
- package/esm/utils/localization/translations/nb-NO.json +7 -5
- package/esm/utils/localization/translations/nl.json +7 -5
- package/esm/utils/localization/translations/pl.json +7 -5
- package/esm/utils/localization/translations/pt-BR.json +7 -5
- package/esm/utils/localization/translations/pt-PT.json +7 -5
- package/esm/utils/localization/translations/ro-RO.json +7 -5
- package/esm/utils/localization/translations/sk-SK.json +7 -5
- package/esm/utils/localization/translations/sv.json +7 -5
- package/esm/utils/localization/translations/th.json +7 -5
- package/esm/utils/localization/translations/tr.json +7 -5
- package/esm/utils/localization/translations/zh-Hans.json +7 -5
- package/esm/utils/localization/translations/zh-TW.json +7 -5
- package/esm/utils/localization/useDirectionalIcon.d.ts +3 -0
- package/esm/utils/localization/useDirectionalIcon.js +5 -0
- package/esm/utils/positioningUtils/alignments.d.ts +2 -2
- package/esm/utils/positioningUtils/alignments.js +2 -2
- package/esm/utils/positioningUtils/calculatePosition.d.ts +2 -1
- package/esm/utils/positioningUtils/calculatePosition.js +11 -11
- package/esm/utils/positioningUtils/normalizeLogicalAlignment.d.ts +4 -0
- package/esm/utils/positioningUtils/normalizeLogicalAlignment.js +32 -0
- package/package.json +11 -12
- package/dist/utils/localization/translations/en-json.d.ts +0 -317
- package/dist/utils/localization/translations/en-json.js +0 -320
- package/esm/utils/localization/translations/en-json.d.ts +0 -317
- package/esm/utils/localization/translations/en-json.js +0 -317
|
@@ -31,7 +31,7 @@ injectString("tr", "Reload", "Yeniden y\xFCkle");
|
|
|
31
31
|
injectString("zh-Hans", "Reload", "\u91CD\u65B0\u52A0\u8F7D");
|
|
32
32
|
injectString("zh-TW", "Reload", "\u91CD\u65B0\u8F09\u5165");
|
|
33
33
|
injectString("ro-RO", "Reload", "Re\xEEnc\u0103rca\u021Bi");
|
|
34
|
-
injectString("ar
|
|
34
|
+
injectString("ar", "Reload", "\u0625\u0639\u0627\u062F\u0629 \u062A\u062D\u0645\u064A\u0644");
|
|
35
35
|
injectString("cs", "Failed to load {0}", "Failed to load {0}");
|
|
36
36
|
injectString("da-DK", "Failed to load {0}", "Failed to load {0}");
|
|
37
37
|
injectString("de", "Failed to load {0}", "Failed to load {0}");
|
|
@@ -58,7 +58,7 @@ injectString("tr", "Failed to load {0}", "Failed to load {0}");
|
|
|
58
58
|
injectString("zh-Hans", "Failed to load {0}", "Failed to load {0}");
|
|
59
59
|
injectString("zh-TW", "Failed to load {0}", "Failed to load {0}");
|
|
60
60
|
injectString("ro-RO", "Failed to load {0}", "Nu s-a putut \xEEnc\u0103rca {0}");
|
|
61
|
-
injectString("ar
|
|
61
|
+
injectString("ar", "Failed to load {0}", "\u0641\u0634\u0644 \u062A\u062D\u0645\u064A\u0644 {0}");
|
|
62
62
|
injectString("cs", "This field is required.", "Toto pole je povinn\xE9.");
|
|
63
63
|
injectString("da-DK", "This field is required.", "Dette felt er p\xE5kr\xE6vet.");
|
|
64
64
|
injectString("de", "This field is required.", "Dieses Feld ist erforderlich.");
|
|
@@ -85,7 +85,7 @@ injectString("tr", "This field is required.", "Bu alan zorunludur.");
|
|
|
85
85
|
injectString("zh-Hans", "This field is required.", "\u8BE5\u5B57\u6BB5\u4E3A\u5FC5\u586B\u9879\u3002");
|
|
86
86
|
injectString("zh-TW", "This field is required.", "\u6B64\u6B04\u4F4D\u70BA\u5FC5\u586B\u3002");
|
|
87
87
|
injectString("ro-RO", "This field is required.", "Acest c\xE2mp este obligatoriu.");
|
|
88
|
-
injectString("ar
|
|
88
|
+
injectString("ar", "This field is required.", "\u0647\u0630\u0627 \u0627\u0644\u062D\u0642\u0644 \u0645\u0637\u0644\u0648\u0628.");
|
|
89
89
|
export const useError = props => {
|
|
90
90
|
var _a, _b, _c, _d;
|
|
91
91
|
const errorId = useId();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
import { TFormFieldComponentProps } from "../formField";
|
|
3
3
|
export declare const useFormFieldProps: <T>(props: TFormFieldComponentProps<T>, wrapperComponent: FC<T>) => {
|
|
4
|
-
id:
|
|
4
|
+
id: any;
|
|
5
5
|
wrapperComponent: FC<T>;
|
|
6
6
|
props: TFormFieldComponentProps<T>;
|
|
7
7
|
hasCustomWidth: boolean;
|
|
@@ -10,6 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { useId } from "react";
|
|
13
|
+
import { normalizeFieldId } from "../../formGroup/utils/normalizeFieldId";
|
|
13
14
|
import { useAssistive } from "./useAssistive";
|
|
14
15
|
import { useError } from "./useError";
|
|
15
16
|
import { useFormFieldClasses } from "./useFormFieldClasses";
|
|
@@ -17,9 +18,10 @@ import { useReadonly } from "./useReadonly";
|
|
|
17
18
|
import { useTrailing } from "./useTrailing";
|
|
18
19
|
import { useWidth } from "./useWidth";
|
|
19
20
|
export const useFormFieldProps = (props, wrapperComponent) => {
|
|
21
|
+
var _a;
|
|
20
22
|
const localId = useId();
|
|
21
|
-
const id = props.id || localId;
|
|
22
|
-
const
|
|
23
|
+
const id = props.id || (((_a = props.controller) === null || _a === void 0 ? void 0 : _a.name) && normalizeFieldId(props.controller.name)) || localId;
|
|
24
|
+
const _b = useWidth(props), { hasCustomWidth } = _b, widthObj = __rest(_b, ["hasCustomWidth"]);
|
|
23
25
|
const { id: trailingId, trailing } = useTrailing(props);
|
|
24
26
|
const { error } = useError(props);
|
|
25
27
|
const { assistive } = useAssistive(props);
|
|
@@ -31,7 +31,7 @@ injectString("tr", "On", "A\xE7\u0131k");
|
|
|
31
31
|
injectString("zh-Hans", "On", "\u5F00\u542F");
|
|
32
32
|
injectString("zh-TW", "On", "\u958B\u555F");
|
|
33
33
|
injectString("ro-RO", "On", "Pe");
|
|
34
|
-
injectString("ar
|
|
34
|
+
injectString("ar", "On", "\u062A\u0634\u063A\u064A\u0644");
|
|
35
35
|
injectString("cs", "Off", "Vypnuto");
|
|
36
36
|
injectString("da-DK", "Off", "Slukket");
|
|
37
37
|
injectString("de", "Off", "Aus");
|
|
@@ -58,7 +58,7 @@ injectString("tr", "Off", "Kapal\u0131");
|
|
|
58
58
|
injectString("zh-Hans", "Off", "\u5173\u95ED");
|
|
59
59
|
injectString("zh-TW", "Off", "\u95DC\u9589");
|
|
60
60
|
injectString("ro-RO", "Off", "Off");
|
|
61
|
-
injectString("ar
|
|
61
|
+
injectString("ar", "Off", "\u0625\u064A\u0642\u0627\u0641");
|
|
62
62
|
export const ReviewListToggle = ({
|
|
63
63
|
value,
|
|
64
64
|
className = ""
|
|
@@ -4,9 +4,10 @@ import { classNames } from "../../commonHelpers/classNames/classNames";
|
|
|
4
4
|
import { FormGroupItem } from "../../formGroupItem/formGroupItem";
|
|
5
5
|
import { CustomRow } from "../components/customRow/customRow";
|
|
6
6
|
import { useMode } from "./useMode";
|
|
7
|
+
import { resolveId } from "../utils/resolveId";
|
|
7
8
|
// eslint-disable-next-line complexity
|
|
8
9
|
export const useCustomRowElements = (state) => {
|
|
9
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15
|
|
10
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
|
|
10
11
|
const id1 = useId();
|
|
11
12
|
const id2 = useId();
|
|
12
13
|
const mode = useMode();
|
|
@@ -15,25 +16,27 @@ export const useCustomRowElements = (state) => {
|
|
|
15
16
|
if (mode === "review") {
|
|
16
17
|
let customControl;
|
|
17
18
|
if ((_a = state.elements.control1) === null || _a === void 0 ? void 0 : _a.value) {
|
|
18
|
-
|
|
19
|
+
const rid1 = resolveId(state.elements.control1.value, id1);
|
|
20
|
+
control1 = cloneElement(state.elements.control1.value, { id: rid1 });
|
|
19
21
|
}
|
|
20
22
|
if ((_b = state.elements.control2) === null || _b === void 0 ? void 0 : _b.value) {
|
|
21
|
-
|
|
23
|
+
const rid2 = resolveId(state.elements.control2.value, id2);
|
|
24
|
+
control2 = cloneElement(state.elements.control2.value, { id: rid2 });
|
|
22
25
|
}
|
|
23
26
|
if (state.controlsCount === 2 && state.labelsCount === 2) {
|
|
24
|
-
customControl = (_jsxs(_Fragment, { children: [_jsx(FormGroupItem, { id: ((
|
|
27
|
+
customControl = (_jsxs(_Fragment, { children: [_jsx(FormGroupItem, { id: ((_c = state.elements.control1) === null || _c === void 0 ? void 0 : _c.value) ? resolveId(state.elements.control1.value, id1) : id1, value: (_d = state.elements.label1) === null || _d === void 0 ? void 0 : _d.value, tooltip: (_e = state.elements.label1) === null || _e === void 0 ? void 0 : _e.tooltip, className: classNames([
|
|
25
28
|
"zen-field-label--custom-width",
|
|
26
|
-
((
|
|
29
|
+
((_f = state.elements.label1) === null || _f === void 0 ? void 0 : _f.className) || "",
|
|
27
30
|
state.customLabelClasses || ""
|
|
28
|
-
]) }), _jsx(CustomRow, { className: state.customControlClasses, children: control1 }), _jsx(FormGroupItem, { id: ((
|
|
31
|
+
]) }), _jsx(CustomRow, { className: state.customControlClasses, children: control1 }), _jsx(FormGroupItem, { id: ((_g = state.elements.control2) === null || _g === void 0 ? void 0 : _g.value) ? resolveId(state.elements.control2.value, id2) : id2, value: (_h = state.elements.label2) === null || _h === void 0 ? void 0 : _h.value, tooltip: (_j = state.elements.label2) === null || _j === void 0 ? void 0 : _j.tooltip, className: classNames(["zen-field-label--custom-width", ((_k = state.elements.label2) === null || _k === void 0 ? void 0 : _k.className) || ""]) }), _jsx(CustomRow, { className: state.customControlClasses, children: control2 })] }));
|
|
29
32
|
return {
|
|
30
33
|
customControl
|
|
31
34
|
};
|
|
32
35
|
}
|
|
33
36
|
if (state.controlsCount > 1) {
|
|
34
|
-
customControl = (_jsxs(_Fragment, { children: [_jsx(FormGroupItem, { id: ((
|
|
37
|
+
customControl = (_jsxs(_Fragment, { children: [_jsx(FormGroupItem, { id: ((_l = state.elements.control1) === null || _l === void 0 ? void 0 : _l.value) ? resolveId(state.elements.control1.value, id1) : id1, value: (_m = state.elements.label1) === null || _m === void 0 ? void 0 : _m.value, tooltip: (_o = state.elements.label1) === null || _o === void 0 ? void 0 : _o.tooltip, className: classNames([
|
|
35
38
|
"zen-field-label--custom-width",
|
|
36
|
-
((
|
|
39
|
+
((_p = state.elements.label1) === null || _p === void 0 ? void 0 : _p.className) || "",
|
|
37
40
|
state.customLabelClasses || ""
|
|
38
41
|
]) }), _jsxs(CustomRow, { className: state.customControlClasses, children: [control1, control2] })] }));
|
|
39
42
|
return {
|
|
@@ -41,10 +44,12 @@ export const useCustomRowElements = (state) => {
|
|
|
41
44
|
};
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
|
-
if (state.custom && state.totalCount === 4 && ((
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
if (state.custom && state.totalCount === 4 && ((_q = state.elements.control1) === null || _q === void 0 ? void 0 : _q.value) && ((_r = state.elements.control2) === null || _r === void 0 ? void 0 : _r.value)) {
|
|
48
|
+
const rid1 = resolveId(state.elements.control1.value, id1);
|
|
49
|
+
const rid2 = resolveId(state.elements.control2.value, id2);
|
|
50
|
+
control1 = cloneElement(state.elements.control1.value, { id: rid1 });
|
|
51
|
+
control2 = cloneElement(state.elements.control2.value, { id: rid2 });
|
|
52
|
+
const customControl = (_jsxs(_Fragment, { children: [_jsx(FormGroupItem, { id: rid1, value: (_s = state.elements.label1) === null || _s === void 0 ? void 0 : _s.value, tooltip: (_t = state.elements.label1) === null || _t === void 0 ? void 0 : _t.tooltip, className: classNames([((_u = state.elements.label1) === null || _u === void 0 ? void 0 : _u.className) || "", "zen-field-label--custom-width", state.customLabelClasses || ""]) }), _jsxs(CustomRow, { className: state.customControlClasses, children: [control1, _jsx(FormGroupItem, { id: rid2, value: (_v = state.elements.label2) === null || _v === void 0 ? void 0 : _v.value, tooltip: (_w = state.elements.label2) === null || _w === void 0 ? void 0 : _w.tooltip, className: classNames([((_x = state.elements.label2) === null || _x === void 0 ? void 0 : _x.className) || "", "zen-field-label--custom-width"]) }), control2] })] }));
|
|
48
53
|
return {
|
|
49
54
|
customControl
|
|
50
55
|
};
|
|
@@ -53,11 +58,13 @@ export const useCustomRowElements = (state) => {
|
|
|
53
58
|
state.totalCount === 3 &&
|
|
54
59
|
state.labelsCount === 1 &&
|
|
55
60
|
!state.elements.label1 &&
|
|
56
|
-
((
|
|
57
|
-
((
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
((_y = state.elements.control1) === null || _y === void 0 ? void 0 : _y.value) &&
|
|
62
|
+
((_z = state.elements.control2) === null || _z === void 0 ? void 0 : _z.value)) {
|
|
63
|
+
const rid1 = resolveId(state.elements.control1.value, id1);
|
|
64
|
+
const rid2 = resolveId(state.elements.control2.value, id2);
|
|
65
|
+
control1 = cloneElement(state.elements.control1.value, { id: rid1 });
|
|
66
|
+
control2 = cloneElement(state.elements.control2.value, { id: rid2 });
|
|
67
|
+
const customControl = (_jsxs(CustomRow, { className: state.customControlClasses, children: [control1, _jsx(FormGroupItem, { id: rid2, value: (_0 = state.elements.label2) === null || _0 === void 0 ? void 0 : _0.value, tooltip: (_1 = state.elements.label2) === null || _1 === void 0 ? void 0 : _1.tooltip, className: classNames([((_2 = state.elements.label2) === null || _2 === void 0 ? void 0 : _2.className) || "", "zen-field-label--custom-width"]) }), control2] }));
|
|
61
68
|
return {
|
|
62
69
|
customControl
|
|
63
70
|
};
|
|
@@ -66,36 +73,43 @@ export const useCustomRowElements = (state) => {
|
|
|
66
73
|
state.totalCount === 3 &&
|
|
67
74
|
state.labelsCount === 1 &&
|
|
68
75
|
state.controlsCount === 2 &&
|
|
69
|
-
((
|
|
70
|
-
((
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
((_3 = state.elements.control1) === null || _3 === void 0 ? void 0 : _3.value) &&
|
|
77
|
+
((_4 = state.elements.control2) === null || _4 === void 0 ? void 0 : _4.value)) {
|
|
78
|
+
const rid1 = resolveId(state.elements.control1.value, id1);
|
|
79
|
+
const rid2 = resolveId(state.elements.control2.value, id2);
|
|
80
|
+
control1 = cloneElement(state.elements.control1.value, { id: rid1 });
|
|
81
|
+
control2 = cloneElement(state.elements.control2.value, { id: rid2 });
|
|
82
|
+
const customControl = (_jsxs(_Fragment, { children: [_jsx(FormGroupItem, { id: rid1, value: (_5 = state.elements.label1) === null || _5 === void 0 ? void 0 : _5.value, tooltip: (_6 = state.elements.label1) === null || _6 === void 0 ? void 0 : _6.tooltip, className: classNames(["zen-field-label--custom-width", ((_7 = state.elements.label1) === null || _7 === void 0 ? void 0 : _7.className) || "", state.customLabelClasses || ""]) }), _jsxs(CustomRow, { className: state.customControlClasses, children: [control1, control2] })] }));
|
|
74
83
|
return {
|
|
75
84
|
customControl
|
|
76
85
|
};
|
|
77
86
|
}
|
|
78
|
-
if (state.custom && state.totalCount === 2 && state.controlsCount === 2 && ((
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
if (state.custom && state.totalCount === 2 && state.controlsCount === 2 && ((_8 = state.elements.control1) === null || _8 === void 0 ? void 0 : _8.value) && ((_9 = state.elements.control2) === null || _9 === void 0 ? void 0 : _9.value)) {
|
|
88
|
+
const rid1 = resolveId(state.elements.control1.value, id1);
|
|
89
|
+
const rid2 = resolveId(state.elements.control2.value, id2);
|
|
90
|
+
control1 = cloneElement(state.elements.control1.value, { id: rid1 });
|
|
91
|
+
control2 = cloneElement(state.elements.control2.value, { id: rid2 });
|
|
81
92
|
const customControl = (_jsxs(CustomRow, { className: state.customControlClasses, children: [control1, control2] }));
|
|
82
93
|
return {
|
|
83
94
|
customControl
|
|
84
95
|
};
|
|
85
96
|
}
|
|
86
|
-
if (state.custom && state.totalCount === 2 && state.labelsCount === 1 && ((
|
|
87
|
-
|
|
88
|
-
|
|
97
|
+
if (state.custom && state.totalCount === 2 && state.labelsCount === 1 && ((_10 = state.elements.control1) === null || _10 === void 0 ? void 0 : _10.value)) {
|
|
98
|
+
const rid1 = resolveId(state.elements.control1.value, id1);
|
|
99
|
+
control1 = cloneElement(state.elements.control1.value, { id: rid1 });
|
|
100
|
+
const customControl = (_jsxs(_Fragment, { children: [_jsx(FormGroupItem, { id: rid1, value: (_11 = state.elements.label1) === null || _11 === void 0 ? void 0 : _11.value, tooltip: (_12 = state.elements.label1) === null || _12 === void 0 ? void 0 : _12.tooltip, className: classNames(["zen-field-label--custom-width", ((_13 = state.elements.label1) === null || _13 === void 0 ? void 0 : _13.className) || "", state.customLabelClasses || ""]) }), _jsx(CustomRow, { className: state.customControlClasses, children: control1 })] }));
|
|
89
101
|
return {
|
|
90
102
|
customControl
|
|
91
103
|
};
|
|
92
104
|
}
|
|
93
105
|
if (state.custom && state.totalCount === 1 && state.controlsCount === 1) {
|
|
94
|
-
if ((
|
|
95
|
-
|
|
106
|
+
if ((_14 = state.elements.control1) === null || _14 === void 0 ? void 0 : _14.value) {
|
|
107
|
+
const rid1 = resolveId(state.elements.control1.value, id1);
|
|
108
|
+
control1 = cloneElement(state.elements.control1.value, { id: rid1 });
|
|
96
109
|
}
|
|
97
|
-
else if ((
|
|
98
|
-
|
|
110
|
+
else if ((_15 = state.elements.control2) === null || _15 === void 0 ? void 0 : _15.value) {
|
|
111
|
+
const rid2 = resolveId(state.elements.control2.value, id2);
|
|
112
|
+
control1 = cloneElement(state.elements.control2.value, { id: rid2 });
|
|
99
113
|
}
|
|
100
114
|
const customControl = _jsx(CustomRow, { className: state.customControlClasses, children: control1 });
|
|
101
115
|
return {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { useId, cloneElement } from "react";
|
|
2
2
|
import { useCustomRowElements } from "./useCustomRow";
|
|
3
|
+
import { resolveId } from "../utils/resolveId";
|
|
3
4
|
export const useRowElements = (state) => {
|
|
4
|
-
var _a, _b;
|
|
5
|
+
var _a, _b, _c, _d;
|
|
5
6
|
const id1 = useId();
|
|
6
7
|
const id2 = useId();
|
|
7
8
|
let control1;
|
|
@@ -10,11 +11,13 @@ export const useRowElements = (state) => {
|
|
|
10
11
|
if (customControl) {
|
|
11
12
|
return { customControl };
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
const resolvedId1 = ((_a = state.elements.control1) === null || _a === void 0 ? void 0 : _a.value) ? resolveId(state.elements.control1.value, id1) : id1;
|
|
15
|
+
const resolvedId2 = ((_b = state.elements.control2) === null || _b === void 0 ? void 0 : _b.value) ? resolveId(state.elements.control2.value, id2) : id2;
|
|
16
|
+
if ((_c = state.elements.control1) === null || _c === void 0 ? void 0 : _c.value) {
|
|
17
|
+
control1 = cloneElement(state.elements.control1.value, { id: resolvedId1 });
|
|
15
18
|
}
|
|
16
|
-
if ((
|
|
17
|
-
control2 = cloneElement(state.elements.control2.value, { id:
|
|
19
|
+
if ((_d = state.elements.control2) === null || _d === void 0 ? void 0 : _d.value) {
|
|
20
|
+
control2 = cloneElement(state.elements.control2.value, { id: resolvedId2 });
|
|
18
21
|
}
|
|
19
|
-
return { control1, control2, id1, id2 };
|
|
22
|
+
return { control1, control2, id1: resolvedId1, id2: resolvedId2 };
|
|
20
23
|
};
|
|
@@ -36,7 +36,7 @@ injectString("tr", "Sub-options are not active.", "Sub-options are not active.")
|
|
|
36
36
|
injectString("zh-Hans", "Sub-options are not active.", "Sub-options are not active.");
|
|
37
37
|
injectString("zh-TW", "Sub-options are not active.", "Sub-options are not active.");
|
|
38
38
|
injectString("ro-RO", "Sub-options are not active.", "Nu sunt active op\u021Biuni secundare.");
|
|
39
|
-
injectString("ar
|
|
39
|
+
injectString("ar", "Sub-options are not active.", "\u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A \u0627\u0644\u0641\u0631\u0639\u064A\u0629 \u063A\u064A\u0631 \u0646\u0634\u0637\u0629.");
|
|
40
40
|
export const useToggle = result => {
|
|
41
41
|
const {
|
|
42
42
|
controller,
|
package/esm/formGroup/types.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const normalizeFieldId: (name: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const normalizeFieldId = (name) => name.replace(/\./g, "-");
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { normalizeFieldId } from "./normalizeFieldId";
|
|
2
|
+
export const resolveId = (element, fallback) => { var _a; return element.props.id || (((_a = element.props.controller) === null || _a === void 0 ? void 0 : _a.name) && normalizeFieldId(element.props.controller.name)) || fallback; };
|
|
@@ -10,11 +10,13 @@ export const getLayoutColumns = (children) => {
|
|
|
10
10
|
if (!Array.isArray(children)) {
|
|
11
11
|
return isValidElement(children) && children.type === LayoutColumn ? [children] : [_jsx(LayoutColumn, { children: children }, "column1")];
|
|
12
12
|
}
|
|
13
|
-
const layoutColumns = children
|
|
13
|
+
const layoutColumns = children
|
|
14
|
+
.filter(child => isValidElement(child) && child.type === LayoutColumn && child.props.children)
|
|
15
|
+
.slice(0, 2);
|
|
14
16
|
if (layoutColumns.length) {
|
|
15
17
|
return layoutColumns;
|
|
16
18
|
}
|
|
17
|
-
const sections = children.filter((el) => el.type === FormSection || isCustomFormSection(el));
|
|
19
|
+
const sections = children.filter((el) => isValidElement(el) && (el.type === FormSection || isCustomFormSection(el)));
|
|
18
20
|
if (sections.length === 1) {
|
|
19
21
|
return [_jsx(LayoutColumn, { children: sections }, "column1")];
|
|
20
22
|
}
|
|
@@ -29,7 +29,7 @@ injectString("tr", "Reload", "Yeniden y\xFCkle");
|
|
|
29
29
|
injectString("zh-Hans", "Reload", "\u91CD\u65B0\u52A0\u8F7D");
|
|
30
30
|
injectString("zh-TW", "Reload", "\u91CD\u65B0\u8F09\u5165");
|
|
31
31
|
injectString("ro-RO", "Reload", "Re\xEEnc\u0103rca\u021Bi");
|
|
32
|
-
injectString("ar
|
|
32
|
+
injectString("ar", "Reload", "\u0625\u0639\u0627\u062F\u0629 \u062A\u062D\u0645\u064A\u0644");
|
|
33
33
|
injectString("cs", "Failed to load page", "Failed to load page");
|
|
34
34
|
injectString("da-DK", "Failed to load page", "Failed to load page");
|
|
35
35
|
injectString("de", "Failed to load page", "Failed to load page");
|
|
@@ -56,7 +56,7 @@ injectString("tr", "Failed to load page", "Failed to load page");
|
|
|
56
56
|
injectString("zh-Hans", "Failed to load page", "Failed to load page");
|
|
57
57
|
injectString("zh-TW", "Failed to load page", "Failed to load page");
|
|
58
58
|
injectString("ro-RO", "Failed to load page", "Nu s-a putut \xEEnc\u0103rca pagina");
|
|
59
|
-
injectString("ar
|
|
59
|
+
injectString("ar", "Failed to load page", "\u0641\u0634\u0644 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0635\u0641\u062D\u0629");
|
|
60
60
|
injectString("cs", "Please refresh the page and try again. If the issue persists, contact Support.", "Please refresh the page and try again. If the issue persists, contact Support.");
|
|
61
61
|
injectString("da-DK", "Please refresh the page and try again. If the issue persists, contact Support.", "Please refresh the page and try again. If the issue persists, contact Support.");
|
|
62
62
|
injectString("de", "Please refresh the page and try again. If the issue persists, contact Support.", "Please refresh the page and try again. If the issue persists, contact Support.");
|
|
@@ -83,7 +83,7 @@ injectString("tr", "Please refresh the page and try again. If the issue persists
|
|
|
83
83
|
injectString("zh-Hans", "Please refresh the page and try again. If the issue persists, contact Support.", "Please refresh the page and try again. If the issue persists, contact Support.");
|
|
84
84
|
injectString("zh-TW", "Please refresh the page and try again. If the issue persists, contact Support.", "Please refresh the page and try again. If the issue persists, contact Support.");
|
|
85
85
|
injectString("ro-RO", "Please refresh the page and try again. If the issue persists, contact Support.", "Re\xEEnc\u0103rca\u021Bi pagina \u0219i \xEEncerca\u021Bi din nou. Dac\u0103 problema persist\u0103, contacta\u021Bi Asisten\u021Ba.");
|
|
86
|
-
injectString("ar
|
|
86
|
+
injectString("ar", "Please refresh the page and try again. If the issue persists, contact Support.", "\u064A\u0631\u062C\u0649 \u062A\u062D\u062F\u064A\u062B \u0627\u0644\u0635\u0641\u062D\u0629 \u0648\u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649. \u0625\u0630\u0627 \u0627\u0633\u062A\u0645\u0631\u062A \u0627\u0644\u0645\u0634\u0643\u0644\u0629\u060C \u0627\u062A\u0635\u0644 \u0628\u0627\u0644\u062F\u0639\u0645.");
|
|
87
87
|
export const useError = props => {
|
|
88
88
|
const {
|
|
89
89
|
translate
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FieldErrors } from "react-hook-form";
|
|
2
|
+
import { IBanner } from "../../banner/banner";
|
|
3
|
+
export interface IUseErrorSummaryConfig extends Pick<IBanner, "size"> {
|
|
4
|
+
autoPrefix?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const useErrorSummary: (errors: FieldErrors, { autoPrefix, size }?: IUseErrorSummaryConfig) => React.ReactElement | null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { Banner } from "../../banner/banner";
|
|
4
|
+
import { BannerErrorSummary } from "../../banner/bannerErrorSummary";
|
|
5
|
+
import { flattenErrors } from "../utils/flattenErrors";
|
|
6
|
+
import { getFieldLabel } from "../utils/getFieldLabel";
|
|
7
|
+
import { normalizeFieldId } from "../../formGroup/utils/normalizeFieldId";
|
|
8
|
+
const MAX_ERROR_SUMMARY_ITEMS = 8;
|
|
9
|
+
export const useErrorSummary = (errors, { autoPrefix = true, size = "XXL" } = {}) => {
|
|
10
|
+
const errorsKey = Object.entries(errors)
|
|
11
|
+
.map(([key, val]) => { var _a; return `${key}:${(_a = val.message) !== null && _a !== void 0 ? _a : ""}`; })
|
|
12
|
+
.join(",");
|
|
13
|
+
const items = useMemo(() => flattenErrors(errors).map(({ name, error }) => {
|
|
14
|
+
var _a;
|
|
15
|
+
const id = normalizeFieldId(name);
|
|
16
|
+
const label = autoPrefix ? getFieldLabel(id) : null;
|
|
17
|
+
const message = (_a = error.message) !== null && _a !== void 0 ? _a : "";
|
|
18
|
+
return {
|
|
19
|
+
name,
|
|
20
|
+
value: label ? `${label} - ${message}` : message,
|
|
21
|
+
link: `#${id}`
|
|
22
|
+
};
|
|
23
|
+
}),
|
|
24
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25
|
+
[errorsKey, autoPrefix]);
|
|
26
|
+
if (items.length === 0) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return (_jsx(Banner, { type: "error", size: size, children: items.slice(0, MAX_ERROR_SUMMARY_ITEMS).map((item, index) => (_jsx(BannerErrorSummary, { value: item.value, link: item.link }, `${item.name}-${index}`))) }));
|
|
30
|
+
};
|
|
@@ -33,7 +33,7 @@ injectString("tr", "Save", "Kaydet");
|
|
|
33
33
|
injectString("zh-Hans", "Save", "\u4FDD\u5B58");
|
|
34
34
|
injectString("zh-TW", "Save", "\u5132\u5B58");
|
|
35
35
|
injectString("ro-RO", "Save", "Salva\u021Bi");
|
|
36
|
-
injectString("ar
|
|
36
|
+
injectString("ar", "Save", "\u062D\u0641\u0638");
|
|
37
37
|
injectString("cs", "Edit", "Upravit");
|
|
38
38
|
injectString("da-DK", "Edit", "Rediger");
|
|
39
39
|
injectString("de", "Edit", "Bearbeiten");
|
|
@@ -60,7 +60,7 @@ injectString("tr", "Edit", "D\xFCzenle");
|
|
|
60
60
|
injectString("zh-Hans", "Edit", "\u7F16\u8F91");
|
|
61
61
|
injectString("zh-TW", "Edit", "\u7DE8\u8F2F");
|
|
62
62
|
injectString("ro-RO", "Edit", "Edita\u021Bi");
|
|
63
|
-
injectString("ar
|
|
63
|
+
injectString("ar", "Edit", "\u062A\u0639\u062F\u064A\u0644");
|
|
64
64
|
injectString("cs", "Cancel", "Zru\u0161it");
|
|
65
65
|
injectString("da-DK", "Cancel", "Annuller");
|
|
66
66
|
injectString("de", "Cancel", "Abbrechen");
|
|
@@ -87,7 +87,7 @@ injectString("tr", "Cancel", "\u0130ptal");
|
|
|
87
87
|
injectString("zh-Hans", "Cancel", "\u53D6\u6D88");
|
|
88
88
|
injectString("zh-TW", "Cancel", "\u53D6\u6D88");
|
|
89
89
|
injectString("ro-RO", "Cancel", "Anula\u021Bi");
|
|
90
|
-
injectString("ar
|
|
90
|
+
injectString("ar", "Cancel", "\u0625\u0644\u063A\u0627\u0621");
|
|
91
91
|
export const useFormButtons = (props = {}) => {
|
|
92
92
|
const {
|
|
93
93
|
onSave,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const flattenErrors = (errors, prefix = "") => Object.entries(errors).flatMap(([key, value]) => {
|
|
2
|
+
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
3
|
+
if (value && typeof value === "object" && "type" in value) {
|
|
4
|
+
return [{ name: fullKey, error: value }];
|
|
5
|
+
}
|
|
6
|
+
if (value && typeof value === "object") {
|
|
7
|
+
return flattenErrors(value, fullKey);
|
|
8
|
+
}
|
|
9
|
+
return [];
|
|
10
|
+
});
|
|
@@ -12,6 +12,9 @@ export const getChildrenWithCustomColumns = (children) => {
|
|
|
12
12
|
return isValidElement(children) && children.type === LayoutColumn ? [children.props.children] : [children];
|
|
13
13
|
}
|
|
14
14
|
let filtered = children.filter(child => {
|
|
15
|
+
if (!isValidElement(child)) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
15
18
|
if (child.type !== LayoutColumn) {
|
|
16
19
|
return true;
|
|
17
20
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getFieldLabel: (id: string) => string | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { zen } from "../../utils/zen";
|
|
2
|
+
export const getFieldLabel = (id) => {
|
|
3
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4
|
+
if (typeof zen.document === "undefined" || typeof zen.document.querySelector !== "function")
|
|
5
|
+
return null;
|
|
6
|
+
const direct = (_b = (_a = zen.document.querySelector(`label[for="${id}"]`)) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim();
|
|
7
|
+
if (direct !== undefined)
|
|
8
|
+
return direct || null;
|
|
9
|
+
const row = (_c = zen.document.getElementById(id)) === null || _c === void 0 ? void 0 : _c.closest(".zen-custom-form-row");
|
|
10
|
+
if (!row)
|
|
11
|
+
return null;
|
|
12
|
+
let sibling = row.previousElementSibling;
|
|
13
|
+
while (sibling) {
|
|
14
|
+
if (sibling.tagName === "LABEL")
|
|
15
|
+
return (_e = (_d = sibling.textContent) === null || _d === void 0 ? void 0 : _d.trim()) !== null && _e !== void 0 ? _e : null;
|
|
16
|
+
const inner = sibling.querySelector("label");
|
|
17
|
+
if (inner)
|
|
18
|
+
return (_g = (_f = inner.textContent) === null || _f === void 0 ? void 0 : _f.trim()) !== null && _g !== void 0 ? _g : null;
|
|
19
|
+
sibling = sibling.previousElementSibling;
|
|
20
|
+
}
|
|
21
|
+
return null;
|
|
22
|
+
};
|
|
@@ -30,7 +30,7 @@ injectString("tr", "Reload", "Yeniden y\xFCkle");
|
|
|
30
30
|
injectString("zh-Hans", "Reload", "\u91CD\u65B0\u52A0\u8F7D");
|
|
31
31
|
injectString("zh-TW", "Reload", "\u91CD\u65B0\u8F09\u5165");
|
|
32
32
|
injectString("ro-RO", "Reload", "Re\xEEnc\u0103rca\u021Bi");
|
|
33
|
-
injectString("ar
|
|
33
|
+
injectString("ar", "Reload", "\u0625\u0639\u0627\u062F\u0629 \u062A\u062D\u0645\u064A\u0644");
|
|
34
34
|
injectString("cs", "Failed to load section", "Failed to load section");
|
|
35
35
|
injectString("da-DK", "Failed to load section", "Failed to load section");
|
|
36
36
|
injectString("de", "Failed to load section", "Failed to load section");
|
|
@@ -57,7 +57,7 @@ injectString("tr", "Failed to load section", "Failed to load section");
|
|
|
57
57
|
injectString("zh-Hans", "Failed to load section", "Failed to load section");
|
|
58
58
|
injectString("zh-TW", "Failed to load section", "Failed to load section");
|
|
59
59
|
injectString("ro-RO", "Failed to load section", "Nu s-a putut \xEEnc\u0103rca sec\u021Biunea");
|
|
60
|
-
injectString("ar
|
|
60
|
+
injectString("ar", "Failed to load section", "\u0641\u0634\u0644 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0642\u0633\u0645");
|
|
61
61
|
injectString("cs", "Please reload this section to try again. If the issue persists, contact Support.", "Please reload this section to try again. If the issue persists, contact Support.");
|
|
62
62
|
injectString("da-DK", "Please reload this section to try again. If the issue persists, contact Support.", "Please reload this section to try again. If the issue persists, contact Support.");
|
|
63
63
|
injectString("de", "Please reload this section to try again. If the issue persists, contact Support.", "Please reload this section to try again. If the issue persists, contact Support.");
|
|
@@ -84,7 +84,7 @@ injectString("tr", "Please reload this section to try again. If the issue persis
|
|
|
84
84
|
injectString("zh-Hans", "Please reload this section to try again. If the issue persists, contact Support.", "Please reload this section to try again. If the issue persists, contact Support.");
|
|
85
85
|
injectString("zh-TW", "Please reload this section to try again. If the issue persists, contact Support.", "Please reload this section to try again. If the issue persists, contact Support.");
|
|
86
86
|
injectString("ro-RO", "Please reload this section to try again. If the issue persists, contact Support.", "Re\xEEnc\u0103rca\u021Bi aceast\u0103 sec\u021Biune pentru a \xEEncerca din nou. Dac\u0103 problema persist\u0103, contacta\u021Bi Asisten\u021Ba.");
|
|
87
|
-
injectString("ar
|
|
87
|
+
injectString("ar", "Please reload this section to try again. If the issue persists, contact Support.", "\u064A\u0631\u062C\u0649 \u0625\u0639\u0627\u062F\u0629 \u062A\u062D\u0645\u064A\u0644 \u0647\u0630\u0627 \u0627\u0644\u0642\u0633\u0645 \u0644\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649. \u0625\u0630\u0627 \u0627\u0633\u062A\u0645\u0631\u062A \u0627\u0644\u0645\u0634\u0643\u0644\u0629\u060C \u0627\u062A\u0635\u0644 \u0628\u0627\u0644\u062F\u0639\u0645.");
|
|
88
88
|
export const useError = props => {
|
|
89
89
|
const {
|
|
90
90
|
translate
|
|
@@ -30,7 +30,7 @@ injectString("tr", "Optional", "\u0130ste\u011Fe ba\u011Fl\u0131");
|
|
|
30
30
|
injectString("zh-Hans", "Optional", "\u53EF\u9009");
|
|
31
31
|
injectString("zh-TW", "Optional", "\u9078\u586B");
|
|
32
32
|
injectString("ro-RO", "Optional", "Op\u021Bional");
|
|
33
|
-
injectString("ar
|
|
33
|
+
injectString("ar", "Optional", "\u0627\u062E\u062A\u064A\u0627\u0631\u064A");
|
|
34
34
|
export const FormStep = ({
|
|
35
35
|
isFirst,
|
|
36
36
|
value,
|
|
@@ -30,7 +30,7 @@ injectString("tr", "Step {0} of {1}", "Ad\u0131m {0} / {1}");
|
|
|
30
30
|
injectString("zh-Hans", "Step {0} of {1}", "\u6B65\u9AA4 {0} / {1} ");
|
|
31
31
|
injectString("zh-TW", "Step {0} of {1}", "\u6B65\u9A5F {0} (\u5171 {1} \u500B)");
|
|
32
32
|
injectString("ro-RO", "Step {0} of {1}", "Pasul {0} din {1}");
|
|
33
|
-
injectString("ar
|
|
33
|
+
injectString("ar", "Step {0} of {1}", "\u0627\u0644\u062E\u0637\u0648\u0629 {0} \u0645\u0646 {1}");
|
|
34
34
|
injectString("cs", "Optional", "Voliteln\xE9");
|
|
35
35
|
injectString("da-DK", "Optional", "Valgfri");
|
|
36
36
|
injectString("de", "Optional", "Optional");
|
|
@@ -57,7 +57,7 @@ injectString("tr", "Optional", "\u0130ste\u011Fe ba\u011Fl\u0131");
|
|
|
57
57
|
injectString("zh-Hans", "Optional", "\u53EF\u9009");
|
|
58
58
|
injectString("zh-TW", "Optional", "\u9078\u586B");
|
|
59
59
|
injectString("ro-RO", "Optional", "Op\u021Bional");
|
|
60
|
-
injectString("ar
|
|
60
|
+
injectString("ar", "Optional", "\u0627\u062E\u062A\u064A\u0627\u0631\u064A");
|
|
61
61
|
const MAX_STEPS = 7;
|
|
62
62
|
export const STEPPER_LAST_STEP = "lastStep";
|
|
63
63
|
export const FormStepper = ({
|