@geotab/zenith 3.3.0 → 3.4.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 +17 -0
- package/dist/advancedGroupsFilter/advancedGroupsFilterFormSection.js +1 -1
- package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +0 -39
- package/dist/alertRaw/components/alertAnimation.js +8 -4
- package/dist/card/card.d.ts +1 -1
- package/dist/card/card.js +1 -3
- package/dist/card/components/status.js +2 -2
- package/dist/chart/barChart/getBarTooltipItems.js +31 -2
- package/dist/chart/barChart.js +2 -1
- package/dist/chart/utils/getYAxisMeta.d.ts +1 -1
- package/dist/chart/utils/getYAxisMeta.js +44 -1
- package/dist/checkbox/checkbox.js +3 -3
- package/dist/dataGrid/emptySearchList/emptySearchList.d.ts +6 -7
- package/dist/dataGrid/emptySearchList/emptySearchList.js +15 -23
- package/dist/dateInputRaw/dateInputRaw.d.ts +1 -1
- package/dist/dateRangeRaw/dateRangeRaw.d.ts +1 -1
- package/dist/dateRangeRaw/utils/dateRangeUtils.d.ts +1 -0
- package/dist/dateRangeRaw/utils/dateRangeUtils.js +39 -1
- package/dist/dropdownRaw/dropdownRaw.d.ts +1 -1
- package/dist/emptyState/emptyState.d.ts +9 -0
- package/dist/emptyState/emptyState.js +14 -0
- package/dist/emptyState/hooks/useIcon.d.ts +2 -0
- package/dist/emptyState/hooks/useIcon.js +17 -0
- package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.d.ts +1 -0
- package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +28 -3
- package/dist/formField/components/formFieldAdditionalInfo.d.ts +12 -0
- package/dist/formField/components/formFieldAdditionalInfo.js +10 -0
- package/dist/formField/components/formFieldAssistiveError.d.ts +10 -0
- package/dist/formField/components/formFieldAssistiveError.js +12 -0
- package/dist/formField/components/formFieldCounter.d.ts +6 -0
- package/dist/formField/components/formFieldCounter.js +7 -0
- package/dist/formField/components/formFieldLoading.d.ts +12 -0
- package/dist/formField/components/formFieldLoading.js +16 -0
- package/dist/formField/components/formFieldWithLabel.d.ts +8 -11
- package/dist/formField/components/formFieldWithLabel.js +21 -3
- package/dist/formField/components/formFieldWithoutLabel.d.ts +8 -9
- package/dist/formField/components/formFieldWithoutLabel.js +6 -1
- package/dist/formField/components/isOldFormFieldComponent.d.ts +2 -0
- package/dist/formField/components/isOldFormFieldComponent.js +12 -0
- package/dist/formField/components/trailingComponent.d.ts +2 -1
- package/dist/formField/components/trailingComponent.js +7 -1
- package/dist/formField/formField.d.ts +17 -35
- package/dist/formField/formField.js +4 -71
- package/dist/formField/hooks/useContainer.d.ts +2 -0
- package/dist/formField/hooks/useContainer.js +47 -0
- package/dist/formField/hooks/useError.d.ts +1 -1
- package/dist/formField/hooks/useFormFieldClasses.d.ts +2 -0
- package/dist/formField/hooks/useFormFieldClasses.js +30 -0
- package/dist/formField/hooks/useFormFieldProps.d.ts +17 -0
- package/dist/formField/hooks/useFormFieldProps.js +37 -0
- package/dist/formField/hooks/useTrailing.d.ts +1 -1
- package/dist/formField/hooks/useTrailing.js +1 -1
- package/dist/formField/hooks/useWidth.d.ts +1 -1
- package/dist/formField/types.d.ts +35 -0
- package/dist/formField/types.js +2 -0
- package/dist/formGroup/components/formGroupList.d.ts +1 -1
- package/dist/formGroup/components/formGroupToggle.d.ts +1 -1
- package/dist/formGroup/formGroup.d.ts +1 -1
- package/dist/formGroup/hooks/useLabelAlign.d.ts +1 -1
- package/dist/formGroup/types.d.ts +1 -1
- package/dist/formGroup/utils/applyCustomControlClasses.d.ts +1 -1
- package/dist/formGroup/utils/applyCustomLabelClasses.d.ts +1 -1
- package/dist/formGroup/utils/getControlClasses/getControlClasses.d.ts +1 -1
- package/dist/formGroup/utils/getControlClasses/getOneLabelOneControlClasses.d.ts +1 -1
- package/dist/formGroup/utils/getControlClasses/getOneLabelTwoControlsClasses.d.ts +1 -1
- package/dist/formGroup/utils/getControlClasses/getTwoLabelsOneControlClasses.d.ts +1 -1
- package/dist/formGroup/utils/getControlClasses/getTwoLabelsTwoControlsClasses.d.ts +1 -1
- package/dist/formGroup/utils/getLabelClasses/getLabelClasses.d.ts +1 -1
- package/dist/formGroup/utils/getLabelClasses/getOneLabelOneControlClasses.d.ts +1 -1
- package/dist/formGroup/utils/getLabelClasses/getOneLabelTwoControlsClasses.d.ts +1 -1
- package/dist/formGroup/utils/getLabelClasses/getTwoLabelsOneControlClasses.d.ts +1 -1
- package/dist/formGroup/utils/getLabelClasses/getTwoLabelsTwoControlsClasses.d.ts +1 -1
- package/dist/formGroup/utils/getListClasses.d.ts +1 -1
- package/dist/formGroup/utils/getToggleClasses.d.ts +1 -1
- package/dist/formGroup/utils/initializeState.d.ts +1 -1
- package/dist/formGroup/utils/isTopAlign.d.ts +1 -1
- package/dist/formLayout/types.d.ts +1 -1
- package/dist/formSection/types.d.ts +1 -1
- package/dist/formSection/utils/formSectionProvider.d.ts +1 -1
- package/dist/groupButtonRaw/groupButtonRaw.d.ts +1 -1
- package/dist/groupsFilterRaw/groupsFilterRaw.d.ts +1 -1
- package/dist/groupsFilterRaw/groupsHelper.js +2 -2
- package/dist/headerTitle/headerTitle.js +1 -1
- package/dist/images/imageAdjustFilter.d.ts +4 -0
- package/dist/images/imageAdjustFilter.js +16 -0
- package/dist/images/imageNoMatchingAssets.d.ts +4 -0
- package/dist/images/imageNoMatchingAssets.js +16 -0
- package/dist/index.css +619 -524
- package/dist/index.d.ts +6 -2
- package/dist/index.js +23 -16
- package/dist/inputAdornments/inputAdornments.d.ts +2 -1
- package/dist/inputAdornments/inputAdornments.js +2 -2
- package/dist/layout/layout.js +11 -7
- package/dist/list/itemData/itemData.d.ts +1 -0
- package/dist/list/itemData/itemDataInternal.d.ts +2 -1
- package/dist/list/itemData/itemDataInternal.js +4 -2
- package/dist/list/itemData/itemDataWaiting.d.ts +2 -1
- package/dist/list/itemData/itemDataWaiting.js +4 -1
- package/dist/list/list.d.ts +13 -4
- package/dist/list/list.js +29 -12
- package/dist/list/utils/getLoadingItems.d.ts +1 -1
- package/dist/list/utils/getLoadingItems.js +4 -4
- package/dist/modal/modal.js +7 -0
- package/dist/pillExpandable/pillExpandable.d.ts +1 -0
- package/dist/pillExpandable/pillExpandable.js +74 -33
- package/dist/radioGroupRaw/radioGroupRaw.d.ts +1 -1
- package/dist/rangeRaw/rangeRaw.d.ts +1 -1
- package/dist/summary/summary.js +0 -1
- package/dist/summaryTile/summaryTile.js +2 -2
- package/dist/table/children/tableEmpty.d.ts +1 -1
- package/dist/table/children/useTableChildren.js +1 -1
- package/dist/timePickerRaw/timePickerRaw.d.ts +1 -1
- package/dist/tooltip/tooltip.d.ts +15 -4
- package/dist/tooltip/tooltip.js +421 -158
- package/dist/utils/localization/translations/cs.json +2 -1
- package/dist/utils/localization/translations/da-DK.json +2 -1
- package/dist/utils/localization/translations/de.json +2 -1
- package/dist/utils/localization/translations/en.json +2 -1
- package/dist/utils/localization/translations/es.json +3 -2
- package/dist/utils/localization/translations/fi-FI.json +2 -1
- package/dist/utils/localization/translations/fr-FR.json +2 -1
- package/dist/utils/localization/translations/fr.json +3 -2
- package/dist/utils/localization/translations/hu-HU.json +2 -1
- package/dist/utils/localization/translations/id.json +2 -1
- package/dist/utils/localization/translations/it.json +2 -1
- package/dist/utils/localization/translations/ja.json +2 -1
- package/dist/utils/localization/translations/ko-KR.json +2 -1
- package/dist/utils/localization/translations/ms.json +2 -1
- package/dist/utils/localization/translations/nb-NO.json +2 -1
- package/dist/utils/localization/translations/nl.json +2 -1
- package/dist/utils/localization/translations/pl.json +2 -1
- package/dist/utils/localization/translations/pt-BR.json +2 -1
- package/dist/utils/localization/translations/sk-SK.json +2 -1
- package/dist/utils/localization/translations/sv.json +2 -1
- package/dist/utils/localization/translations/th.json +2 -1
- package/dist/utils/localization/translations/tr.json +2 -1
- package/dist/utils/localization/translations/zh-Hans.json +2 -1
- package/dist/utils/localization/translations/zh-TW.json +2 -1
- package/dist/utils/positioningUtils/calculatePosition.d.ts +1 -1
- package/dist/utils/positioningUtils/calculatePosition.js +11 -1
- package/esm/advancedGroupsFilter/advancedGroupsFilterFormSection.js +1 -1
- package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +0 -39
- package/esm/alertRaw/components/alertAnimation.js +8 -4
- package/esm/card/card.d.ts +1 -1
- package/esm/card/card.js +1 -3
- package/esm/card/components/status.js +2 -2
- package/esm/chart/barChart/getBarTooltipItems.js +31 -2
- package/esm/chart/barChart.js +2 -1
- package/esm/chart/utils/getYAxisMeta.d.ts +1 -1
- package/esm/chart/utils/getYAxisMeta.js +44 -1
- package/esm/checkbox/checkbox.js +3 -3
- package/esm/dataGrid/emptySearchList/emptySearchList.d.ts +6 -7
- package/esm/dataGrid/emptySearchList/emptySearchList.js +16 -24
- package/esm/dateInputRaw/dateInputRaw.d.ts +1 -1
- package/esm/dateRangeRaw/dateRangeRaw.d.ts +1 -1
- package/esm/dateRangeRaw/utils/dateRangeUtils.d.ts +1 -0
- package/esm/dateRangeRaw/utils/dateRangeUtils.js +37 -0
- package/esm/dropdownRaw/dropdownRaw.d.ts +1 -1
- package/esm/emptyState/emptyState.d.ts +9 -0
- package/esm/emptyState/emptyState.js +10 -0
- package/esm/emptyState/hooks/useIcon.d.ts +2 -0
- package/esm/emptyState/hooks/useIcon.js +10 -0
- package/esm/filtersBar/components/filtersBarPeriodPicker/getRangeOption.d.ts +1 -0
- package/esm/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +29 -4
- package/esm/formField/components/formFieldAdditionalInfo.d.ts +12 -0
- package/esm/formField/components/formFieldAdditionalInfo.js +6 -0
- package/esm/formField/components/formFieldAssistiveError.d.ts +10 -0
- package/esm/formField/components/formFieldAssistiveError.js +8 -0
- package/esm/formField/components/formFieldCounter.d.ts +6 -0
- package/esm/formField/components/formFieldCounter.js +3 -0
- package/esm/formField/components/formFieldLoading.d.ts +12 -0
- package/esm/formField/components/formFieldLoading.js +12 -0
- package/esm/formField/components/formFieldWithLabel.d.ts +8 -11
- package/esm/formField/components/formFieldWithLabel.js +21 -3
- package/esm/formField/components/formFieldWithoutLabel.d.ts +8 -9
- package/esm/formField/components/formFieldWithoutLabel.js +6 -1
- package/esm/formField/components/isOldFormFieldComponent.d.ts +2 -0
- package/esm/formField/components/isOldFormFieldComponent.js +8 -0
- package/esm/formField/components/trailingComponent.d.ts +2 -1
- package/esm/formField/components/trailingComponent.js +7 -1
- package/esm/formField/formField.d.ts +17 -35
- package/esm/formField/formField.js +5 -72
- package/esm/formField/hooks/useContainer.d.ts +2 -0
- package/esm/formField/hooks/useContainer.js +43 -0
- package/esm/formField/hooks/useError.d.ts +1 -1
- package/esm/formField/hooks/useFormFieldClasses.d.ts +2 -0
- package/esm/formField/hooks/useFormFieldClasses.js +26 -0
- package/esm/formField/hooks/useFormFieldProps.d.ts +17 -0
- package/esm/formField/hooks/useFormFieldProps.js +33 -0
- package/esm/formField/hooks/useTrailing.d.ts +1 -1
- package/esm/formField/hooks/useTrailing.js +1 -1
- package/esm/formField/hooks/useWidth.d.ts +1 -1
- package/esm/formField/types.d.ts +35 -0
- package/esm/formField/types.js +1 -0
- package/esm/formGroup/components/formGroupList.d.ts +1 -1
- package/esm/formGroup/components/formGroupToggle.d.ts +1 -1
- package/esm/formGroup/formGroup.d.ts +1 -1
- package/esm/formGroup/hooks/useLabelAlign.d.ts +1 -1
- package/esm/formGroup/types.d.ts +1 -1
- package/esm/formGroup/utils/applyCustomControlClasses.d.ts +1 -1
- package/esm/formGroup/utils/applyCustomLabelClasses.d.ts +1 -1
- package/esm/formGroup/utils/getControlClasses/getControlClasses.d.ts +1 -1
- package/esm/formGroup/utils/getControlClasses/getOneLabelOneControlClasses.d.ts +1 -1
- package/esm/formGroup/utils/getControlClasses/getOneLabelTwoControlsClasses.d.ts +1 -1
- package/esm/formGroup/utils/getControlClasses/getTwoLabelsOneControlClasses.d.ts +1 -1
- package/esm/formGroup/utils/getControlClasses/getTwoLabelsTwoControlsClasses.d.ts +1 -1
- package/esm/formGroup/utils/getLabelClasses/getLabelClasses.d.ts +1 -1
- package/esm/formGroup/utils/getLabelClasses/getOneLabelOneControlClasses.d.ts +1 -1
- package/esm/formGroup/utils/getLabelClasses/getOneLabelTwoControlsClasses.d.ts +1 -1
- package/esm/formGroup/utils/getLabelClasses/getTwoLabelsOneControlClasses.d.ts +1 -1
- package/esm/formGroup/utils/getLabelClasses/getTwoLabelsTwoControlsClasses.d.ts +1 -1
- package/esm/formGroup/utils/getListClasses.d.ts +1 -1
- package/esm/formGroup/utils/getToggleClasses.d.ts +1 -1
- package/esm/formGroup/utils/initializeState.d.ts +1 -1
- package/esm/formGroup/utils/isTopAlign.d.ts +1 -1
- package/esm/formLayout/types.d.ts +1 -1
- package/esm/formSection/types.d.ts +1 -1
- package/esm/formSection/utils/formSectionProvider.d.ts +1 -1
- package/esm/groupButtonRaw/groupButtonRaw.d.ts +1 -1
- package/esm/groupsFilterRaw/groupsFilterRaw.d.ts +1 -1
- package/esm/groupsFilterRaw/groupsHelper.js +2 -2
- package/esm/headerTitle/headerTitle.js +1 -1
- package/esm/images/imageAdjustFilter.d.ts +4 -0
- package/esm/images/imageAdjustFilter.js +12 -0
- package/esm/images/imageNoMatchingAssets.d.ts +4 -0
- package/esm/images/imageNoMatchingAssets.js +12 -0
- package/esm/index.d.ts +6 -2
- package/esm/index.js +4 -1
- package/esm/inputAdornments/inputAdornments.d.ts +2 -1
- package/esm/inputAdornments/inputAdornments.js +2 -2
- package/esm/layout/layout.js +11 -7
- package/esm/list/itemData/itemData.d.ts +1 -0
- package/esm/list/itemData/itemDataInternal.d.ts +2 -1
- package/esm/list/itemData/itemDataInternal.js +4 -2
- package/esm/list/itemData/itemDataWaiting.d.ts +2 -1
- package/esm/list/itemData/itemDataWaiting.js +4 -1
- package/esm/list/list.d.ts +13 -4
- package/esm/list/list.js +29 -12
- package/esm/list/utils/getLoadingItems.d.ts +1 -1
- package/esm/list/utils/getLoadingItems.js +4 -4
- package/esm/modal/modal.js +7 -0
- package/esm/pillExpandable/pillExpandable.d.ts +1 -0
- package/esm/pillExpandable/pillExpandable.js +74 -33
- package/esm/radioGroupRaw/radioGroupRaw.d.ts +1 -1
- package/esm/rangeRaw/rangeRaw.d.ts +1 -1
- package/esm/summary/summary.js +0 -1
- package/esm/summaryTile/summaryTile.js +2 -2
- package/esm/table/children/tableEmpty.d.ts +1 -1
- package/esm/table/children/useTableChildren.js +1 -1
- package/esm/timePickerRaw/timePickerRaw.d.ts +1 -1
- package/esm/tooltip/tooltip.d.ts +15 -4
- package/esm/tooltip/tooltip.js +388 -138
- package/esm/utils/localization/translations/cs.json +2 -1
- package/esm/utils/localization/translations/da-DK.json +2 -1
- package/esm/utils/localization/translations/de.json +2 -1
- package/esm/utils/localization/translations/en.json +2 -1
- package/esm/utils/localization/translations/es.json +3 -2
- package/esm/utils/localization/translations/fi-FI.json +2 -1
- package/esm/utils/localization/translations/fr-FR.json +2 -1
- package/esm/utils/localization/translations/fr.json +3 -2
- package/esm/utils/localization/translations/hu-HU.json +2 -1
- package/esm/utils/localization/translations/id.json +2 -1
- package/esm/utils/localization/translations/it.json +2 -1
- package/esm/utils/localization/translations/ja.json +2 -1
- package/esm/utils/localization/translations/ko-KR.json +2 -1
- package/esm/utils/localization/translations/ms.json +2 -1
- package/esm/utils/localization/translations/nb-NO.json +2 -1
- package/esm/utils/localization/translations/nl.json +2 -1
- package/esm/utils/localization/translations/pl.json +2 -1
- package/esm/utils/localization/translations/pt-BR.json +2 -1
- package/esm/utils/localization/translations/sk-SK.json +2 -1
- package/esm/utils/localization/translations/sv.json +2 -1
- package/esm/utils/localization/translations/th.json +2 -1
- package/esm/utils/localization/translations/tr.json +2 -1
- package/esm/utils/localization/translations/zh-Hans.json +2 -1
- package/esm/utils/localization/translations/zh-TW.json +2 -1
- package/esm/utils/positioningUtils/calculatePosition.d.ts +1 -1
- package/esm/utils/positioningUtils/calculatePosition.js +11 -1
- package/package.json +1 -1
package/esm/index.d.ts
CHANGED
|
@@ -64,12 +64,13 @@ export { type IDateInput, type TDateInput, DateInput } from "./dateInput/dateInp
|
|
|
64
64
|
export { cutSeconds } from "./dateInputRaw/utils/cutSeconds";
|
|
65
65
|
export { getLabel } from "./dateInputRaw/utils/getLabel";
|
|
66
66
|
export { type IDateRange, type IDateRangeUnsetValue, type TDateRange, DateRange } from "./dateRange/dateRange";
|
|
67
|
-
export { type IDateRangeValue, type IDateRangeValueOptionalLabel, type IDateRangeOption, type TDateRangeOption, GET_TODAY_OPTION, GET_YESTERDAY_OPTION, GET_THIS_WEEK_OPTION, GET_NEXT_WEEK_OPTION, GET_LAST_WEEK_OPTION, GET_THIS_MONTH_OPTION, GET_NEXT_MONTH_OPTION, GET_LAST_MONTH_OPTION, GET_LAST_SEVEN_DAYS_OPTION, GET_LAST_THIRTY_DAYS_OPTION, GET_LAST_TWELVE_MONTHS_OPTION, GET_LAST_THREE_MONTH_OPTION, GET_LAST_QUARTER_OPTION, GET_THIS_QUARTER_OPTION, GET_LAST_YEAR_OPTION, GET_THIS_YEAR_OPTION, GET_DEFAULT_DATE_OPTIONS } from "./dateRangeRaw/utils/dateRangeUtils";
|
|
67
|
+
export { type IDateRangeValue, type IDateRangeValueOptionalLabel, type IDateRangeOption, type TDateRangeOption, GET_TODAY_OPTION, GET_YESTERDAY_OPTION, GET_THIS_WEEK_OPTION, GET_NEXT_WEEK_OPTION, GET_LAST_WEEK_OPTION, GET_THIS_MONTH_OPTION, GET_NEXT_MONTH_OPTION, GET_LAST_MONTH_OPTION, GET_LAST_SEVEN_DAYS_OPTION, GET_LAST_THIRTY_DAYS_OPTION, GET_YEAR_TO_DATE_OPTION, GET_LAST_TWELVE_MONTHS_OPTION, GET_LAST_THREE_MONTH_OPTION, GET_LAST_QUARTER_OPTION, GET_THIS_QUARTER_OPTION, GET_LAST_YEAR_OPTION, GET_THIS_YEAR_OPTION, GET_DEFAULT_DATE_OPTIONS } from "./dateRangeRaw/utils/dateRangeUtils";
|
|
68
68
|
export { type IDialog, Dialog } from "./dialog/dialog";
|
|
69
69
|
export { isElementInsideContainer, isFocusable, getFocusableStartInd } from "./dialog/dialogHelpers";
|
|
70
70
|
export { type IDivider, Divider } from "./divider/divider";
|
|
71
71
|
export { LIST_LIMIT, type ISelectionItem, type IDropdownItem, type IDropdownValueFullSelection, type IDropdownWithCheckboxValue, type IDropdownWithCheckboxSelected, type IDropdownValueFullSelectionWithCheckbox, type IDropdownFullSelectedValue, type IDropdownFullSelectedValueWithCheckbox, type IDropdownFullSelection, type IDropdown, type IDropdownWithCheckbox, type IDropdownFullSelectionWithCheckbox, type IFetchDropdownState, type TDropdown, Dropdown } from "./dropdown/dropdown";
|
|
72
72
|
export { useDropdownState } from "./dropdown/useDropdownState";
|
|
73
|
+
export { type IEmptyState, EmptyState } from "./emptyState/emptyState";
|
|
73
74
|
export { type IFavoriteButton, FavoriteButton } from "./favoriteButton/favoriteButton";
|
|
74
75
|
export { FeedbackProvider } from "./feedbackProvider/feedbackProvider";
|
|
75
76
|
export { type TFilterButton, type IFilterButton, FilterButton } from "./filterButton/filterButton";
|
|
@@ -96,9 +97,10 @@ export { TriggerContext, TriggerContextProvider } from "./filtersBar/filtersBarP
|
|
|
96
97
|
export { type IFooterButtons, FooterButtons } from "./footerButtons/footerButtons";
|
|
97
98
|
export { type IFormFieldBannerProps, FormFieldBanner } from "./formField/components/formFieldBanner";
|
|
98
99
|
export { FormFieldSkeleton } from "./formField/components/formFieldSkeleton";
|
|
99
|
-
export { type
|
|
100
|
+
export { type TFormFieldComponentProps, FormField } from "./formField/formField";
|
|
100
101
|
export { useSkeleton } from "./formField/hooks/useSkeleton";
|
|
101
102
|
export { useWidth } from "./formField/hooks/useWidth";
|
|
103
|
+
export { type TLabelAlign, type IFormFieldWithLabel, type IFormField, type TFormField, type IFormFieldComponent } from "./formField/types";
|
|
102
104
|
export { type ICustomRowProps, CustomRow } from "./formGroup/components/customRow/customRow";
|
|
103
105
|
export { type IFormGroupList, FormGroupList } from "./formGroup/components/formGroupList";
|
|
104
106
|
export { type TFormGroupToggle, FormGroupToggle } from "./formGroup/components/formGroupToggle";
|
|
@@ -674,7 +676,9 @@ export { IconYen } from "./icons/iconYen";
|
|
|
674
676
|
export { IconZone } from "./icons/iconZone";
|
|
675
677
|
export { IconZoom } from "./icons/iconZoom";
|
|
676
678
|
export { IconZoom2 } from "./icons/iconZoom2";
|
|
679
|
+
export { ImageAdjustFilter } from "./images/imageAdjustFilter";
|
|
677
680
|
export { ImageLooking } from "./images/imageLooking";
|
|
681
|
+
export { ImageNoMatchingAssets } from "./images/imageNoMatchingAssets";
|
|
678
682
|
export { ImageNothingFound } from "./images/imageNothingFound";
|
|
679
683
|
export { type ISvgImage } from "./images/svgImage";
|
|
680
684
|
export { type ILayout, Layout } from "./layout/layout";
|
package/esm/index.js
CHANGED
|
@@ -63,12 +63,13 @@ export { DateInput } from "./dateInput/dateInput";
|
|
|
63
63
|
export { cutSeconds } from "./dateInputRaw/utils/cutSeconds";
|
|
64
64
|
export { getLabel } from "./dateInputRaw/utils/getLabel";
|
|
65
65
|
export { DateRange } from "./dateRange/dateRange";
|
|
66
|
-
export { GET_TODAY_OPTION, GET_YESTERDAY_OPTION, GET_THIS_WEEK_OPTION, GET_NEXT_WEEK_OPTION, GET_LAST_WEEK_OPTION, GET_THIS_MONTH_OPTION, GET_NEXT_MONTH_OPTION, GET_LAST_MONTH_OPTION, GET_LAST_SEVEN_DAYS_OPTION, GET_LAST_THIRTY_DAYS_OPTION, GET_LAST_TWELVE_MONTHS_OPTION, GET_LAST_THREE_MONTH_OPTION, GET_LAST_QUARTER_OPTION, GET_THIS_QUARTER_OPTION, GET_LAST_YEAR_OPTION, GET_THIS_YEAR_OPTION, GET_DEFAULT_DATE_OPTIONS } from "./dateRangeRaw/utils/dateRangeUtils";
|
|
66
|
+
export { GET_TODAY_OPTION, GET_YESTERDAY_OPTION, GET_THIS_WEEK_OPTION, GET_NEXT_WEEK_OPTION, GET_LAST_WEEK_OPTION, GET_THIS_MONTH_OPTION, GET_NEXT_MONTH_OPTION, GET_LAST_MONTH_OPTION, GET_LAST_SEVEN_DAYS_OPTION, GET_LAST_THIRTY_DAYS_OPTION, GET_YEAR_TO_DATE_OPTION, GET_LAST_TWELVE_MONTHS_OPTION, GET_LAST_THREE_MONTH_OPTION, GET_LAST_QUARTER_OPTION, GET_THIS_QUARTER_OPTION, GET_LAST_YEAR_OPTION, GET_THIS_YEAR_OPTION, GET_DEFAULT_DATE_OPTIONS } from "./dateRangeRaw/utils/dateRangeUtils";
|
|
67
67
|
export { Dialog } from "./dialog/dialog";
|
|
68
68
|
export { isElementInsideContainer, isFocusable, getFocusableStartInd } from "./dialog/dialogHelpers";
|
|
69
69
|
export { Divider } from "./divider/divider";
|
|
70
70
|
export { LIST_LIMIT, Dropdown } from "./dropdown/dropdown";
|
|
71
71
|
export { useDropdownState } from "./dropdown/useDropdownState";
|
|
72
|
+
export { EmptyState } from "./emptyState/emptyState";
|
|
72
73
|
export { FavoriteButton } from "./favoriteButton/favoriteButton";
|
|
73
74
|
export { FeedbackProvider } from "./feedbackProvider/feedbackProvider";
|
|
74
75
|
export { FilterButton } from "./filterButton/filterButton";
|
|
@@ -664,7 +665,9 @@ export { IconYen } from "./icons/iconYen";
|
|
|
664
665
|
export { IconZone } from "./icons/iconZone";
|
|
665
666
|
export { IconZoom } from "./icons/iconZoom";
|
|
666
667
|
export { IconZoom2 } from "./icons/iconZoom2";
|
|
668
|
+
export { ImageAdjustFilter } from "./images/imageAdjustFilter";
|
|
667
669
|
export { ImageLooking } from "./images/imageLooking";
|
|
670
|
+
export { ImageNoMatchingAssets } from "./images/imageNoMatchingAssets";
|
|
668
671
|
export { ImageNothingFound } from "./images/imageNothingFound";
|
|
669
672
|
export { Layout } from "./layout/layout";
|
|
670
673
|
export { useLayoutFullScreenElement, LayoutFullScreenElementProvider } from "./layout/layoutFullScreenElementProvider";
|
|
@@ -19,8 +19,9 @@ export interface IInputAdornments {
|
|
|
19
19
|
autoFocus?: boolean;
|
|
20
20
|
ref?: RefObject<HTMLInputElement | null>;
|
|
21
21
|
name?: string;
|
|
22
|
+
ariaLabel?: string;
|
|
22
23
|
}
|
|
23
24
|
export declare const InputAdornments: {
|
|
24
|
-
({ id, value, className, disabled, isError, maxLength, onChange, onKeyDown, onFocus, startAdornment, endAdornment, placeholder, inputType, autoFocus, name, onBlur, ref }: IInputAdornments): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
({ id, value, className, disabled, isError, maxLength, onChange, onKeyDown, onFocus, startAdornment, endAdornment, placeholder, inputType, autoFocus, name, onBlur, ref, ariaLabel }: IInputAdornments): import("react/jsx-runtime").JSX.Element;
|
|
25
26
|
displayName: string;
|
|
26
27
|
};
|
|
@@ -3,7 +3,7 @@ import { useMemo } from "react";
|
|
|
3
3
|
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
4
4
|
import { TextInputRaw } from "../textInputRaw/textInputRaw";
|
|
5
5
|
import { useDriveClassName } from "../utils/theme/useDriveClassName";
|
|
6
|
-
export const InputAdornments = ({ id, value, className = "", disabled, isError, maxLength, onChange, onKeyDown, onFocus, startAdornment, endAdornment, placeholder, inputType = "text", autoFocus, name, onBlur, ref }) => {
|
|
6
|
+
export const InputAdornments = ({ id, value, className = "", disabled, isError, maxLength, onChange, onKeyDown, onFocus, startAdornment, endAdornment, placeholder, inputType = "text", autoFocus, name, onBlur, ref, ariaLabel }) => {
|
|
7
7
|
const disabledClassName = disabled ? "zen-input-adornments--disabled" : "";
|
|
8
8
|
const driveComponentClass = useDriveClassName("zen-input-adornments");
|
|
9
9
|
const classes = useMemo(() => classNames([
|
|
@@ -18,6 +18,6 @@ export const InputAdornments = ({ id, value, className = "", disabled, isError,
|
|
|
18
18
|
!value ? "zen-input-adornments__wrapper--empty" : "",
|
|
19
19
|
className
|
|
20
20
|
]), [className, endAdornment, value]);
|
|
21
|
-
return (_jsxs("div", { className: classes, children: [!!startAdornment && (_jsx("div", { className: "zen-input-adornments__adornment zen-input-adornments__adornment--start", children: startAdornment })), _jsx("div", { className: wrapperClasses, children: _jsx(TextInputRaw, { name: name, onBlur: onBlur, ref: ref, id: id, value: value, maxLength: maxLength, isError: isError, placeholder: placeholder, onChange: onChange, onKeyDown: onKeyDown, onFocus: onFocus, disabled: disabled, type: inputType, autoFocus: autoFocus, className: "zen-input-adornments__input zen-input-adornments__input--border-none" }) }), !!endAdornment && (_jsx("div", { className: "zen-input-adornments__adornment zen-input-adornments__adornment--end", children: endAdornment }))] }));
|
|
21
|
+
return (_jsxs("div", { className: classes, children: [!!startAdornment && (_jsx("div", { className: "zen-input-adornments__adornment zen-input-adornments__adornment--start", children: startAdornment })), _jsx("div", { className: wrapperClasses, children: _jsx(TextInputRaw, { name: name, onBlur: onBlur, ref: ref, id: id, value: value, maxLength: maxLength, isError: isError, placeholder: placeholder, onChange: onChange, onKeyDown: onKeyDown, onFocus: onFocus, disabled: disabled, type: inputType, autoFocus: autoFocus, ariaLabel: ariaLabel, className: "zen-input-adornments__input zen-input-adornments__input--border-none" }) }), !!endAdornment && (_jsx("div", { className: "zen-input-adornments__adornment zen-input-adornments__adornment--end", children: endAdornment }))] }));
|
|
22
22
|
};
|
|
23
23
|
InputAdornments.displayName = "InputAdornments";
|
package/esm/layout/layout.js
CHANGED
|
@@ -84,19 +84,23 @@ const LayoutInner = ({ id, className, pageScrolling = true, children }) => {
|
|
|
84
84
|
return [h, s, c];
|
|
85
85
|
}, [children]);
|
|
86
86
|
const calculateLayoutParams = useCallback((elem, middleEl) => {
|
|
87
|
-
var _a, _b;
|
|
88
87
|
if (!elem) {
|
|
89
88
|
return;
|
|
90
89
|
}
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
let absoluteTop = 0;
|
|
91
|
+
let current = elem;
|
|
92
|
+
while (current) {
|
|
93
|
+
absoluteTop += current.offsetTop;
|
|
94
|
+
current = current.offsetParent;
|
|
95
|
+
}
|
|
96
|
+
const visibleTopOffset = Math.max(0, absoluteTop - window.scrollY);
|
|
93
97
|
if (middleEl) {
|
|
94
|
-
const
|
|
95
|
-
const middleElBottomPosition = middleEl.offsetTop + middleElRect.height;
|
|
98
|
+
const middleElBottomPosition = middleEl.offsetTop + middleEl.offsetHeight;
|
|
96
99
|
setMiddleElBottom(middleElBottomPosition);
|
|
97
100
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
101
|
+
const vh = window.innerHeight;
|
|
102
|
+
const finalMinHeight = vh - visibleTopOffset;
|
|
103
|
+
setMinHeight(finalMinHeight);
|
|
100
104
|
}, []);
|
|
101
105
|
const checkIsStartWithToolbar = useCallback((fullScreen) => {
|
|
102
106
|
var _a;
|
|
@@ -25,6 +25,7 @@ export interface IItemData {
|
|
|
25
25
|
onCheck?: (checked: boolean) => void;
|
|
26
26
|
isMobile?: boolean;
|
|
27
27
|
isDrive?: boolean;
|
|
28
|
+
isTall?: boolean;
|
|
28
29
|
target?: React.HTMLAttributeAnchorTarget;
|
|
29
30
|
}
|
|
30
31
|
export declare const ItemData: ({ id, ...rest }: IItemData) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -24,7 +24,8 @@ export interface IItemData {
|
|
|
24
24
|
onCheck?: (checked: boolean) => void;
|
|
25
25
|
isMobile?: boolean;
|
|
26
26
|
isDrive?: boolean;
|
|
27
|
+
isTall?: boolean;
|
|
27
28
|
target?: React.HTMLAttributeAnchorTarget;
|
|
28
29
|
}
|
|
29
|
-
export declare const ItemDataInternal: ({ id, visible, icon, iconClassName, name, link, secondary, status, actions, data, onClick, checked, onCheck, isDrive, isMobile, target }: IItemData) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare const ItemDataInternal: ({ id, visible, icon, iconClassName, name, link, secondary, status, actions, data, onClick, checked, onCheck, isDrive, isMobile, isTall, target }: IItemData) => import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
export {};
|
|
@@ -74,12 +74,14 @@ const ItemDataInternalInner = ({
|
|
|
74
74
|
onCheck,
|
|
75
75
|
isDrive,
|
|
76
76
|
isMobile,
|
|
77
|
+
isTall,
|
|
77
78
|
target
|
|
78
79
|
}) => {
|
|
79
80
|
const {
|
|
80
81
|
translate
|
|
81
82
|
} = useLanguage();
|
|
82
83
|
const driveClassName = useMemo(() => isDrive ? isMobile ? "zen-item-data-drive" : "zen-item-data-drive-tablet" : "", [isDrive, isMobile]);
|
|
84
|
+
const aceClassName = useMemo(() => isTall ? "zen-item-data--tall" : "", [isTall]);
|
|
83
85
|
const renderActions = useCallback(() => {
|
|
84
86
|
if (!actions || actions.length === 0) {
|
|
85
87
|
return null;
|
|
@@ -137,7 +139,7 @@ const ItemDataInternalInner = ({
|
|
|
137
139
|
height: `${plHeight + 12 * 2 + 1}px`
|
|
138
140
|
};
|
|
139
141
|
}, [data, icon, secondary]);
|
|
140
|
-
const classNamesList = useMemo(() => classNames(["zen-item-data", driveClassName || ""]), [driveClassName]);
|
|
142
|
+
const classNamesList = useMemo(() => classNames(["zen-item-data", driveClassName || "", aceClassName]), [driveClassName, aceClassName]);
|
|
141
143
|
if (!visible) {
|
|
142
144
|
return _jsx("li", {
|
|
143
145
|
style: placeholderHeight,
|
|
@@ -146,7 +148,7 @@ const ItemDataInternalInner = ({
|
|
|
146
148
|
}, id);
|
|
147
149
|
}
|
|
148
150
|
return _jsxs("li", {
|
|
149
|
-
className: classNames(["zen-item-data", driveClassName || ""]),
|
|
151
|
+
className: classNames(["zen-item-data", driveClassName || "", aceClassName]),
|
|
150
152
|
"data-list-item-id": id,
|
|
151
153
|
onClick: handleClick,
|
|
152
154
|
children: [_jsxs("div", {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "./itemData.less";
|
|
2
2
|
export interface IItemDataWaiting {
|
|
3
3
|
id: string;
|
|
4
|
+
isTall?: boolean;
|
|
4
5
|
}
|
|
5
|
-
export declare const ItemDataWaiting: ({ id }: IItemDataWaiting) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const ItemDataWaiting: ({ id, isTall }: IItemDataWaiting) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { classNames } from "../../commonHelpers/classNames/classNames";
|
|
3
3
|
import { Skeleton } from "../../skeleton/skeleton";
|
|
4
|
-
export const ItemDataWaiting = ({ id }) => _jsxs("li", { className: classNames([
|
|
4
|
+
export const ItemDataWaiting = ({ id, isTall }) => (_jsxs("li", { className: classNames([
|
|
5
|
+
"zen-item-data",
|
|
6
|
+
isTall ? "zen-item-data--tall" : ""
|
|
7
|
+
]), "data-list-item-id": id, children: [_jsx(Skeleton, { className: "zen-item-data__waiting" }), _jsx(Skeleton, { className: "zen-item-data__waiting" }), _jsx(Skeleton, { className: "zen-item-data__waiting" })] }, id));
|
package/esm/list/list.d.ts
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
3
3
|
import "./list.less";
|
|
4
4
|
import { TListType } from "./interfaces";
|
|
5
|
-
|
|
6
|
-
type?: TListType;
|
|
5
|
+
type IListBase = {
|
|
7
6
|
onChangeOrder?: (startPosition: number, endPosition: number) => void;
|
|
8
7
|
checked?: string[];
|
|
9
8
|
onCheck?: (checked: string[]) => void;
|
|
@@ -11,5 +10,15 @@ export interface IList extends IZenComponentProps {
|
|
|
11
10
|
isLoading?: boolean;
|
|
12
11
|
waitingItems?: number;
|
|
13
12
|
onKeyDown?: (event: React.KeyboardEvent<HTMLUListElement>) => void;
|
|
14
|
-
}
|
|
15
|
-
|
|
13
|
+
} & IZenComponentProps;
|
|
14
|
+
type IListStandard = IListBase & {
|
|
15
|
+
type?: Omit<TListType, "data">;
|
|
16
|
+
variant?: never;
|
|
17
|
+
};
|
|
18
|
+
type IListData = IListBase & {
|
|
19
|
+
type?: Extract<TListType, "data">;
|
|
20
|
+
variant: "tall";
|
|
21
|
+
};
|
|
22
|
+
export type IList = IListStandard | IListData;
|
|
23
|
+
export declare const List: (props: IList) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
package/esm/list/list.js
CHANGED
|
@@ -10,7 +10,9 @@ import { useVirtualScroll } from "./hooks/useVirtualScroll";
|
|
|
10
10
|
import { useLazyLoading } from "./hooks/useLazyLoading";
|
|
11
11
|
import { getLoadingItems } from "./utils/getLoadingItems";
|
|
12
12
|
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
13
|
-
export const List = (
|
|
13
|
+
export const List = (props) => {
|
|
14
|
+
const { type, children, onChangeOrder, checked, onCheck, onListEnd, onKeyDown, isLoading, waitingItems, className } = props;
|
|
15
|
+
const isTall = type === "data" && "variant" in props ? props.variant === "tall" : undefined;
|
|
14
16
|
const listId = useId();
|
|
15
17
|
const listRef = useRef(null);
|
|
16
18
|
const onChangeOrderCallback = useCallback((startPosition, endPosition) => {
|
|
@@ -24,29 +26,44 @@ export const List = ({ type, children, onChangeOrder, checked, onCheck, onListEn
|
|
|
24
26
|
const { isInViewport } = useVirtualScroll(listRef, children);
|
|
25
27
|
useLazyLoading(listRef, isLoading, onListEnd);
|
|
26
28
|
const childrenArray = useMemo(() => Children.map(children, (child) => {
|
|
27
|
-
const
|
|
29
|
+
const childProps = {
|
|
28
30
|
isDrive: isDrive,
|
|
29
31
|
isMobile: isMobile
|
|
30
32
|
};
|
|
31
33
|
if (onChangeOrder) {
|
|
32
|
-
|
|
34
|
+
childProps.onDragStart = onDragStart;
|
|
33
35
|
}
|
|
34
|
-
|
|
36
|
+
const isChildDataListItem = isDataListItem(child);
|
|
37
|
+
if (onCheck && checked && isChildDataListItem) {
|
|
35
38
|
const id = child.props.id;
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
childProps.checked = checked.indexOf(id) > -1;
|
|
40
|
+
childProps.onCheck = (itemChecked) => onCheck(itemChecked
|
|
41
|
+
? [...checked, id]
|
|
42
|
+
: checked.filter((c) => c !== id));
|
|
38
43
|
}
|
|
39
|
-
if (
|
|
40
|
-
|
|
44
|
+
if (isChildDataListItem) {
|
|
45
|
+
childProps.isTall = isTall;
|
|
46
|
+
}
|
|
47
|
+
if (Object.keys(childProps).length > 0) {
|
|
48
|
+
return cloneElement(child, childProps);
|
|
41
49
|
}
|
|
42
50
|
return child;
|
|
43
|
-
}), [
|
|
51
|
+
}), [
|
|
52
|
+
isTall,
|
|
53
|
+
checked,
|
|
54
|
+
children,
|
|
55
|
+
isDrive,
|
|
56
|
+
isMobile,
|
|
57
|
+
onChangeOrder,
|
|
58
|
+
onCheck,
|
|
59
|
+
onDragStart
|
|
60
|
+
]);
|
|
44
61
|
const loadingChildren = useMemo(() => {
|
|
45
62
|
if (!isLoading) {
|
|
46
63
|
return null;
|
|
47
64
|
}
|
|
48
65
|
const defaultWaitingItems = type === "data" ? 50 : 10;
|
|
49
|
-
return getLoadingItems(type || "standard", waitingItems || defaultWaitingItems, listId, isDrive, isMobile);
|
|
50
|
-
}, [isDrive, isLoading, isMobile, listId, type, waitingItems]);
|
|
51
|
-
return _jsx(ViewportProvider, { isInViewport: isInViewport, children: _jsxs("ul", { className: classNames(["zen-list", className || ""]), onKeyDown: onKeyDown, ref: listRef, children: [childrenArray, loadingChildren] }) });
|
|
66
|
+
return getLoadingItems(type || "standard", waitingItems || defaultWaitingItems, listId, isDrive, isMobile, isTall);
|
|
67
|
+
}, [isDrive, isTall, isLoading, isMobile, listId, type, waitingItems]);
|
|
68
|
+
return (_jsx(ViewportProvider, { isInViewport: isInViewport, children: _jsxs("ul", { className: classNames(["zen-list", className || ""]), onKeyDown: onKeyDown, ref: listRef, children: [childrenArray, loadingChildren] }) }));
|
|
52
69
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TListType } from "../interfaces";
|
|
2
|
-
export declare const getLoadingItems: (type: TListType, count: number, listId: string, isDrive: boolean, isMobile: boolean) => import("react/jsx-runtime").JSX.Element[];
|
|
2
|
+
export declare const getLoadingItems: (type: TListType, count: number, listId: string, isDrive: boolean, isMobile: boolean, isTall?: boolean) => import("react/jsx-runtime").JSX.Element[];
|
|
@@ -2,13 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { ItemDataWaiting } from "../itemData/itemDataWaiting";
|
|
3
3
|
import { ItemCompactWaiting } from "../itemCompact/itemCompactWaiting";
|
|
4
4
|
import { ListItemWaiting } from "../listItem/listItemWaiting";
|
|
5
|
-
export const getLoadingItems = (type, count, listId, isDrive, isMobile) => Array.from({ length: count }).map((_, index) => {
|
|
5
|
+
export const getLoadingItems = (type, count, listId, isDrive, isMobile, isTall) => Array.from({ length: count }).map((_, index) => {
|
|
6
6
|
const id = `${listId}-${index}`;
|
|
7
7
|
if (type === "data") {
|
|
8
|
-
return _jsx(ItemDataWaiting, { id: id }, id);
|
|
8
|
+
return _jsx(ItemDataWaiting, { id: id, isTall: isTall }, id);
|
|
9
9
|
}
|
|
10
10
|
if (type === "compact") {
|
|
11
|
-
return _jsx(ItemCompactWaiting, { isDrive: isDrive, isMobile: isMobile }, id);
|
|
11
|
+
return (_jsx(ItemCompactWaiting, { isDrive: isDrive, isMobile: isMobile }, id));
|
|
12
12
|
}
|
|
13
|
-
return _jsx(ListItemWaiting, { id: id, isDrive: isDrive, isMobile: isMobile }, id);
|
|
13
|
+
return (_jsx(ListItemWaiting, { id: id, isDrive: isDrive, isMobile: isMobile }, id));
|
|
14
14
|
});
|
package/esm/modal/modal.js
CHANGED
|
@@ -149,6 +149,7 @@ export const DialogContentNew = ({
|
|
|
149
149
|
} = useLanguage();
|
|
150
150
|
const isMobile = useMobile();
|
|
151
151
|
const contentRef = useRef(null);
|
|
152
|
+
const lastActiveOutsideElement = useRef(document.activeElement);
|
|
152
153
|
const iconDriveClassName = useDriveClassName("icon");
|
|
153
154
|
const iconsByType = useMemo(() => ({
|
|
154
155
|
"error": IconException,
|
|
@@ -159,6 +160,12 @@ export const DialogContentNew = ({
|
|
|
159
160
|
const subscriptionCondition = useCallback(trigger => trigger.current !== null, []);
|
|
160
161
|
useTrapFocus(contentRef, undefined, contentRef, subscriptionCondition);
|
|
161
162
|
useEscape(contentRef, onClose || dummyOnClose, contentRef, subscriptionCondition);
|
|
163
|
+
useEffect(() => {
|
|
164
|
+
const previousElement = lastActiveOutsideElement.current;
|
|
165
|
+
return () => {
|
|
166
|
+
isFocusable(previousElement) && previousElement.focus();
|
|
167
|
+
};
|
|
168
|
+
}, []);
|
|
162
169
|
useEffect(() => {
|
|
163
170
|
if (contentRef.current === null) {
|
|
164
171
|
return;
|
|
@@ -46,6 +46,7 @@ export interface IPillExpandable extends IZenComponentProps {
|
|
|
46
46
|
loadingWidth?: number;
|
|
47
47
|
isBeta?: boolean;
|
|
48
48
|
hideCounterNumber?: boolean;
|
|
49
|
+
autoExpandChildren?: boolean;
|
|
49
50
|
}
|
|
50
51
|
type TPillExpandable = IPillExpandable & TProps;
|
|
51
52
|
export declare const PillExpandable: React.NamedExoticComponent<TPillExpandable>;
|
|
@@ -62,8 +62,10 @@ injectString("zh-TW", "View all", "\u6AA2\u8996\u5168\u90E8");
|
|
|
62
62
|
const MAX_PILLS_TO_DISPLAY_IN_POPUP = 2;
|
|
63
63
|
const PillContext = createContext({
|
|
64
64
|
level: 0,
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
onChildPillExpand: () => {},
|
|
66
|
+
onChildPillCollapse: () => {},
|
|
67
|
+
expandedChildPillIds: new Set(),
|
|
68
|
+
autoExpand: false
|
|
67
69
|
});
|
|
68
70
|
const paddingX = 26;
|
|
69
71
|
const paddingY = 52;
|
|
@@ -145,7 +147,8 @@ const PillExpandableBase = ({
|
|
|
145
147
|
secondaryIcon,
|
|
146
148
|
isBeta,
|
|
147
149
|
loadingWidth = 200,
|
|
148
|
-
hideCounterNumber
|
|
150
|
+
hideCounterNumber,
|
|
151
|
+
autoExpandChildren
|
|
149
152
|
}) => {
|
|
150
153
|
const popupId = useId();
|
|
151
154
|
const pillId = useId();
|
|
@@ -160,11 +163,11 @@ const PillExpandableBase = ({
|
|
|
160
163
|
mainAction,
|
|
161
164
|
getData
|
|
162
165
|
}));
|
|
163
|
-
const [
|
|
166
|
+
const [isPopupOpen, setIsPopupOpen] = useState(false);
|
|
164
167
|
const [isPopupContentReady, setIsPopupContentReady] = useState(false);
|
|
165
168
|
const [containerNode, setContainerNode] = useState(null);
|
|
166
169
|
useEffect(() => {
|
|
167
|
-
if (!
|
|
170
|
+
if (!isPopupOpen) {
|
|
168
171
|
setIsPopupContentReady(false);
|
|
169
172
|
return;
|
|
170
173
|
}
|
|
@@ -181,10 +184,10 @@ const PillExpandableBase = ({
|
|
|
181
184
|
return () => {
|
|
182
185
|
observer.unobserve(containerNode);
|
|
183
186
|
};
|
|
184
|
-
}, [
|
|
187
|
+
}, [isPopupOpen, containerNode]);
|
|
185
188
|
useEffect(() => {
|
|
186
189
|
const fetchData = function () {
|
|
187
|
-
if (!
|
|
190
|
+
if (!isPopupOpen) {
|
|
188
191
|
return;
|
|
189
192
|
}
|
|
190
193
|
if (isFunction(getData)) {
|
|
@@ -198,9 +201,9 @@ const PillExpandableBase = ({
|
|
|
198
201
|
}
|
|
199
202
|
};
|
|
200
203
|
fetchData();
|
|
201
|
-
}, [getData,
|
|
204
|
+
}, [getData, isPopupOpen, errorHandler]);
|
|
202
205
|
useEffect(() => {
|
|
203
|
-
if (!
|
|
206
|
+
if (!isPopupOpen) {
|
|
204
207
|
return;
|
|
205
208
|
}
|
|
206
209
|
getValue(description, setContent, "description", errorHandler);
|
|
@@ -208,25 +211,58 @@ const PillExpandableBase = ({
|
|
|
208
211
|
getValue(count, setContent, "count", errorHandler);
|
|
209
212
|
getValue(secondaryAction, setContent, "secondaryAction", errorHandler);
|
|
210
213
|
getValue(mainAction, setContent, "mainAction", errorHandler);
|
|
211
|
-
}, [content,
|
|
214
|
+
}, [content, isPopupOpen, description, date, count, secondaryAction, mainAction, errorHandler]);
|
|
212
215
|
const {
|
|
213
216
|
level,
|
|
214
|
-
|
|
215
|
-
|
|
217
|
+
expandedChildPillIds,
|
|
218
|
+
onChildPillExpand,
|
|
219
|
+
onChildPillCollapse,
|
|
220
|
+
autoExpand
|
|
216
221
|
} = useContext(PillContext);
|
|
217
222
|
const triggerRef = useRef(null);
|
|
218
223
|
const isChild = level !== 0;
|
|
219
|
-
const [
|
|
220
|
-
|
|
224
|
+
const [currentExpandedPills, setCurrentExpandedPills] = useState(new Set());
|
|
225
|
+
useEffect(() => {
|
|
226
|
+
if (isChild && autoExpand) {
|
|
227
|
+
onChildPillExpand(pillId);
|
|
228
|
+
}
|
|
229
|
+
}, [autoExpand, isChild, onChildPillExpand, pillId]);
|
|
230
|
+
const handlePopupToggle = useCallback(e => {
|
|
221
231
|
var _a;
|
|
222
232
|
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
233
|
+
setIsPopupOpen(!isPopupOpen);
|
|
234
|
+
isPopupOpen && ((_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus());
|
|
235
|
+
}, [isPopupOpen]);
|
|
236
|
+
const handleChildToggle = useCallback(e => {
|
|
237
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
238
|
+
const isExpanded = expandedChildPillIds.has(pillId);
|
|
239
|
+
if (isExpanded) {
|
|
240
|
+
onChildPillCollapse(pillId);
|
|
241
|
+
} else {
|
|
242
|
+
if (!autoExpand) {
|
|
243
|
+
// Prevent multiple child pills being expanded at the same time
|
|
244
|
+
expandedChildPillIds.forEach(pill => onChildPillCollapse(pill));
|
|
245
|
+
}
|
|
246
|
+
onChildPillExpand(pillId);
|
|
247
|
+
}
|
|
248
|
+
}, [expandedChildPillIds, pillId, autoExpand, onChildPillCollapse, onChildPillExpand]);
|
|
249
|
+
const addExpandedChild = useCallback(id => {
|
|
250
|
+
setCurrentExpandedPills(prev => {
|
|
251
|
+
const next = new Set(prev);
|
|
252
|
+
next.add(id);
|
|
253
|
+
return next;
|
|
254
|
+
});
|
|
255
|
+
}, []);
|
|
256
|
+
const removeExpandedChild = useCallback(id => {
|
|
257
|
+
setCurrentExpandedPills(prev => {
|
|
258
|
+
const next = new Set(prev);
|
|
259
|
+
next.delete(id);
|
|
260
|
+
return next;
|
|
261
|
+
});
|
|
262
|
+
}, []);
|
|
227
263
|
const onChange = useCallback(() => {
|
|
228
|
-
|
|
229
|
-
}, [
|
|
264
|
+
setIsPopupOpen(!isPopupOpen);
|
|
265
|
+
}, [isPopupOpen]);
|
|
230
266
|
const buttonMoreProps = useMemo(() => getButtonMoreProps(viewMoreAction), [viewMoreAction]);
|
|
231
267
|
const validChildren = useMemo(() => Children.toArray(children).filter(child => {
|
|
232
268
|
var _a;
|
|
@@ -244,28 +280,31 @@ const PillExpandableBase = ({
|
|
|
244
280
|
});
|
|
245
281
|
}
|
|
246
282
|
if (isChild) {
|
|
283
|
+
const isExpanded = expandedChildPillIds.has(pillId);
|
|
247
284
|
return _jsxs(PillContext.Provider, {
|
|
248
285
|
value: {
|
|
249
286
|
level: level + 1,
|
|
250
|
-
|
|
251
|
-
|
|
287
|
+
onChildPillExpand: addExpandedChild,
|
|
288
|
+
onChildPillCollapse: removeExpandedChild,
|
|
289
|
+
expandedChildPillIds: currentExpandedPills,
|
|
290
|
+
autoExpand: autoExpandChildren || false
|
|
252
291
|
},
|
|
253
292
|
children: [_jsx(PillExpandableSimple, {
|
|
254
293
|
icon: icon,
|
|
255
294
|
text: text,
|
|
256
|
-
expanded:
|
|
257
|
-
onExpand:
|
|
295
|
+
expanded: isExpanded,
|
|
296
|
+
onExpand: handleChildToggle,
|
|
258
297
|
expandAriaText: translate("Expand"),
|
|
259
298
|
type: type,
|
|
260
299
|
errorHandler: errorHandler
|
|
261
300
|
}), _jsx(PillContent, {
|
|
262
|
-
onActionClick:
|
|
301
|
+
onActionClick: handleChildToggle,
|
|
263
302
|
descriptionText: content.description,
|
|
264
303
|
date: content.date,
|
|
265
304
|
count: content.count,
|
|
266
305
|
mainAction: content.mainAction,
|
|
267
306
|
secondaryAction: content.secondaryAction,
|
|
268
|
-
isVisible:
|
|
307
|
+
isVisible: isExpanded,
|
|
269
308
|
errorHandler: errorHandler
|
|
270
309
|
})]
|
|
271
310
|
});
|
|
@@ -273,19 +312,21 @@ const PillExpandableBase = ({
|
|
|
273
312
|
return _jsx(PillContext.Provider, {
|
|
274
313
|
value: {
|
|
275
314
|
level: level + 1,
|
|
276
|
-
|
|
277
|
-
|
|
315
|
+
onChildPillExpand: addExpandedChild,
|
|
316
|
+
onChildPillCollapse: removeExpandedChild,
|
|
317
|
+
expandedChildPillIds: currentExpandedPills,
|
|
318
|
+
autoExpand: autoExpandChildren || false
|
|
278
319
|
},
|
|
279
320
|
children: _jsxs("div", {
|
|
280
321
|
className: classNames(["zen-status-pill", className || ""]),
|
|
281
322
|
"aria-haspopup": "true",
|
|
282
323
|
children: [_jsxs("div", {
|
|
283
324
|
className: "zen-status-pill__pill-container",
|
|
284
|
-
onClick:
|
|
325
|
+
onClick: handlePopupToggle,
|
|
285
326
|
children: [_jsx(PillExpandableSimple, {
|
|
286
327
|
icon: icon,
|
|
287
328
|
text: text,
|
|
288
|
-
expanded:
|
|
329
|
+
expanded: isPopupOpen,
|
|
289
330
|
expandAriaText: translate("Expand"),
|
|
290
331
|
ref: triggerRef,
|
|
291
332
|
type: type,
|
|
@@ -307,7 +348,7 @@ const PillExpandableBase = ({
|
|
|
307
348
|
onOpenChange: onChange,
|
|
308
349
|
paddingX: paddingX,
|
|
309
350
|
paddingY: paddingY,
|
|
310
|
-
isOpen:
|
|
351
|
+
isOpen: isPopupOpen,
|
|
311
352
|
triggerRef: triggerRef,
|
|
312
353
|
alignmentsFn: alignments,
|
|
313
354
|
children: _jsx("div", {
|
|
@@ -321,14 +362,14 @@ const PillExpandableBase = ({
|
|
|
321
362
|
icon: icon,
|
|
322
363
|
text: text,
|
|
323
364
|
expanded: true,
|
|
324
|
-
onExpand:
|
|
365
|
+
onExpand: handlePopupToggle,
|
|
325
366
|
expandAriaText: translate("Expand"),
|
|
326
367
|
type: type,
|
|
327
368
|
errorHandler: errorHandler,
|
|
328
369
|
isBeta: isBeta
|
|
329
370
|
})
|
|
330
371
|
}), _jsx(PillContent, {
|
|
331
|
-
onActionClick:
|
|
372
|
+
onActionClick: handlePopupToggle,
|
|
332
373
|
descriptionText: content.description,
|
|
333
374
|
date: content.date,
|
|
334
375
|
count: content.count,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { IFormFieldComponent } from "../formField/
|
|
2
|
+
import { IFormFieldComponent } from "../formField/types";
|
|
3
3
|
import { IRadioGroupRawDefault, TRadioGroupRaw } from "./types";
|
|
4
4
|
import "./radioGroupRaw.less";
|
|
5
5
|
export interface IRadioGroupRaw extends IRadioGroupRawDefault {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IFormFieldComponent } from "../formField/
|
|
2
|
+
import { IFormFieldComponent } from "../formField/types";
|
|
3
3
|
import { IRangeRawDefault, TRangeRaw } from "./types";
|
|
4
4
|
import "./rangeRaw.less";
|
|
5
5
|
export type { IRangeValuesRaw } from "./types";
|
package/esm/summary/summary.js
CHANGED
|
@@ -27,7 +27,7 @@ export var SummaryTileSize;
|
|
|
27
27
|
SummaryTileSize["Medium"] = "medium";
|
|
28
28
|
})(SummaryTileSize || (SummaryTileSize = {}));
|
|
29
29
|
export const SummaryTileDisplayName = "SummaryTile";
|
|
30
|
-
export const SummaryTile = ({ className, children, size = SummaryTileSize.Small, title, tileType = SummaryTileType.Default, id, onClick, tooltipText, tooltipAlignment = "top"
|
|
30
|
+
export const SummaryTile = ({ className, children, size = SummaryTileSize.Small, title, tileType = SummaryTileType.Default, id, onClick, tooltipText, tooltipAlignment = "top" }) => {
|
|
31
31
|
const generatedId = React.useId();
|
|
32
32
|
const eltId = id || generatedId;
|
|
33
33
|
const memoizedGetIconId = React.useMemo(() => {
|
|
@@ -57,6 +57,6 @@ export const SummaryTile = ({ className, children, size = SummaryTileSize.Small,
|
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
const Tag = onClick ? "button" : "div";
|
|
60
|
-
return _jsxs(Tag, Object.assign({}, componentProps, { children: [_jsxs("div", { className: "zen-summary-tile__title-block", children: [_jsx("div", { className: "zen-summary-tile__title-text zen-ellipsis heading-05", children: title }), tooltipText ? _jsx(Tooltip, { alignment: tooltipAlignment,
|
|
60
|
+
return _jsxs(Tag, Object.assign({}, componentProps, { children: [_jsxs("div", { className: "zen-summary-tile__title-block", children: [_jsx("div", { className: "zen-summary-tile__title-text zen-ellipsis heading-05", children: title }), tooltipText ? _jsx(Tooltip, { alignment: tooltipAlignment, trigger: _jsx(SummaryTileTrigger, { icon: memoizedGetIconId }), children: tooltipText }) : null] }), _jsx("div", { className: "zen-summary-tile__content", children: children })] }));
|
|
61
61
|
};
|
|
62
62
|
SummaryTile.displayName = SummaryTileDisplayName;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IEmptySearchList } from "../../dataGrid/emptySearchList/emptySearchList";
|
|
2
|
-
export interface ITableEmpty extends Pick<IEmptySearchList, "description" | "image" | "className"> {
|
|
2
|
+
export interface ITableEmpty extends Pick<IEmptySearchList, "description" | "image" | "className" | "children"> {
|
|
3
3
|
}
|
|
4
4
|
export declare const TableEmpty: {
|
|
5
5
|
(_: ITableEmpty): import("react/jsx-runtime").JSX.Element;
|
|
@@ -68,7 +68,7 @@ export const useTableChildren = (children, isMobile, selected, allSelected, clea
|
|
|
68
68
|
description: child.props.description,
|
|
69
69
|
image: child.props.image,
|
|
70
70
|
className: child.props.className
|
|
71
|
-
}));
|
|
71
|
+
}, child.props.children));
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
if (isChildElement(child, TableDetailPanel.displayName)) {
|