@geotab/zenith 3.11.0-beta.0 → 3.11.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 +3 -26
- package/dist/calendar/calendar.js +4 -7
- package/dist/card/components/title.js +1 -4
- package/dist/card/components/titleLink.js +2 -5
- package/dist/chart/barChart/getDefaultOptions.d.ts +1 -2
- package/dist/chart/barChart/getDefaultOptions.js +2 -5
- package/dist/chart/barChart.js +4 -6
- package/dist/chart/lineChart/getDefaultOptions.d.ts +1 -2
- package/dist/chart/lineChart/getDefaultOptions.js +2 -5
- package/dist/chart/lineChart.js +2 -4
- package/dist/checkboxListWithAction/checkboxListWithAction.js +1 -4
- package/dist/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +1 -4
- package/dist/commonStyles/pillStyles/pillContent.less +14 -13
- package/dist/commonStyles/pillStyles/pillStyles.less +5 -4
- package/dist/commonStyles/pillStyles/pillTextContent.less +2 -2
- package/dist/commonStyles/typography/typography.less +19 -579
- package/dist/controlledPopup/controlledPopup.d.ts +0 -1
- package/dist/controlledPopup/controlledPopup.js +1 -3
- package/dist/dataGrid/cell/cell.d.ts +1 -2
- package/dist/dataGrid/cell/cell.js +2 -2
- package/dist/dataGrid/dataGrid.js +4 -7
- package/dist/dataGrid/listColumn.d.ts +0 -2
- package/dist/dataGrid/row/row.d.ts +1 -2
- package/dist/dataGrid/row/row.js +9 -13
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsList.js +1 -2
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +0 -4
- package/dist/dateRangeInner/dateRangeInner.js +2 -5
- package/dist/dateRangeRaw/dateRangeRaw.js +2 -5
- package/dist/dateRangeRaw/utils/parseLabel.js +1 -1
- package/dist/dropdownRaw/dropdownRaw.js +6 -12
- package/dist/fileUpload/components/dropZoneContent.js +100 -100
- package/dist/fileUpload/fileUpload.js +100 -100
- package/dist/filters/components/filtersSearchList.js +1 -4
- package/dist/filtersBar/filtersContainer/filtersContainer.js +61 -62
- package/dist/formStepperButtons/formStepperButtons.js +1 -4
- package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +1 -4
- package/dist/groupsFilterRaw/groupsFilterInitialState.js +1 -4
- package/dist/header/headerBack.js +1 -4
- package/dist/icons/iconAlignLeft.js +3 -1
- package/dist/icons/iconAlignmentLeft.js +3 -1
- package/dist/icons/iconAlignmentRight.js +3 -1
- package/dist/icons/iconArrowBottomLeft.js +3 -1
- package/dist/icons/iconArrowBottomRight.js +3 -1
- package/dist/icons/iconArrowLeftPath.js +3 -1
- package/dist/icons/iconArrowRight.js +3 -1
- package/dist/icons/iconArrowRightCircle.js +3 -1
- package/dist/icons/iconArrowRightPath.js +3 -1
- package/dist/icons/iconArrowTopLeft.js +3 -1
- package/dist/icons/iconArrowTopRight.js +3 -1
- package/dist/icons/iconChevronDoubleRight.js +3 -1
- package/dist/icons/iconChevronRight.js +3 -1
- package/dist/icons/iconChevronRightSmall.js +3 -1
- package/dist/icons/iconCornerDownLeft.js +3 -1
- package/dist/icons/iconCornerDownRight.js +3 -1
- package/dist/icons/iconCornerLeftDown.js +3 -1
- package/dist/icons/iconCornerLeftUp.js +3 -1
- package/dist/icons/iconCornerRightDown.js +3 -1
- package/dist/icons/iconCornerRightUp.js +3 -1
- package/dist/icons/iconCornerUpLeft.js +3 -1
- package/dist/icons/iconCornerUpRight.js +3 -1
- package/dist/index.css +2920 -3245
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -3
- package/dist/lineChartMini/lineChartMini.js +3 -15
- package/dist/list/itemData/itemDataInternal.js +1 -4
- package/dist/list/listItem/listItem.js +1 -4
- package/dist/menu/components/controlledMenuList/controlledMenuList.js +1 -4
- package/dist/menu/components/menuButton.js +1 -4
- package/dist/menu/utils/useMenuItemCore.js +3 -4
- package/dist/nav/navItem/navItem.js +1 -4
- package/dist/pagination/paginationArrow.js +3 -10
- package/dist/radioGroupRaw/radioGroupRaw.js +1 -2
- package/dist/rangeRaw/rangeRaw.js +1 -0
- package/dist/selectList/selectList.helpers.d.ts +1 -1
- package/dist/selectList/selectList.helpers.js +4 -29
- package/dist/selectList/selectList.js +1 -3
- package/dist/selectList/selectList.reducer.js +2 -1
- package/dist/selectList/selectListItem.js +1 -4
- package/dist/sortControl/sortControl.js +4 -59
- package/dist/table/children/useTableChildren.d.ts +1 -1
- package/dist/table/children/useTableChildren.js +3 -3
- package/dist/table/flexible/columnsList.js +2 -4
- package/dist/table/selectable/useSelectableRows.d.ts +0 -8
- package/dist/table/selectable/useSelectableRows.js +6 -14
- package/dist/table/table.js +7 -1
- package/dist/tabs/tabs.js +58 -60
- package/dist/tabs/tabsTestHelper.js +2 -2
- package/dist/timePickerRaw/timePickerRaw.js +1 -1
- package/dist/toggleButtonRaw/toggleButtonRaw.js +2 -5
- package/dist/utils/localization/translations/ar.json +1 -3
- package/dist/utils/localization/translations/cs.json +5 -9
- package/dist/utils/localization/translations/da-DK.json +5 -9
- package/dist/utils/localization/translations/de.json +5 -9
- package/dist/utils/localization/translations/en.json +1 -5
- package/dist/utils/localization/translations/es.json +5 -9
- package/dist/utils/localization/translations/fi-FI.json +5 -9
- package/dist/utils/localization/translations/fr-FR.json +5 -9
- package/dist/utils/localization/translations/fr.json +5 -9
- package/dist/utils/localization/translations/hu-HU.json +5 -9
- package/dist/utils/localization/translations/id.json +5 -9
- package/dist/utils/localization/translations/it.json +5 -9
- package/dist/utils/localization/translations/ja.json +5 -9
- package/dist/utils/localization/translations/ko-KR.json +5 -9
- package/dist/utils/localization/translations/ms.json +5 -9
- package/dist/utils/localization/translations/nb-NO.json +5 -9
- package/dist/utils/localization/translations/nl.json +5 -9
- package/dist/utils/localization/translations/pl.json +5 -9
- package/dist/utils/localization/translations/pt-BR.json +5 -9
- package/dist/utils/localization/translations/pt-PT.json +5 -9
- package/dist/utils/localization/translations/ro-RO.json +5 -9
- package/dist/utils/localization/translations/sk-SK.json +5 -9
- package/dist/utils/localization/translations/sv.json +5 -9
- package/dist/utils/localization/translations/th.json +5 -9
- package/dist/utils/localization/translations/tr.json +5 -9
- package/dist/utils/localization/translations/zh-Hans.json +5 -9
- package/dist/utils/localization/translations/zh-TW.json +5 -9
- package/dist/utils/positioningUtils/alignments.d.ts +2 -2
- package/dist/utils/positioningUtils/alignments.js +2 -2
- package/dist/utils/positioningUtils/calculatePosition.js +6 -4
- package/esm/calendar/calendar.js +4 -7
- package/esm/card/components/title.js +1 -4
- package/esm/card/components/titleLink.js +2 -5
- package/esm/chart/barChart/getDefaultOptions.d.ts +1 -2
- package/esm/chart/barChart/getDefaultOptions.js +2 -5
- package/esm/chart/barChart.js +4 -6
- package/esm/chart/lineChart/getDefaultOptions.d.ts +1 -2
- package/esm/chart/lineChart/getDefaultOptions.js +2 -5
- package/esm/chart/lineChart.js +2 -4
- package/esm/checkboxListWithAction/checkboxListWithAction.js +1 -4
- package/esm/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +1 -4
- package/esm/controlledPopup/controlledPopup.d.ts +0 -1
- package/esm/controlledPopup/controlledPopup.js +1 -3
- package/esm/dataGrid/cell/cell.d.ts +1 -2
- package/esm/dataGrid/cell/cell.js +2 -2
- package/esm/dataGrid/dataGrid.js +4 -7
- package/esm/dataGrid/listColumn.d.ts +0 -2
- package/esm/dataGrid/row/row.d.ts +1 -2
- package/esm/dataGrid/row/row.js +9 -13
- package/esm/dataGrid/withFlexibleColumns/components/columnSettingsList.js +1 -2
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +0 -4
- package/esm/dateRangeInner/dateRangeInner.js +2 -5
- package/esm/dateRangeRaw/dateRangeRaw.js +2 -5
- package/esm/dateRangeRaw/utils/parseLabel.js +1 -1
- package/esm/dropdownRaw/dropdownRaw.js +6 -12
- package/esm/fileUpload/components/dropZoneContent.js +100 -100
- package/esm/fileUpload/fileUpload.js +100 -100
- package/esm/filters/components/filtersSearchList.js +1 -4
- package/esm/filtersBar/filtersContainer/filtersContainer.js +61 -62
- package/esm/formStepperButtons/formStepperButtons.js +1 -4
- package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +1 -4
- package/esm/groupsFilterRaw/groupsFilterInitialState.js +1 -4
- package/esm/header/headerBack.js +1 -4
- package/esm/icons/iconAlignLeft.js +3 -1
- package/esm/icons/iconAlignmentLeft.js +3 -1
- package/esm/icons/iconAlignmentRight.js +3 -1
- package/esm/icons/iconArrowBottomLeft.js +3 -1
- package/esm/icons/iconArrowBottomRight.js +3 -1
- package/esm/icons/iconArrowLeftPath.js +3 -1
- package/esm/icons/iconArrowRight.js +3 -1
- package/esm/icons/iconArrowRightCircle.js +3 -1
- package/esm/icons/iconArrowRightPath.js +3 -1
- package/esm/icons/iconArrowTopLeft.js +3 -1
- package/esm/icons/iconArrowTopRight.js +3 -1
- package/esm/icons/iconChevronDoubleRight.js +3 -1
- package/esm/icons/iconChevronRight.js +3 -1
- package/esm/icons/iconChevronRightSmall.js +3 -1
- package/esm/icons/iconCornerDownLeft.js +3 -1
- package/esm/icons/iconCornerDownRight.js +3 -1
- package/esm/icons/iconCornerLeftDown.js +3 -1
- package/esm/icons/iconCornerLeftUp.js +3 -1
- package/esm/icons/iconCornerRightDown.js +3 -1
- package/esm/icons/iconCornerRightUp.js +3 -1
- package/esm/icons/iconCornerUpLeft.js +3 -1
- package/esm/icons/iconCornerUpRight.js +3 -1
- package/esm/index.d.ts +0 -1
- package/esm/index.js +0 -1
- package/esm/lineChartMini/lineChartMini.js +3 -15
- package/esm/list/itemData/itemDataInternal.js +1 -4
- package/esm/list/listItem/listItem.js +1 -4
- package/esm/menu/components/controlledMenuList/controlledMenuList.js +1 -4
- package/esm/menu/components/menuButton.js +1 -4
- package/esm/menu/utils/useMenuItemCore.js +3 -4
- package/esm/nav/navItem/navItem.js +1 -4
- package/esm/pagination/paginationArrow.js +3 -10
- package/esm/radioGroupRaw/radioGroupRaw.js +1 -2
- package/esm/rangeRaw/rangeRaw.js +1 -0
- package/esm/selectList/selectList.helpers.d.ts +1 -1
- package/esm/selectList/selectList.helpers.js +4 -29
- package/esm/selectList/selectList.js +1 -3
- package/esm/selectList/selectList.reducer.js +2 -1
- package/esm/selectList/selectListItem.js +1 -4
- package/esm/sortControl/sortControl.js +4 -59
- package/esm/table/children/useTableChildren.d.ts +1 -1
- package/esm/table/children/useTableChildren.js +3 -3
- package/esm/table/flexible/columnsList.js +2 -4
- package/esm/table/selectable/useSelectableRows.d.ts +0 -8
- package/esm/table/selectable/useSelectableRows.js +6 -14
- package/esm/table/table.js +7 -1
- package/esm/tabs/tabs.js +58 -60
- package/esm/tabs/tabsTestHelper.js +2 -2
- package/esm/timePickerRaw/timePickerRaw.js +1 -1
- package/esm/toggleButtonRaw/toggleButtonRaw.js +2 -5
- package/esm/utils/localization/translations/ar.json +1 -3
- package/esm/utils/localization/translations/cs.json +5 -9
- package/esm/utils/localization/translations/da-DK.json +5 -9
- package/esm/utils/localization/translations/de.json +5 -9
- package/esm/utils/localization/translations/en.json +1 -5
- package/esm/utils/localization/translations/es.json +5 -9
- package/esm/utils/localization/translations/fi-FI.json +5 -9
- package/esm/utils/localization/translations/fr-FR.json +5 -9
- package/esm/utils/localization/translations/fr.json +5 -9
- package/esm/utils/localization/translations/hu-HU.json +5 -9
- package/esm/utils/localization/translations/id.json +5 -9
- package/esm/utils/localization/translations/it.json +5 -9
- package/esm/utils/localization/translations/ja.json +5 -9
- package/esm/utils/localization/translations/ko-KR.json +5 -9
- package/esm/utils/localization/translations/ms.json +5 -9
- package/esm/utils/localization/translations/nb-NO.json +5 -9
- package/esm/utils/localization/translations/nl.json +5 -9
- package/esm/utils/localization/translations/pl.json +5 -9
- package/esm/utils/localization/translations/pt-BR.json +5 -9
- package/esm/utils/localization/translations/pt-PT.json +5 -9
- package/esm/utils/localization/translations/ro-RO.json +5 -9
- package/esm/utils/localization/translations/sk-SK.json +5 -9
- package/esm/utils/localization/translations/sv.json +5 -9
- package/esm/utils/localization/translations/th.json +5 -9
- package/esm/utils/localization/translations/tr.json +5 -9
- package/esm/utils/localization/translations/zh-Hans.json +5 -9
- package/esm/utils/localization/translations/zh-TW.json +5 -9
- package/esm/utils/positioningUtils/alignments.d.ts +2 -2
- package/esm/utils/positioningUtils/alignments.js +2 -2
- package/esm/utils/positioningUtils/calculatePosition.js +6 -4
- package/package.json +122 -123
- package/dist/utils/localization/useDirectionalIcon.d.ts +0 -3
- package/dist/utils/localization/useDirectionalIcon.js +0 -9
- package/esm/testHelpers/mockAbsoluteAlignment.d.ts +0 -1
- package/esm/testHelpers/mockAbsoluteAlignment.js +0 -10
- package/esm/utils/localization/useDirectionalIcon.d.ts +0 -3
- package/esm/utils/localization/useDirectionalIcon.js +0 -5
|
@@ -317,15 +317,11 @@
|
|
|
317
317
|
"Exit full screen table view": "Exit full screen table view",
|
|
318
318
|
"Close search": "Close search",
|
|
319
319
|
"Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return.",
|
|
320
|
-
"Drag & drop files or": "
|
|
321
|
-
"Browse": "
|
|
322
|
-
"Tap to add files": "
|
|
323
|
-
"Supported Formats:": "
|
|
320
|
+
"Drag & drop files or": "Drag & drop files or",
|
|
321
|
+
"Browse": "Browse",
|
|
322
|
+
"Tap to add files": "Tap to add files",
|
|
323
|
+
"Supported Formats:": "Supported Formats:",
|
|
324
324
|
"Upload files.": "Upload files.",
|
|
325
325
|
"File upload area": "File upload area",
|
|
326
|
-
"Uploaded": "Uploaded"
|
|
327
|
-
"Ascending": "Stigende",
|
|
328
|
-
"Descending": "Synkende",
|
|
329
|
-
"Scroll to start": "Rull til start",
|
|
330
|
-
"Scroll to end": "Rull til slutt"
|
|
326
|
+
"Uploaded": "Uploaded"
|
|
331
327
|
}
|
|
@@ -317,15 +317,11 @@
|
|
|
317
317
|
"Exit full screen table view": "Exit full screen table view",
|
|
318
318
|
"Close search": "Close search",
|
|
319
319
|
"Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return.",
|
|
320
|
-
"Drag & drop files or": "
|
|
321
|
-
"Browse": "
|
|
322
|
-
"Tap to add files": "
|
|
323
|
-
"Supported Formats:": "
|
|
320
|
+
"Drag & drop files or": "Drag & drop files or",
|
|
321
|
+
"Browse": "Browse",
|
|
322
|
+
"Tap to add files": "Tap to add files",
|
|
323
|
+
"Supported Formats:": "Supported Formats:",
|
|
324
324
|
"Upload files.": "Upload files.",
|
|
325
325
|
"File upload area": "File upload area",
|
|
326
|
-
"Uploaded": "Uploaded"
|
|
327
|
-
"Ascending": "Oplopend",
|
|
328
|
-
"Descending": "Aflopend",
|
|
329
|
-
"Scroll to start": "Scroll to start",
|
|
330
|
-
"Scroll to end": "Scroll to end"
|
|
326
|
+
"Uploaded": "Uploaded"
|
|
331
327
|
}
|
|
@@ -317,15 +317,11 @@
|
|
|
317
317
|
"Exit full screen table view": "Exit full screen table view",
|
|
318
318
|
"Close search": "Close search",
|
|
319
319
|
"Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return.",
|
|
320
|
-
"Drag & drop files or": "
|
|
321
|
-
"Browse": "
|
|
322
|
-
"Tap to add files": "
|
|
323
|
-
"Supported Formats:": "
|
|
320
|
+
"Drag & drop files or": "Drag & drop files or",
|
|
321
|
+
"Browse": "Browse",
|
|
322
|
+
"Tap to add files": "Tap to add files",
|
|
323
|
+
"Supported Formats:": "Supported Formats:",
|
|
324
324
|
"Upload files.": "Upload files.",
|
|
325
325
|
"File upload area": "File upload area",
|
|
326
|
-
"Uploaded": "Uploaded"
|
|
327
|
-
"Ascending": "Rosnąco",
|
|
328
|
-
"Descending": "Malejąco",
|
|
329
|
-
"Scroll to start": "Przewiń do początku",
|
|
330
|
-
"Scroll to end": "Przewiń do końca"
|
|
326
|
+
"Uploaded": "Uploaded"
|
|
331
327
|
}
|
|
@@ -317,15 +317,11 @@
|
|
|
317
317
|
"Exit full screen table view": "Exit full screen table view",
|
|
318
318
|
"Close search": "Close search",
|
|
319
319
|
"Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return.",
|
|
320
|
-
"Drag & drop files or": "
|
|
321
|
-
"Browse": "
|
|
322
|
-
"Tap to add files": "
|
|
323
|
-
"Supported Formats:": "
|
|
320
|
+
"Drag & drop files or": "Drag & drop files or",
|
|
321
|
+
"Browse": "Browse",
|
|
322
|
+
"Tap to add files": "Tap to add files",
|
|
323
|
+
"Supported Formats:": "Supported Formats:",
|
|
324
324
|
"Upload files.": "Upload files.",
|
|
325
325
|
"File upload area": "File upload area",
|
|
326
|
-
"Uploaded": "Uploaded"
|
|
327
|
-
"Ascending": "Crescente",
|
|
328
|
-
"Descending": "Decrescente",
|
|
329
|
-
"Scroll to start": "Scroll to start",
|
|
330
|
-
"Scroll to end": "Scroll to end"
|
|
326
|
+
"Uploaded": "Uploaded"
|
|
331
327
|
}
|
|
@@ -317,15 +317,11 @@
|
|
|
317
317
|
"Exit full screen table view": "Exit full screen table view",
|
|
318
318
|
"Close search": "Close search",
|
|
319
319
|
"Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return.",
|
|
320
|
-
"Drag & drop files or": "
|
|
321
|
-
"Browse": "
|
|
322
|
-
"Tap to add files": "
|
|
323
|
-
"Supported Formats:": "
|
|
320
|
+
"Drag & drop files or": "Drag & drop files or",
|
|
321
|
+
"Browse": "Browse",
|
|
322
|
+
"Tap to add files": "Tap to add files",
|
|
323
|
+
"Supported Formats:": "Supported Formats:",
|
|
324
324
|
"Upload files.": "Upload files.",
|
|
325
325
|
"File upload area": "File upload area",
|
|
326
|
-
"Uploaded": "Uploaded"
|
|
327
|
-
"Ascending": "Ascendente",
|
|
328
|
-
"Descending": "Descendente",
|
|
329
|
-
"Scroll to start": "Scroll to start",
|
|
330
|
-
"Scroll to end": "Scroll to end"
|
|
326
|
+
"Uploaded": "Uploaded"
|
|
331
327
|
}
|
|
@@ -317,15 +317,11 @@
|
|
|
317
317
|
"Exit full screen table view": "Exit full screen table view",
|
|
318
318
|
"Close search": "Close search",
|
|
319
319
|
"Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return.",
|
|
320
|
-
"Drag & drop files or": "
|
|
321
|
-
"Browse": "
|
|
322
|
-
"Tap to add files": "
|
|
323
|
-
"Supported Formats:": "
|
|
320
|
+
"Drag & drop files or": "Drag & drop files or",
|
|
321
|
+
"Browse": "Browse",
|
|
322
|
+
"Tap to add files": "Tap to add files",
|
|
323
|
+
"Supported Formats:": "Supported Formats:",
|
|
324
324
|
"Upload files.": "Upload files.",
|
|
325
325
|
"File upload area": "File upload area",
|
|
326
|
-
"Uploaded": "Uploaded"
|
|
327
|
-
"Ascending": "Ascensiune",
|
|
328
|
-
"Descending": "Coborâre",
|
|
329
|
-
"Scroll to start": "Derulare la început",
|
|
330
|
-
"Scroll to end": "Derulare la sfârșit"
|
|
326
|
+
"Uploaded": "Uploaded"
|
|
331
327
|
}
|
|
@@ -317,15 +317,11 @@
|
|
|
317
317
|
"Exit full screen table view": "Exit full screen table view",
|
|
318
318
|
"Close search": "Close search",
|
|
319
319
|
"Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return.",
|
|
320
|
-
"Drag & drop files or": "
|
|
321
|
-
"Browse": "
|
|
322
|
-
"Tap to add files": "
|
|
323
|
-
"Supported Formats:": "
|
|
320
|
+
"Drag & drop files or": "Drag & drop files or",
|
|
321
|
+
"Browse": "Browse",
|
|
322
|
+
"Tap to add files": "Tap to add files",
|
|
323
|
+
"Supported Formats:": "Supported Formats:",
|
|
324
324
|
"Upload files.": "Upload files.",
|
|
325
325
|
"File upload area": "File upload area",
|
|
326
|
-
"Uploaded": "Uploaded"
|
|
327
|
-
"Ascending": "Vzostupne",
|
|
328
|
-
"Descending": "Zostupne",
|
|
329
|
-
"Scroll to start": "Posunúť na začiatok",
|
|
330
|
-
"Scroll to end": "Posunúť na koniec"
|
|
326
|
+
"Uploaded": "Uploaded"
|
|
331
327
|
}
|
|
@@ -317,15 +317,11 @@
|
|
|
317
317
|
"Exit full screen table view": "Exit full screen table view",
|
|
318
318
|
"Close search": "Close search",
|
|
319
319
|
"Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return.",
|
|
320
|
-
"Drag & drop files or": "
|
|
321
|
-
"Browse": "
|
|
322
|
-
"Tap to add files": "
|
|
323
|
-
"Supported Formats:": "
|
|
320
|
+
"Drag & drop files or": "Drag & drop files or",
|
|
321
|
+
"Browse": "Browse",
|
|
322
|
+
"Tap to add files": "Tap to add files",
|
|
323
|
+
"Supported Formats:": "Supported Formats:",
|
|
324
324
|
"Upload files.": "Upload files.",
|
|
325
325
|
"File upload area": "File upload area",
|
|
326
|
-
"Uploaded": "Uploaded"
|
|
327
|
-
"Ascending": "Stigande",
|
|
328
|
-
"Descending": "Fallande",
|
|
329
|
-
"Scroll to start": "Scroll to start",
|
|
330
|
-
"Scroll to end": "Scroll to end"
|
|
326
|
+
"Uploaded": "Uploaded"
|
|
331
327
|
}
|
|
@@ -317,15 +317,11 @@
|
|
|
317
317
|
"Exit full screen table view": "Exit full screen table view",
|
|
318
318
|
"Close search": "Close search",
|
|
319
319
|
"Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return.",
|
|
320
|
-
"Drag & drop files or": "
|
|
321
|
-
"Browse": "
|
|
322
|
-
"Tap to add files": "
|
|
323
|
-
"Supported Formats:": "
|
|
320
|
+
"Drag & drop files or": "Drag & drop files or",
|
|
321
|
+
"Browse": "Browse",
|
|
322
|
+
"Tap to add files": "Tap to add files",
|
|
323
|
+
"Supported Formats:": "Supported Formats:",
|
|
324
324
|
"Upload files.": "Upload files.",
|
|
325
325
|
"File upload area": "File upload area",
|
|
326
|
-
"Uploaded": "Uploaded"
|
|
327
|
-
"Ascending": "จากน้อยไปมาก",
|
|
328
|
-
"Descending": "จากมากไปน้อย",
|
|
329
|
-
"Scroll to start": "เลื่อนไปที่จุดเริ่มต้น",
|
|
330
|
-
"Scroll to end": "เลื่อนไปที่จุดสิ้นสุด"
|
|
326
|
+
"Uploaded": "Uploaded"
|
|
331
327
|
}
|
|
@@ -317,15 +317,11 @@
|
|
|
317
317
|
"Exit full screen table view": "Exit full screen table view",
|
|
318
318
|
"Close search": "Close search",
|
|
319
319
|
"Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return.",
|
|
320
|
-
"Drag & drop files or": "
|
|
321
|
-
"Browse": "
|
|
322
|
-
"Tap to add files": "
|
|
323
|
-
"Supported Formats:": "
|
|
320
|
+
"Drag & drop files or": "Drag & drop files or",
|
|
321
|
+
"Browse": "Browse",
|
|
322
|
+
"Tap to add files": "Tap to add files",
|
|
323
|
+
"Supported Formats:": "Supported Formats:",
|
|
324
324
|
"Upload files.": "Upload files.",
|
|
325
325
|
"File upload area": "File upload area",
|
|
326
|
-
"Uploaded": "Uploaded"
|
|
327
|
-
"Ascending": "Artan",
|
|
328
|
-
"Descending": "Azalan",
|
|
329
|
-
"Scroll to start": "Başlangıca kaydır",
|
|
330
|
-
"Scroll to end": "Sona kaydır"
|
|
326
|
+
"Uploaded": "Uploaded"
|
|
331
327
|
}
|
|
@@ -317,15 +317,11 @@
|
|
|
317
317
|
"Exit full screen table view": "Exit full screen table view",
|
|
318
318
|
"Close search": "Close search",
|
|
319
319
|
"Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return.",
|
|
320
|
-
"Drag & drop files or": "
|
|
321
|
-
"Browse": "
|
|
322
|
-
"Tap to add files": "
|
|
323
|
-
"Supported Formats:": "
|
|
320
|
+
"Drag & drop files or": "Drag & drop files or",
|
|
321
|
+
"Browse": "Browse",
|
|
322
|
+
"Tap to add files": "Tap to add files",
|
|
323
|
+
"Supported Formats:": "Supported Formats:",
|
|
324
324
|
"Upload files.": "Upload files.",
|
|
325
325
|
"File upload area": "File upload area",
|
|
326
|
-
"Uploaded": "Uploaded"
|
|
327
|
-
"Ascending": "升序",
|
|
328
|
-
"Descending": "降序",
|
|
329
|
-
"Scroll to start": "滚动至开头",
|
|
330
|
-
"Scroll to end": "滚动至末尾"
|
|
326
|
+
"Uploaded": "Uploaded"
|
|
331
327
|
}
|
|
@@ -317,15 +317,11 @@
|
|
|
317
317
|
"Exit full screen table view": "Exit full screen table view",
|
|
318
318
|
"Close search": "Close search",
|
|
319
319
|
"Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return.",
|
|
320
|
-
"Drag & drop files or": "
|
|
321
|
-
"Browse": "
|
|
322
|
-
"Tap to add files": "
|
|
323
|
-
"Supported Formats:": "
|
|
320
|
+
"Drag & drop files or": "Drag & drop files or",
|
|
321
|
+
"Browse": "Browse",
|
|
322
|
+
"Tap to add files": "Tap to add files",
|
|
323
|
+
"Supported Formats:": "Supported Formats:",
|
|
324
324
|
"Upload files.": "Upload files.",
|
|
325
325
|
"File upload area": "File upload area",
|
|
326
|
-
"Uploaded": "Uploaded"
|
|
327
|
-
"Ascending": "遞增",
|
|
328
|
-
"Descending": "遞減",
|
|
329
|
-
"Scroll to start": "捲動至開始處",
|
|
330
|
-
"Scroll to end": "捲動至結尾處"
|
|
326
|
+
"Uploaded": "Uploaded"
|
|
331
327
|
}
|
|
@@ -47,9 +47,9 @@ export declare const alignments: {
|
|
|
47
47
|
right: number;
|
|
48
48
|
top: number;
|
|
49
49
|
};
|
|
50
|
-
"left-bottom": (triggerRect: IRect,
|
|
50
|
+
"left-bottom": (triggerRect: IRect, _1: ISizes, parentRect: IPosition, paddingX: number, _2: number) => {
|
|
51
51
|
right: number;
|
|
52
|
-
|
|
52
|
+
bottom: number;
|
|
53
53
|
};
|
|
54
54
|
right: (triggerRect: IRect, popupRect: ISizes, parentRect: IPosition, paddingX: number, _: number) => {
|
|
55
55
|
left: number;
|
|
@@ -34,9 +34,9 @@ exports.alignments = {
|
|
|
34
34
|
right: parentRect.right - triggerRect.right + triggerRect.width + paddingX,
|
|
35
35
|
top: triggerRect.top - parentRect.top
|
|
36
36
|
}),
|
|
37
|
-
"left-bottom": (triggerRect,
|
|
37
|
+
"left-bottom": (triggerRect, _1, parentRect, paddingX, _2) => ({
|
|
38
38
|
right: parentRect.right - triggerRect.right + triggerRect.width + paddingX,
|
|
39
|
-
|
|
39
|
+
bottom: parentRect.bottom - triggerRect.bottom
|
|
40
40
|
}),
|
|
41
41
|
right: (triggerRect, popupRect, parentRect, paddingX, _) => ({
|
|
42
42
|
left: triggerRect.left - parentRect.left + triggerRect.width + paddingX,
|
|
@@ -11,25 +11,27 @@ const zen_1 = require("../zen");
|
|
|
11
11
|
const calculatePosition = (triggerRef, popupRef, paddingX, paddingY, inline, alignment, alignmentsFn = alignments_1.alignments, scrollParent, forceHorizontalCenter
|
|
12
12
|
// eslint-disable-next-line complexity
|
|
13
13
|
) => {
|
|
14
|
-
var _a, _b, _c, _d, _e;
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
15
15
|
if (!triggerRef.current || !popupRef.current) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
const triggerElement = triggerRef.current;
|
|
19
19
|
const popup = popupRef.current;
|
|
20
20
|
const scrollTop = zen_1.zen.pageYOffset || ((_a = zen_1.zen.document) === null || _a === void 0 ? void 0 : _a.documentElement.scrollTop) || ((_b = zen_1.zen.document) === null || _b === void 0 ? void 0 : _b.body.scrollTop) || 0;
|
|
21
|
+
const scrollLeft = zen_1.zen.pageXOffset || ((_c = zen_1.zen.document) === null || _c === void 0 ? void 0 : _c.documentElement.scrollLeft) || ((_d = zen_1.zen.document) === null || _d === void 0 ? void 0 : _d.body.scrollLeft) || 0;
|
|
21
22
|
const triggerRect = triggerElement.getBoundingClientRect();
|
|
22
23
|
let popupRect = popup.getBoundingClientRect();
|
|
23
|
-
const relativeParent = inline ? (0, getRelativeParent_1.getRelativeParent)(triggerElement) || ((
|
|
24
|
+
const relativeParent = inline ? (0, getRelativeParent_1.getRelativeParent)(triggerElement) || ((_e = zen_1.zen.document) === null || _e === void 0 ? void 0 : _e.body) : (_f = zen_1.zen.document) === null || _f === void 0 ? void 0 : _f.body;
|
|
24
25
|
popup.classList.add("zen-calculate-position");
|
|
25
26
|
const parentDomRect = (relativeParent === null || relativeParent === void 0 ? void 0 : relativeParent.getBoundingClientRect()) || { top: 0, left: 0, bottom: 0, right: 0, width: 0, height: 0, x: 0, y: 0 };
|
|
26
27
|
popup.classList.remove("zen-calculate-position");
|
|
27
28
|
const parentBorders = (0, getBorders_1.getBorders)(relativeParent || {});
|
|
28
29
|
const parentMargins = (0, getMargins_1.getMargins)(relativeParent || {});
|
|
29
30
|
let parentTop = parentDomRect.top + parentBorders.top - parentMargins.top;
|
|
30
|
-
|
|
31
|
-
if (!inline && relativeParent === ((
|
|
31
|
+
let parentLeft = parentDomRect.left + parentBorders.left - parentMargins.left;
|
|
32
|
+
if (!inline && relativeParent === ((_g = zen_1.zen.document) === null || _g === void 0 ? void 0 : _g.body)) {
|
|
32
33
|
parentTop = -scrollTop + parentBorders.top - parentMargins.top;
|
|
34
|
+
parentLeft = -scrollLeft + parentBorders.left - parentMargins.left;
|
|
33
35
|
}
|
|
34
36
|
const parentRect = {
|
|
35
37
|
top: parentTop,
|
package/esm/calendar/calendar.js
CHANGED
|
@@ -5,7 +5,6 @@ import { addDays, addMonth, getCalendarMonthDates, getEndOfMonth, getEndOfWeek,
|
|
|
5
5
|
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
6
6
|
import { IconChevronRightSmall } from "../icons/iconChevronRightSmall";
|
|
7
7
|
import { IconChevronLeftSmall } from "../icons/iconChevronLeftSmall";
|
|
8
|
-
import { useDirectionalIcon } from "../utils/localization/useDirectionalIcon";
|
|
9
8
|
import { ParallelSelection, ParallelSelectionTrigger } from "../parallelSelection/parallelSelection";
|
|
10
9
|
import { getButtonLabel, getCalendarRange, isDateInRange, isLeftBorderVisible, isRightBorderVisible, setFocusTo } from "./calendarUtils";
|
|
11
10
|
import { useLanguage } from "../utils/localization/useLanguage";
|
|
@@ -846,8 +845,6 @@ export const Calendar = ({
|
|
|
846
845
|
const {
|
|
847
846
|
translate
|
|
848
847
|
} = useLanguage();
|
|
849
|
-
const PrevMonthIcon = useDirectionalIcon(IconChevronLeftSmall, IconChevronRightSmall);
|
|
850
|
-
const NextMonthIcon = useDirectionalIcon(IconChevronRightSmall, IconChevronLeftSmall);
|
|
851
848
|
const fromDate = useMemo(() => value.from ? toDayStart(value.from) : undefined, [value.from]);
|
|
852
849
|
const toDate = useMemo(() => value.to ? toDayStart(value.to) : undefined, [value.to]);
|
|
853
850
|
const driveClassName = useDriveClassName("zen-calendar");
|
|
@@ -1101,7 +1098,7 @@ export const Calendar = ({
|
|
|
1101
1098
|
children: [isMobileView ? null : _jsx(TextIconButton, {
|
|
1102
1099
|
className: "zen-calendar__btn",
|
|
1103
1100
|
type: "tertiary-black",
|
|
1104
|
-
icon:
|
|
1101
|
+
icon: IconChevronLeftSmall,
|
|
1105
1102
|
title: translate("Previous month"),
|
|
1106
1103
|
onClick: () => changeView(addMonth(viewDate, -1)),
|
|
1107
1104
|
iconPosition: ButtonIconPosition.Start
|
|
@@ -1135,14 +1132,14 @@ export const Calendar = ({
|
|
|
1135
1132
|
children: [_jsx(TextIconButton, {
|
|
1136
1133
|
className: "zen-calendar__btn",
|
|
1137
1134
|
type: "tertiary-black",
|
|
1138
|
-
icon:
|
|
1135
|
+
icon: IconChevronLeftSmall,
|
|
1139
1136
|
title: translate("Previous month"),
|
|
1140
1137
|
onClick: () => changeView(addMonth(viewDate, -1)),
|
|
1141
1138
|
iconPosition: ButtonIconPosition.Start
|
|
1142
1139
|
}), _jsx(TextIconButton, {
|
|
1143
1140
|
className: "zen-calendar__btn",
|
|
1144
1141
|
type: "tertiary-black",
|
|
1145
|
-
icon:
|
|
1142
|
+
icon: IconChevronRightSmall,
|
|
1146
1143
|
title: translate("Next month"),
|
|
1147
1144
|
onClick: () => changeView(addMonth(viewDate, 1)),
|
|
1148
1145
|
iconPosition: ButtonIconPosition.Start
|
|
@@ -1150,7 +1147,7 @@ export const Calendar = ({
|
|
|
1150
1147
|
}) : null, isMobileView ? null : _jsx(TextIconButton, {
|
|
1151
1148
|
className: "zen-calendar__btn",
|
|
1152
1149
|
type: "tertiary-black",
|
|
1153
|
-
icon:
|
|
1150
|
+
icon: IconChevronRightSmall,
|
|
1154
1151
|
title: translate("Next month"),
|
|
1155
1152
|
onClick: () => changeView(addMonth(viewDate, 1)),
|
|
1156
1153
|
iconPosition: ButtonIconPosition.Start
|
|
@@ -4,8 +4,6 @@ import { classNames } from "../../commonHelpers/classNames/classNames";
|
|
|
4
4
|
import { useDriveClassName } from "../../utils/theme/useDriveClassName";
|
|
5
5
|
import { useDrive } from "../../utils/theme/useDrive";
|
|
6
6
|
import { IconChevronRightSmall } from "../../icons/iconChevronRightSmall";
|
|
7
|
-
import { IconChevronLeftSmall } from "../../icons/iconChevronLeftSmall";
|
|
8
|
-
import { useDirectionalIcon } from "../../utils/localization/useDirectionalIcon";
|
|
9
7
|
const VALID_HEADING_TAGS = new Set(["h1", "h2", "h3", "h4", "h5", "h6"]);
|
|
10
8
|
export const Title = ({ isMobile, link, target, title, id, icon, iconType, className = "", onClick, titleAs }) => {
|
|
11
9
|
const driveClassNames = useDriveClassName("zen-card-title");
|
|
@@ -13,8 +11,7 @@ export const Title = ({ isMobile, link, target, title, id, icon, iconType, class
|
|
|
13
11
|
const iconClassName = iconType ? `zen-card-title__icon--${iconType}` : "";
|
|
14
12
|
const iconSize = useMemo(() => (isDrive ? "huge" : "large"), [isDrive]);
|
|
15
13
|
const iconElement = useMemo(() => (icon ? _jsx("span", { className: classNames(["zen-card-title__icon", iconClassName]), children: createElement(icon, { size: iconSize }) }) : null), [icon, iconSize, iconClassName]);
|
|
16
|
-
const
|
|
17
|
-
const chevron = useMemo(() => (_jsx("span", { className: "zen-card-title__link-chevron", children: _jsx(ChevronIcon, { size: iconSize, className: "zen-card-title__chevron-icon" }) })), [ChevronIcon, iconSize]);
|
|
14
|
+
const chevron = useMemo(() => (_jsx("span", { className: "zen-card-title__link-chevron", children: _jsx(IconChevronRightSmall, { size: iconSize, className: "zen-card-title__chevron-icon" }) })), [iconSize]);
|
|
18
15
|
const titleClasses = classNames(["zen-card-title", driveClassNames || "", onClick ? "zen-card-title__clickable" : ""]);
|
|
19
16
|
if (onClick) {
|
|
20
17
|
return (_jsxs("button", { type: "button", className: titleClasses, onClick: onClick, children: [iconElement, _jsxs("span", { title: title, id: id, className: classNames(["zen-card-title__text", isMobile && !isDrive ? "zen-card-title__text--mobile" : "", className]), children: [title, chevron] })] }));
|
|
@@ -2,8 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { classNames } from "../../commonHelpers/classNames/classNames";
|
|
3
3
|
import { ButtonIconPosition, TextIconButton } from "../../textIconButton/textIconButton";
|
|
4
4
|
import { IconArrowRight } from "../../icons/iconArrowRight";
|
|
5
|
-
import { IconArrowLeft } from "../../icons/iconArrowLeft";
|
|
6
|
-
import { useDirectionalIcon } from "../../utils/localization/useDirectionalIcon";
|
|
7
5
|
import { useDriveClassName } from "../../utils/theme/useDriveClassName";
|
|
8
6
|
import { useMobile } from "../../commonHelpers/hooks/useMobile";
|
|
9
7
|
import { useDrive } from "../../utils/theme/useDrive";
|
|
@@ -13,9 +11,8 @@ export const TitleLink = ({ titleIconClasses, ariaLabel, children, link, id, cla
|
|
|
13
11
|
const isMobile = useMobile();
|
|
14
12
|
const isDrive = useDrive();
|
|
15
13
|
const titleAriaLabel = ariaLabel || "";
|
|
16
|
-
const ArrowIcon = useDirectionalIcon(IconArrowRight, IconArrowLeft);
|
|
17
14
|
if (!isMobile) {
|
|
18
|
-
return (_jsxs("a", { id: id, className: classNames(["zen-link", "zen-title-link", className]), href: link, "aria-label": titleAriaLabel, children: [_jsx("span", { className: classNames(["zen-title-link__text", titleLinkTextDriveClasses || ""]), children: children }), _jsx(
|
|
15
|
+
return (_jsxs("a", { id: id, className: classNames(["zen-link", "zen-title-link", className]), href: link, "aria-label": titleAriaLabel, children: [_jsx("span", { className: classNames(["zen-title-link__text", titleLinkTextDriveClasses || ""]), children: children }), _jsx(IconArrowRight, { size: isDrive ? "huge" : "large", className: classNames(["zen-title-link__icon", titleIconClasses || ""]) })] }));
|
|
19
16
|
}
|
|
20
|
-
return (_jsx(TextIconButton, { type: "tertiary", iconClasses: titleIconClasses, id: id, "aria-label": titleAriaLabel, link: link, iconPosition: ButtonIconPosition.End, icon:
|
|
17
|
+
return (_jsx(TextIconButton, { type: "tertiary", iconClasses: titleIconClasses, id: id, "aria-label": titleAriaLabel, link: link, iconPosition: ButtonIconPosition.End, icon: IconArrowRight, iconSize: isDrive ? "huge" : "large", className: classNames(["zen-title-link", "zen-title-link__icon", titleLinkClasses || "", className || ""]), children: children && _jsx("span", { className: classNames(["zen-title-link__text", titleLinkTextDriveClasses || ""]), children: children }) }));
|
|
21
18
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IYAxisMeta } from "../interfaces";
|
|
2
|
-
export declare const getDefaultOptions: (yAxis: IYAxisMeta[], isTimedData: boolean, isDark: boolean, translate: (s: string) => string
|
|
2
|
+
export declare const getDefaultOptions: (yAxis: IYAxisMeta[], isTimedData: boolean, isDark: boolean, translate: (s: string) => string) => {
|
|
3
3
|
responsive: boolean;
|
|
4
4
|
maintainAspectRatio: boolean;
|
|
5
5
|
scales: {
|
|
@@ -10,7 +10,6 @@ export declare const getDefaultOptions: (yAxis: IYAxisMeta[], isTimedData: boole
|
|
|
10
10
|
grid: {
|
|
11
11
|
display: boolean;
|
|
12
12
|
};
|
|
13
|
-
reverse: boolean;
|
|
14
13
|
type: string;
|
|
15
14
|
ticks: {
|
|
16
15
|
source: string;
|
|
@@ -7,10 +7,8 @@ const defaultGridBorderStyle = {
|
|
|
7
7
|
display: false,
|
|
8
8
|
dash: [2, 2]
|
|
9
9
|
};
|
|
10
|
-
export const getDefaultOptions = (yAxis, isTimedData, isDark, translate
|
|
10
|
+
export const getDefaultOptions = (yAxis, isTimedData, isDark, translate) => {
|
|
11
11
|
const textColor = isDark ? "#C0CCD8" : "#4E677E";
|
|
12
|
-
const primaryYPosition = isRtl ? "right" : "left";
|
|
13
|
-
const secondaryYPosition = isRtl ? "left" : "right";
|
|
14
12
|
const scales = {
|
|
15
13
|
x: {
|
|
16
14
|
title: {
|
|
@@ -19,7 +17,6 @@ export const getDefaultOptions = (yAxis, isTimedData, isDark, translate, isRtl =
|
|
|
19
17
|
grid: {
|
|
20
18
|
display: false
|
|
21
19
|
},
|
|
22
|
-
reverse: isRtl,
|
|
23
20
|
type: isTimedData ? "time" : "category",
|
|
24
21
|
ticks: isTimedData
|
|
25
22
|
? {
|
|
@@ -57,7 +54,7 @@ export const getDefaultOptions = (yAxis, isTimedData, isDark, translate, isRtl =
|
|
|
57
54
|
border: defaultGridBorderStyle,
|
|
58
55
|
min: yAxis[i].min,
|
|
59
56
|
max: yAxis[i].max,
|
|
60
|
-
position: i === 0 ?
|
|
57
|
+
position: i === 0 ? "left" : "right"
|
|
61
58
|
};
|
|
62
59
|
}
|
|
63
60
|
return {
|
package/esm/chart/barChart.js
CHANGED
|
@@ -22,7 +22,6 @@ import { classNames } from "../commonHelpers/classNames/classNames";
|
|
|
22
22
|
import { legendPlugin } from "./plugins/legend/legendPlugin";
|
|
23
23
|
import { ChartAxis } from "./chartAxis/chartAxis";
|
|
24
24
|
import { useLanguage } from "../utils/localization/useLanguage";
|
|
25
|
-
import { useIsRTL } from "../utils/localization/useIsRTL";
|
|
26
25
|
import { isDateRange } from "./utils/isDateRange";
|
|
27
26
|
import { getYAxisMeta } from "./utils/getYAxisMeta";
|
|
28
27
|
import { getDefaultOptions } from "./barChart/getDefaultOptions";
|
|
@@ -42,7 +41,6 @@ export const BarChart = (_a) => {
|
|
|
42
41
|
const { translate } = useLanguage();
|
|
43
42
|
const isDrive = useDrive();
|
|
44
43
|
const isMobile = useMobile();
|
|
45
|
-
const isRtl = useIsRTL();
|
|
46
44
|
const fontSize = useMemo(() => (isDrive ? (isMobile ? 14 : 16) : 12), [isDrive, isMobile]);
|
|
47
45
|
const { dark } = useContext(themeContext);
|
|
48
46
|
useEffect(() => {
|
|
@@ -58,15 +56,15 @@ export const BarChart = (_a) => {
|
|
|
58
56
|
const isTimedData = useMemo(() => isDateRange(data, false), [data]);
|
|
59
57
|
const isStacked = 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]);
|
|
60
58
|
const yAxisMeta = useMemo(() => getYAxisMeta(data, isStacked), [data, isStacked]);
|
|
61
|
-
const defOptions = useMemo(() => getDefaultOptions(yAxisMeta, isTimedData, dark, translate
|
|
59
|
+
const defOptions = useMemo(() => getDefaultOptions(yAxisMeta, isTimedData, dark, translate), [yAxisMeta, isTimedData, dark, translate]);
|
|
62
60
|
const chartOptions = deepMerge(defOptions, options);
|
|
63
61
|
const { isHidden, toggleHidden } = useHidden();
|
|
64
62
|
const chartData = useMemo(() => {
|
|
65
63
|
const chData = convertDates(data, toLocalDateTime);
|
|
66
64
|
chData.datasets = chData.datasets.map((ds, i) => getDefaultDatasetStyle(ds, i));
|
|
67
|
-
chData.datasets = chData.datasets.map((ds, i) => (Object.assign(Object.assign({}, ds), { hidden: isHidden(i)
|
|
65
|
+
chData.datasets = chData.datasets.map((ds, i) => (Object.assign(Object.assign({}, ds), { hidden: isHidden(i) })));
|
|
68
66
|
return chData;
|
|
69
|
-
}, [data, isHidden, toLocalDateTime
|
|
67
|
+
}, [data, isHidden, toLocalDateTime]);
|
|
70
68
|
const chartTooltip = useMemo(() => TooltipPlugin(tooltipId, tooltip, "top", isHidden, dark), [tooltipId, tooltip, isHidden, dark]);
|
|
71
69
|
const chartLegend = useMemo(() => legendPlugin(legendId, legend, isDrive, isHidden, toggleHidden), [isDrive, isHidden, legend, legendId, toggleHidden]);
|
|
72
70
|
const chartPlugins = useMemo(() => [...(plugins || []), chartTooltip, chartLegend], [chartLegend, chartTooltip, plugins]);
|
|
@@ -74,5 +72,5 @@ export const BarChart = (_a) => {
|
|
|
74
72
|
const intSummary = useSummary(summary, chartData);
|
|
75
73
|
const isMainHidden = useMemo(() => isHidden(0), [isHidden]);
|
|
76
74
|
const toggleMainData = useCallback(() => toggleHidden(0), [toggleHidden]);
|
|
77
|
-
return (_jsxs("div", { className: classNames(["zen-chart", className || ""]), children: [insight ? _jsx(ChartInsight, Object.assign({}, insight)) : null, summary ? _jsx(Summary, Object.assign({ onToggle: toggleMainData, isEnabled: isMainHidden }, intSummary)) : null, (isDrive ? undefined : xLabels) || yLabels.length > 0 ? (_jsx(ChartAxis, { xLabel: isDrive ? undefined : xLabels, yLabels: yLabels, yAxisPosition:
|
|
75
|
+
return (_jsxs("div", { className: classNames(["zen-chart", className || ""]), children: [insight ? _jsx(ChartInsight, Object.assign({}, insight)) : null, summary ? _jsx(Summary, Object.assign({ onToggle: toggleMainData, isEnabled: isMainHidden }, intSummary)) : null, (isDrive ? undefined : xLabels) || yLabels.length > 0 ? (_jsx(ChartAxis, { xLabel: isDrive ? undefined : xLabels, yLabels: yLabels, yAxisPosition: "right" })) : null, _jsx("div", { className: "zen-chart__chart", children: _jsx(Bar, Object.assign({ options: chartOptions, data: chartData, plugins: chartPlugins }, rest, { "aria-hidden": true })) }), _jsx("div", { className: "zen-chart__legend", id: legendId }), isDrive && xLabels ? _jsx("div", { className: "zen-chart__x-axis", children: xLabels }) : null, _jsx(AccessibleChart, { type: "bar", data: chartData, options: chartOptions })] }));
|
|
78
76
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IXAxisMeta, IYAxisMeta } from "../interfaces";
|
|
2
|
-
export declare const getDefaultOptions: (yAxis: IYAxisMeta[], xAxis: IXAxisMeta, isTimedData: boolean, ticks: number, isDark: boolean, translate: (s: string) => string
|
|
2
|
+
export declare const getDefaultOptions: (yAxis: IYAxisMeta[], xAxis: IXAxisMeta, isTimedData: boolean, ticks: number, isDark: boolean, translate: (s: string) => string) => {
|
|
3
3
|
responsive: boolean;
|
|
4
4
|
maintainAspectRatio: boolean;
|
|
5
5
|
scales: {
|
|
@@ -10,7 +10,6 @@ export declare const getDefaultOptions: (yAxis: IYAxisMeta[], xAxis: IXAxisMeta,
|
|
|
10
10
|
grid: {
|
|
11
11
|
display: boolean;
|
|
12
12
|
};
|
|
13
|
-
reverse: boolean;
|
|
14
13
|
type: string;
|
|
15
14
|
time: {
|
|
16
15
|
unit: string;
|
|
@@ -44,11 +44,9 @@ const getFormatFromDateRange = (minDate, maxDate, ticks) => {
|
|
|
44
44
|
}
|
|
45
45
|
return { unit: "millisecond", format: "HH:mm:ss.l" };
|
|
46
46
|
};
|
|
47
|
-
export const getDefaultOptions = (yAxis, xAxis, isTimedData, ticks, isDark, translate
|
|
47
|
+
export const getDefaultOptions = (yAxis, xAxis, isTimedData, ticks, isDark, translate) => {
|
|
48
48
|
const time = getFormatFromDateRange(xAxis.minDate, xAxis.maxDate, ticks);
|
|
49
49
|
const textColor = isDark ? "#C0CCD8" : "#4E677E";
|
|
50
|
-
const primaryYPosition = isRtl ? "right" : "left";
|
|
51
|
-
const secondaryYPosition = isRtl ? "left" : "right";
|
|
52
50
|
const scales = {
|
|
53
51
|
x: {
|
|
54
52
|
title: {
|
|
@@ -57,7 +55,6 @@ export const getDefaultOptions = (yAxis, xAxis, isTimedData, ticks, isDark, tran
|
|
|
57
55
|
grid: {
|
|
58
56
|
display: false
|
|
59
57
|
},
|
|
60
|
-
reverse: isRtl,
|
|
61
58
|
type: isTimedData ? "time" : "linear",
|
|
62
59
|
time: isTimedData
|
|
63
60
|
? {
|
|
@@ -104,7 +101,7 @@ export const getDefaultOptions = (yAxis, xAxis, isTimedData, ticks, isDark, tran
|
|
|
104
101
|
border: defaultGridBorderStyle,
|
|
105
102
|
min: yAxis[i].min,
|
|
106
103
|
max: yAxis[i].max,
|
|
107
|
-
position: i === 0 ?
|
|
104
|
+
position: i === 0 ? "left" : "right"
|
|
108
105
|
};
|
|
109
106
|
}
|
|
110
107
|
return {
|
package/esm/chart/lineChart.js
CHANGED
|
@@ -31,7 +31,6 @@ import { getDefaultOptions } from "./lineChart/getDefaultOptions";
|
|
|
31
31
|
import { useHidden } from "./utils/useHidden";
|
|
32
32
|
import { LinePlugin } from "./plugins/linePlugin/linePlugin";
|
|
33
33
|
import { useLanguage } from "../utils/localization/useLanguage";
|
|
34
|
-
import { useIsRTL } from "../utils/localization/useIsRTL";
|
|
35
34
|
import { useChartTicks } from "./lineChart/useChartTicks";
|
|
36
35
|
import { ChartInsight } from "./chartInsight/chartInsight";
|
|
37
36
|
import { getXAxisMeta } from "./utils/getXAxisMeta";
|
|
@@ -44,7 +43,6 @@ export const LineChart = (_a) => {
|
|
|
44
43
|
const { translate } = useLanguage();
|
|
45
44
|
const isDrive = useDrive();
|
|
46
45
|
const isMobile = useMobile();
|
|
47
|
-
const isRtl = useIsRTL();
|
|
48
46
|
const fontSize = useMemo(() => (isDrive ? (isMobile ? 14 : 16) : 12), [isDrive, isMobile]);
|
|
49
47
|
const { dark } = useContext(themeContext);
|
|
50
48
|
useEffect(() => {
|
|
@@ -75,7 +73,7 @@ export const LineChart = (_a) => {
|
|
|
75
73
|
const yAxisMeta = useMemo(() => getYAxisMeta(chartData), [chartData]);
|
|
76
74
|
const xAxisMeta = useMemo(() => getXAxisMeta(chartData, isTimedData), [chartData, isTimedData]);
|
|
77
75
|
const { chartRef, ticks } = useChartTicks();
|
|
78
|
-
const defOptions = useMemo(() => getDefaultOptions(yAxisMeta, xAxisMeta, isTimedData, ticks, dark, translate
|
|
76
|
+
const defOptions = useMemo(() => getDefaultOptions(yAxisMeta, xAxisMeta, isTimedData, ticks, dark, translate), [yAxisMeta, xAxisMeta, isTimedData, ticks, dark, translate]);
|
|
79
77
|
const chartOptions = deepMerge(defOptions, options);
|
|
80
78
|
const chartTooltip = useMemo(() => LinePlugin(tooltipId, tooltip, dark), [tooltip, tooltipId, dark]);
|
|
81
79
|
const chartLegend = useMemo(() => legendPlugin(legendId, legend, isDrive, isHidden, toggleHidden), [isDrive, legend, legendId, isHidden, toggleHidden]);
|
|
@@ -84,5 +82,5 @@ export const LineChart = (_a) => {
|
|
|
84
82
|
const intSummary = useSummary(summary, chartData);
|
|
85
83
|
const isMainHidden = useMemo(() => isHidden(0), [isHidden]);
|
|
86
84
|
const toggleMainDataset = useCallback(() => toggleHidden(0), [toggleHidden]);
|
|
87
|
-
return (_jsxs("div", { className: classNames(["zen-chart", className || ""]), ref: chartRef, children: [insight ? _jsx(ChartInsight, Object.assign({}, insight)) : null, summary !== false ? _jsx(Summary, Object.assign({}, intSummary, { onToggle: toggleMainDataset, isEnabled: isMainHidden })) : null, (isDrive ? undefined : xLabels) || yLabels.length > 0 ?
|
|
85
|
+
return (_jsxs("div", { className: classNames(["zen-chart", className || ""]), ref: chartRef, children: [insight ? _jsx(ChartInsight, Object.assign({}, insight)) : null, summary !== false ? _jsx(Summary, Object.assign({}, intSummary, { onToggle: toggleMainDataset, isEnabled: isMainHidden })) : null, (isDrive ? undefined : xLabels) || yLabels.length > 0 ? _jsx(ChartAxis, { xLabel: isDrive ? undefined : xLabels, yLabels: yLabels }) : null, _jsx("div", { className: "zen-chart__chart", children: _jsx(Line, Object.assign({ width: 100, height: 100, options: chartOptions, data: chartData, plugins: chartPlugins, "aria-hidden": true }, rest)) }), _jsx("div", { className: "zen-chart__legend", id: legendId }), isDrive && xLabels ? _jsx("div", { className: "zen-chart__x-axis", children: xLabels }) : null, _jsx(AccessibleChart, { type: "line", data: chartData, options: chartOptions })] }));
|
|
88
86
|
};
|