@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
|
@@ -70,8 +70,10 @@ const reactHelpers_1 = require("../commonHelpers/reactHelpers/reactHelpers");
|
|
|
70
70
|
const MAX_PILLS_TO_DISPLAY_IN_POPUP = 2;
|
|
71
71
|
const PillContext = (0, react_1.createContext)({
|
|
72
72
|
level: 0,
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
onChildPillExpand: () => {},
|
|
74
|
+
onChildPillCollapse: () => {},
|
|
75
|
+
expandedChildPillIds: new Set(),
|
|
76
|
+
autoExpand: false
|
|
75
77
|
});
|
|
76
78
|
const paddingX = 26;
|
|
77
79
|
const paddingY = 52;
|
|
@@ -153,7 +155,8 @@ const PillExpandableBase = ({
|
|
|
153
155
|
secondaryIcon,
|
|
154
156
|
isBeta,
|
|
155
157
|
loadingWidth = 200,
|
|
156
|
-
hideCounterNumber
|
|
158
|
+
hideCounterNumber,
|
|
159
|
+
autoExpandChildren
|
|
157
160
|
}) => {
|
|
158
161
|
const popupId = (0, react_1.useId)();
|
|
159
162
|
const pillId = (0, react_1.useId)();
|
|
@@ -168,11 +171,11 @@ const PillExpandableBase = ({
|
|
|
168
171
|
mainAction,
|
|
169
172
|
getData
|
|
170
173
|
}));
|
|
171
|
-
const [
|
|
174
|
+
const [isPopupOpen, setIsPopupOpen] = (0, react_1.useState)(false);
|
|
172
175
|
const [isPopupContentReady, setIsPopupContentReady] = (0, react_1.useState)(false);
|
|
173
176
|
const [containerNode, setContainerNode] = (0, react_1.useState)(null);
|
|
174
177
|
(0, react_1.useEffect)(() => {
|
|
175
|
-
if (!
|
|
178
|
+
if (!isPopupOpen) {
|
|
176
179
|
setIsPopupContentReady(false);
|
|
177
180
|
return;
|
|
178
181
|
}
|
|
@@ -189,10 +192,10 @@ const PillExpandableBase = ({
|
|
|
189
192
|
return () => {
|
|
190
193
|
observer.unobserve(containerNode);
|
|
191
194
|
};
|
|
192
|
-
}, [
|
|
195
|
+
}, [isPopupOpen, containerNode]);
|
|
193
196
|
(0, react_1.useEffect)(() => {
|
|
194
197
|
const fetchData = function () {
|
|
195
|
-
if (!
|
|
198
|
+
if (!isPopupOpen) {
|
|
196
199
|
return;
|
|
197
200
|
}
|
|
198
201
|
if ((0, reactHelpers_1.isFunction)(getData)) {
|
|
@@ -206,9 +209,9 @@ const PillExpandableBase = ({
|
|
|
206
209
|
}
|
|
207
210
|
};
|
|
208
211
|
fetchData();
|
|
209
|
-
}, [getData,
|
|
212
|
+
}, [getData, isPopupOpen, errorHandler]);
|
|
210
213
|
(0, react_1.useEffect)(() => {
|
|
211
|
-
if (!
|
|
214
|
+
if (!isPopupOpen) {
|
|
212
215
|
return;
|
|
213
216
|
}
|
|
214
217
|
getValue(description, setContent, "description", errorHandler);
|
|
@@ -216,25 +219,58 @@ const PillExpandableBase = ({
|
|
|
216
219
|
getValue(count, setContent, "count", errorHandler);
|
|
217
220
|
getValue(secondaryAction, setContent, "secondaryAction", errorHandler);
|
|
218
221
|
getValue(mainAction, setContent, "mainAction", errorHandler);
|
|
219
|
-
}, [content,
|
|
222
|
+
}, [content, isPopupOpen, description, date, count, secondaryAction, mainAction, errorHandler]);
|
|
220
223
|
const {
|
|
221
224
|
level,
|
|
222
|
-
|
|
223
|
-
|
|
225
|
+
expandedChildPillIds,
|
|
226
|
+
onChildPillExpand,
|
|
227
|
+
onChildPillCollapse,
|
|
228
|
+
autoExpand
|
|
224
229
|
} = (0, react_1.useContext)(PillContext);
|
|
225
230
|
const triggerRef = (0, react_1.useRef)(null);
|
|
226
231
|
const isChild = level !== 0;
|
|
227
|
-
const [
|
|
228
|
-
|
|
232
|
+
const [currentExpandedPills, setCurrentExpandedPills] = (0, react_1.useState)(new Set());
|
|
233
|
+
(0, react_1.useEffect)(() => {
|
|
234
|
+
if (isChild && autoExpand) {
|
|
235
|
+
onChildPillExpand(pillId);
|
|
236
|
+
}
|
|
237
|
+
}, [autoExpand, isChild, onChildPillExpand, pillId]);
|
|
238
|
+
const handlePopupToggle = (0, react_1.useCallback)(e => {
|
|
229
239
|
var _a;
|
|
230
240
|
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
241
|
+
setIsPopupOpen(!isPopupOpen);
|
|
242
|
+
isPopupOpen && ((_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus());
|
|
243
|
+
}, [isPopupOpen]);
|
|
244
|
+
const handleChildToggle = (0, react_1.useCallback)(e => {
|
|
245
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
246
|
+
const isExpanded = expandedChildPillIds.has(pillId);
|
|
247
|
+
if (isExpanded) {
|
|
248
|
+
onChildPillCollapse(pillId);
|
|
249
|
+
} else {
|
|
250
|
+
if (!autoExpand) {
|
|
251
|
+
// Prevent multiple child pills being expanded at the same time
|
|
252
|
+
expandedChildPillIds.forEach(pill => onChildPillCollapse(pill));
|
|
253
|
+
}
|
|
254
|
+
onChildPillExpand(pillId);
|
|
255
|
+
}
|
|
256
|
+
}, [expandedChildPillIds, pillId, autoExpand, onChildPillCollapse, onChildPillExpand]);
|
|
257
|
+
const addExpandedChild = (0, react_1.useCallback)(id => {
|
|
258
|
+
setCurrentExpandedPills(prev => {
|
|
259
|
+
const next = new Set(prev);
|
|
260
|
+
next.add(id);
|
|
261
|
+
return next;
|
|
262
|
+
});
|
|
263
|
+
}, []);
|
|
264
|
+
const removeExpandedChild = (0, react_1.useCallback)(id => {
|
|
265
|
+
setCurrentExpandedPills(prev => {
|
|
266
|
+
const next = new Set(prev);
|
|
267
|
+
next.delete(id);
|
|
268
|
+
return next;
|
|
269
|
+
});
|
|
270
|
+
}, []);
|
|
235
271
|
const onChange = (0, react_1.useCallback)(() => {
|
|
236
|
-
|
|
237
|
-
}, [
|
|
272
|
+
setIsPopupOpen(!isPopupOpen);
|
|
273
|
+
}, [isPopupOpen]);
|
|
238
274
|
const buttonMoreProps = (0, react_1.useMemo)(() => (0, getProps_1.getButtonMoreProps)(viewMoreAction), [viewMoreAction]);
|
|
239
275
|
const validChildren = (0, react_1.useMemo)(() => react_1.Children.toArray(children).filter(child => {
|
|
240
276
|
var _a;
|
|
@@ -252,28 +288,31 @@ const PillExpandableBase = ({
|
|
|
252
288
|
});
|
|
253
289
|
}
|
|
254
290
|
if (isChild) {
|
|
291
|
+
const isExpanded = expandedChildPillIds.has(pillId);
|
|
255
292
|
return (0, jsx_runtime_1.jsxs)(PillContext.Provider, {
|
|
256
293
|
value: {
|
|
257
294
|
level: level + 1,
|
|
258
|
-
|
|
259
|
-
|
|
295
|
+
onChildPillExpand: addExpandedChild,
|
|
296
|
+
onChildPillCollapse: removeExpandedChild,
|
|
297
|
+
expandedChildPillIds: currentExpandedPills,
|
|
298
|
+
autoExpand: autoExpandChildren || false
|
|
260
299
|
},
|
|
261
300
|
children: [(0, jsx_runtime_1.jsx)(pillExpandableSimple_1.PillExpandableSimple, {
|
|
262
301
|
icon: icon,
|
|
263
302
|
text: text,
|
|
264
|
-
expanded:
|
|
265
|
-
onExpand:
|
|
303
|
+
expanded: isExpanded,
|
|
304
|
+
onExpand: handleChildToggle,
|
|
266
305
|
expandAriaText: translate("Expand"),
|
|
267
306
|
type: type,
|
|
268
307
|
errorHandler: errorHandler
|
|
269
308
|
}), (0, jsx_runtime_1.jsx)(pillContent_1.PillContent, {
|
|
270
|
-
onActionClick:
|
|
309
|
+
onActionClick: handleChildToggle,
|
|
271
310
|
descriptionText: content.description,
|
|
272
311
|
date: content.date,
|
|
273
312
|
count: content.count,
|
|
274
313
|
mainAction: content.mainAction,
|
|
275
314
|
secondaryAction: content.secondaryAction,
|
|
276
|
-
isVisible:
|
|
315
|
+
isVisible: isExpanded,
|
|
277
316
|
errorHandler: errorHandler
|
|
278
317
|
})]
|
|
279
318
|
});
|
|
@@ -281,19 +320,21 @@ const PillExpandableBase = ({
|
|
|
281
320
|
return (0, jsx_runtime_1.jsx)(PillContext.Provider, {
|
|
282
321
|
value: {
|
|
283
322
|
level: level + 1,
|
|
284
|
-
|
|
285
|
-
|
|
323
|
+
onChildPillExpand: addExpandedChild,
|
|
324
|
+
onChildPillCollapse: removeExpandedChild,
|
|
325
|
+
expandedChildPillIds: currentExpandedPills,
|
|
326
|
+
autoExpand: autoExpandChildren || false
|
|
286
327
|
},
|
|
287
328
|
children: (0, jsx_runtime_1.jsxs)("div", {
|
|
288
329
|
className: (0, classNames_1.classNames)(["zen-status-pill", className || ""]),
|
|
289
330
|
"aria-haspopup": "true",
|
|
290
331
|
children: [(0, jsx_runtime_1.jsxs)("div", {
|
|
291
332
|
className: "zen-status-pill__pill-container",
|
|
292
|
-
onClick:
|
|
333
|
+
onClick: handlePopupToggle,
|
|
293
334
|
children: [(0, jsx_runtime_1.jsx)(pillExpandableSimple_1.PillExpandableSimple, {
|
|
294
335
|
icon: icon,
|
|
295
336
|
text: text,
|
|
296
|
-
expanded:
|
|
337
|
+
expanded: isPopupOpen,
|
|
297
338
|
expandAriaText: translate("Expand"),
|
|
298
339
|
ref: triggerRef,
|
|
299
340
|
type: type,
|
|
@@ -315,7 +356,7 @@ const PillExpandableBase = ({
|
|
|
315
356
|
onOpenChange: onChange,
|
|
316
357
|
paddingX: paddingX,
|
|
317
358
|
paddingY: paddingY,
|
|
318
|
-
isOpen:
|
|
359
|
+
isOpen: isPopupOpen,
|
|
319
360
|
triggerRef: triggerRef,
|
|
320
361
|
alignmentsFn: pillExpandableAlignments_1.alignments,
|
|
321
362
|
children: (0, jsx_runtime_1.jsx)("div", {
|
|
@@ -329,14 +370,14 @@ const PillExpandableBase = ({
|
|
|
329
370
|
icon: icon,
|
|
330
371
|
text: text,
|
|
331
372
|
expanded: true,
|
|
332
|
-
onExpand:
|
|
373
|
+
onExpand: handlePopupToggle,
|
|
333
374
|
expandAriaText: translate("Expand"),
|
|
334
375
|
type: type,
|
|
335
376
|
errorHandler: errorHandler,
|
|
336
377
|
isBeta: isBeta
|
|
337
378
|
})
|
|
338
379
|
}), (0, jsx_runtime_1.jsx)(pillContent_1.PillContent, {
|
|
339
|
-
onActionClick:
|
|
380
|
+
onActionClick: handlePopupToggle,
|
|
340
381
|
descriptionText: content.description,
|
|
341
382
|
date: content.date,
|
|
342
383
|
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/dist/summary/summary.js
CHANGED
|
@@ -72,7 +72,6 @@ const Summary = ({
|
|
|
72
72
|
children: title
|
|
73
73
|
}), tooltip && (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, {
|
|
74
74
|
alignment: "top",
|
|
75
|
-
size: "auto",
|
|
76
75
|
trigger: (0, jsx_runtime_1.jsx)("div", {
|
|
77
76
|
className: "zen-summary__trigger",
|
|
78
77
|
children: (0, jsx_runtime_1.jsx)(iconInfoCircle_1.IconInfoCircle, {
|
|
@@ -53,7 +53,7 @@ var SummaryTileSize;
|
|
|
53
53
|
SummaryTileSize["Medium"] = "medium";
|
|
54
54
|
})(SummaryTileSize || (exports.SummaryTileSize = SummaryTileSize = {}));
|
|
55
55
|
exports.SummaryTileDisplayName = "SummaryTile";
|
|
56
|
-
const SummaryTile = ({ className, children, size = SummaryTileSize.Small, title, tileType = SummaryTileType.Default, id, onClick, tooltipText, tooltipAlignment = "top"
|
|
56
|
+
const SummaryTile = ({ className, children, size = SummaryTileSize.Small, title, tileType = SummaryTileType.Default, id, onClick, tooltipText, tooltipAlignment = "top" }) => {
|
|
57
57
|
const generatedId = React.useId();
|
|
58
58
|
const eltId = id || generatedId;
|
|
59
59
|
const memoizedGetIconId = React.useMemo(() => {
|
|
@@ -83,7 +83,7 @@ const SummaryTile = ({ className, children, size = SummaryTileSize.Small, title,
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
const Tag = onClick ? "button" : "div";
|
|
86
|
-
return (0, jsx_runtime_1.jsxs)(Tag, Object.assign({}, componentProps, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "zen-summary-tile__title-block", children: [(0, jsx_runtime_1.jsx)("div", { className: "zen-summary-tile__title-text zen-ellipsis heading-05", children: title }), tooltipText ? (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { alignment: tooltipAlignment,
|
|
86
|
+
return (0, jsx_runtime_1.jsxs)(Tag, Object.assign({}, componentProps, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "zen-summary-tile__title-block", children: [(0, jsx_runtime_1.jsx)("div", { className: "zen-summary-tile__title-text zen-ellipsis heading-05", children: title }), tooltipText ? (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { alignment: tooltipAlignment, trigger: (0, jsx_runtime_1.jsx)(summaryTileTrigger_1.SummaryTileTrigger, { icon: memoizedGetIconId }), children: tooltipText }) : null] }), (0, jsx_runtime_1.jsx)("div", { className: "zen-summary-tile__content", children: children })] }));
|
|
87
87
|
};
|
|
88
88
|
exports.SummaryTile = SummaryTile;
|
|
89
89
|
exports.SummaryTile.displayName = exports.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;
|
|
@@ -71,7 +71,7 @@ const useTableChildren = (children, isMobile, selected, allSelected, clearSelect
|
|
|
71
71
|
description: child.props.description,
|
|
72
72
|
image: child.props.image,
|
|
73
73
|
className: child.props.className
|
|
74
|
-
}));
|
|
74
|
+
}, child.props.children));
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
if (isChildElement(child, tableDetailPanel_1.TableDetailPanel.displayName)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IFormFieldComponent } from "../formField/
|
|
2
|
+
import { IFormFieldComponent } from "../formField/types";
|
|
3
3
|
import { ITimePickerRawDefault, TTimePickerRaw } from "./types";
|
|
4
4
|
import "./timePickerRaw.less";
|
|
5
5
|
export interface ITimePickerRaw extends ITimePickerRawDefault {
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import { FC, PropsWithChildren, ReactElement } from "react";
|
|
1
|
+
import React, { FC, PropsWithChildren, ReactElement } from "react";
|
|
2
2
|
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
3
|
-
import { TAlignment } from "../absolute/absolute";
|
|
4
3
|
import "./tooltip.less";
|
|
4
|
+
import { TAlignment } from "../absolute/absolute";
|
|
5
5
|
export type TooltipSize = "large" | "small" | "auto";
|
|
6
6
|
export type TMobileView = "default" | "mobileSheet";
|
|
7
7
|
interface ITooltip extends IZenComponentProps {
|
|
8
|
-
trigger
|
|
9
|
-
|
|
8
|
+
trigger?: ReactElement<PropsWithChildren & {
|
|
9
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
10
|
+
}>;
|
|
10
11
|
alignment?: TAlignment;
|
|
12
|
+
triggerClassName?: string;
|
|
13
|
+
mobileTitle?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated
|
|
16
|
+
* @param mobileSheetTitle - will be removed in the next major release
|
|
17
|
+
* @param mobileView - will be removed in the next major release
|
|
18
|
+
* @param size - will be removed in the next major release
|
|
19
|
+
* @param padding - will be removed in the next major release
|
|
20
|
+
*/
|
|
21
|
+
size?: TooltipSize;
|
|
11
22
|
padding?: number;
|
|
12
23
|
mobileView?: TMobileView;
|
|
13
24
|
mobileSheetTitle?: ReactElement | string;
|