@geotab/zenith 3.2.1 → 3.3.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 +25 -1
- package/dist/card/card.d.ts +3 -0
- package/dist/card/card.js +15 -5
- package/dist/card/components/cardToggle/cardToggle.d.ts +5 -0
- package/dist/card/components/cardToggle/cardToggle.js +7 -0
- package/dist/card/components/title.js +3 -3
- package/dist/cardContainer/cardContainer.d.ts +2 -1
- package/dist/cardContainer/cardContainer.js +4 -3
- package/dist/chart/barChart/getDefaultDatasetStyle.js +8 -6
- package/dist/chart/lineChart/getDatasetColor.js +8 -6
- package/dist/chart/lineChart/useSummary.js +1 -1
- package/dist/chart/pieChart/getDefaultDatasetStyle.js +8 -6
- package/dist/chart/plugins/linePlugin/getInterpolatedValue.js +1 -1
- package/dist/chart/plugins/linePlugin/linePlugin.js +16 -4
- package/dist/commonHelpers/hooks/useEscape.js +4 -0
- package/dist/commonHelpers/hooks/usePillSize.d.ts +2 -1
- package/dist/commonHelpers/hooks/usePillSize.js +6 -3
- package/dist/commonStyles/colors/colors.less +9 -0
- package/dist/dataFeed/dataFeed.d.ts +2 -1
- package/dist/dataFeed/dataFeed.js +18 -3
- package/dist/dataFeed/dataFeedColumnsItems.d.ts +2 -1
- package/dist/dataFeed/dataFeedColumnsItems.js +6 -4
- package/dist/dataGrid/cell/cell.d.ts +2 -1
- package/dist/dataGrid/cell/cell.js +2 -1
- package/dist/dataGrid/dataGrid.d.ts +3 -1
- package/dist/dataGrid/dataGrid.js +7 -2
- package/dist/dataGrid/row/row.d.ts +3 -1
- package/dist/dataGrid/row/row.js +3 -3
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +8 -4
- package/dist/divider/divider.d.ts +5 -5
- package/dist/divider/divider.js +6 -2
- package/dist/filtersBar/components/filtersBarPeriodPicker/filtersBarPeriodPicker.js +2 -2
- package/dist/footerButtons/footerButtons.d.ts +4 -0
- package/dist/footerButtons/footerButtons.js +4 -6
- package/dist/groupsFilterRaw/groupsFilterRaw.js +1 -0
- package/dist/index.css +475 -255
- package/dist/index.d.ts +3 -1
- package/dist/index.js +20 -18
- package/dist/lineChart/utils.js +2 -9
- package/dist/list/listItem/listItem.js +26 -0
- package/dist/mobileSheet/components/mobileSheetFooter.d.ts +1 -0
- package/dist/mobileSheet/components/mobileSheetFooter.js +1 -1
- package/dist/mobileSheet/mobileSheet.js +1 -1
- package/dist/pill/components/pillActionable/pillActionable.js +5 -4
- package/dist/pill/components/pillNonActionable/pillNonActionable.js +11 -5
- package/dist/pill/interfaces/pillActionable.interface.d.ts +1 -0
- package/dist/pill/interfaces/pillNonActionable.interface.d.ts +1 -0
- package/dist/pillExpandable/pillExpandable.js +6 -6
- package/dist/rangeRaw/rangeRaw.js +1 -0
- package/dist/selectRaw/selectRaw.js +6 -3
- package/dist/sidePanel/sidePanel.d.ts +1 -1
- package/dist/sidePanel/sidePanel.js +7 -3
- package/dist/table/children/tableDetailPanel.d.ts +9 -0
- package/dist/table/children/tableDetailPanel.js +6 -0
- package/dist/table/children/useTableChildren.d.ts +2 -1
- package/dist/table/children/useTableChildren.js +17 -2
- package/dist/table/detailPanel/detailPanel.d.ts +4 -0
- package/dist/table/detailPanel/detailPanel.js +140 -0
- package/dist/table/detailPanel/detailPanelHeader.d.ts +4 -0
- package/dist/table/detailPanel/detailPanelHeader.js +105 -0
- package/dist/table/detailPanel/interfaces.d.ts +8 -0
- package/dist/table/detailPanel/interfaces.js +2 -0
- package/dist/table/table.d.ts +6 -1
- package/dist/table/table.js +248 -68
- package/dist/utils/localization/translations/cs.json +3 -1
- package/dist/utils/localization/translations/da-DK.json +3 -1
- package/dist/utils/localization/translations/de.json +3 -1
- package/dist/utils/localization/translations/en-json.d.ts +315 -0
- package/dist/utils/localization/translations/en-json.js +318 -0
- package/dist/utils/localization/translations/en.json +5 -1
- package/dist/utils/localization/translations/es.json +3 -1
- package/dist/utils/localization/translations/fi-FI.json +3 -1
- package/dist/utils/localization/translations/fr-FR.json +3 -1
- package/dist/utils/localization/translations/fr.json +3 -1
- package/dist/utils/localization/translations/hu-HU.json +3 -1
- package/dist/utils/localization/translations/id.json +3 -1
- package/dist/utils/localization/translations/it.json +3 -1
- package/dist/utils/localization/translations/ja.json +3 -1
- package/dist/utils/localization/translations/ko-KR.json +3 -1
- package/dist/utils/localization/translations/ms.json +3 -1
- package/dist/utils/localization/translations/nb-NO.json +3 -1
- package/dist/utils/localization/translations/nl.json +3 -1
- package/dist/utils/localization/translations/pl.json +3 -1
- package/dist/utils/localization/translations/pt-BR.json +3 -1
- package/dist/utils/localization/translations/sk-SK.json +3 -1
- package/dist/utils/localization/translations/sv.json +3 -1
- package/dist/utils/localization/translations/th.json +3 -1
- package/dist/utils/localization/translations/tr.json +3 -1
- package/dist/utils/localization/translations/zh-Hans.json +3 -1
- package/dist/utils/localization/translations/zh-TW.json +3 -1
- package/esm/card/card.d.ts +3 -0
- package/esm/card/card.js +15 -5
- package/esm/card/components/cardToggle/cardToggle.d.ts +5 -0
- package/esm/card/components/cardToggle/cardToggle.js +3 -0
- package/esm/card/components/title.js +3 -3
- package/esm/cardContainer/cardContainer.d.ts +2 -1
- package/esm/cardContainer/cardContainer.js +4 -3
- package/esm/chart/barChart/getDefaultDatasetStyle.js +8 -6
- package/esm/chart/lineChart/getDatasetColor.js +8 -6
- package/esm/chart/lineChart/useSummary.js +1 -1
- package/esm/chart/pieChart/getDefaultDatasetStyle.js +8 -6
- package/esm/chart/plugins/linePlugin/getInterpolatedValue.js +1 -1
- package/esm/chart/plugins/linePlugin/linePlugin.js +16 -4
- package/esm/commonHelpers/hooks/useEscape.js +4 -0
- package/esm/commonHelpers/hooks/usePillSize.d.ts +2 -1
- package/esm/commonHelpers/hooks/usePillSize.js +6 -3
- package/esm/commonStyles/colors/colorsConstant.d.ts +6 -0
- package/esm/commonStyles/colors/colorsConstant.js +50 -0
- package/esm/dataFeed/dataFeed.d.ts +2 -1
- package/esm/dataFeed/dataFeed.js +18 -3
- package/esm/dataFeed/dataFeedColumnsItems.d.ts +2 -1
- package/esm/dataFeed/dataFeedColumnsItems.js +6 -4
- package/esm/dataGrid/cell/cell.d.ts +2 -1
- package/esm/dataGrid/cell/cell.js +2 -1
- package/esm/dataGrid/dataGrid.d.ts +3 -1
- package/esm/dataGrid/dataGrid.js +7 -2
- package/esm/dataGrid/row/row.d.ts +3 -1
- package/esm/dataGrid/row/row.js +3 -3
- package/esm/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +8 -4
- package/esm/divider/divider.d.ts +5 -5
- package/esm/divider/divider.js +6 -2
- package/esm/filtersBar/components/filtersBarPeriodPicker/filtersBarPeriodPicker.js +2 -2
- package/esm/footerButtons/footerButtons.d.ts +4 -0
- package/esm/footerButtons/footerButtons.js +4 -6
- package/esm/groupsFilterRaw/groupsFilterRaw.js +1 -0
- package/esm/index.d.ts +3 -1
- package/esm/index.js +1 -0
- package/esm/lineChart/utils.js +2 -9
- package/esm/list/listItem/listItem.js +26 -0
- package/esm/mobileSheet/components/mobileSheetFooter.d.ts +1 -0
- package/esm/mobileSheet/components/mobileSheetFooter.js +1 -1
- package/esm/mobileSheet/mobileSheet.js +1 -1
- package/esm/pill/components/pillActionable/pillActionable.js +5 -4
- package/esm/pill/components/pillNonActionable/pillNonActionable.js +11 -5
- package/esm/pill/interfaces/pillActionable.interface.d.ts +1 -0
- package/esm/pill/interfaces/pillNonActionable.interface.d.ts +1 -0
- package/esm/pillExpandable/pillExpandable.js +6 -6
- package/esm/rangeRaw/rangeRaw.js +1 -0
- package/esm/selectRaw/selectRaw.js +6 -3
- package/esm/sidePanel/sidePanel.d.ts +1 -1
- package/esm/sidePanel/sidePanel.js +7 -3
- package/esm/table/children/tableDetailPanel.d.ts +9 -0
- package/esm/table/children/tableDetailPanel.js +2 -0
- package/esm/table/children/useTableChildren.d.ts +2 -1
- package/esm/table/children/useTableChildren.js +17 -2
- package/esm/table/detailPanel/detailPanel.d.ts +4 -0
- package/esm/table/detailPanel/detailPanel.js +131 -0
- package/esm/table/detailPanel/detailPanelHeader.d.ts +4 -0
- package/esm/table/detailPanel/detailPanelHeader.js +96 -0
- package/esm/table/detailPanel/interfaces.d.ts +8 -0
- package/esm/table/table.d.ts +6 -1
- package/esm/table/table.js +201 -61
- package/esm/utils/localization/translations/cs.json +3 -1
- package/esm/utils/localization/translations/da-DK.json +3 -1
- package/esm/utils/localization/translations/de.json +3 -1
- package/esm/utils/localization/translations/en-json.d.ts +315 -0
- package/esm/utils/localization/translations/en-json.js +315 -0
- package/esm/utils/localization/translations/en.json +5 -1
- package/esm/utils/localization/translations/es.json +3 -1
- package/esm/utils/localization/translations/fi-FI.json +3 -1
- package/esm/utils/localization/translations/fr-FR.json +3 -1
- package/esm/utils/localization/translations/fr.json +3 -1
- package/esm/utils/localization/translations/hu-HU.json +3 -1
- package/esm/utils/localization/translations/id.json +3 -1
- package/esm/utils/localization/translations/it.json +3 -1
- package/esm/utils/localization/translations/ja.json +3 -1
- package/esm/utils/localization/translations/ko-KR.json +3 -1
- package/esm/utils/localization/translations/ms.json +3 -1
- package/esm/utils/localization/translations/nb-NO.json +3 -1
- package/esm/utils/localization/translations/nl.json +3 -1
- package/esm/utils/localization/translations/pl.json +3 -1
- package/esm/utils/localization/translations/pt-BR.json +3 -1
- package/esm/utils/localization/translations/sk-SK.json +3 -1
- package/esm/utils/localization/translations/sv.json +3 -1
- package/esm/utils/localization/translations/th.json +3 -1
- package/esm/utils/localization/translations/tr.json +3 -1
- package/esm/utils/localization/translations/zh-Hans.json +3 -1
- package/esm/utils/localization/translations/zh-TW.json +3 -1
- package/package.json +10 -10
- package/dist/nav/storyHelpers/storyDecorator.d.ts +0 -35
- package/dist/nav/storyHelpers/storyDecorator.js +0 -79
- package/esm/nav/storyHelpers/storyDecorator.d.ts +0 -35
- package/esm/nav/storyHelpers/storyDecorator.js +0 -74
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/api/fetchEntities.d.ts +0 -3
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/api/fetchEntities.js +0 -32
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/api/gridModel.d.ts +0 -81
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/api/gridModel.js +0 -113
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/components/ColumnWaiting.d.ts +0 -4
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/components/ColumnWaiting.js +0 -4
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/components/EntitiesListAction.d.ts +0 -18
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/components/EntitiesListAction.js +0 -193
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/constants/index.d.ts +0 -1
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/constants/index.js +0 -1
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/interfaces/entity.d.ts +0 -7
- package/esm/storybookHelpers/fieldDelayRenderer.d.ts +0 -5
- package/esm/storybookHelpers/fieldDelayRenderer.js +0 -20
- package/esm/storybookHelpers/storyFeedbackProviderDecorator.d.ts +0 -2
- package/esm/storybookHelpers/storyFeedbackProviderDecorator.js +0 -16
- package/esm/storybookHelpers/storyGlobalWrapper.d.ts +0 -2
- package/esm/storybookHelpers/storyGlobalWrapper.js +0 -3
- package/esm/storybookHelpers/storyItem.d.ts +0 -8
- package/esm/storybookHelpers/storyItem.js +0 -17
- package/esm/storybookHelpers/storyLanguageDecorator.d.ts +0 -2
- package/esm/storybookHelpers/storyLanguageDecorator.js +0 -4
- package/esm/storybookHelpers/storyQueryClientProvider.d.ts +0 -2
- package/esm/storybookHelpers/storyQueryClientProvider.js +0 -15
- package/esm/storybookHelpers/storyThemeDecorator.d.ts +0 -2
- package/esm/storybookHelpers/storyThemeDecorator.js +0 -15
- package/esm/storybookHelpers/storyTopWindowDecorator.d.ts +0 -2
- package/esm/storybookHelpers/storyTopWindowDecorator.js +0 -4
- /package/esm/{storybookHelpers/dataGridWithDifferentCellOptions/interfaces/entity.js → table/detailPanel/interfaces.js} +0 -0
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "Fermer le filtre",
|
|
235
235
|
"Column Settings": "Paramètres des colonnes",
|
|
236
236
|
"Category": "Catégorie",
|
|
237
|
+
"Details": "Détails",
|
|
237
238
|
"Select visible columns": "Sélectionner les colonnes visibles",
|
|
238
239
|
"Selected": "Sélectionné",
|
|
239
240
|
"This field is required.": "Ce champ est requis.",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "Supprimer",
|
|
247
248
|
"Confirm": "Confirmer",
|
|
248
249
|
"Clear all": "Tout effacer",
|
|
249
|
-
"Reload": "Actualiser"
|
|
250
|
+
"Reload": "Actualiser",
|
|
251
|
+
"View details": "Voir les détails"
|
|
250
252
|
}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "Fermer le filtre",
|
|
235
235
|
"Column Settings": "Paramètres des colonnes",
|
|
236
236
|
"Category": "Catégorie",
|
|
237
|
+
"Details": "Détails",
|
|
237
238
|
"Select visible columns": "Sélectionner les colonnes visibles",
|
|
238
239
|
"Selected": "Sélectionné",
|
|
239
240
|
"This field is required.": "Ce champ est obligatoire.",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "Supprimer",
|
|
247
248
|
"Confirm": "Confirmer",
|
|
248
249
|
"Clear all": "Effacer tout",
|
|
249
|
-
"Reload": "Recharger"
|
|
250
|
+
"Reload": "Recharger",
|
|
251
|
+
"View details": "Afficher les détails"
|
|
250
252
|
}
|
|
@@ -228,6 +228,7 @@
|
|
|
228
228
|
"Collapse": "Összecsukás",
|
|
229
229
|
"Column Settings": "Oszlopbeállítások",
|
|
230
230
|
"Category": "Kategória",
|
|
231
|
+
"Details": "Részletek",
|
|
231
232
|
"Select visible columns": "Látható oszlopok kiválasztása",
|
|
232
233
|
"Value": "Érték",
|
|
233
234
|
"Data": "Adatok",
|
|
@@ -256,5 +257,6 @@
|
|
|
256
257
|
"This field is required.": "Ez a mező kötelező.",
|
|
257
258
|
"On": "Bekapcsolva",
|
|
258
259
|
"Off": "Kikapcsolva",
|
|
259
|
-
"Reload": "Újratöltés"
|
|
260
|
+
"Reload": "Újratöltés",
|
|
261
|
+
"View details": "Részletek megtekintése"
|
|
260
262
|
}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "Tutup filter",
|
|
235
235
|
"Column Settings": "Pengaturan Kolom",
|
|
236
236
|
"Category": "Kategori",
|
|
237
|
+
"Details": "Detail",
|
|
237
238
|
"Select visible columns": "Pilih kolom yang terlihat",
|
|
238
239
|
"Selected": "Dipilih",
|
|
239
240
|
"This field is required.": "Bidang ini harus diisi.",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "Hapus",
|
|
247
248
|
"Confirm": "Konfirmasi",
|
|
248
249
|
"Clear all": "Hapus semua",
|
|
249
|
-
"Reload": "Muat ulang"
|
|
250
|
+
"Reload": "Muat ulang",
|
|
251
|
+
"View details": "Lihat detail"
|
|
250
252
|
}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "Chiudi filtro",
|
|
235
235
|
"Column Settings": "Impostazioni colonna",
|
|
236
236
|
"Category": "Categoria",
|
|
237
|
+
"Details": "Dettagli",
|
|
237
238
|
"Select visible columns": "Selezionare colonne visibili",
|
|
238
239
|
"Selected": "Selezionato",
|
|
239
240
|
"This field is required.": "Questo campo è obbligatorio.",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "Rimuovere",
|
|
247
248
|
"Confirm": "Confermare",
|
|
248
249
|
"Clear all": "Cancellare tutto",
|
|
249
|
-
"Reload": "Ricarica"
|
|
250
|
+
"Reload": "Ricarica",
|
|
251
|
+
"View details": "Visualizzare dettagli"
|
|
250
252
|
}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "フィルターを閉じる",
|
|
235
235
|
"Column Settings": "列の設定",
|
|
236
236
|
"Category": "カテゴリ",
|
|
237
|
+
"Details": "詳細",
|
|
237
238
|
"Select visible columns": "表示列を選択",
|
|
238
239
|
"Selected": "選択車両",
|
|
239
240
|
"This field is required.": "このフィールドは必須です。",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "削除",
|
|
247
248
|
"Confirm": "確認",
|
|
248
249
|
"Clear all": "すべてをクリア",
|
|
249
|
-
"Reload": "再読込"
|
|
250
|
+
"Reload": "再読込",
|
|
251
|
+
"View details": "詳細を表示する"
|
|
250
252
|
}
|
|
@@ -230,6 +230,7 @@
|
|
|
230
230
|
"Close filter": "필터 닫기",
|
|
231
231
|
"Column Settings": "열 설정",
|
|
232
232
|
"Category": "범주",
|
|
233
|
+
"Details": "세부",
|
|
233
234
|
"Select visible columns": "표시되는 열 선택",
|
|
234
235
|
"Selected": "선택됨",
|
|
235
236
|
"This field is required.": "이 필드는 필수입니다.",
|
|
@@ -255,5 +256,6 @@
|
|
|
255
256
|
"Fri": "금",
|
|
256
257
|
"Sat": "앉았다",
|
|
257
258
|
"Sun": "해",
|
|
258
|
-
"Reload": "다시 불러오기"
|
|
259
|
+
"Reload": "다시 불러오기",
|
|
260
|
+
"View details": "세부 정보 보기"
|
|
259
261
|
}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "Tutup penyaring",
|
|
235
235
|
"Column Settings": "Tetapan Lajur",
|
|
236
236
|
"Category": "Kategori",
|
|
237
|
+
"Details": "Butiran",
|
|
237
238
|
"Select visible columns": "Pilih lajur yang boleh dilihat",
|
|
238
239
|
"Selected": "Dipilih",
|
|
239
240
|
"This field is required.": "Medan ini diperlukan.",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "Alih Keluar",
|
|
247
248
|
"Confirm": "Sahkan",
|
|
248
249
|
"Clear all": "Kosongkan semua",
|
|
249
|
-
"Reload": "Muatkan semula"
|
|
250
|
+
"Reload": "Muatkan semula",
|
|
251
|
+
"View details": "Lihat butiran"
|
|
250
252
|
}
|
|
@@ -228,6 +228,7 @@
|
|
|
228
228
|
"Collapse": "Kollapse",
|
|
229
229
|
"Column Settings": "Kolonneinnstillinger",
|
|
230
230
|
"Category": "Kategori",
|
|
231
|
+
"Details": "Detaljer",
|
|
231
232
|
"Select visible columns": "Velg synlige kolonner",
|
|
232
233
|
"Value": "Verdi",
|
|
233
234
|
"Data": "Data",
|
|
@@ -256,5 +257,6 @@
|
|
|
256
257
|
"This field is required.": "Dette feltet er påkrevd.",
|
|
257
258
|
"On": "På",
|
|
258
259
|
"Off": "Av",
|
|
259
|
-
"Reload": "Last inn på nytt"
|
|
260
|
+
"Reload": "Last inn på nytt",
|
|
261
|
+
"View details": "Se detaljer"
|
|
260
262
|
}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "Filter sluiten",
|
|
235
235
|
"Column Settings": "Kolominstellingen",
|
|
236
236
|
"Category": "Categorie",
|
|
237
|
+
"Details": "Details",
|
|
237
238
|
"Select visible columns": "Zichtbare kolommen selecteren",
|
|
238
239
|
"Selected": "Geselecteerd",
|
|
239
240
|
"This field is required.": "Dit veld is verplicht.",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "Verwijderen",
|
|
247
248
|
"Confirm": "Bevestigen",
|
|
248
249
|
"Clear all": "Alles wissen",
|
|
249
|
-
"Reload": "Herladen"
|
|
250
|
+
"Reload": "Herladen",
|
|
251
|
+
"View details": "Details weergeven"
|
|
250
252
|
}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "Zamknij filtr",
|
|
235
235
|
"Column Settings": "Ustawienia kolumn",
|
|
236
236
|
"Category": "Kategoria",
|
|
237
|
+
"Details": "Szczegóły",
|
|
237
238
|
"Select visible columns": "Wybierz widoczne kolumny",
|
|
238
239
|
"Selected": "Wybrano",
|
|
239
240
|
"This field is required.": "To pole jest wymagane.",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "Usuń",
|
|
247
248
|
"Confirm": "Potwierdź",
|
|
248
249
|
"Clear all": "Wyczyść wszystkie",
|
|
249
|
-
"Reload": "Odśwież"
|
|
250
|
+
"Reload": "Odśwież",
|
|
251
|
+
"View details": "Wyświetl szczegóły"
|
|
250
252
|
}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "Fechar filtro",
|
|
235
235
|
"Column Settings": "Configurações da coluna",
|
|
236
236
|
"Category": "Categoria",
|
|
237
|
+
"Details": "Detalhes",
|
|
237
238
|
"Select visible columns": "Selecionar colunas visíveis",
|
|
238
239
|
"Selected": "Selecionado",
|
|
239
240
|
"This field is required.": "Este campo é obrigatório.",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "Remover",
|
|
247
248
|
"Confirm": "Confirmar",
|
|
248
249
|
"Clear all": "Limpar tudo",
|
|
249
|
-
"Reload": "Recarregar"
|
|
250
|
+
"Reload": "Recarregar",
|
|
251
|
+
"View details": "Exibir detalhes"
|
|
250
252
|
}
|
|
@@ -227,6 +227,7 @@
|
|
|
227
227
|
"Collapse": "Zlož.",
|
|
228
228
|
"Column Settings": "Nastavenia stĺpcov",
|
|
229
229
|
"Category": "Kategória",
|
|
230
|
+
"Details": "Detaily",
|
|
230
231
|
"Select visible columns": "Vybrať viditeľné stĺpce",
|
|
231
232
|
"Value": "Hodnota",
|
|
232
233
|
"Data": "Dáta",
|
|
@@ -255,5 +256,6 @@
|
|
|
255
256
|
"This field is required.": "Toto pole je povinné.",
|
|
256
257
|
"On": "Zapnuté",
|
|
257
258
|
"Off": "Vypnuté",
|
|
258
|
-
"Reload": "Obnoviť"
|
|
259
|
+
"Reload": "Obnoviť",
|
|
260
|
+
"View details": "Zobraziť podrobnosti"
|
|
259
261
|
}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "Stäng filter",
|
|
235
235
|
"Column Settings": "Kolumninställningar",
|
|
236
236
|
"Category": "Kategori",
|
|
237
|
+
"Details": "Detaljer",
|
|
237
238
|
"Select visible columns": "Välj synbara kolumner",
|
|
238
239
|
"Selected": "Valda",
|
|
239
240
|
"This field is required.": "Det här fältet är obligatoriskt.",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "Ta bort",
|
|
247
248
|
"Confirm": "Bekräfta",
|
|
248
249
|
"Clear all": "Rensa alla",
|
|
249
|
-
"Reload": "Ladda igen"
|
|
250
|
+
"Reload": "Ladda igen",
|
|
251
|
+
"View details": "Visa detaljer"
|
|
250
252
|
}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "ปิดตัวกรอง",
|
|
235
235
|
"Column Settings": "การตั้งค่าคอลัมน์",
|
|
236
236
|
"Category": "หมวดหมู่",
|
|
237
|
+
"Details": "รายละเอียด",
|
|
237
238
|
"Select visible columns": "เลือกคอลัมน์ที่มองเห็นได้",
|
|
238
239
|
"Selected": "เลือกแล้ว",
|
|
239
240
|
"This field is required.": "ต้องใส่ข้อมูลในฟิลด์นี้",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "ลบ",
|
|
247
248
|
"Confirm": "ยืนยัน",
|
|
248
249
|
"Clear all": "ล้างทั้งหมด",
|
|
249
|
-
"Reload": "โหลดอีกครั้ง"
|
|
250
|
+
"Reload": "โหลดอีกครั้ง",
|
|
251
|
+
"View details": "ดูรายละเอียด"
|
|
250
252
|
}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "Filtreyi kapat",
|
|
235
235
|
"Column Settings": "Sütun Ayarları",
|
|
236
236
|
"Category": "Kategori",
|
|
237
|
+
"Details": "Ayrıntılar",
|
|
237
238
|
"Select visible columns": "Görünür sütunları seç",
|
|
238
239
|
"Selected": "Seçildi",
|
|
239
240
|
"This field is required.": "Bu alan zorunludur.",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "Kaldır",
|
|
247
248
|
"Confirm": "Onayla",
|
|
248
249
|
"Clear all": "Tümünü temizle",
|
|
249
|
-
"Reload": "Yeniden yükle"
|
|
250
|
+
"Reload": "Yeniden yükle",
|
|
251
|
+
"View details": "Ayrıntıları görüntüle"
|
|
250
252
|
}
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"Close filter": "关闭筛选器",
|
|
235
235
|
"Column Settings": "列设置",
|
|
236
236
|
"Category": "类别",
|
|
237
|
+
"Details": "详细信息",
|
|
237
238
|
"Select visible columns": "选择可见列",
|
|
238
239
|
"Selected": "选中的",
|
|
239
240
|
"This field is required.": "该字段为必填项。",
|
|
@@ -246,5 +247,6 @@
|
|
|
246
247
|
"Remove": "删除",
|
|
247
248
|
"Confirm": "确认",
|
|
248
249
|
"Clear all": "全部清除",
|
|
249
|
-
"Reload": "重新加载"
|
|
250
|
+
"Reload": "重新加载",
|
|
251
|
+
"View details": "查看详细信息"
|
|
250
252
|
}
|
|
@@ -243,6 +243,7 @@
|
|
|
243
243
|
"Close filter": "關閉篩選器",
|
|
244
244
|
"Column Settings": "欄設定",
|
|
245
245
|
"Category": "種類",
|
|
246
|
+
"Details": "詳細資訊",
|
|
246
247
|
"Select visible columns": "選取可見欄",
|
|
247
248
|
"Selected": "已選取",
|
|
248
249
|
"This field is required.": "此欄位為必填。",
|
|
@@ -255,5 +256,6 @@
|
|
|
255
256
|
"Remove": "移除",
|
|
256
257
|
"Confirm": "確認",
|
|
257
258
|
"Clear all": "清除全部",
|
|
258
|
-
"Reload": "重新載入"
|
|
259
|
+
"Reload": "重新載入",
|
|
260
|
+
"View details": "檢視詳細資訊"
|
|
259
261
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geotab/zenith",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Zenith components library on React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "esm/index.d.ts",
|
|
@@ -11,9 +11,6 @@
|
|
|
11
11
|
"**/react-chartjs/dateAdapter.ts",
|
|
12
12
|
"**/react-chartjs/dateAdapter.js"
|
|
13
13
|
],
|
|
14
|
-
"publishConfig": {
|
|
15
|
-
"access": "public"
|
|
16
|
-
},
|
|
17
14
|
"scripts": {
|
|
18
15
|
"test": "npm run clean && npm run test-build && node build-utils/translations/inject-translations.js && jest --clearCache && jest",
|
|
19
16
|
"start": "npm run storybook --loglevel verbose",
|
|
@@ -52,10 +49,10 @@
|
|
|
52
49
|
"@babel/preset-react": "^7.24.1",
|
|
53
50
|
"@babel/preset-typescript": "^7.24.1",
|
|
54
51
|
"@babel/traverse": "^7.28.5",
|
|
55
|
-
"@storybook/addon-docs": "^
|
|
56
|
-
"@storybook/addon-links": "^
|
|
57
|
-
"@storybook/addon-webpack5-compiler-babel": "^
|
|
58
|
-
"@storybook/react-webpack5": "^
|
|
52
|
+
"@storybook/addon-docs": "^10.1.11",
|
|
53
|
+
"@storybook/addon-links": "^10.1.11",
|
|
54
|
+
"@storybook/addon-webpack5-compiler-babel": "^4.0.0",
|
|
55
|
+
"@storybook/react-webpack5": "^10.1.11",
|
|
59
56
|
"@tanstack/react-query": "^5.85.5",
|
|
60
57
|
"@testing-library/react": "^16.3.0",
|
|
61
58
|
"@types/jest": "^29.5.12",
|
|
@@ -68,14 +65,14 @@
|
|
|
68
65
|
"eslint": "^8.57.0",
|
|
69
66
|
"eslint-plugin-react": "^7.34.1",
|
|
70
67
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
71
|
-
"eslint-plugin-storybook": "^
|
|
68
|
+
"eslint-plugin-storybook": "^10.1.11",
|
|
72
69
|
"jest": "^30.2.0",
|
|
73
70
|
"jest-environment-jsdom": "^30.2.0",
|
|
74
71
|
"jest-junit": "^16.0.0",
|
|
75
72
|
"less": "^4.1.3",
|
|
76
73
|
"less-loader": "^12.2.0",
|
|
77
74
|
"mini-css-extract-plugin": "^2.9.2",
|
|
78
|
-
"storybook": "^
|
|
75
|
+
"storybook": "^10.1.11",
|
|
79
76
|
"style-loader": "^4.0.0",
|
|
80
77
|
"typescript": "^5.4.3",
|
|
81
78
|
"webpack": "^5.96.1",
|
|
@@ -107,5 +104,8 @@
|
|
|
107
104
|
"last 1 firefox version",
|
|
108
105
|
"last 1 safari version"
|
|
109
106
|
]
|
|
107
|
+
},
|
|
108
|
+
"publishConfig": {
|
|
109
|
+
"access": "public"
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Decorator } from "@storybook/react";
|
|
2
|
-
import "../nav.less";
|
|
3
|
-
export interface INavContainerDecoratorOptions {
|
|
4
|
-
collapsed?: boolean;
|
|
5
|
-
collapsedWidth?: string;
|
|
6
|
-
expandedWidth?: string;
|
|
7
|
-
defaultCollapsed?: boolean;
|
|
8
|
-
setIsMobile?: (isMobile: boolean) => void;
|
|
9
|
-
withoutStyles?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const createNavContainerDecorator: (options?: INavContainerDecoratorOptions) => Decorator;
|
|
12
|
-
/**
|
|
13
|
-
* Pre-configured decorators for common navigation scenarios
|
|
14
|
-
*/
|
|
15
|
-
export declare const navDecorators: {
|
|
16
|
-
/**
|
|
17
|
-
* Uses parameters with collapsed boolean
|
|
18
|
-
* It allows to dynamically change the state from the story
|
|
19
|
-
*/
|
|
20
|
-
withParameters: Decorator;
|
|
21
|
-
/**
|
|
22
|
-
* Fixed width for expanded navigation (232px)
|
|
23
|
-
*/
|
|
24
|
-
expanded: Decorator;
|
|
25
|
-
/**
|
|
26
|
-
* Fixed width for collapsed navigation (48px)
|
|
27
|
-
*/
|
|
28
|
-
collapsed: Decorator;
|
|
29
|
-
/**
|
|
30
|
-
* Decorator without styles
|
|
31
|
-
*/
|
|
32
|
-
withoutStyles: Decorator;
|
|
33
|
-
};
|
|
34
|
-
export declare const SearchDecorator: (Story: any, context: any) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
export declare const navContainerDecorator: Decorator;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.navContainerDecorator = exports.SearchDecorator = exports.navDecorators = exports.createNavContainerDecorator = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const nav_context_1 = require("../context/nav.context");
|
|
7
|
-
const createNavContainerDecorator = (options = {}) => {
|
|
8
|
-
const { collapsed, collapsedWidth = "64px", expandedWidth = "256px", withoutStyles = false } = options;
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
10
|
-
const DecoratorStory = (Story, context) => {
|
|
11
|
-
const [isCollapsed, setIsCollapsed] = (0, react_1.useState)(collapsed);
|
|
12
|
-
const [searchTerm, setSearchTerm] = (0, react_1.useState)("");
|
|
13
|
-
const [isSearchOpen, setIsSearchOpen] = (0, react_1.useState)(false);
|
|
14
|
-
const [isMobile, setIsMobile] = (0, react_1.useState)(false);
|
|
15
|
-
const isCollapsedState = !isMobile && isCollapsed && !isSearchOpen;
|
|
16
|
-
const containerWidth = isMobile ? "100%" : isCollapsedState ? collapsedWidth : expandedWidth;
|
|
17
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: withoutStyles ? "" : "zen-nav zen-shadow-dropdown-default", style: {
|
|
18
|
-
maxWidth: "100%",
|
|
19
|
-
width: containerWidth,
|
|
20
|
-
overflow: withoutStyles ? undefined : "hidden",
|
|
21
|
-
padding: withoutStyles ? undefined : (isMobile ? "12px" : "16px 12px"),
|
|
22
|
-
backgroundColor: withoutStyles ? undefined : "var(--backgrounds-main)",
|
|
23
|
-
display: "flex",
|
|
24
|
-
flexDirection: "column",
|
|
25
|
-
alignItems: withoutStyles ? undefined : (isCollapsedState ? "center" : "normal")
|
|
26
|
-
}, children: (0, jsx_runtime_1.jsx)(nav_context_1.NavContext.Provider, { value: {
|
|
27
|
-
collapsed: !!isCollapsedState,
|
|
28
|
-
onCollapseToggle: setIsCollapsed,
|
|
29
|
-
searchOpen: isMobile || isSearchOpen,
|
|
30
|
-
onSearchToggle: setIsSearchOpen,
|
|
31
|
-
searchTerm,
|
|
32
|
-
onSearch: setSearchTerm
|
|
33
|
-
}, children: (0, jsx_runtime_1.jsx)(Story, { args: Object.assign(Object.assign({}, context.args), { setIsMobile,
|
|
34
|
-
setIsCollapsed, collapsed: isCollapsedState }) }) }) }));
|
|
35
|
-
};
|
|
36
|
-
return DecoratorStory;
|
|
37
|
-
};
|
|
38
|
-
exports.createNavContainerDecorator = createNavContainerDecorator;
|
|
39
|
-
/**
|
|
40
|
-
* Pre-configured decorators for common navigation scenarios
|
|
41
|
-
*/
|
|
42
|
-
exports.navDecorators = {
|
|
43
|
-
/**
|
|
44
|
-
* Uses parameters with collapsed boolean
|
|
45
|
-
* It allows to dynamically change the state from the story
|
|
46
|
-
*/
|
|
47
|
-
withParameters: (0, exports.createNavContainerDecorator)(),
|
|
48
|
-
/**
|
|
49
|
-
* Fixed width for expanded navigation (232px)
|
|
50
|
-
*/
|
|
51
|
-
expanded: (0, exports.createNavContainerDecorator)({
|
|
52
|
-
collapsed: false
|
|
53
|
-
}),
|
|
54
|
-
/**
|
|
55
|
-
* Fixed width for collapsed navigation (48px)
|
|
56
|
-
*/
|
|
57
|
-
collapsed: (0, exports.createNavContainerDecorator)({
|
|
58
|
-
collapsed: true
|
|
59
|
-
}),
|
|
60
|
-
/**
|
|
61
|
-
* Decorator without styles
|
|
62
|
-
*/
|
|
63
|
-
withoutStyles: (0, exports.createNavContainerDecorator)({
|
|
64
|
-
withoutStyles: true
|
|
65
|
-
})
|
|
66
|
-
};
|
|
67
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
68
|
-
const SearchDecorator = (Story, context) => {
|
|
69
|
-
var _a;
|
|
70
|
-
const loggerRef = (0, react_1.useRef)(null);
|
|
71
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
72
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Story, { args: Object.assign(Object.assign({}, context.args), { onSearch: term => {
|
|
73
|
-
if (loggerRef.current) {
|
|
74
|
-
loggerRef.current.innerText = term;
|
|
75
|
-
}
|
|
76
|
-
} }) }), (0, jsx_runtime_1.jsxs)("div", { style: { padding: "10px 0" }, children: ["Search term: ", (0, jsx_runtime_1.jsx)("span", { style: { fontWeight: "bold" }, ref: loggerRef, children: (_a = loggerRef.current) === null || _a === void 0 ? void 0 : _a.innerText })] })] });
|
|
77
|
-
};
|
|
78
|
-
exports.SearchDecorator = SearchDecorator;
|
|
79
|
-
exports.navContainerDecorator = exports.navDecorators.withParameters;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Decorator } from "@storybook/react";
|
|
2
|
-
import "../nav.less";
|
|
3
|
-
export interface INavContainerDecoratorOptions {
|
|
4
|
-
collapsed?: boolean;
|
|
5
|
-
collapsedWidth?: string;
|
|
6
|
-
expandedWidth?: string;
|
|
7
|
-
defaultCollapsed?: boolean;
|
|
8
|
-
setIsMobile?: (isMobile: boolean) => void;
|
|
9
|
-
withoutStyles?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const createNavContainerDecorator: (options?: INavContainerDecoratorOptions) => Decorator;
|
|
12
|
-
/**
|
|
13
|
-
* Pre-configured decorators for common navigation scenarios
|
|
14
|
-
*/
|
|
15
|
-
export declare const navDecorators: {
|
|
16
|
-
/**
|
|
17
|
-
* Uses parameters with collapsed boolean
|
|
18
|
-
* It allows to dynamically change the state from the story
|
|
19
|
-
*/
|
|
20
|
-
withParameters: Decorator;
|
|
21
|
-
/**
|
|
22
|
-
* Fixed width for expanded navigation (232px)
|
|
23
|
-
*/
|
|
24
|
-
expanded: Decorator;
|
|
25
|
-
/**
|
|
26
|
-
* Fixed width for collapsed navigation (48px)
|
|
27
|
-
*/
|
|
28
|
-
collapsed: Decorator;
|
|
29
|
-
/**
|
|
30
|
-
* Decorator without styles
|
|
31
|
-
*/
|
|
32
|
-
withoutStyles: Decorator;
|
|
33
|
-
};
|
|
34
|
-
export declare const SearchDecorator: (Story: any, context: any) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
export declare const navContainerDecorator: Decorator;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useRef, useState } from "react";
|
|
3
|
-
import { NavContext } from "../context/nav.context";
|
|
4
|
-
export const createNavContainerDecorator = (options = {}) => {
|
|
5
|
-
const { collapsed, collapsedWidth = "64px", expandedWidth = "256px", withoutStyles = false } = options;
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
-
const DecoratorStory = (Story, context) => {
|
|
8
|
-
const [isCollapsed, setIsCollapsed] = useState(collapsed);
|
|
9
|
-
const [searchTerm, setSearchTerm] = useState("");
|
|
10
|
-
const [isSearchOpen, setIsSearchOpen] = useState(false);
|
|
11
|
-
const [isMobile, setIsMobile] = useState(false);
|
|
12
|
-
const isCollapsedState = !isMobile && isCollapsed && !isSearchOpen;
|
|
13
|
-
const containerWidth = isMobile ? "100%" : isCollapsedState ? collapsedWidth : expandedWidth;
|
|
14
|
-
return (_jsx("div", { className: withoutStyles ? "" : "zen-nav zen-shadow-dropdown-default", style: {
|
|
15
|
-
maxWidth: "100%",
|
|
16
|
-
width: containerWidth,
|
|
17
|
-
overflow: withoutStyles ? undefined : "hidden",
|
|
18
|
-
padding: withoutStyles ? undefined : (isMobile ? "12px" : "16px 12px"),
|
|
19
|
-
backgroundColor: withoutStyles ? undefined : "var(--backgrounds-main)",
|
|
20
|
-
display: "flex",
|
|
21
|
-
flexDirection: "column",
|
|
22
|
-
alignItems: withoutStyles ? undefined : (isCollapsedState ? "center" : "normal")
|
|
23
|
-
}, children: _jsx(NavContext.Provider, { value: {
|
|
24
|
-
collapsed: !!isCollapsedState,
|
|
25
|
-
onCollapseToggle: setIsCollapsed,
|
|
26
|
-
searchOpen: isMobile || isSearchOpen,
|
|
27
|
-
onSearchToggle: setIsSearchOpen,
|
|
28
|
-
searchTerm,
|
|
29
|
-
onSearch: setSearchTerm
|
|
30
|
-
}, children: _jsx(Story, { args: Object.assign(Object.assign({}, context.args), { setIsMobile,
|
|
31
|
-
setIsCollapsed, collapsed: isCollapsedState }) }) }) }));
|
|
32
|
-
};
|
|
33
|
-
return DecoratorStory;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Pre-configured decorators for common navigation scenarios
|
|
37
|
-
*/
|
|
38
|
-
export const navDecorators = {
|
|
39
|
-
/**
|
|
40
|
-
* Uses parameters with collapsed boolean
|
|
41
|
-
* It allows to dynamically change the state from the story
|
|
42
|
-
*/
|
|
43
|
-
withParameters: createNavContainerDecorator(),
|
|
44
|
-
/**
|
|
45
|
-
* Fixed width for expanded navigation (232px)
|
|
46
|
-
*/
|
|
47
|
-
expanded: createNavContainerDecorator({
|
|
48
|
-
collapsed: false
|
|
49
|
-
}),
|
|
50
|
-
/**
|
|
51
|
-
* Fixed width for collapsed navigation (48px)
|
|
52
|
-
*/
|
|
53
|
-
collapsed: createNavContainerDecorator({
|
|
54
|
-
collapsed: true
|
|
55
|
-
}),
|
|
56
|
-
/**
|
|
57
|
-
* Decorator without styles
|
|
58
|
-
*/
|
|
59
|
-
withoutStyles: createNavContainerDecorator({
|
|
60
|
-
withoutStyles: true
|
|
61
|
-
})
|
|
62
|
-
};
|
|
63
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
64
|
-
export const SearchDecorator = (Story, context) => {
|
|
65
|
-
var _a;
|
|
66
|
-
const loggerRef = useRef(null);
|
|
67
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
68
|
-
return _jsxs(_Fragment, { children: [_jsx(Story, { args: Object.assign(Object.assign({}, context.args), { onSearch: term => {
|
|
69
|
-
if (loggerRef.current) {
|
|
70
|
-
loggerRef.current.innerText = term;
|
|
71
|
-
}
|
|
72
|
-
} }) }), _jsxs("div", { style: { padding: "10px 0" }, children: ["Search term: ", _jsx("span", { style: { fontWeight: "bold" }, ref: loggerRef, children: (_a = loggerRef.current) === null || _a === void 0 ? void 0 : _a.innerText })] })] });
|
|
73
|
-
};
|
|
74
|
-
export const navContainerDecorator = navDecorators.withParameters;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ColumnSortDirection } from "../../../dataGrid/withSortableColumns/columns/columnSortDirection";
|
|
2
|
-
import { PAGE_SIZE } from "../constants";
|
|
3
|
-
const allEntities = new Array(500)
|
|
4
|
-
.fill("")
|
|
5
|
-
.map((_, i) => ({
|
|
6
|
-
id: i.toString(),
|
|
7
|
-
col1: `row${i} - column 1`,
|
|
8
|
-
col2: `row${i} - column 2`,
|
|
9
|
-
col3: `${i}%`,
|
|
10
|
-
col4: `row${i} - cl 4`
|
|
11
|
-
}));
|
|
12
|
-
// Generator function to load entities for page
|
|
13
|
-
export const fetchEntities = async (activePage, sort) => {
|
|
14
|
-
const start = activePage * PAGE_SIZE;
|
|
15
|
-
const end = start + PAGE_SIZE;
|
|
16
|
-
const sortFn = (a, b) => {
|
|
17
|
-
if (!sort || sort.sortDirection === ColumnSortDirection.None || !sort.sortColumn) {
|
|
18
|
-
return 0;
|
|
19
|
-
}
|
|
20
|
-
const aVal = a[sort.sortColumn];
|
|
21
|
-
const bVal = b[sort.sortColumn];
|
|
22
|
-
if (!aVal || !bVal) {
|
|
23
|
-
return 0;
|
|
24
|
-
}
|
|
25
|
-
return sort.sortDirection === ColumnSortDirection.Ascending ? aVal.localeCompare(bVal) : bVal.localeCompare(aVal);
|
|
26
|
-
};
|
|
27
|
-
return new Promise((res) => {
|
|
28
|
-
setTimeout(() => res(allEntities
|
|
29
|
-
.sort(sortFn)
|
|
30
|
-
.slice(start, end)), 2000);
|
|
31
|
-
});
|
|
32
|
-
};
|