@geotab/zenith 3.3.0 → 3.4.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 +18 -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/stepperRaw/stepperRaw.d.ts +4 -1
- package/dist/stepperRaw/stepperRaw.js +2 -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/textInputRaw/textInputRaw.d.ts +4 -1
- package/dist/textInputRaw/textInputRaw.js +1 -0
- package/dist/timePickerRaw/timePickerRaw.d.ts +1 -1
- package/dist/tooltip/tooltip.d.ts +24 -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/stepperRaw/stepperRaw.d.ts +4 -1
- package/esm/stepperRaw/stepperRaw.js +2 -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/textInputRaw/textInputRaw.d.ts +4 -1
- package/esm/textInputRaw/textInputRaw.js +1 -0
- package/esm/timePickerRaw/timePickerRaw.d.ts +1 -1
- package/esm/tooltip/tooltip.d.ts +24 -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/README.md
CHANGED
|
@@ -40,6 +40,24 @@ Zenith library provides components defined in Zenith Design System. It includes
|
|
|
40
40
|
|
|
41
41
|
## Change log
|
|
42
42
|
|
|
43
|
+
### 3.4.0
|
|
44
|
+
|
|
45
|
+
* Integrate Tooltip with Zenith components
|
|
46
|
+
* Add `tall` list variation
|
|
47
|
+
* Fix Layout min-height issue
|
|
48
|
+
* Add EmptyState component
|
|
49
|
+
* Update fr and es trantions
|
|
50
|
+
* Add ExpandablePill `autoExpandChildren` property
|
|
51
|
+
* Mobile Table alignment fix
|
|
52
|
+
* Modal close button style fix
|
|
53
|
+
* Accessibility issues fixes
|
|
54
|
+
* Add year to date option to daterange
|
|
55
|
+
* FormField refactoring
|
|
56
|
+
* Update documentation for images
|
|
57
|
+
* Zenith stacked bar chart calculation fix
|
|
58
|
+
* Update Alerts animation
|
|
59
|
+
* FormField build fixes
|
|
60
|
+
|
|
43
61
|
### 3.3.0
|
|
44
62
|
|
|
45
63
|
**🎉 Introducing Detail Panel in Table**
|
|
@@ -187,7 +187,7 @@ injectString("cs", "GroupCompanyId", "Skupina spole\u010Dnosti");
|
|
|
187
187
|
injectString("da-DK", "GroupCompanyId", "Virksomhedsgruppe");
|
|
188
188
|
injectString("de", "GroupCompanyId", "Unternehmensgruppe");
|
|
189
189
|
injectString("en", "GroupCompanyId", "Company group");
|
|
190
|
-
injectString("es", "GroupCompanyId", "Grupo
|
|
190
|
+
injectString("es", "GroupCompanyId", "Grupo Empresa");
|
|
191
191
|
injectString("fi-FI", "GroupCompanyId", "Yritysryhm\xE4");
|
|
192
192
|
injectString("fr", "GroupCompanyId", "Groupe Entreprise");
|
|
193
193
|
injectString("fr-FR", "GroupCompanyId", "Groupe Entreprise");
|
|
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
});
|
|
9
9
|
exports.TRANSLATIONS = exports.AdvancedGroupsFilterSectionTooltip = void 0;
|
|
10
10
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
|
-
const react_1 = require("react");
|
|
12
11
|
const tooltip_1 = require("../tooltip/tooltip");
|
|
13
12
|
injectString("cs", "Use multiple operators when searching for a specific group. For example, filtering for assets that belong to the Tractor group and the Toronto group displays a list of tractors that belong to the Toronto branch.", "P\u0159i hled\xE1n\xED konkr\xE9tn\xED skupiny pou\u017Eijte v\xEDce oper\xE1tor\u016F. Nap\u0159\xEDklad p\u0159i filtrov\xE1n\xED prost\u0159edk\u016F, kter\xE9 spadaj\xED do skupiny Traktory, skupina Toronto zobraz\xED seznam traktor\u016F, kter\xE9 pat\u0159\xED do pobo\u010Dky v Torontu.");
|
|
14
13
|
injectString("da-DK", "Use multiple operators when searching for a specific group. For example, filtering for assets that belong to the Tractor group and the Toronto group displays a list of tractors that belong to the Toronto branch.", "Brug flere operatorer, n\xE5r du s\xF8ger efter en bestemt gruppe. Hvis du f.eks. filtrerer efter aktiver, der tilh\xF8rer gruppen Traktor og Toronto-gruppen, vises en liste over traktorer, der tilh\xF8rer Toronto-grenen.");
|
|
@@ -34,58 +33,20 @@ injectString("th", "Use multiple operators when searching for a specific group.
|
|
|
34
33
|
injectString("tr", "Use multiple operators when searching for a specific group. For example, filtering for assets that belong to the Tractor group and the Toronto group displays a list of tractors that belong to the Toronto branch.", "Belirli bir grubu ararken birden \xE7ok operat\xF6r kullan\u0131n. \xD6rne\u011Fin, Trakt\xF6r grubuna ve Toronto grubuna ait varl\u0131klar i\xE7in filtreleme yap\u0131l\u0131rken Toronto \u015Fubesine ait trakt\xF6rlerin listesi g\xF6r\xFCnt\xFClenir.");
|
|
35
34
|
injectString("zh-Hans", "Use multiple operators when searching for a specific group. For example, filtering for assets that belong to the Tractor group and the Toronto group displays a list of tractors that belong to the Toronto branch.", "\u641C\u7D22\u7279\u5B9A\u7EC4\u65F6\uFF0C\u53EF\u4EE5\u4F7F\u7528\u591A\u4E2A\u8FD0\u7B97\u7B26\u3002\u4F8B\u5982\uFF0C\u7B5B\u9009\u5C5E\u4E8E\u201C\u7275\u5F15\u8F66\u201D\u7EC4\u548C\u201C\u591A\u4F26\u591A\u201D\u7EC4\u7684\u8D44\u4EA7\uFF0C\u5C31\u4F1A\u663E\u793A\u5C5E\u4E8E\u591A\u4F26\u591A\u5206\u652F\u7684\u7275\u5F15\u8F66\u5217\u8868\u3002");
|
|
36
35
|
injectString("zh-TW", "Use multiple operators when searching for a specific group. For example, filtering for assets that belong to the Tractor group and the Toronto group displays a list of tractors that belong to the Toronto branch.", "\u641C\u5C0B\u7279\u5B9A\u7FA4\u7D44\u6642\uFF0C\u8ACB\u4F7F\u7528\u591A\u500B\u904B\u7B97\u5B50\u3002\u4F8B\u5982\uFF0C\u82E5\u7BE9\u9078\u5C6C\u65BC\u727D\u5F15\u6A5F\u7FA4\u7D44\u548C\u591A\u502B\u591A\u7FA4\u7D44\u7684\u8CC7\u7522\uFF0C\u5247\u6703\u986F\u793A\u5C6C\u65BC\u591A\u502B\u591A\u5206\u516C\u53F8\u7684\u727D\u5F15\u6A5F\u6E05\u55AE\u3002");
|
|
37
|
-
injectString("cs", "Information", "Informace");
|
|
38
|
-
injectString("da-DK", "Information", "Information");
|
|
39
|
-
injectString("de", "Information", "Information");
|
|
40
|
-
injectString("en", "Information", "Information");
|
|
41
|
-
injectString("es", "Information", "Informaci\xF3n");
|
|
42
|
-
injectString("fi-FI", "Information", "Tiedot");
|
|
43
|
-
injectString("fr", "Information", "Renseignements");
|
|
44
|
-
injectString("fr-FR", "Information", "Informations");
|
|
45
|
-
injectString("hu-HU", "Information", "Inform\xE1ci\xF3");
|
|
46
|
-
injectString("id", "Information", "Informasi");
|
|
47
|
-
injectString("it", "Information", "Informazioni");
|
|
48
|
-
injectString("ja", "Information", "\u60C5\u5831");
|
|
49
|
-
injectString("ko-KR", "Information", "\uC815\uBCF4");
|
|
50
|
-
injectString("ms", "Information", "Maklumat");
|
|
51
|
-
injectString("nb-NO", "Information", "Informasjon");
|
|
52
|
-
injectString("nl", "Information", "Informatie");
|
|
53
|
-
injectString("pl", "Information", "Informacje");
|
|
54
|
-
injectString("pt-BR", "Information", "Informa\xE7\xF5es");
|
|
55
|
-
injectString("sk-SK", "Information", "Inform\xE1cie");
|
|
56
|
-
injectString("sv", "Information", "Information");
|
|
57
|
-
injectString("th", "Information", "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25");
|
|
58
|
-
injectString("tr", "Information", "Bilgi");
|
|
59
|
-
injectString("zh-Hans", "Information", "\u4FE1\u606F");
|
|
60
|
-
injectString("zh-TW", "Information", "\u8CC7\u8A0A");
|
|
61
|
-
const iconInfoCircle_1 = require("../icons/iconInfoCircle");
|
|
62
36
|
const useLanguage_1 = require("../utils/localization/useLanguage");
|
|
63
37
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
64
38
|
const AdvancedGroupsFilterSectionTooltip = ({
|
|
65
39
|
className = "",
|
|
66
|
-
size = "auto",
|
|
67
40
|
alignment = "top",
|
|
68
41
|
text
|
|
69
42
|
}) => {
|
|
70
43
|
const {
|
|
71
44
|
translate
|
|
72
45
|
} = (0, useLanguage_1.useLanguage)();
|
|
73
|
-
const triggerRef = (0, react_1.useRef)(null);
|
|
74
46
|
const defaultTooltipText = translate("Use multiple operators when searching for a specific group. For example, filtering for assets that belong to the Tractor group and the Toronto group displays a list of tractors that belong to the Toronto branch.");
|
|
75
47
|
return (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, {
|
|
76
48
|
className: (0, classNames_1.classNames)(["zen-advanced-groups-filter-section-tooltip__item", className || ""]),
|
|
77
|
-
size: size,
|
|
78
49
|
alignment: alignment,
|
|
79
|
-
trigger: (0, jsx_runtime_1.jsx)("button", {
|
|
80
|
-
type: "button",
|
|
81
|
-
"aria-label": translate("Information"),
|
|
82
|
-
className: "zen-advanced-groups-filter-section-tooltip__trigger",
|
|
83
|
-
ref: triggerRef,
|
|
84
|
-
children: (0, jsx_runtime_1.jsx)(iconInfoCircle_1.IconInfoCircle, {
|
|
85
|
-
className: "zen-advanced-groups-filter-section-tooltip__trigger-icon",
|
|
86
|
-
size: "large"
|
|
87
|
-
})
|
|
88
|
-
}),
|
|
89
50
|
children: text || defaultTooltipText
|
|
90
51
|
});
|
|
91
52
|
};
|
|
@@ -19,7 +19,8 @@ const AlertAnimation = ({ id, children, isOpen, animation }) => {
|
|
|
19
19
|
], {
|
|
20
20
|
duration: 300,
|
|
21
21
|
iterations: 1,
|
|
22
|
-
delay: 0
|
|
22
|
+
delay: 0,
|
|
23
|
+
easing: "ease-in-out"
|
|
23
24
|
}).onfinish = () => {
|
|
24
25
|
finishAlertAnimation(id);
|
|
25
26
|
};
|
|
@@ -32,7 +33,8 @@ const AlertAnimation = ({ id, children, isOpen, animation }) => {
|
|
|
32
33
|
], {
|
|
33
34
|
duration: 300,
|
|
34
35
|
iterations: 1,
|
|
35
|
-
delay: 0
|
|
36
|
+
delay: 0,
|
|
37
|
+
easing: "ease-in-out"
|
|
36
38
|
}).onfinish = () => {
|
|
37
39
|
finishAlertAnimation(id);
|
|
38
40
|
};
|
|
@@ -46,7 +48,8 @@ const AlertAnimation = ({ id, children, isOpen, animation }) => {
|
|
|
46
48
|
duration: 300,
|
|
47
49
|
iterations: 1,
|
|
48
50
|
delay: 0,
|
|
49
|
-
fill: "forwards"
|
|
51
|
+
fill: "forwards",
|
|
52
|
+
easing: "ease-in-out"
|
|
50
53
|
}).onfinish = () => {
|
|
51
54
|
finishAlertAnimation(id);
|
|
52
55
|
};
|
|
@@ -58,7 +61,8 @@ const AlertAnimation = ({ id, children, isOpen, animation }) => {
|
|
|
58
61
|
], {
|
|
59
62
|
duration: 300,
|
|
60
63
|
iterations: 1,
|
|
61
|
-
delay: 0
|
|
64
|
+
delay: 0,
|
|
65
|
+
easing: "ease-in-out"
|
|
62
66
|
}).onfinish = () => {
|
|
63
67
|
finishAlertAnimation(id);
|
|
64
68
|
};
|
package/dist/card/card.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ import { IActions } from "./components/actions";
|
|
|
6
6
|
import { IContent } from "./components/content";
|
|
7
7
|
import "./card.less";
|
|
8
8
|
import { TAlignment } from "../absolute/absolute";
|
|
9
|
-
import { TooltipSize } from "../tooltip/tooltip";
|
|
10
9
|
import { IZenComponentProps, IZenFormLayoutItem, IZenGridItem } from "../commonHelpers/zenComponent";
|
|
11
10
|
import { ICardButton } from "./components/cardButton/cardButton";
|
|
12
11
|
import { IIcon } from "../icons/icon";
|
|
12
|
+
import { TooltipSize } from "../tooltip/tooltip";
|
|
13
13
|
import { IToggleButton } from "../toggleButton/toggleButton";
|
|
14
14
|
export declare const DEFAULT_CARD_SIZE: TContainerSize;
|
|
15
15
|
export interface ICard extends IZenComponentProps, IZenGridItem, IZenFormLayoutItem {
|
package/dist/card/card.js
CHANGED
|
@@ -116,7 +116,6 @@ props => {
|
|
|
116
116
|
onClick,
|
|
117
117
|
cardContentClasses = "",
|
|
118
118
|
tooltipAlignment,
|
|
119
|
-
tooltipSize,
|
|
120
119
|
fullWidth,
|
|
121
120
|
scrollableContent = true,
|
|
122
121
|
autoHeight = false,
|
|
@@ -290,8 +289,7 @@ props => {
|
|
|
290
289
|
status: status,
|
|
291
290
|
isMobile: isMobile,
|
|
292
291
|
tooltip: tooltip,
|
|
293
|
-
tooltipAlignment: tooltipAlignment
|
|
294
|
-
tooltipSize: tooltipSize
|
|
292
|
+
tooltipAlignment: tooltipAlignment
|
|
295
293
|
}), toggle ? (0, jsx_runtime_1.jsx)(toggleButton_1.ToggleButton, Object.assign({}, toggle.props)) : null, !!menuActions.length && (0, jsx_runtime_1.jsx)(menu_1.Menu, {
|
|
296
294
|
trigger: menuTrigger,
|
|
297
295
|
title: title || translate("Actions"),
|
|
@@ -9,7 +9,7 @@ const textIconButton_1 = require("../../textIconButton/textIconButton");
|
|
|
9
9
|
const tooltip_1 = require("../../tooltip/tooltip");
|
|
10
10
|
const useDrive_1 = require("../../utils/theme/useDrive");
|
|
11
11
|
const iconInfoCircle_1 = require("../../icons/iconInfoCircle");
|
|
12
|
-
const Status = ({ status, isMobile, tooltip, className = "", tooltipAlignment,
|
|
12
|
+
const Status = ({ status, isMobile, tooltip, className = "", tooltipAlignment, title }) => {
|
|
13
13
|
const ref = (0, react_1.useRef)(null);
|
|
14
14
|
const isDrive = (0, useDrive_1.useDrive)();
|
|
15
15
|
const renderButton = () => {
|
|
@@ -17,7 +17,7 @@ const Status = ({ status, isMobile, tooltip, className = "", tooltipAlignment, t
|
|
|
17
17
|
return "";
|
|
18
18
|
}
|
|
19
19
|
const statusButton = (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { ref: ref, iconPosition: textIconButton_1.ButtonIconPosition.Start, className: (0, classNames_1.classNames)(["zen-card-status", isMobile ? "zen-card-status--mobile" : "", "zen-card-status-button", status ? `zen-card-status--${status}` : "", className]), icon: iconInfoCircle_1.IconInfoCircle, iconSize: isDrive ? svgIconSize_1.SvgIconSize.Huge : svgIconSize_1.SvgIconSize.Large, "aria-label": tooltip, htmlType: "button" });
|
|
20
|
-
return (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, {
|
|
20
|
+
return (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { mobileTitle: title, alignment: tooltipAlignment, trigger: statusButton, children: tooltip });
|
|
21
21
|
};
|
|
22
22
|
return tooltip ? renderButton() : null;
|
|
23
23
|
};
|
|
@@ -9,6 +9,26 @@ const getBarTooltipItems = (data, datasetIndex, index, options, isHidden) => {
|
|
|
9
9
|
if (datasetIndex === undefined || index === undefined) {
|
|
10
10
|
return [];
|
|
11
11
|
}
|
|
12
|
+
// Get the x-value from the hovered dataset to match against other datasets
|
|
13
|
+
// If the hovered dataset is empty, find the first non-empty dataset to get the x-value
|
|
14
|
+
const hoveredDataset = data.datasets[datasetIndex];
|
|
15
|
+
let hoveredDataItem = index < hoveredDataset.data.length
|
|
16
|
+
? hoveredDataset.data[index]
|
|
17
|
+
: undefined;
|
|
18
|
+
// If the hovered dataset doesn't have data at this index, find another dataset that does
|
|
19
|
+
if (hoveredDataItem === undefined) {
|
|
20
|
+
for (const dataset of data.datasets) {
|
|
21
|
+
if (dataset.data.length > index) {
|
|
22
|
+
hoveredDataItem = dataset.data[index];
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
// If still no data found, return empty
|
|
27
|
+
if (hoveredDataItem === undefined) {
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const hoveredXValue = typeof hoveredDataItem === "number" ? undefined : hoveredDataItem.x;
|
|
12
32
|
return data.datasets.map((dataset, dsIndex) => {
|
|
13
33
|
if (dataset.data.length === 0) {
|
|
14
34
|
return undefined;
|
|
@@ -16,12 +36,21 @@ const getBarTooltipItems = (data, datasetIndex, index, options, isHidden) => {
|
|
|
16
36
|
if (isHidden(dsIndex)) {
|
|
17
37
|
return undefined;
|
|
18
38
|
}
|
|
19
|
-
|
|
39
|
+
// Find the data item in this dataset that matches the hovered x-value
|
|
40
|
+
const dataItem = hoveredXValue !== undefined
|
|
41
|
+
? dataset.data.find(item => typeof item !== "number" && item.x === hoveredXValue)
|
|
42
|
+
: dataset.data[index];
|
|
43
|
+
// If no matching data point exists for this dataset, skip it
|
|
44
|
+
if (!dataItem) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
20
47
|
const itemValue = typeof dataItem === "number" ? dataItem : dataItem.y;
|
|
21
48
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
22
49
|
const value = itemValue !== undefined ? (0, formatValue_1.formatValue)(itemValue.toFixed(2), dsIndex, options === null || options === void 0 ? void 0 : options.unit) : undefined;
|
|
23
50
|
const label = dataset.label || "";
|
|
24
|
-
|
|
51
|
+
// For color, find the correct index in the original dataset
|
|
52
|
+
const dataItemIndex = dataset.data.indexOf(dataItem);
|
|
53
|
+
const color = Array.isArray(dataset.backgroundColor) && dataset.backgroundColor[dataItemIndex] ? dataset.backgroundColor[dataItemIndex] :
|
|
25
54
|
typeof dataset.borderColor === "string" ? dataset.borderColor : "";
|
|
26
55
|
return { label, value, color };
|
|
27
56
|
}).filter(item => item !== undefined);
|
package/dist/chart/barChart.js
CHANGED
|
@@ -58,7 +58,8 @@ const BarChart = (_a) => {
|
|
|
58
58
|
const tooltipId = (0, react_1.useMemo)(() => (0, generateId_1.generateId)(), []);
|
|
59
59
|
const { toLocalDateTime } = (0, react_1.useContext)(userFormatContext_1.userFormatContext);
|
|
60
60
|
const isTimedData = (0, react_1.useMemo)(() => (0, isDateRange_1.isDateRange)(data, false), [data]);
|
|
61
|
-
const
|
|
61
|
+
const isStacked = (0, react_1.useMemo)(() => { var _a, _b; return ((_b = (_a = options.scales) === null || _a === void 0 ? void 0 : _a.y) === null || _b === void 0 ? void 0 : _b.stacked) === true; }, [options]);
|
|
62
|
+
const yAxisMeta = (0, react_1.useMemo)(() => (0, getYAxisMeta_1.getYAxisMeta)(data, isStacked), [data, isStacked]);
|
|
62
63
|
const defOptions = (0, react_1.useMemo)(() => (0, getDefaultOptions_1.getDefaultOptions)(yAxisMeta, isTimedData, dark, translate), [yAxisMeta, isTimedData, dark, translate]);
|
|
63
64
|
const chartOptions = (0, utils_1.deepMerge)(defOptions, options);
|
|
64
65
|
const { isHidden, toggleHidden } = (0, useHidden_1.useHidden)();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ILineChartData } from "../lineChart/interfaces";
|
|
2
2
|
import { IBarChartData } from "../barChart/interfaces";
|
|
3
|
-
export declare const getYAxisMeta: (data: ILineChartData | IBarChartData) => {
|
|
3
|
+
export declare const getYAxisMeta: (data: ILineChartData | IBarChartData, stacked?: boolean) => {
|
|
4
4
|
min: number;
|
|
5
5
|
max: number;
|
|
6
6
|
name: string;
|
|
@@ -4,10 +4,53 @@ exports.getYAxisMeta = void 0;
|
|
|
4
4
|
const getRange_1 = require("./getRange");
|
|
5
5
|
const mergeRanges_1 = require("./mergeRanges");
|
|
6
6
|
const normalizeRange_1 = require("./normalizeRange");
|
|
7
|
-
const getYAxisMeta = (data) => {
|
|
7
|
+
const getYAxisMeta = (data, stacked = false) => {
|
|
8
8
|
if (data.datasets.length === 0) {
|
|
9
9
|
return [Object.assign({ name: "y" }, (0, getRange_1.getRange)({ data: [] }))];
|
|
10
10
|
}
|
|
11
|
+
if (stacked) {
|
|
12
|
+
const axisMap = {};
|
|
13
|
+
data.datasets.forEach((ds) => {
|
|
14
|
+
const name = ds.yAxisID ? ds.yAxisID : "y";
|
|
15
|
+
if (!axisMap.hasOwnProperty(name)) {
|
|
16
|
+
axisMap[name] = {
|
|
17
|
+
name: name,
|
|
18
|
+
valuesByX: new Map()
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const valuesByX = axisMap[name].valuesByX;
|
|
22
|
+
ds.data.forEach((point) => {
|
|
23
|
+
const xKey = typeof point === "object" && "x" in point ? point.x : "";
|
|
24
|
+
const yValue = typeof point === "object" && "y" in point ? point.y : (typeof point === "number" ? point : 0);
|
|
25
|
+
const existing = valuesByX.get(xKey) || { positive: 0, negative: 0 };
|
|
26
|
+
if (yValue !== null && yValue >= 0) {
|
|
27
|
+
existing.positive += yValue;
|
|
28
|
+
}
|
|
29
|
+
else if (yValue !== null && yValue < 0) {
|
|
30
|
+
existing.negative += yValue;
|
|
31
|
+
}
|
|
32
|
+
valuesByX.set(xKey, existing);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
return Object.values(axisMap).map(axis => {
|
|
36
|
+
const stackedValues = [];
|
|
37
|
+
axis.valuesByX.forEach((value) => {
|
|
38
|
+
// Always include 0 as the baseline for stacked charts
|
|
39
|
+
if (value.positive > 0) {
|
|
40
|
+
stackedValues.push(value.positive);
|
|
41
|
+
}
|
|
42
|
+
if (value.negative < 0) {
|
|
43
|
+
stackedValues.push(value.negative);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
// Add 0 to ensure the axis includes the baseline
|
|
47
|
+
stackedValues.push(0);
|
|
48
|
+
const stackedData = stackedValues.map(y => ({ x: 0, y }));
|
|
49
|
+
const range = (0, getRange_1.getRange)({ data: stackedData });
|
|
50
|
+
const normalized = (0, normalizeRange_1.normalizeRange)(range);
|
|
51
|
+
return Object.assign({ name: axis.name }, normalized);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
11
54
|
const axisMap = data.datasets.reduce((acc, ds) => {
|
|
12
55
|
const name = ds.yAxisID ? ds.yAxisID : "y";
|
|
13
56
|
const range = (0, getRange_1.getRange)({ data: ds.data });
|
|
@@ -51,14 +51,14 @@ const Checkbox = (_a) => {
|
|
|
51
51
|
const intId = id || generatedId;
|
|
52
52
|
const driveClasses = (0, useDriveClassName_1.useDriveClassName)("zen-checkbox");
|
|
53
53
|
const checkboxIconClasses = (0, react_1.useMemo)(() => (0, classNames_1.classNames)(["zen-checkbox__icon", disabled ? "zen-checkbox__icon--disabled" : ""]), [disabled]);
|
|
54
|
-
const checkbox = (0, jsx_runtime_1.jsx)(triStateCheckbox_1.TriStateCheckbox, Object.assign({ className: "zen-checkbox__input", id: intId, checked: checked, indeterminate: indeterminate, disabled: disabled }, rest));
|
|
54
|
+
const checkbox = (0, jsx_runtime_1.jsx)(triStateCheckbox_1.TriStateCheckbox, Object.assign({ className: "zen-checkbox__input", id: intId, checked: checked, indeterminate: indeterminate, disabled: disabled, "aria-label": title }, rest));
|
|
55
55
|
const iconAndLabel = (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "zen-checkbox__box", children: state === checkboxState_1.CheckboxState.Indeterminate ? (0, jsx_runtime_1.jsx)(checkboxIconMinus_1.CheckboxIconMinus, { className: checkboxIconClasses, size: driveClasses ? "bigger" : "medium" }) :
|
|
56
56
|
state === checkboxState_1.CheckboxState.On ? (0, jsx_runtime_1.jsx)(checkboxIconCheckmark_1.CheckboxIconCheckmark, { className: checkboxIconClasses, size: driveClasses ? "bigger" : "medium" }) : null }), children
|
|
57
57
|
? (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-checkbox__label-text", fullWidth ? "zen-checkbox__label-text--full-width" : ""]), children: children })
|
|
58
58
|
: null] });
|
|
59
59
|
if (wrapped) {
|
|
60
|
-
return (0, jsx_runtime_1.jsxs)("label", { className: (0, classNames_1.classNames)(["zen-checkbox", driveClasses || "", className]), title: title,
|
|
60
|
+
return (0, jsx_runtime_1.jsxs)("label", { className: (0, classNames_1.classNames)(["zen-checkbox", driveClasses || "", className]), title: title, children: [checkbox, (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-checkbox__label", reverse ? "zen-checkbox__label--reverse" : ""]), children: iconAndLabel })] });
|
|
61
61
|
}
|
|
62
|
-
return (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-checkbox", driveClasses || "", className]), children: [checkbox, (0, jsx_runtime_1.jsx)("label", { className: (0, classNames_1.classNames)(["zen-checkbox__label", reverse ? "zen-checkbox__label--reverse" : ""]), htmlFor: intId, title: title,
|
|
62
|
+
return (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-checkbox", driveClasses || "", className]), children: [checkbox, (0, jsx_runtime_1.jsx)("label", { className: (0, classNames_1.classNames)(["zen-checkbox__label", reverse ? "zen-checkbox__label--reverse" : ""]), htmlFor: intId, title: title, children: iconAndLabel })] });
|
|
63
63
|
};
|
|
64
64
|
exports.Checkbox = Checkbox;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
image?: ReactNode;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IEmptyState } from "../../emptyState/emptyState";
|
|
3
|
+
export interface IEmptySearchList extends Omit<IEmptyState, "children"> {
|
|
4
|
+
image?: React.ReactNode;
|
|
5
|
+
children?: React.ReactNode;
|
|
7
6
|
}
|
|
8
7
|
export declare const EmptySearchList: {
|
|
9
|
-
({
|
|
8
|
+
({ ...props }: IEmptySearchList): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
translations: string[];
|
|
11
10
|
};
|
|
@@ -3,13 +3,20 @@
|
|
|
3
3
|
const {
|
|
4
4
|
injectString
|
|
5
5
|
} = require("../../utils/localization/translationsDictionary");
|
|
6
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
7
|
+
var t = {};
|
|
8
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
9
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
10
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
6
14
|
Object.defineProperty(exports, "__esModule", {
|
|
7
15
|
value: true
|
|
8
16
|
});
|
|
9
17
|
exports.EmptySearchList = void 0;
|
|
10
18
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
|
-
const
|
|
12
|
-
const imageNothingFound_1 = require("../../images/imageNothingFound");
|
|
19
|
+
const emptyState_1 = require("../../emptyState/emptyState");
|
|
13
20
|
const useLanguage_1 = require("../../utils/localization/useLanguage");
|
|
14
21
|
injectString("cs", "Try adjusting your search or filter.", "Zkuste upravit sv\xE9 vyhled\xE1v\xE1n\xED nebo filtr.");
|
|
15
22
|
injectString("da-DK", "Try adjusting your search or filter.", "Pr\xF8v at justere din s\xF8gning eller dit filter.");
|
|
@@ -35,30 +42,15 @@ injectString("th", "Try adjusting your search or filter.", "\u0E25\u0E2D\u0E07\u
|
|
|
35
42
|
injectString("tr", "Try adjusting your search or filter.", "Araman\u0131z\u0131 veya filtrenizi ayarlamay\u0131 deneyin.");
|
|
36
43
|
injectString("zh-Hans", "Try adjusting your search or filter.", "\u5C1D\u8BD5\u8C03\u6574\u60A8\u7684\u641C\u7D22\u6216\u7B5B\u9009\u6761\u4EF6\u3002");
|
|
37
44
|
injectString("zh-TW", "Try adjusting your search or filter.", "\u8ACB\u5617\u8A66\u8ABF\u6574\u60A8\u7684\u641C\u5C0B\u6216\u7BE9\u9078\u689D\u4EF6\u3002");
|
|
38
|
-
const EmptySearchList =
|
|
39
|
-
|
|
40
|
-
children,
|
|
41
|
-
description,
|
|
42
|
-
image
|
|
43
|
-
}) => {
|
|
45
|
+
const EmptySearchList = _a => {
|
|
46
|
+
var props = __rest(_a, []);
|
|
44
47
|
const {
|
|
45
48
|
translate
|
|
46
49
|
} = (0, useLanguage_1.useLanguage)();
|
|
47
|
-
return (0, jsx_runtime_1.
|
|
48
|
-
|
|
49
|
-
children:
|
|
50
|
-
|
|
51
|
-
children: image
|
|
52
|
-
}) : (0, jsx_runtime_1.jsx)(imageNothingFound_1.ImageNothingFound, {
|
|
53
|
-
className: "zen-empty-list-search__image"
|
|
54
|
-
}), (0, jsx_runtime_1.jsx)("h2", {
|
|
55
|
-
className: "zen-empty-list-search__header",
|
|
56
|
-
children: children
|
|
57
|
-
}), (0, jsx_runtime_1.jsx)("div", {
|
|
58
|
-
className: "zen-empty-list-search__description",
|
|
59
|
-
children: description || translate("Try adjusting your search or filter.")
|
|
60
|
-
})]
|
|
61
|
-
});
|
|
50
|
+
return (0, jsx_runtime_1.jsx)(emptyState_1.EmptyState, Object.assign({}, props, {
|
|
51
|
+
description: props.description || translate("Try adjusting your search or filter."),
|
|
52
|
+
children: props.children
|
|
53
|
+
}));
|
|
62
54
|
};
|
|
63
55
|
exports.EmptySearchList = EmptySearchList;
|
|
64
56
|
exports.EmptySearchList.translations = ["Try adjusting your search or filter."];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./dateInputRaw.less";
|
|
3
|
-
import { IFormFieldComponent } from "../formField/
|
|
3
|
+
import { IFormFieldComponent } from "../formField/types";
|
|
4
4
|
import { IDateInputRawDefault, TDateInputRaw } from "./types";
|
|
5
5
|
import { IChipsParent } from "../chip/chip";
|
|
6
6
|
export interface IDateInputRaw extends IDateInputRawDefault, IChipsParent {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./dateRangeRaw.less";
|
|
3
3
|
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
4
4
|
import { TButton } from "../button/buttonType";
|
|
5
|
-
import { IFormFieldComponent } from "../formField/
|
|
5
|
+
import { IFormFieldComponent } from "../formField/types";
|
|
6
6
|
import { IChipsParent } from "../chip/chip";
|
|
7
7
|
import { TDateRangeOption, IDateRangeValue, IDateRangeValueOptionalLabel } from "./utils/dateRangeUtils";
|
|
8
8
|
import { TDateRangeRaw } from "./types";
|
|
@@ -28,6 +28,7 @@ export declare const GET_NEXT_MONTH_OPTION: (toLocalDateTime?: TToLocalDateTime,
|
|
|
28
28
|
export declare const GET_LAST_MONTH_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
|
|
29
29
|
export declare const GET_LAST_SEVEN_DAYS_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
|
|
30
30
|
export declare const GET_LAST_THIRTY_DAYS_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
|
|
31
|
+
export declare const GET_YEAR_TO_DATE_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
|
|
31
32
|
export declare const GET_LAST_TWELVE_MONTHS_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
|
|
32
33
|
export declare const GET_LAST_THREE_MONTH_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
|
|
33
34
|
export declare const GET_LAST_QUARTER_OPTION: (toLocalDateTime?: TToLocalDateTime, translate?: TTranslate, toReverseOffsetDateTime?: TToLocalDateTime) => IDateRangeOption;
|
|
@@ -6,7 +6,7 @@ const {
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.GET_DEFAULT_DATE_OPTIONS = exports.GET_THIS_YEAR_OPTION = exports.GET_LAST_YEAR_OPTION = exports.GET_THIS_QUARTER_OPTION = exports.GET_LAST_QUARTER_OPTION = exports.GET_LAST_THREE_MONTH_OPTION = exports.GET_LAST_TWELVE_MONTHS_OPTION = exports.GET_LAST_THIRTY_DAYS_OPTION = exports.GET_LAST_SEVEN_DAYS_OPTION = exports.GET_LAST_MONTH_OPTION = exports.GET_NEXT_MONTH_OPTION = exports.GET_THIS_MONTH_OPTION = exports.GET_LAST_WEEK_OPTION = exports.GET_NEXT_WEEK_OPTION = exports.GET_THIS_WEEK_OPTION = exports.GET_YESTERDAY_OPTION = exports.GET_TODAY_OPTION = void 0;
|
|
9
|
+
exports.GET_DEFAULT_DATE_OPTIONS = exports.GET_THIS_YEAR_OPTION = exports.GET_LAST_YEAR_OPTION = exports.GET_THIS_QUARTER_OPTION = exports.GET_LAST_QUARTER_OPTION = exports.GET_LAST_THREE_MONTH_OPTION = exports.GET_LAST_TWELVE_MONTHS_OPTION = exports.GET_YEAR_TO_DATE_OPTION = exports.GET_LAST_THIRTY_DAYS_OPTION = exports.GET_LAST_SEVEN_DAYS_OPTION = exports.GET_LAST_MONTH_OPTION = exports.GET_NEXT_MONTH_OPTION = exports.GET_THIS_MONTH_OPTION = exports.GET_LAST_WEEK_OPTION = exports.GET_NEXT_WEEK_OPTION = exports.GET_THIS_WEEK_OPTION = exports.GET_YESTERDAY_OPTION = exports.GET_TODAY_OPTION = void 0;
|
|
10
10
|
const dateUtils_1 = require("../../calendar/dateUtils");
|
|
11
11
|
injectString("cs", "Today", "Dnes");
|
|
12
12
|
injectString("da-DK", "Today", "I dag");
|
|
@@ -248,6 +248,30 @@ injectString("th", "Last 30 days", "30 \u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E1
|
|
|
248
248
|
injectString("tr", "Last 30 days", "Son 30 g\xFCn");
|
|
249
249
|
injectString("zh-Hans", "Last 30 days", "\u6700\u8FD1 30 \u5929");
|
|
250
250
|
injectString("zh-TW", "Last 30 days", "\u904E\u53BB 30 \u5929");
|
|
251
|
+
injectString("cs", "Year to date", "Od za\u010D\xE1tku roku");
|
|
252
|
+
injectString("da-DK", "Year to date", "\xC5r til dato");
|
|
253
|
+
injectString("de", "Year to date", "Seit Jahresbeginn");
|
|
254
|
+
injectString("en", "Year to date", "Year to date");
|
|
255
|
+
injectString("es", "Year to date", "A\xF1o a la fecha");
|
|
256
|
+
injectString("fi-FI", "Year to date", "Vuoden alusta");
|
|
257
|
+
injectString("fr", "Year to date", "Cumul jusqu\u2019\xE0 ce jour");
|
|
258
|
+
injectString("fr-FR", "Year to date", "L\u2019ann\xE9e pass\xE9e");
|
|
259
|
+
injectString("hu-HU", "Year to date", "\xC9v a mai napig");
|
|
260
|
+
injectString("id", "Year to date", "Tahun hingga saat ini");
|
|
261
|
+
injectString("it", "Year to date", "Dall'inizio dell'anno");
|
|
262
|
+
injectString("ja", "Year to date", "\u7D2F\u8A08");
|
|
263
|
+
injectString("ko-KR", "Year to date", "\uC62C\uD574 \uD604\uC7AC\uAE4C\uC9C0");
|
|
264
|
+
injectString("ms", "Year to date", "Tahun ini hingga tarikh ini");
|
|
265
|
+
injectString("nb-NO", "Year to date", "\xC5r til dato");
|
|
266
|
+
injectString("nl", "Year to date", "Jaar tot heden");
|
|
267
|
+
injectString("pl", "Year to date", "Od pocz\u0105tku roku");
|
|
268
|
+
injectString("pt-BR", "Year to date", "Acumulado no ano");
|
|
269
|
+
injectString("sk-SK", "Year to date", "Rok od za\u010Diatku");
|
|
270
|
+
injectString("sv", "Year to date", "\xC5r till dagens datum");
|
|
271
|
+
injectString("th", "Year to date", "\u0E15\u0E49\u0E19\u0E1B\u0E35\u0E16\u0E36\u0E07\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19");
|
|
272
|
+
injectString("tr", "Year to date", "Y\u0131lba\u015F\u0131ndan bug\xFCne kadar");
|
|
273
|
+
injectString("zh-Hans", "Year to date", "\u5E74\u521D\u81F3\u4ECA");
|
|
274
|
+
injectString("zh-TW", "Year to date", "\u5E74\u521D\u81F3\u4ECA");
|
|
251
275
|
injectString("cs", "Last 12 months", "Posledn\xEDch 12 m\u011Bs\xEDc\u016F");
|
|
252
276
|
injectString("da-DK", "Last 12 months", "Sidste 12 m\xE5neder");
|
|
253
277
|
injectString("de", "Last 12 months", "Letzte 12 Monate");
|
|
@@ -552,6 +576,20 @@ const GET_LAST_THIRTY_DAYS_OPTION = (toLocalDateTime = defaultToLocalDateTime, t
|
|
|
552
576
|
};
|
|
553
577
|
};
|
|
554
578
|
exports.GET_LAST_THIRTY_DAYS_OPTION = GET_LAST_THIRTY_DAYS_OPTION;
|
|
579
|
+
const GET_YEAR_TO_DATE_OPTION = (toLocalDateTime = defaultToLocalDateTime, translate = defaultTranslate, toReverseOffsetDateTime = defaultToReverseOffsetDateTime) => {
|
|
580
|
+
const startDate = new Date((0, dateUtils_1.getNewStartDate)(toLocalDateTime).getFullYear(), 0, 1);
|
|
581
|
+
const endDate = (0, dateUtils_1.getNewEndDate)(toLocalDateTime);
|
|
582
|
+
const from = toReverseOffsetDateTime(startDate);
|
|
583
|
+
const to = toReverseOffsetDateTime(endDate);
|
|
584
|
+
return {
|
|
585
|
+
label: translate("Year to date"),
|
|
586
|
+
getRange: () => ({
|
|
587
|
+
from,
|
|
588
|
+
to
|
|
589
|
+
})
|
|
590
|
+
};
|
|
591
|
+
};
|
|
592
|
+
exports.GET_YEAR_TO_DATE_OPTION = GET_YEAR_TO_DATE_OPTION;
|
|
555
593
|
const GET_LAST_TWELVE_MONTHS_OPTION = (toLocalDateTime = defaultToLocalDateTime, translate = defaultTranslate, toReverseOffsetDateTime = defaultToReverseOffsetDateTime) => {
|
|
556
594
|
const startDate = (0, dateUtils_1.addMonths)((0, dateUtils_1.getNewStartDate)(toLocalDateTime), -12);
|
|
557
595
|
const endDate = (0, dateUtils_1.getNewEndDate)(toLocalDateTime);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./dropdownRaw.less";
|
|
3
|
-
import { IFormFieldComponent } from "../formField/
|
|
3
|
+
import { IFormFieldComponent } from "../formField/types";
|
|
4
4
|
import { TDropdownRaw } from "./types";
|
|
5
5
|
export declare const DropdownRaw: React.FC<TDropdownRaw & IFormFieldComponent>;
|
|
6
6
|
export declare const TRANSLATIONS: string[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import "./emptyState.less";
|
|
3
|
+
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
4
|
+
export interface IEmptyState extends IZenComponentProps {
|
|
5
|
+
description?: string;
|
|
6
|
+
image?: ReactNode | React.FC;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const EmptyState: ({ className, children, description, image }: IEmptyState) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmptyState = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
6
|
+
const imageNothingFound_1 = require("../images/imageNothingFound");
|
|
7
|
+
const useIcon_1 = require("./hooks/useIcon");
|
|
8
|
+
const EmptyState = ({ className, children, description, image }) => {
|
|
9
|
+
const icon = (0, useIcon_1.useIcon)(image);
|
|
10
|
+
return (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-empty-state", className || ""]), children: [icon
|
|
11
|
+
? (0, jsx_runtime_1.jsx)("div", { className: "zen-empty-state__image", children: icon })
|
|
12
|
+
: (0, jsx_runtime_1.jsx)(imageNothingFound_1.ImageNothingFound, { className: "zen-empty-state__image" }), children && (0, jsx_runtime_1.jsx)("h2", { className: "zen-empty-state__header", children: children }), description && (0, jsx_runtime_1.jsx)("div", { className: "zen-empty-state__description", children: description })] });
|
|
13
|
+
};
|
|
14
|
+
exports.EmptyState = EmptyState;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
export declare const useIcon: (icon: ReactNode | React.FC) => string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.FunctionComponentElement<{}> | null | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const useIcon = (icon) => {
|
|
9
|
+
const svgIcon = react_1.default.useMemo(() => {
|
|
10
|
+
if (typeof icon === "function") {
|
|
11
|
+
return react_1.default.createElement(icon, {});
|
|
12
|
+
}
|
|
13
|
+
return icon;
|
|
14
|
+
}, [icon]);
|
|
15
|
+
return svgIcon;
|
|
16
|
+
};
|
|
17
|
+
exports.useIcon = useIcon;
|
|
@@ -24,6 +24,7 @@ declare const options: {
|
|
|
24
24
|
LastQuarter: (translate: (s: string) => string, toLocalDateTime: (date: Date | string) => Date, _firstDayOfWeek?: TDayName, toReverseOffsetDateTime?: (date: Date | string) => Date) => IDateRangeOption;
|
|
25
25
|
LastYear: (translate: (s: string) => string, toLocalDateTime: (date: Date | string) => Date, _firstDayOfWeek?: TDayName, toReverseOffsetDateTime?: (date: Date | string) => Date) => IDateRangeOption;
|
|
26
26
|
ThisYear: (translate: (s: string) => string, toLocalDateTime: (date: Date | string) => Date, _firstDayOfWeek?: TDayName, toReverseOffsetDateTime?: (date: Date | string) => Date) => IDateRangeOption;
|
|
27
|
+
YearToDate: (translate: (s: string) => string, toLocalDateTime: (date: Date | string) => Date, _firstDayOfWeek?: TDayName, toReverseOffsetDateTime?: (date: Date | string) => Date) => IDateRangeOption;
|
|
27
28
|
};
|
|
28
29
|
export type TDateRangeName = keyof typeof options | "Custom";
|
|
29
30
|
export declare function getRangeOption(option: TDateRangeOption, translate: (s: string) => string, toLocalDateTime?: (date: Date | string) => Date, firstDayOfWeek?: TDayName, toReverseOffsetDateTime?: (date: Date | string) => Date): IDateRangeOptionId | undefined;
|