@geotab/zenith 3.11.1 → 3.12.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 +24 -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 +29 -29
- 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 +1 -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 +29 -29
- 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 +1 -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
|
@@ -7,9 +7,10 @@ const classNames_1 = require("../../commonHelpers/classNames/classNames");
|
|
|
7
7
|
const formGroupItem_1 = require("../../formGroupItem/formGroupItem");
|
|
8
8
|
const customRow_1 = require("../components/customRow/customRow");
|
|
9
9
|
const useMode_1 = require("./useMode");
|
|
10
|
+
const resolveId_1 = require("../utils/resolveId");
|
|
10
11
|
// eslint-disable-next-line complexity
|
|
11
12
|
const useCustomRowElements = (state) => {
|
|
12
|
-
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
|
|
13
|
+
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;
|
|
13
14
|
const id1 = (0, react_1.useId)();
|
|
14
15
|
const id2 = (0, react_1.useId)();
|
|
15
16
|
const mode = (0, useMode_1.useMode)();
|
|
@@ -18,25 +19,27 @@ const useCustomRowElements = (state) => {
|
|
|
18
19
|
if (mode === "review") {
|
|
19
20
|
let customControl;
|
|
20
21
|
if ((_a = state.elements.control1) === null || _a === void 0 ? void 0 : _a.value) {
|
|
21
|
-
|
|
22
|
+
const rid1 = (0, resolveId_1.resolveId)(state.elements.control1.value, id1);
|
|
23
|
+
control1 = (0, react_1.cloneElement)(state.elements.control1.value, { id: rid1 });
|
|
22
24
|
}
|
|
23
25
|
if ((_b = state.elements.control2) === null || _b === void 0 ? void 0 : _b.value) {
|
|
24
|
-
|
|
26
|
+
const rid2 = (0, resolveId_1.resolveId)(state.elements.control2.value, id2);
|
|
27
|
+
control2 = (0, react_1.cloneElement)(state.elements.control2.value, { id: rid2 });
|
|
25
28
|
}
|
|
26
29
|
if (state.controlsCount === 2 && state.labelsCount === 2) {
|
|
27
|
-
customControl = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(formGroupItem_1.FormGroupItem, { id: ((
|
|
30
|
+
customControl = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(formGroupItem_1.FormGroupItem, { id: ((_c = state.elements.control1) === null || _c === void 0 ? void 0 : _c.value) ? (0, resolveId_1.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: (0, classNames_1.classNames)([
|
|
28
31
|
"zen-field-label--custom-width",
|
|
29
|
-
((
|
|
32
|
+
((_f = state.elements.label1) === null || _f === void 0 ? void 0 : _f.className) || "",
|
|
30
33
|
state.customLabelClasses || ""
|
|
31
|
-
]) }), (0, jsx_runtime_1.jsx)(customRow_1.CustomRow, { className: state.customControlClasses, children: control1 }), (0, jsx_runtime_1.jsx)(formGroupItem_1.FormGroupItem, { id: ((
|
|
34
|
+
]) }), (0, jsx_runtime_1.jsx)(customRow_1.CustomRow, { className: state.customControlClasses, children: control1 }), (0, jsx_runtime_1.jsx)(formGroupItem_1.FormGroupItem, { id: ((_g = state.elements.control2) === null || _g === void 0 ? void 0 : _g.value) ? (0, resolveId_1.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: (0, classNames_1.classNames)(["zen-field-label--custom-width", ((_k = state.elements.label2) === null || _k === void 0 ? void 0 : _k.className) || ""]) }), (0, jsx_runtime_1.jsx)(customRow_1.CustomRow, { className: state.customControlClasses, children: control2 })] }));
|
|
32
35
|
return {
|
|
33
36
|
customControl
|
|
34
37
|
};
|
|
35
38
|
}
|
|
36
39
|
if (state.controlsCount > 1) {
|
|
37
|
-
customControl = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(formGroupItem_1.FormGroupItem, { id: ((
|
|
40
|
+
customControl = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(formGroupItem_1.FormGroupItem, { id: ((_l = state.elements.control1) === null || _l === void 0 ? void 0 : _l.value) ? (0, resolveId_1.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: (0, classNames_1.classNames)([
|
|
38
41
|
"zen-field-label--custom-width",
|
|
39
|
-
((
|
|
42
|
+
((_p = state.elements.label1) === null || _p === void 0 ? void 0 : _p.className) || "",
|
|
40
43
|
state.customLabelClasses || ""
|
|
41
44
|
]) }), (0, jsx_runtime_1.jsxs)(customRow_1.CustomRow, { className: state.customControlClasses, children: [control1, control2] })] }));
|
|
42
45
|
return {
|
|
@@ -44,10 +47,12 @@ const useCustomRowElements = (state) => {
|
|
|
44
47
|
};
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
|
-
if (state.custom && state.totalCount === 4 && ((
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
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)) {
|
|
51
|
+
const rid1 = (0, resolveId_1.resolveId)(state.elements.control1.value, id1);
|
|
52
|
+
const rid2 = (0, resolveId_1.resolveId)(state.elements.control2.value, id2);
|
|
53
|
+
control1 = (0, react_1.cloneElement)(state.elements.control1.value, { id: rid1 });
|
|
54
|
+
control2 = (0, react_1.cloneElement)(state.elements.control2.value, { id: rid2 });
|
|
55
|
+
const customControl = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(formGroupItem_1.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: (0, classNames_1.classNames)([((_u = state.elements.label1) === null || _u === void 0 ? void 0 : _u.className) || "", "zen-field-label--custom-width", state.customLabelClasses || ""]) }), (0, jsx_runtime_1.jsxs)(customRow_1.CustomRow, { className: state.customControlClasses, children: [control1, (0, jsx_runtime_1.jsx)(formGroupItem_1.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: (0, classNames_1.classNames)([((_x = state.elements.label2) === null || _x === void 0 ? void 0 : _x.className) || "", "zen-field-label--custom-width"]) }), control2] })] }));
|
|
51
56
|
return {
|
|
52
57
|
customControl
|
|
53
58
|
};
|
|
@@ -56,11 +61,13 @@ const useCustomRowElements = (state) => {
|
|
|
56
61
|
state.totalCount === 3 &&
|
|
57
62
|
state.labelsCount === 1 &&
|
|
58
63
|
!state.elements.label1 &&
|
|
59
|
-
((
|
|
60
|
-
((
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
((_y = state.elements.control1) === null || _y === void 0 ? void 0 : _y.value) &&
|
|
65
|
+
((_z = state.elements.control2) === null || _z === void 0 ? void 0 : _z.value)) {
|
|
66
|
+
const rid1 = (0, resolveId_1.resolveId)(state.elements.control1.value, id1);
|
|
67
|
+
const rid2 = (0, resolveId_1.resolveId)(state.elements.control2.value, id2);
|
|
68
|
+
control1 = (0, react_1.cloneElement)(state.elements.control1.value, { id: rid1 });
|
|
69
|
+
control2 = (0, react_1.cloneElement)(state.elements.control2.value, { id: rid2 });
|
|
70
|
+
const customControl = ((0, jsx_runtime_1.jsxs)(customRow_1.CustomRow, { className: state.customControlClasses, children: [control1, (0, jsx_runtime_1.jsx)(formGroupItem_1.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: (0, classNames_1.classNames)([((_2 = state.elements.label2) === null || _2 === void 0 ? void 0 : _2.className) || "", "zen-field-label--custom-width"]) }), control2] }));
|
|
64
71
|
return {
|
|
65
72
|
customControl
|
|
66
73
|
};
|
|
@@ -69,36 +76,43 @@ const useCustomRowElements = (state) => {
|
|
|
69
76
|
state.totalCount === 3 &&
|
|
70
77
|
state.labelsCount === 1 &&
|
|
71
78
|
state.controlsCount === 2 &&
|
|
72
|
-
((
|
|
73
|
-
((
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
((_3 = state.elements.control1) === null || _3 === void 0 ? void 0 : _3.value) &&
|
|
80
|
+
((_4 = state.elements.control2) === null || _4 === void 0 ? void 0 : _4.value)) {
|
|
81
|
+
const rid1 = (0, resolveId_1.resolveId)(state.elements.control1.value, id1);
|
|
82
|
+
const rid2 = (0, resolveId_1.resolveId)(state.elements.control2.value, id2);
|
|
83
|
+
control1 = (0, react_1.cloneElement)(state.elements.control1.value, { id: rid1 });
|
|
84
|
+
control2 = (0, react_1.cloneElement)(state.elements.control2.value, { id: rid2 });
|
|
85
|
+
const customControl = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(formGroupItem_1.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: (0, classNames_1.classNames)(["zen-field-label--custom-width", ((_7 = state.elements.label1) === null || _7 === void 0 ? void 0 : _7.className) || "", state.customLabelClasses || ""]) }), (0, jsx_runtime_1.jsxs)(customRow_1.CustomRow, { className: state.customControlClasses, children: [control1, control2] })] }));
|
|
77
86
|
return {
|
|
78
87
|
customControl
|
|
79
88
|
};
|
|
80
89
|
}
|
|
81
|
-
if (state.custom && state.totalCount === 2 && state.controlsCount === 2 && ((
|
|
82
|
-
|
|
83
|
-
|
|
90
|
+
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)) {
|
|
91
|
+
const rid1 = (0, resolveId_1.resolveId)(state.elements.control1.value, id1);
|
|
92
|
+
const rid2 = (0, resolveId_1.resolveId)(state.elements.control2.value, id2);
|
|
93
|
+
control1 = (0, react_1.cloneElement)(state.elements.control1.value, { id: rid1 });
|
|
94
|
+
control2 = (0, react_1.cloneElement)(state.elements.control2.value, { id: rid2 });
|
|
84
95
|
const customControl = ((0, jsx_runtime_1.jsxs)(customRow_1.CustomRow, { className: state.customControlClasses, children: [control1, control2] }));
|
|
85
96
|
return {
|
|
86
97
|
customControl
|
|
87
98
|
};
|
|
88
99
|
}
|
|
89
|
-
if (state.custom && state.totalCount === 2 && state.labelsCount === 1 && ((
|
|
90
|
-
|
|
91
|
-
|
|
100
|
+
if (state.custom && state.totalCount === 2 && state.labelsCount === 1 && ((_10 = state.elements.control1) === null || _10 === void 0 ? void 0 : _10.value)) {
|
|
101
|
+
const rid1 = (0, resolveId_1.resolveId)(state.elements.control1.value, id1);
|
|
102
|
+
control1 = (0, react_1.cloneElement)(state.elements.control1.value, { id: rid1 });
|
|
103
|
+
const customControl = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(formGroupItem_1.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: (0, classNames_1.classNames)(["zen-field-label--custom-width", ((_13 = state.elements.label1) === null || _13 === void 0 ? void 0 : _13.className) || "", state.customLabelClasses || ""]) }), (0, jsx_runtime_1.jsx)(customRow_1.CustomRow, { className: state.customControlClasses, children: control1 })] }));
|
|
92
104
|
return {
|
|
93
105
|
customControl
|
|
94
106
|
};
|
|
95
107
|
}
|
|
96
108
|
if (state.custom && state.totalCount === 1 && state.controlsCount === 1) {
|
|
97
|
-
if ((
|
|
98
|
-
|
|
109
|
+
if ((_14 = state.elements.control1) === null || _14 === void 0 ? void 0 : _14.value) {
|
|
110
|
+
const rid1 = (0, resolveId_1.resolveId)(state.elements.control1.value, id1);
|
|
111
|
+
control1 = (0, react_1.cloneElement)(state.elements.control1.value, { id: rid1 });
|
|
99
112
|
}
|
|
100
|
-
else if ((
|
|
101
|
-
|
|
113
|
+
else if ((_15 = state.elements.control2) === null || _15 === void 0 ? void 0 : _15.value) {
|
|
114
|
+
const rid2 = (0, resolveId_1.resolveId)(state.elements.control2.value, id2);
|
|
115
|
+
control1 = (0, react_1.cloneElement)(state.elements.control2.value, { id: rid2 });
|
|
102
116
|
}
|
|
103
117
|
const customControl = (0, jsx_runtime_1.jsx)(customRow_1.CustomRow, { className: state.customControlClasses, children: control1 });
|
|
104
118
|
return {
|
|
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useRowElements = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const useCustomRow_1 = require("./useCustomRow");
|
|
6
|
+
const resolveId_1 = require("../utils/resolveId");
|
|
6
7
|
const useRowElements = (state) => {
|
|
7
|
-
var _a, _b;
|
|
8
|
+
var _a, _b, _c, _d;
|
|
8
9
|
const id1 = (0, react_1.useId)();
|
|
9
10
|
const id2 = (0, react_1.useId)();
|
|
10
11
|
let control1;
|
|
@@ -13,12 +14,14 @@ const useRowElements = (state) => {
|
|
|
13
14
|
if (customControl) {
|
|
14
15
|
return { customControl };
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
const resolvedId1 = ((_a = state.elements.control1) === null || _a === void 0 ? void 0 : _a.value) ? (0, resolveId_1.resolveId)(state.elements.control1.value, id1) : id1;
|
|
18
|
+
const resolvedId2 = ((_b = state.elements.control2) === null || _b === void 0 ? void 0 : _b.value) ? (0, resolveId_1.resolveId)(state.elements.control2.value, id2) : id2;
|
|
19
|
+
if ((_c = state.elements.control1) === null || _c === void 0 ? void 0 : _c.value) {
|
|
20
|
+
control1 = (0, react_1.cloneElement)(state.elements.control1.value, { id: resolvedId1 });
|
|
18
21
|
}
|
|
19
|
-
if ((
|
|
20
|
-
control2 = (0, react_1.cloneElement)(state.elements.control2.value, { id:
|
|
22
|
+
if ((_d = state.elements.control2) === null || _d === void 0 ? void 0 : _d.value) {
|
|
23
|
+
control2 = (0, react_1.cloneElement)(state.elements.control2.value, { id: resolvedId2 });
|
|
21
24
|
}
|
|
22
|
-
return { control1, control2, id1, id2 };
|
|
25
|
+
return { control1, control2, id1: resolvedId1, id2: resolvedId2 };
|
|
23
26
|
};
|
|
24
27
|
exports.useRowElements = useRowElements;
|
|
@@ -44,7 +44,7 @@ injectString("tr", "Sub-options are not active.", "Sub-options are not active.")
|
|
|
44
44
|
injectString("zh-Hans", "Sub-options are not active.", "Sub-options are not active.");
|
|
45
45
|
injectString("zh-TW", "Sub-options are not active.", "Sub-options are not active.");
|
|
46
46
|
injectString("ro-RO", "Sub-options are not active.", "Nu sunt active op\u021Biuni secundare.");
|
|
47
|
-
injectString("ar
|
|
47
|
+
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.");
|
|
48
48
|
const useToggle = result => {
|
|
49
49
|
const {
|
|
50
50
|
controller,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const normalizeFieldId: (name: string) => string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveId = void 0;
|
|
4
|
+
const normalizeFieldId_1 = require("./normalizeFieldId");
|
|
5
|
+
const resolveId = (element, fallback) => { var _a; return element.props.id || (((_a = element.props.controller) === null || _a === void 0 ? void 0 : _a.name) && (0, normalizeFieldId_1.normalizeFieldId)(element.props.controller.name)) || fallback; };
|
|
6
|
+
exports.resolveId = resolveId;
|
|
@@ -13,11 +13,13 @@ const getLayoutColumns = (children) => {
|
|
|
13
13
|
if (!Array.isArray(children)) {
|
|
14
14
|
return (0, react_1.isValidElement)(children) && children.type === layoutColum_1.LayoutColumn ? [children] : [(0, jsx_runtime_1.jsx)(layoutColum_1.LayoutColumn, { children: children }, "column1")];
|
|
15
15
|
}
|
|
16
|
-
const layoutColumns = children
|
|
16
|
+
const layoutColumns = children
|
|
17
|
+
.filter(child => (0, react_1.isValidElement)(child) && child.type === layoutColum_1.LayoutColumn && child.props.children)
|
|
18
|
+
.slice(0, 2);
|
|
17
19
|
if (layoutColumns.length) {
|
|
18
20
|
return layoutColumns;
|
|
19
21
|
}
|
|
20
|
-
const sections = children.filter((el) => el.type === formSection_1.FormSection || (0, isCustomFormSection_1.isCustomFormSection)(el));
|
|
22
|
+
const sections = children.filter((el) => (0, react_1.isValidElement)(el) && (el.type === formSection_1.FormSection || (0, isCustomFormSection_1.isCustomFormSection)(el)));
|
|
21
23
|
if (sections.length === 1) {
|
|
22
24
|
return [(0, jsx_runtime_1.jsx)(layoutColum_1.LayoutColumn, { children: sections }, "column1")];
|
|
23
25
|
}
|
|
@@ -37,7 +37,7 @@ injectString("tr", "Reload", "Yeniden y\xFCkle");
|
|
|
37
37
|
injectString("zh-Hans", "Reload", "\u91CD\u65B0\u52A0\u8F7D");
|
|
38
38
|
injectString("zh-TW", "Reload", "\u91CD\u65B0\u8F09\u5165");
|
|
39
39
|
injectString("ro-RO", "Reload", "Re\xEEnc\u0103rca\u021Bi");
|
|
40
|
-
injectString("ar
|
|
40
|
+
injectString("ar", "Reload", "\u0625\u0639\u0627\u062F\u0629 \u062A\u062D\u0645\u064A\u0644");
|
|
41
41
|
injectString("cs", "Failed to load page", "Failed to load page");
|
|
42
42
|
injectString("da-DK", "Failed to load page", "Failed to load page");
|
|
43
43
|
injectString("de", "Failed to load page", "Failed to load page");
|
|
@@ -64,7 +64,7 @@ injectString("tr", "Failed to load page", "Failed to load page");
|
|
|
64
64
|
injectString("zh-Hans", "Failed to load page", "Failed to load page");
|
|
65
65
|
injectString("zh-TW", "Failed to load page", "Failed to load page");
|
|
66
66
|
injectString("ro-RO", "Failed to load page", "Nu s-a putut \xEEnc\u0103rca pagina");
|
|
67
|
-
injectString("ar
|
|
67
|
+
injectString("ar", "Failed to load page", "\u0641\u0634\u0644 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0635\u0641\u062D\u0629");
|
|
68
68
|
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.");
|
|
69
69
|
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.");
|
|
70
70
|
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.");
|
|
@@ -91,7 +91,7 @@ injectString("tr", "Please refresh the page and try again. If the issue persists
|
|
|
91
91
|
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.");
|
|
92
92
|
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.");
|
|
93
93
|
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.");
|
|
94
|
-
injectString("ar
|
|
94
|
+
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.");
|
|
95
95
|
const useError = props => {
|
|
96
96
|
const {
|
|
97
97
|
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,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useErrorSummary = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const banner_1 = require("../../banner/banner");
|
|
7
|
+
const bannerErrorSummary_1 = require("../../banner/bannerErrorSummary");
|
|
8
|
+
const flattenErrors_1 = require("../utils/flattenErrors");
|
|
9
|
+
const getFieldLabel_1 = require("../utils/getFieldLabel");
|
|
10
|
+
const normalizeFieldId_1 = require("../../formGroup/utils/normalizeFieldId");
|
|
11
|
+
const MAX_ERROR_SUMMARY_ITEMS = 8;
|
|
12
|
+
const useErrorSummary = (errors, { autoPrefix = true, size = "XXL" } = {}) => {
|
|
13
|
+
const errorsKey = Object.entries(errors)
|
|
14
|
+
.map(([key, val]) => { var _a; return `${key}:${(_a = val.message) !== null && _a !== void 0 ? _a : ""}`; })
|
|
15
|
+
.join(",");
|
|
16
|
+
const items = (0, react_1.useMemo)(() => (0, flattenErrors_1.flattenErrors)(errors).map(({ name, error }) => {
|
|
17
|
+
var _a;
|
|
18
|
+
const id = (0, normalizeFieldId_1.normalizeFieldId)(name);
|
|
19
|
+
const label = autoPrefix ? (0, getFieldLabel_1.getFieldLabel)(id) : null;
|
|
20
|
+
const message = (_a = error.message) !== null && _a !== void 0 ? _a : "";
|
|
21
|
+
return {
|
|
22
|
+
name,
|
|
23
|
+
value: label ? `${label} - ${message}` : message,
|
|
24
|
+
link: `#${id}`
|
|
25
|
+
};
|
|
26
|
+
}),
|
|
27
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28
|
+
[errorsKey, autoPrefix]);
|
|
29
|
+
if (items.length === 0) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(banner_1.Banner, { type: "error", size: size, children: items.slice(0, MAX_ERROR_SUMMARY_ITEMS).map((item, index) => ((0, jsx_runtime_1.jsx)(bannerErrorSummary_1.BannerErrorSummary, { value: item.value, link: item.link }, `${item.name}-${index}`))) }));
|
|
33
|
+
};
|
|
34
|
+
exports.useErrorSummary = useErrorSummary;
|
|
@@ -41,7 +41,7 @@ injectString("tr", "Save", "Kaydet");
|
|
|
41
41
|
injectString("zh-Hans", "Save", "\u4FDD\u5B58");
|
|
42
42
|
injectString("zh-TW", "Save", "\u5132\u5B58");
|
|
43
43
|
injectString("ro-RO", "Save", "Salva\u021Bi");
|
|
44
|
-
injectString("ar
|
|
44
|
+
injectString("ar", "Save", "\u062D\u0641\u0638");
|
|
45
45
|
injectString("cs", "Edit", "Upravit");
|
|
46
46
|
injectString("da-DK", "Edit", "Rediger");
|
|
47
47
|
injectString("de", "Edit", "Bearbeiten");
|
|
@@ -68,7 +68,7 @@ injectString("tr", "Edit", "D\xFCzenle");
|
|
|
68
68
|
injectString("zh-Hans", "Edit", "\u7F16\u8F91");
|
|
69
69
|
injectString("zh-TW", "Edit", "\u7DE8\u8F2F");
|
|
70
70
|
injectString("ro-RO", "Edit", "Edita\u021Bi");
|
|
71
|
-
injectString("ar
|
|
71
|
+
injectString("ar", "Edit", "\u062A\u0639\u062F\u064A\u0644");
|
|
72
72
|
injectString("cs", "Cancel", "Zru\u0161it");
|
|
73
73
|
injectString("da-DK", "Cancel", "Annuller");
|
|
74
74
|
injectString("de", "Cancel", "Abbrechen");
|
|
@@ -95,7 +95,7 @@ injectString("tr", "Cancel", "\u0130ptal");
|
|
|
95
95
|
injectString("zh-Hans", "Cancel", "\u53D6\u6D88");
|
|
96
96
|
injectString("zh-TW", "Cancel", "\u53D6\u6D88");
|
|
97
97
|
injectString("ro-RO", "Cancel", "Anula\u021Bi");
|
|
98
|
-
injectString("ar
|
|
98
|
+
injectString("ar", "Cancel", "\u0625\u0644\u063A\u0627\u0621");
|
|
99
99
|
const useFormButtons = (props = {}) => {
|
|
100
100
|
const {
|
|
101
101
|
onSave,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.flattenErrors = void 0;
|
|
4
|
+
const flattenErrors = (errors, prefix = "") => Object.entries(errors).flatMap(([key, value]) => {
|
|
5
|
+
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
6
|
+
if (value && typeof value === "object" && "type" in value) {
|
|
7
|
+
return [{ name: fullKey, error: value }];
|
|
8
|
+
}
|
|
9
|
+
if (value && typeof value === "object") {
|
|
10
|
+
return (0, exports.flattenErrors)(value, fullKey);
|
|
11
|
+
}
|
|
12
|
+
return [];
|
|
13
|
+
});
|
|
14
|
+
exports.flattenErrors = flattenErrors;
|
|
@@ -15,6 +15,9 @@ const getChildrenWithCustomColumns = (children) => {
|
|
|
15
15
|
return (0, react_1.isValidElement)(children) && children.type === layoutColum_1.LayoutColumn ? [children.props.children] : [children];
|
|
16
16
|
}
|
|
17
17
|
let filtered = children.filter(child => {
|
|
18
|
+
if (!(0, react_1.isValidElement)(child)) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
18
21
|
if (child.type !== layoutColum_1.LayoutColumn) {
|
|
19
22
|
return true;
|
|
20
23
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getFieldLabel: (id: string) => string | null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFieldLabel = void 0;
|
|
4
|
+
const zen_1 = require("../../utils/zen");
|
|
5
|
+
const getFieldLabel = (id) => {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
7
|
+
if (typeof zen_1.zen.document === "undefined" || typeof zen_1.zen.document.querySelector !== "function")
|
|
8
|
+
return null;
|
|
9
|
+
const direct = (_b = (_a = zen_1.zen.document.querySelector(`label[for="${id}"]`)) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim();
|
|
10
|
+
if (direct !== undefined)
|
|
11
|
+
return direct || null;
|
|
12
|
+
const row = (_c = zen_1.zen.document.getElementById(id)) === null || _c === void 0 ? void 0 : _c.closest(".zen-custom-form-row");
|
|
13
|
+
if (!row)
|
|
14
|
+
return null;
|
|
15
|
+
let sibling = row.previousElementSibling;
|
|
16
|
+
while (sibling) {
|
|
17
|
+
if (sibling.tagName === "LABEL")
|
|
18
|
+
return (_e = (_d = sibling.textContent) === null || _d === void 0 ? void 0 : _d.trim()) !== null && _e !== void 0 ? _e : null;
|
|
19
|
+
const inner = sibling.querySelector("label");
|
|
20
|
+
if (inner)
|
|
21
|
+
return (_g = (_f = inner.textContent) === null || _f === void 0 ? void 0 : _f.trim()) !== null && _g !== void 0 ? _g : null;
|
|
22
|
+
sibling = sibling.previousElementSibling;
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
};
|
|
26
|
+
exports.getFieldLabel = getFieldLabel;
|
|
@@ -38,7 +38,7 @@ injectString("tr", "Reload", "Yeniden y\xFCkle");
|
|
|
38
38
|
injectString("zh-Hans", "Reload", "\u91CD\u65B0\u52A0\u8F7D");
|
|
39
39
|
injectString("zh-TW", "Reload", "\u91CD\u65B0\u8F09\u5165");
|
|
40
40
|
injectString("ro-RO", "Reload", "Re\xEEnc\u0103rca\u021Bi");
|
|
41
|
-
injectString("ar
|
|
41
|
+
injectString("ar", "Reload", "\u0625\u0639\u0627\u062F\u0629 \u062A\u062D\u0645\u064A\u0644");
|
|
42
42
|
injectString("cs", "Failed to load section", "Failed to load section");
|
|
43
43
|
injectString("da-DK", "Failed to load section", "Failed to load section");
|
|
44
44
|
injectString("de", "Failed to load section", "Failed to load section");
|
|
@@ -65,7 +65,7 @@ injectString("tr", "Failed to load section", "Failed to load section");
|
|
|
65
65
|
injectString("zh-Hans", "Failed to load section", "Failed to load section");
|
|
66
66
|
injectString("zh-TW", "Failed to load section", "Failed to load section");
|
|
67
67
|
injectString("ro-RO", "Failed to load section", "Nu s-a putut \xEEnc\u0103rca sec\u021Biunea");
|
|
68
|
-
injectString("ar
|
|
68
|
+
injectString("ar", "Failed to load section", "\u0641\u0634\u0644 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0642\u0633\u0645");
|
|
69
69
|
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.");
|
|
70
70
|
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.");
|
|
71
71
|
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.");
|
|
@@ -92,7 +92,7 @@ injectString("tr", "Please reload this section to try again. If the issue persis
|
|
|
92
92
|
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.");
|
|
93
93
|
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.");
|
|
94
94
|
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.");
|
|
95
|
-
injectString("ar
|
|
95
|
+
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.");
|
|
96
96
|
const useError = props => {
|
|
97
97
|
const {
|
|
98
98
|
translate
|
|
@@ -38,7 +38,7 @@ injectString("tr", "Optional", "\u0130ste\u011Fe ba\u011Fl\u0131");
|
|
|
38
38
|
injectString("zh-Hans", "Optional", "\u53EF\u9009");
|
|
39
39
|
injectString("zh-TW", "Optional", "\u9078\u586B");
|
|
40
40
|
injectString("ro-RO", "Optional", "Op\u021Bional");
|
|
41
|
-
injectString("ar
|
|
41
|
+
injectString("ar", "Optional", "\u0627\u062E\u062A\u064A\u0627\u0631\u064A");
|
|
42
42
|
const FormStep = ({
|
|
43
43
|
isFirst,
|
|
44
44
|
value,
|
|
@@ -38,7 +38,7 @@ injectString("tr", "Step {0} of {1}", "Ad\u0131m {0} / {1}");
|
|
|
38
38
|
injectString("zh-Hans", "Step {0} of {1}", "\u6B65\u9AA4 {0} / {1} ");
|
|
39
39
|
injectString("zh-TW", "Step {0} of {1}", "\u6B65\u9A5F {0} (\u5171 {1} \u500B)");
|
|
40
40
|
injectString("ro-RO", "Step {0} of {1}", "Pasul {0} din {1}");
|
|
41
|
-
injectString("ar
|
|
41
|
+
injectString("ar", "Step {0} of {1}", "\u0627\u0644\u062E\u0637\u0648\u0629 {0} \u0645\u0646 {1}");
|
|
42
42
|
injectString("cs", "Optional", "Voliteln\xE9");
|
|
43
43
|
injectString("da-DK", "Optional", "Valgfri");
|
|
44
44
|
injectString("de", "Optional", "Optional");
|
|
@@ -65,7 +65,7 @@ injectString("tr", "Optional", "\u0130ste\u011Fe ba\u011Fl\u0131");
|
|
|
65
65
|
injectString("zh-Hans", "Optional", "\u53EF\u9009");
|
|
66
66
|
injectString("zh-TW", "Optional", "\u9078\u586B");
|
|
67
67
|
injectString("ro-RO", "Optional", "Op\u021Bional");
|
|
68
|
-
injectString("ar
|
|
68
|
+
injectString("ar", "Optional", "\u0627\u062E\u062A\u064A\u0627\u0631\u064A");
|
|
69
69
|
const MAX_STEPS = 7;
|
|
70
70
|
exports.STEPPER_LAST_STEP = "lastStep";
|
|
71
71
|
const FormStepper = ({
|
|
@@ -11,6 +11,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
11
11
|
const react_1 = require("react");
|
|
12
12
|
const button_1 = require("../button/button");
|
|
13
13
|
const iconChevronLeft_1 = require("../icons/iconChevronLeft");
|
|
14
|
+
const iconChevronRight_1 = require("../icons/iconChevronRight");
|
|
15
|
+
const useDirectionalIcon_1 = require("../utils/localization/useDirectionalIcon");
|
|
14
16
|
const textIconButton_1 = require("../textIconButton/textIconButton");
|
|
15
17
|
const useLanguage_1 = require("../utils/localization/useLanguage");
|
|
16
18
|
const formStepper_1 = require("../formStepper/formStepper");
|
|
@@ -42,7 +44,7 @@ injectString("tr", "Previous step", "\xD6nceki ad\u0131m");
|
|
|
42
44
|
injectString("zh-Hans", "Previous step", "\u524D\u4E00\u6B65");
|
|
43
45
|
injectString("zh-TW", "Previous step", "\u4E0A\u4E00\u6B65");
|
|
44
46
|
injectString("ro-RO", "Previous step", "Pasul anterior");
|
|
45
|
-
injectString("ar
|
|
47
|
+
injectString("ar", "Previous step", "\u0627\u0644\u062E\u0637\u0648\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629");
|
|
46
48
|
injectString("cs", "Cancel", "Zru\u0161it");
|
|
47
49
|
injectString("da-DK", "Cancel", "Annuller");
|
|
48
50
|
injectString("de", "Cancel", "Abbrechen");
|
|
@@ -69,7 +71,7 @@ injectString("tr", "Cancel", "\u0130ptal");
|
|
|
69
71
|
injectString("zh-Hans", "Cancel", "\u53D6\u6D88");
|
|
70
72
|
injectString("zh-TW", "Cancel", "\u53D6\u6D88");
|
|
71
73
|
injectString("ro-RO", "Cancel", "Anula\u021Bi");
|
|
72
|
-
injectString("ar
|
|
74
|
+
injectString("ar", "Cancel", "\u0625\u0644\u063A\u0627\u0621");
|
|
73
75
|
injectString("cs", "Submit", "Odeslat");
|
|
74
76
|
injectString("da-DK", "Submit", "Indsend");
|
|
75
77
|
injectString("de", "Submit", "Absenden");
|
|
@@ -96,7 +98,7 @@ injectString("tr", "Submit", "G\xF6nder");
|
|
|
96
98
|
injectString("zh-Hans", "Submit", "\u63D0\u4EA4");
|
|
97
99
|
injectString("zh-TW", "Submit", "\u63D0\u4EA4");
|
|
98
100
|
injectString("ro-RO", "Submit", "Trimite\u021Bi");
|
|
99
|
-
injectString("ar
|
|
101
|
+
injectString("ar", "Submit", "\u0625\u0631\u0633\u0627\u0644");
|
|
100
102
|
injectString("cs", "Continue", "Pokra\u010Dovat");
|
|
101
103
|
injectString("da-DK", "Continue", "Forts\xE6t");
|
|
102
104
|
injectString("de", "Continue", "Fortsetzen");
|
|
@@ -123,7 +125,7 @@ injectString("tr", "Continue", "Devam");
|
|
|
123
125
|
injectString("zh-Hans", "Continue", "\u7EE7\u7EED");
|
|
124
126
|
injectString("zh-TW", "Continue", "\u7E7C\u7E8C");
|
|
125
127
|
injectString("ro-RO", "Continue", "Continua\u021Bi");
|
|
126
|
-
injectString("ar
|
|
128
|
+
injectString("ar", "Continue", "\u0645\u062A\u0627\u0628\u0639\u0629");
|
|
127
129
|
const FormStepperButtons = ({
|
|
128
130
|
onPrevious,
|
|
129
131
|
onCancel,
|
|
@@ -139,6 +141,7 @@ const FormStepperButtons = ({
|
|
|
139
141
|
translate
|
|
140
142
|
} = (0, useLanguage_1.useLanguage)();
|
|
141
143
|
const isMobile = (0, useMobile_1.useMobile)();
|
|
144
|
+
const BackChevronIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronLeft_1.IconChevronLeft, iconChevronRight_1.IconChevronRight);
|
|
142
145
|
const onPreviousHandler = (0, react_1.useCallback)(() => {
|
|
143
146
|
const currIndex = (0, getCurrentIndex_1.getCurrentIndex)(steps, current);
|
|
144
147
|
const prevStep = currIndex > 0 ? steps[currIndex - 1].id : null;
|
|
@@ -177,7 +180,7 @@ const FormStepperButtons = ({
|
|
|
177
180
|
className: "zen-form-step-buttons__left",
|
|
178
181
|
children: !isFirstStep && (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
|
|
179
182
|
className: "zen-form-step-buttons__previous",
|
|
180
|
-
icon:
|
|
183
|
+
icon: BackChevronIcon,
|
|
181
184
|
type: "tertiary-black",
|
|
182
185
|
onClick: onPreviousHandler,
|
|
183
186
|
children: translate("Previous step")
|
|
@@ -55,7 +55,8 @@ const useGridClasses = (children, childrenArr, colsState = {
|
|
|
55
55
|
tablet: constants_1.TABLET_COLS_NUMBER,
|
|
56
56
|
mobile: constants_1.MOBILE_COLS_NUMBER
|
|
57
57
|
}) => {
|
|
58
|
-
|
|
58
|
+
childrenArr.length = 0;
|
|
59
|
+
react_1.Children.forEach(children, (child) => {
|
|
59
60
|
var _a;
|
|
60
61
|
if (!child || typeof child === "string") {
|
|
61
62
|
return;
|
|
@@ -89,16 +90,9 @@ const useGridClasses = (children, childrenArr, colsState = {
|
|
|
89
90
|
isFitContent ? constants_1.FIT_CONTENT_CLASS : ""
|
|
90
91
|
]);
|
|
91
92
|
const clone = (0, react_1.cloneElement)(el, {
|
|
92
|
-
key: el.props.id || el.key || indx,
|
|
93
93
|
className: itemClassName
|
|
94
94
|
});
|
|
95
|
-
|
|
96
|
-
if (prevElementIndex !== -1) {
|
|
97
|
-
childrenArr[prevElementIndex] = clone;
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
childrenArr.push(clone);
|
|
101
|
-
}
|
|
95
|
+
childrenArr.push(clone);
|
|
102
96
|
});
|
|
103
97
|
};
|
|
104
98
|
exports.useGridClasses = useGridClasses;
|
|
@@ -12,7 +12,7 @@ const useMobileClassName_1 = require("../utils/theme/useMobileClassName");
|
|
|
12
12
|
// TODO: tests
|
|
13
13
|
const GroupButtonRaw = (props) => {
|
|
14
14
|
var _a;
|
|
15
|
-
const { fullWidth, groupData, className, isError, isReadOnly, controller, value: valueProp } = props;
|
|
15
|
+
const { fullWidth, groupData, className, isError, isReadOnly, controller, value: valueProp, id } = props;
|
|
16
16
|
const nameGroupId = (0, react_1.useId)();
|
|
17
17
|
const driveClasses = (0, useDriveClassName_1.useDriveClassName)("zen-group-button");
|
|
18
18
|
const mobileClasses = (0, useMobileClassName_1.useMobileClassName)("zen-group-button");
|
|
@@ -24,7 +24,7 @@ const GroupButtonRaw = (props) => {
|
|
|
24
24
|
return (0, jsx_runtime_1.jsx)(reviewTextControl_1.ReviewTextControl, { value: value.name, className: "zen-group-button__review" });
|
|
25
25
|
}
|
|
26
26
|
// TODO: is it a proper place for onBlur handler?
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)("ul", { onBlur: onBlurHandlerMemo, role: "group", "aria-label": props.ariaLabel || "Group Button", className: (0, classNames_1.classNames)([
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)("ul", { id: id, onBlur: onBlurHandlerMemo, role: "group", "aria-label": props.ariaLabel || "Group Button", className: (0, classNames_1.classNames)([
|
|
28
28
|
"zen-group-button",
|
|
29
29
|
isError ? "zen-group-button--error" : "",
|
|
30
30
|
mobileClasses || driveClasses || "",
|