@okta/odyssey-react-mui 1.42.0 → 1.43.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/dist/cjs/DataTable/DataTable.cjs +67 -42
- package/dist/cjs/DataTable/DataTable.cjs.map +1 -1
- package/dist/cjs/Drawer.cjs +16 -14
- package/dist/cjs/Drawer.cjs.map +1 -1
- package/dist/cjs/PasswordField.cjs +1 -1
- package/dist/cjs/PasswordField.cjs.map +1 -1
- package/dist/cjs/Select.cjs +34 -43
- package/dist/cjs/Select.cjs.map +1 -1
- package/dist/cjs/Status.cjs +2 -0
- package/dist/cjs/Status.cjs.map +1 -1
- package/dist/cjs/Typography.cjs +32 -8
- package/dist/cjs/Typography.cjs.map +1 -1
- package/dist/cjs/labs/DataFilters.cjs +1 -0
- package/dist/cjs/labs/DataFilters.cjs.map +1 -1
- package/dist/cjs/labs/DataView/BulkActionsMenu.cjs.map +1 -1
- package/dist/cjs/labs/DataView/CardLayoutContent.cjs.map +1 -1
- package/dist/cjs/labs/DataView/DataView.cjs +10 -1
- package/dist/cjs/labs/DataView/DataView.cjs.map +1 -1
- package/dist/cjs/labs/DataView/RowActions.cjs +3 -4
- package/dist/cjs/labs/DataView/RowActions.cjs.map +1 -1
- package/dist/cjs/labs/DataView/TableLayoutContent.cjs +2 -4
- package/dist/cjs/labs/DataView/TableLayoutContent.cjs.map +1 -1
- package/dist/cjs/labs/DataView/useFilterConversion.cjs.map +1 -1
- package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs.map +1 -1
- package/dist/cjs/labs/OdysseyPickers/Picker.cjs +17 -11
- package/dist/cjs/labs/OdysseyPickers/Picker.cjs.map +1 -1
- package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs +2 -1
- package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs.map +1 -1
- package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs +2 -3
- package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs +4 -2
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs +129 -126
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs +0 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs.map +1 -1
- package/dist/cjs/theme/components.cjs +7 -1
- package/dist/cjs/theme/components.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs +1 -0
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
- package/dist/esm/DataTable/DataTable.js +67 -40
- package/dist/esm/DataTable/DataTable.js.map +1 -1
- package/dist/esm/Drawer.js +16 -14
- package/dist/esm/Drawer.js.map +1 -1
- package/dist/esm/PasswordField.js +1 -1
- package/dist/esm/PasswordField.js.map +1 -1
- package/dist/esm/Select.js +34 -43
- package/dist/esm/Select.js.map +1 -1
- package/dist/esm/Status.js +2 -0
- package/dist/esm/Status.js.map +1 -1
- package/dist/esm/Typography.js +32 -8
- package/dist/esm/Typography.js.map +1 -1
- package/dist/esm/labs/DataFilters.js +1 -0
- package/dist/esm/labs/DataFilters.js.map +1 -1
- package/dist/esm/labs/DataView/BulkActionsMenu.js.map +1 -1
- package/dist/esm/labs/DataView/CardLayoutContent.js.map +1 -1
- package/dist/esm/labs/DataView/DataView.js +10 -1
- package/dist/esm/labs/DataView/DataView.js.map +1 -1
- package/dist/esm/labs/DataView/RowActions.js +2 -1
- package/dist/esm/labs/DataView/RowActions.js.map +1 -1
- package/dist/esm/labs/DataView/TableLayoutContent.js +2 -4
- package/dist/esm/labs/DataView/TableLayoutContent.js.map +1 -1
- package/dist/esm/labs/DataView/useFilterConversion.js.map +1 -1
- package/dist/esm/labs/OdysseyPickers/ComposablePicker.js.map +1 -1
- package/dist/esm/labs/OdysseyPickers/Picker.js +19 -13
- package/dist/esm/labs/OdysseyPickers/Picker.js.map +1 -1
- package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js +2 -1
- package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js.map +1 -1
- package/dist/esm/labs/OdysseyPickers/SearchDropdown.js +2 -3
- package/dist/esm/labs/OdysseyPickers/SearchDropdown.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_cs.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_cs.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_da.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_da.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_de.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_de.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_el.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_el.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_es.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_es.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_eu.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_eu.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fi.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fi.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fr.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fr.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ht.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ht.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_hu.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_hu.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_id.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_id.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_it.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_it.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ja.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ja.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ko.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ko.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ms.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ms.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nb.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nb.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js +4 -2
- package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js +129 -126
- package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pl.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pl.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ro.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ro.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ru.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ru.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_sv.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_sv.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_th.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_th.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_tr.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_tr.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_uk.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_uk.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_vi.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_vi.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js +0 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
- package/dist/esm/theme/components.js +7 -1
- package/dist/esm/theme/components.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNav.js +1 -0
- package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.scss +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/DataTable/DataTable.d.ts +2 -2
- package/dist/types/DataTable/DataTable.d.ts.map +1 -1
- package/dist/types/Drawer.d.ts +24 -6
- package/dist/types/Drawer.d.ts.map +1 -1
- package/dist/types/OdysseyTranslationProvider.d.ts +1 -1
- package/dist/types/OdysseyTranslationProvider.d.ts.map +1 -1
- package/dist/types/PasswordField.d.ts.map +1 -1
- package/dist/types/Select.d.ts.map +1 -1
- package/dist/types/Status.d.ts +2 -2
- package/dist/types/Status.d.ts.map +1 -1
- package/dist/types/Typography.d.ts +16 -12
- package/dist/types/Typography.d.ts.map +1 -1
- package/dist/types/i18n.d.ts +6 -29
- package/dist/types/i18n.d.ts.map +1 -1
- package/dist/types/labs/DataFilters.d.ts.map +1 -1
- package/dist/types/labs/DataView/BulkActionsMenu.d.ts +1 -1
- package/dist/types/labs/DataView/BulkActionsMenu.d.ts.map +1 -1
- package/dist/types/labs/DataView/CardLayoutContent.d.ts.map +1 -1
- package/dist/types/labs/DataView/DataView.d.ts.map +1 -1
- package/dist/types/labs/DataView/RowActions.d.ts +5 -4
- package/dist/types/labs/DataView/RowActions.d.ts.map +1 -1
- package/dist/types/labs/DataView/TableLayoutContent.d.ts +1 -1
- package/dist/types/labs/DataView/TableLayoutContent.d.ts.map +1 -1
- package/dist/types/labs/OdysseyPickers/ComposablePicker.d.ts +4 -1
- package/dist/types/labs/OdysseyPickers/ComposablePicker.d.ts.map +1 -1
- package/dist/types/labs/OdysseyPickers/Picker.d.ts +7 -7
- package/dist/types/labs/OdysseyPickers/Picker.d.ts.map +1 -1
- package/dist/types/labs/OdysseyPickers/PickerWithOptionAdornment.d.ts.map +1 -1
- package/dist/types/labs/OdysseyPickers/SearchDropdown.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_da.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_de.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_el.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_es.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_id.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_it.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts +3 -1
- package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts +3 -0
- package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_th.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts +0 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/types/theme/components.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
- package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
- package/package.json +9 -7
|
@@ -33,9 +33,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
33
33
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
34
34
|
*
|
|
35
35
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
const ScrollableTableContainer = (0, _styled.default)("div", {
|
|
36
|
+
*/const ScrollableTableContainer = (0, _styled.default)("div", {
|
|
39
37
|
shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "isScrollableStart" && prop !== "isScrollableEnd"
|
|
40
38
|
})(({
|
|
41
39
|
odysseyDesignTokens,
|
|
@@ -251,6 +249,65 @@ const DataTable = ({
|
|
|
251
249
|
}, [columns]);
|
|
252
250
|
const columnOrder = (0, _react.useMemo)(() => ["mrt-row-drag", "mrt-row-select", "mrt-row-expand", ...columnIds, "mrt-row-actions"], [columnIds]);
|
|
253
251
|
const shouldDisplayRowActions = (0, _react.useMemo)(() => hasRowReordering === true && onReorderRows || rowActionButtons || rowActionMenuItems ? true : false, [hasRowReordering, onReorderRows, rowActionButtons, rowActionMenuItems]);
|
|
252
|
+
const muiTableBodyProps = (0, _react.useCallback)(() => ({
|
|
253
|
+
className: rowDensityClassName
|
|
254
|
+
}), [rowDensityClassName]);
|
|
255
|
+
const muiTableBodyCellProps = (0, _react.useCallback)(({
|
|
256
|
+
column
|
|
257
|
+
}) => ({
|
|
258
|
+
className: column.getIsResizing() ? "isResizing" : "",
|
|
259
|
+
sx: {
|
|
260
|
+
overflowWrap: "anywhere"
|
|
261
|
+
}
|
|
262
|
+
}), []);
|
|
263
|
+
const muiDetailPanelProps = (0, _react.useCallback)(({
|
|
264
|
+
row
|
|
265
|
+
}) => ({
|
|
266
|
+
sx: {
|
|
267
|
+
paddingBlock: row.getIsExpanded() ? `${odysseyDesignTokens.Spacing3} !important` : undefined
|
|
268
|
+
}
|
|
269
|
+
}), [odysseyDesignTokens.Spacing3]);
|
|
270
|
+
const muiTableBodyRowProps = (0, _react.useCallback)(({
|
|
271
|
+
table,
|
|
272
|
+
row,
|
|
273
|
+
isDetailPanel
|
|
274
|
+
}) => ({
|
|
275
|
+
className: draggableTableBodyRowClassName({
|
|
276
|
+
currentRowId: row.id,
|
|
277
|
+
draggingRowId: draggingRow?.id,
|
|
278
|
+
hoveredRowId: table.getState().hoveredRow?.id
|
|
279
|
+
}),
|
|
280
|
+
sx: {
|
|
281
|
+
...(isDetailPanel && {
|
|
282
|
+
paddingBlock: "0 !important",
|
|
283
|
+
border: 0,
|
|
284
|
+
["&:hover"]: {
|
|
285
|
+
backgroundColor: `transparent !important`
|
|
286
|
+
}
|
|
287
|
+
})
|
|
288
|
+
}
|
|
289
|
+
}), [draggableTableBodyRowClassName, draggingRow?.id]);
|
|
290
|
+
const muiRowDragHandleProps = (0, _react.useCallback)(({
|
|
291
|
+
table,
|
|
292
|
+
row
|
|
293
|
+
}) => ({
|
|
294
|
+
onKeyDown: event => handleDragHandleKeyDown({
|
|
295
|
+
table,
|
|
296
|
+
row,
|
|
297
|
+
event
|
|
298
|
+
}),
|
|
299
|
+
onBlur: () => resetDraggingAndHoveredRow(table),
|
|
300
|
+
onDragEnd: () => handleDragHandleOnDragEnd(table),
|
|
301
|
+
onDragCapture: () => handleDragHandleOnDragCapture(table),
|
|
302
|
+
sx: dragHandleStyles,
|
|
303
|
+
...dragHandleText
|
|
304
|
+
}), [dragHandleStyles, dragHandleText, handleDragHandleKeyDown, resetDraggingAndHoveredRow, handleDragHandleOnDragEnd, handleDragHandleOnDragCapture]);
|
|
305
|
+
const muiTableHeadCellProps = (0, _react.useCallback)(({
|
|
306
|
+
column: currentColumn
|
|
307
|
+
}) => ({
|
|
308
|
+
className: columnSorting.find(sortedColumn => sortedColumn.id === currentColumn.id) ? "isSorted" : "isUnsorted"
|
|
309
|
+
}), [columnSorting]);
|
|
310
|
+
const hasColumnWithGrow = (0, _react.useMemo)(() => columns.some(column => column.grow === true), [columns]);
|
|
254
311
|
const dataTable = (0, _materialReactTable.useMaterialReactTable)({
|
|
255
312
|
columns: columns,
|
|
256
313
|
data: data,
|
|
@@ -363,44 +420,16 @@ const DataTable = ({
|
|
|
363
420
|
header: ""
|
|
364
421
|
}
|
|
365
422
|
},
|
|
366
|
-
muiTableBodyProps
|
|
367
|
-
className: rowDensityClassName
|
|
368
|
-
}),
|
|
423
|
+
muiTableBodyProps,
|
|
369
424
|
defaultColumn: {
|
|
370
425
|
Cell: defaultCell
|
|
371
426
|
},
|
|
372
|
-
muiTableBodyCellProps
|
|
373
|
-
column
|
|
374
|
-
}) => ({
|
|
375
|
-
className: column.getIsResizing() ? "isResizing" : ""
|
|
376
|
-
}),
|
|
427
|
+
muiTableBodyCellProps,
|
|
377
428
|
enableRowOrdering: hasRowReordering && Boolean(onReorderRows),
|
|
378
429
|
enableRowDragging: hasRowReordering && Boolean(onReorderRows),
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}) => ({
|
|
383
|
-
className: draggableTableBodyRowClassName({
|
|
384
|
-
currentRowId: row.id,
|
|
385
|
-
draggingRowId: draggingRow?.id,
|
|
386
|
-
hoveredRowId: table.getState().hoveredRow?.id
|
|
387
|
-
})
|
|
388
|
-
}),
|
|
389
|
-
muiRowDragHandleProps: ({
|
|
390
|
-
table,
|
|
391
|
-
row
|
|
392
|
-
}) => ({
|
|
393
|
-
onKeyDown: event => handleDragHandleKeyDown({
|
|
394
|
-
table,
|
|
395
|
-
row,
|
|
396
|
-
event
|
|
397
|
-
}),
|
|
398
|
-
onBlur: () => resetDraggingAndHoveredRow(table),
|
|
399
|
-
onDragEnd: () => handleDragHandleOnDragEnd(table),
|
|
400
|
-
onDragCapture: () => handleDragHandleOnDragCapture(table),
|
|
401
|
-
sx: dragHandleStyles,
|
|
402
|
-
...dragHandleText
|
|
403
|
-
}),
|
|
430
|
+
muiDetailPanelProps,
|
|
431
|
+
muiTableBodyRowProps,
|
|
432
|
+
muiRowDragHandleProps,
|
|
404
433
|
enableRowActions: shouldDisplayRowActions,
|
|
405
434
|
positionActionsColumn: "last",
|
|
406
435
|
renderRowActions: ({
|
|
@@ -412,11 +441,7 @@ const DataTable = ({
|
|
|
412
441
|
onRowSelectionChange: setRowSelection,
|
|
413
442
|
enableSorting: hasSorting,
|
|
414
443
|
onSortingChange: setColumnSorting,
|
|
415
|
-
muiTableHeadCellProps
|
|
416
|
-
column: currentColumn
|
|
417
|
-
}) => ({
|
|
418
|
-
className: columnSorting.find(sortedColumn => sortedColumn.id === currentColumn.id) ? "isSorted" : "isUnsorted"
|
|
419
|
-
}),
|
|
444
|
+
muiTableHeadCellProps,
|
|
420
445
|
enableRowVirtualization: paginationType !== "loadMore" && pagination.pageSize > 50,
|
|
421
446
|
rowVirtualizerInstanceRef: (0, _react.useRef)(null),
|
|
422
447
|
rowVirtualizerOptions: {
|
|
@@ -425,7 +450,7 @@ const DataTable = ({
|
|
|
425
450
|
renderEmptyRowsFallback: emptyState,
|
|
426
451
|
muiTableProps: {
|
|
427
452
|
ref: tableContentRef,
|
|
428
|
-
className: !shouldDisplayRowActions && hasColumnResizing ? "ods-hide-spacer-column" : ""
|
|
453
|
+
className: !shouldDisplayRowActions && hasColumnResizing ? hasColumnWithGrow ? "ods-hide-spacer-column" : "ods-hide-spacer-column ods-column-grow" : ""
|
|
429
454
|
},
|
|
430
455
|
muiTableContainerProps: {
|
|
431
456
|
ref: tableInnerContainerRef
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.cjs","names":["_react","require","_materialReactTable","_reactI18next","_index","_constants","_index2","_DataFilters","_DataTableRowActions","_useRowReordering","_DataTableSettings","_Box","_OdysseyDesignTokensContext","_useScrollIndication","_styled","_interopRequireDefault","_EmptyState","_index3","_Callout","_jsxRuntime","e","__esModule","default","ScrollableTableContainer","styled","shouldForwardProp","prop","odysseyDesignTokens","isScrollableStart","isScrollableEnd","marginBlockEnd","Spacing4","position","borderInlineStartColor","HueNeutral200","borderInlineStartStyle","borderInlineStartWidth","BorderWidthMain","background","content","opacity","pointerEvents","top","left","bottom","width","Spacing6","zIndex","transition","TransitionDurationMain","TransitionTimingMain","borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth","right","defaultGetRowId","row","id","DataTable","additionalActionButton","additionalActionMenuItems","bulkActionMenuItems","columns","currentPage","emptyPlaceholder","errorMessage","errorMessageProp","filters","filtersProp","getData","getRowId","hasChangeableDensity","hasColumnResizing","hasColumnVisibility","hasFilters","hasPagination","hasRowReordering","hasRowSelection","hasSearch","hasSearchSubmitButton","hasSorting","initialDensity","densityValues","initialSearchValue","isPaginationMoreDisabled","noResultsPlaceholder","onChangeRowSelection","onReorderRows","paginationType","renderDetailPanel","resultsPerPage","maxResultsPerPage","maxPages","rowActionButtons","rowActionMenuItems","searchDelayTime","selectedRows","totalRows","t","useTranslation","data","setData","useState","pagination","setPagination","pageIndex","pageSize","draggingRow","setDraggingRow","isTableContainerScrolledToStart","setIsTableContainerScrolledToStart","isTableContainerScrolledToEnd","setIsTableContainerScrolledToEnd","tableInnerContainerWidth","setTableInnerContainerWidth","tableOuterContainerRef","useRef","tableInnerContainerRef","tableContentRef","columnSorting","setColumnSorting","columnVisibility","setColumnVisibility","rowDensity","setRowDensity","search","setSearch","setFilters","initialFilters","setInitialFilters","isLoading","setIsLoading","isEmpty","setIsEmpty","setErrorMessage","_rowSelection","setRowSelection","rowSelection","useScrollIndication","tableOuterContainer","current","tableInnerContainer","useOdysseyDesignTokens","dragHandleStyles","dragHandleText","draggableTableBodyRowClassName","handleDragHandleKeyDown","handleDragHandleOnDragCapture","handleDragHandleOnDragEnd","resetDraggingAndHoveredRow","updateRowOrder","useRowReordering","page","rowDensityClassName","useMemo","renderRowActions","useCallback","currentIndex","index","jsx","DataTableRowActions","rowIndex","undefined","convertFilterSelectOptions","options","map","option","label","value","convertColumnToFilter","column","enableColumnFilter","accessorKey","header","variant","filterVariant","filterSelectOptions","dataTableFilters","providedFilters","reduce","accumulator","item","foundColumn","find","filter","concat","defaultCell","cell","getValue","hasTextWrapping","columnDef","enableWrapping","Box","sx","whiteSpace","textOverflow","overflow","children","emptyState","noResultsInnerContent","EmptyState","heading","description","emptyStateInnerContent","columnIds","columnOrder","shouldDisplayRowActions","dataTable","useMaterialReactTable","state","sorting","globalFilter","icons","ArrowDownwardIcon","ArrowDownIcon","DragHandleIcon","DragIndicatorIcon","SyncAltIcon","ArrowUnsortedIcon","ExpandMoreIcon","ChevronDownIcon","enableColumnActions","enableColumnResizing","enableDensityToggle","enableFilters","enableFullScreenToggle","enableGlobalFilter","enableHiding","enablePagination","layoutMode","manualFiltering","manualSorting","muiTablePaperProps","elevation","selectAllMode","displayColumnDefOptions","grow","muiTableBodyCellProps","align","className","muiTableHeadCellProps","jsxs","display","visibility","Button","endIcon","MoreIcon","size","ariaLabel","isDisabled","minWidth","marginInline","padding","muiTableBodyProps","defaultColumn","Cell","getIsResizing","enableRowOrdering","Boolean","enableRowDragging","muiTableBodyRowProps","table","currentRowId","draggingRowId","hoveredRowId","getState","hoveredRow","muiRowDragHandleProps","onKeyDown","event","onBlur","onDragEnd","onDragCapture","enableRowActions","positionActionsColumn","enableRowSelection","onRowSelectionChange","enableSorting","onSortingChange","currentColumn","sortedColumn","enableRowVirtualization","rowVirtualizerInstanceRef","rowVirtualizerOptions","overscan","renderEmptyRowsFallback","muiTableProps","ref","muiTableContainerProps","enableExpandAll","bulkActionMenuButton","Fragment","MenuButton","buttonVariant","Object","keys","length","useEffect","incomingData","sort","error","prev","lastRow","usePagination","currentRowsCount","marginBottom","DataFilters","onChangeSearch","onChangeFilters","defaultSearchTerm","additionalActions","DataTableSettings","menuAlignment","Callout","severity","text","MRT_TableContainer","Pagination","maxPageIndex","maxPageSize","onPaginationChange","isMoreDisabled","rowsPerPageLabel","currentPageLabel","previousLabel","nextLabel","loadMoreLabel","MemoizedDataTable","exports","memo","displayName"],"sources":["../../../src/DataTable/DataTable.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n ReactNode,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n MRT_Cell,\n MRT_DensityState,\n MRT_Row,\n MRT_SortingState,\n MRT_TableOptions,\n MRT_RowSelectionState,\n MRT_RowVirtualizer,\n MRT_VisibilityState,\n useMaterialReactTable,\n MRT_TableContainer,\n MRT_Column,\n MRT_ColumnDef,\n MRT_TableInstance,\n} from \"material-react-table\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n ArrowDownIcon,\n ArrowUnsortedIcon,\n ChevronDownIcon,\n DragIndicatorIcon,\n MoreIcon,\n} from \"../icons.generated/index.js\";\nimport { densityValues } from \"./constants.js\";\nimport {\n Pagination,\n paginationTypeValues,\n usePagination,\n} from \"../Pagination/index.js\";\nimport { DataFilter, DataFilters } from \"../labs/DataFilters.js\";\nimport {\n DataTableRowActions,\n DataTableRowActionsProps,\n} from \"./DataTableRowActions.js\";\nimport { useRowReordering } from \"./useRowReordering.js\";\nimport { DataTableSettings } from \"./DataTableSettings.js\";\nimport { Box } from \"../Box.js\";\nimport { DataTableRowSelectionState, DataTableRowData } from \"./index.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { useScrollIndication } from \"./useScrollIndication.js\";\nimport styled from \"@emotion/styled\";\nimport { EmptyState } from \"../EmptyState.js\";\nimport { Button, MenuButton, MenuButtonProps } from \"../Buttons/index.js\";\nimport { Callout } from \"../Callout.js\";\n\nexport type DataTableColumn<T extends DataTableRowData> = MRT_ColumnDef<T> & {\n /**\n * @deprecated use hasTextWrapping instead of enableWrapping\n */\n enableWrapping?: boolean;\n hasTextWrapping?: boolean;\n};\n\ntype DataTableColumnInstance<T extends DataTableRowData> = Omit<\n MRT_Column<T, unknown>,\n \"columnDef\"\n> & {\n columnDef: DataTableColumn<T>;\n};\n\ntype DataTableCell<T extends DataTableRowData> = Omit<MRT_Cell<T>, \"column\"> & {\n column: DataTableColumnInstance<T>;\n};\n\nexport type DataTableGetDataType = {\n page?: number;\n resultsPerPage?: number;\n search?: string;\n filters?: DataFilter[];\n sort?: MRT_SortingState;\n};\n\nexport type DataTableOnReorderRowsType = {\n rowId: string;\n newRowIndex: number;\n};\n\nexport type DataTableRenderDetailPanelType = {\n row: MRT_Row<DataTableRowData>;\n table: MRT_TableInstance<DataTableRowData>;\n};\n\nexport type DataTableProps = {\n /**\n * An optional action button above the table.\n */\n additionalActionButton?: ReactNode;\n /**\n * MenuItems that go in an optional action menu above the table.\n */\n additionalActionMenuItems?: ReactNode;\n /**\n * Menu items to include in the bulk actions menu, which appears above the table if a row or rows are selected\n */\n bulkActionMenuItems?: (\n selectedRows: MRT_RowSelectionState,\n ) => MenuButtonProps[\"children\"];\n /**\n * The columns that make up the table\n */\n columns: DataTableColumn<DataTableRowData>[];\n /**\n * The current page number.\n */\n currentPage?: number;\n /**\n * If `error` is not undefined, the DataTable will indicate an error.\n */\n errorMessage?: string;\n /**\n * The component to display when the table is displaying the initial empty state\n */\n emptyPlaceholder?: ReactNode;\n /**\n * An optional set of filters to render in the filters menu\n */\n filters?: Array<DataFilter | DataTableColumn<DataTableRowData> | string>;\n /**\n * The function to get the ID of a row\n */\n getRowId?: MRT_TableOptions<DataTableRowData>[\"getRowId\"];\n /**\n * Callback that fires whenever the table needs to fetch new data, due to changes in\n * page, results per page, search input, filters, or sorting\n */\n getData: ({\n page,\n resultsPerPage,\n search,\n filters,\n sort,\n }: DataTableGetDataType) =>\n | MRT_TableOptions<DataTableRowData>[\"data\"]\n | Promise<MRT_TableOptions<DataTableRowData>[\"data\"]>;\n /**\n * If true, the end user can resize individual columns.\n */\n hasColumnResizing?: boolean;\n /**\n * If true, the end user will be able to show/hide columns.\n */\n hasColumnVisibility?: boolean;\n /**\n * If true, the end user will be able to filter columns.\n */\n hasFilters?: boolean;\n /**\n * If true, the table will include pagination controls.\n */\n hasPagination?: boolean;\n /**\n * If true, the end user can reorder rows via a drag-and-drop interface\n */\n hasRowReordering?: boolean;\n /**\n * If true, the table will include checkboxes on each row, enabling\n * the user to select some or all rows.\n */\n hasRowSelection?: boolean;\n /**\n * If true, the global table search controls will be shown.\n */\n hasSearch?: boolean;\n /**\n * If true, the search field will include a Search button, rather than\n * firing on input change.\n */\n hasSearchSubmitButton?: boolean;\n /**\n * If true, the end user can sort columns (ascending, descending, or neither)\n */\n hasSorting?: boolean;\n /**\n * If true, the end user will be able to change the table density.\n */\n hasChangeableDensity?: boolean;\n /**\n * The initial density (height & padding) of the table rows. This is available even if the\n * table density isn't changeable by the end user via hasChangeableDensity.\n */\n initialDensity?: (typeof densityValues)[number];\n /**\n * The initial search value\n */\n initialSearchValue?: string;\n /**\n * Is the next or show-more button disabled\n */\n isPaginationMoreDisabled?: boolean;\n /**\n * The component to display when the query returns no results\n */\n noResultsPlaceholder?: ReactNode;\n /**\n * The number of results per page.\n */\n resultsPerPage?: number;\n /**\n * The optional component to display when expanding a row.\n */\n renderDetailPanel?: MRT_TableOptions<DataTableRowData>[\"renderDetailPanel\"];\n /**\n * Action buttons to display in each row\n */\n rowActionButtons?: DataTableRowActionsProps[\"rowActionButtons\"];\n /**\n * Menu items to include in the optional actions menu on each row.\n */\n rowActionMenuItems?: DataTableRowActionsProps[\"rowActionMenuItems\"];\n /**\n * The debounce time, in milliseconds, for the search input firing\n * `onChangeSearch` when changed. If `hasSearchSubmitButton` is true,\n * this doesn't do anything.\n */\n searchDelayTime?: number;\n /**\n * Allows for external control of the selected row state\n * use in tandem with onChangeRowSelection to manage your state\n */\n selectedRows?: DataTableRowSelectionState;\n /**\n * Callback that fires when a row (or rows) is selected or unselected.\n */\n onChangeRowSelection?: (rowSelection: DataTableRowSelectionState) => void;\n /**\n * Callback that fires when the user reorders rows within the table. Can be used\n * to propagate order change to the backend.\n */\n onReorderRows?: ({ rowId, newRowIndex }: DataTableOnReorderRowsType) => void;\n /**\n * The type of pagination controls shown. Defaults to next/prev buttons, but can be\n * set to a simple \"Load more\" button by setting to \"loadMore\".\n */\n paginationType?: (typeof paginationTypeValues)[number];\n /**\n * The total number of rows in the table. Optional, because it's sometimes impossible\n * to calculate. Used in table pagination to know when to disable the \"next\"/\"more\" button.\n */\n totalRows?: number;\n /**\n * The largest number of rows allowed to be shown per page. This only affects the row input\n * in pagination.\n */\n maxResultsPerPage?: number;\n /**\n * The highest page number allowed to be manually input in pagination\n */\n maxPages?: number;\n};\n\nconst ScrollableTableContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isScrollableStart\" &&\n prop !== \"isScrollableEnd\",\n})<{\n odysseyDesignTokens: DesignTokens;\n isScrollableStart: boolean;\n isScrollableEnd: boolean;\n}>(({ odysseyDesignTokens, isScrollableStart, isScrollableEnd }) => ({\n marginBlockEnd: odysseyDesignTokens.Spacing4,\n position: \"relative\",\n borderInlineStartColor: isScrollableStart\n ? odysseyDesignTokens.HueNeutral200\n : \"transparent\",\n borderInlineStartStyle: \"solid\",\n borderInlineStartWidth: odysseyDesignTokens.BorderWidthMain,\n \"::before\": {\n background:\n \"linear-gradient(-90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.33) 50%, rgba(0, 0, 0, 1) 100%)\",\n content: '\"\"',\n opacity: isScrollableStart ? \"0.075\" : \"0\",\n pointerEvents: \"none\",\n position: \"absolute\",\n top: 0,\n left: 0,\n bottom: 0,\n width: odysseyDesignTokens.Spacing6,\n zIndex: 100,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n },\n borderInlineEndColor: isScrollableEnd\n ? odysseyDesignTokens.HueNeutral200\n : \"transparent\",\n borderInlineEndStyle: \"solid\",\n borderInlineEndWidth: odysseyDesignTokens.BorderWidthMain,\n \"::after\": {\n background:\n \"linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.33) 50%, rgba(0, 0, 0, 1) 100%)\",\n content: '\"\"',\n opacity: isScrollableEnd ? \"0.075\" : \"0\",\n pointerEvents: \"none\",\n position: \"absolute\",\n top: 0,\n right: 0,\n bottom: 0,\n width: odysseyDesignTokens.Spacing6,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n },\n}));\n\nconst defaultGetRowId: DataTableProps[\"getRowId\"] = (row) => row.id as string;\n\nconst DataTable = ({\n additionalActionButton,\n additionalActionMenuItems,\n bulkActionMenuItems,\n columns,\n currentPage = 1,\n emptyPlaceholder,\n errorMessage: errorMessageProp,\n filters: filtersProp,\n getData,\n getRowId = defaultGetRowId,\n hasChangeableDensity,\n hasColumnResizing,\n hasColumnVisibility,\n hasFilters,\n hasPagination,\n hasRowReordering,\n hasRowSelection,\n hasSearch,\n hasSearchSubmitButton,\n hasSorting,\n initialDensity = densityValues[0],\n initialSearchValue = \"\",\n isPaginationMoreDisabled,\n noResultsPlaceholder,\n onChangeRowSelection,\n onReorderRows,\n paginationType = \"paged\",\n renderDetailPanel,\n resultsPerPage = 20,\n maxResultsPerPage,\n maxPages,\n rowActionButtons,\n rowActionMenuItems,\n searchDelayTime,\n selectedRows,\n totalRows,\n}: DataTableProps) => {\n const { t } = useTranslation();\n\n const [data, setData] = useState<DataTableRowData[]>([]);\n const [pagination, setPagination] = useState({\n pageIndex: currentPage,\n pageSize: resultsPerPage,\n });\n const [draggingRow, setDraggingRow] =\n useState<MRT_Row<DataTableRowData> | null>();\n const [isTableContainerScrolledToStart, setIsTableContainerScrolledToStart] =\n useState(true);\n const [isTableContainerScrolledToEnd, setIsTableContainerScrolledToEnd] =\n useState(true);\n const [tableInnerContainerWidth, setTableInnerContainerWidth] =\n useState<string>(\"100%\");\n const tableOuterContainerRef = useRef<HTMLDivElement>(null);\n const tableInnerContainerRef = useRef<HTMLDivElement>(null);\n const tableContentRef = useRef<HTMLTableElement>(null);\n\n // Table states\n const [columnSorting, setColumnSorting] = useState<MRT_SortingState>([]);\n const [columnVisibility, setColumnVisibility] =\n useState<MRT_VisibilityState>();\n const [rowDensity, setRowDensity] =\n useState<MRT_DensityState>(initialDensity);\n const [search, setSearch] = useState<string>(initialSearchValue);\n const [filters, setFilters] = useState<DataFilter[]>();\n const [initialFilters, setInitialFilters] = useState<DataFilter[]>();\n const [isLoading, setIsLoading] = useState<boolean | undefined>(true);\n const [isEmpty, setIsEmpty] = useState<boolean | undefined>();\n const [errorMessage, setErrorMessage] = useState<string | undefined>(\n errorMessageProp,\n );\n const [_rowSelection, setRowSelection] = useState<MRT_RowSelectionState>({});\n const rowSelection = selectedRows || _rowSelection;\n\n useScrollIndication({\n tableOuterContainer: tableOuterContainerRef.current,\n tableInnerContainer: tableInnerContainerRef.current,\n setIsTableContainerScrolledToStart: setIsTableContainerScrolledToStart,\n setIsTableContainerScrolledToEnd: setIsTableContainerScrolledToEnd,\n setTableInnerContainerWidth: setTableInnerContainerWidth,\n });\n\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const {\n dragHandleStyles,\n dragHandleText,\n draggableTableBodyRowClassName,\n handleDragHandleKeyDown,\n handleDragHandleOnDragCapture,\n handleDragHandleOnDragEnd,\n resetDraggingAndHoveredRow,\n updateRowOrder,\n } = useRowReordering({\n totalRows,\n onReorderRows,\n data,\n setData,\n draggingRow,\n setDraggingRow,\n resultsPerPage: pagination.pageSize,\n page: pagination.pageIndex,\n });\n\n const rowDensityClassName = useMemo(() => {\n return rowDensity === \"spacious\"\n ? \"MuiTableBody-spacious\"\n : rowDensity === \"compact\"\n ? \"MuiTableBody-compact\"\n : \"MuiTableBody-default\";\n }, [rowDensity]);\n\n const renderRowActions = useCallback(\n ({ row }: { row: MRT_Row<DataTableRowData> }) => {\n const currentIndex =\n row.index + (pagination.pageIndex - 1) * pagination.pageSize;\n return (\n <DataTableRowActions\n row={row}\n rowIndex={currentIndex}\n rowActionButtons={rowActionButtons}\n rowActionMenuItems={rowActionMenuItems}\n totalRows={totalRows}\n updateRowOrder={\n hasRowReordering && onReorderRows ? updateRowOrder : undefined\n }\n />\n );\n },\n [\n pagination,\n rowActionButtons,\n rowActionMenuItems,\n hasRowReordering,\n onReorderRows,\n totalRows,\n updateRowOrder,\n ],\n );\n\n /**\n * This hack is to provide compatibility with Material-React-Table's\n * filterOptions format, which allows for strings and { label: string, value: string }\n */\n const convertFilterSelectOptions = useCallback(\n (options: DataTableColumn<DataTableRowData>[\"filterSelectOptions\"]) =>\n options?.map((option) =>\n typeof option === \"string\"\n ? {\n label: option,\n value: option,\n }\n : {\n // If the option isn't a string, it must have value and/or option defined\n // If either is undefined, use the other\n // These shouldn't need `as`, but this is a legacy file now. --Kevin Ghadyani\n label: (option.label ?? option.value) as string,\n value: (option.value ?? option.label) as string,\n },\n ),\n [],\n );\n\n const convertColumnToFilter = useCallback(\n (column: DataTableColumn<DataTableRowData>) =>\n column.enableColumnFilter !== false && column.accessorKey\n ? ({\n id: column.accessorKey,\n label: column.header,\n variant: column.filterVariant,\n options: convertFilterSelectOptions(column.filterSelectOptions),\n } satisfies DataFilter as DataFilter)\n : null,\n [convertFilterSelectOptions],\n );\n\n /**\n * Filters default to the columns, but can be overridden\n * with the `filters` prop. `filters` should be an array\n * of column accessorKeys, column defs, or DataFilters.\n */\n const dataTableFilters = useMemo(() => {\n const providedFilters = filtersProp || columns;\n return providedFilters.reduce<DataFilter[]>((accumulator, item) => {\n if (typeof item === \"string\") {\n const foundColumn = columns.find(\n (column) => column.accessorKey === item,\n );\n if (foundColumn) {\n const filter = convertColumnToFilter(foundColumn);\n if (filter) {\n return accumulator.concat(filter);\n }\n }\n } else if (\"accessorKey\" in item) {\n // Checks if it's a column\n const filter = convertColumnToFilter(item);\n if (filter) {\n return accumulator.concat(filter);\n }\n } else if (\"label\" in item) {\n // Checks if it's a DataFilter\n return accumulator.concat(item);\n }\n // If none of the conditions match, item is ignored (not mapping to undefined)\n return accumulator;\n }, []);\n }, [columns, filtersProp, convertColumnToFilter]);\n\n const defaultCell = useCallback(\n ({ cell }: { cell: DataTableCell<DataTableRowData> }) => {\n const value = cell.getValue<string>();\n const hasTextWrapping =\n cell.column.columnDef.hasTextWrapping ||\n cell.column.columnDef.enableWrapping;\n\n return hasTextWrapping ? (\n value\n ) : (\n <Box\n sx={{\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n }}\n >\n {value}\n </Box>\n );\n },\n [],\n );\n\n const emptyState = useCallback(() => {\n const noResultsInnerContent = noResultsPlaceholder || (\n <EmptyState\n heading={t(\"table.noresults.heading\")}\n description={t(\"table.noresults.text\")}\n />\n );\n\n const emptyStateInnerContent =\n emptyPlaceholder && isEmpty ? emptyPlaceholder : noResultsInnerContent;\n\n return (\n <Box sx={{ width: tableInnerContainerWidth }}>\n {emptyStateInnerContent}\n </Box>\n );\n }, [\n emptyPlaceholder,\n isEmpty,\n noResultsPlaceholder,\n t,\n tableInnerContainerWidth,\n ]);\n\n const columnIds = useMemo(() => {\n return columns.map((column) => column.accessorKey);\n }, [columns]);\n\n const columnOrder = useMemo(\n () => [\n \"mrt-row-drag\",\n \"mrt-row-select\",\n \"mrt-row-expand\",\n ...columnIds,\n \"mrt-row-actions\",\n ],\n [columnIds],\n ) as string[];\n\n const shouldDisplayRowActions = useMemo(\n () =>\n (hasRowReordering === true && onReorderRows) ||\n rowActionButtons ||\n rowActionMenuItems\n ? true\n : false,\n [hasRowReordering, onReorderRows, rowActionButtons, rowActionMenuItems],\n );\n\n const dataTable = useMaterialReactTable({\n columns: columns,\n data: data,\n getRowId,\n state: {\n sorting: columnSorting,\n globalFilter: search,\n columnVisibility,\n isLoading,\n rowSelection,\n columnOrder,\n },\n icons: {\n ArrowDownwardIcon: ArrowDownIcon,\n DragHandleIcon: DragIndicatorIcon,\n SyncAltIcon: ArrowUnsortedIcon,\n ExpandMoreIcon: ChevronDownIcon,\n },\n\n // Base table settings\n enableColumnActions: false,\n enableColumnResizing: hasColumnResizing,\n enableDensityToggle: false,\n enableFilters: false,\n enableFullScreenToggle: false,\n enableGlobalFilter: false,\n enableHiding: false,\n enablePagination: false,\n layoutMode: \"grid-no-grow\",\n manualFiltering: true,\n manualSorting: true,\n muiTablePaperProps: {\n elevation: 0,\n sx: {\n overflow: \"visible\",\n },\n },\n selectAllMode: \"all\",\n displayColumnDefOptions: {\n \"mrt-row-actions\": {\n header: \"\",\n grow: true,\n muiTableBodyCellProps: {\n align: \"right\",\n sx: {\n overflow: \"visible\",\n width: \"unset\",\n },\n className: \"ods-actions-cell\",\n },\n muiTableHeadCellProps: {\n align: \"right\",\n sx: {\n width: \"unset\",\n },\n className: \"ods-actions-cell\",\n children: (\n <Box sx={{ display: \"flex\", visibility: \"hidden\" }}>\n {rowActionButtons && rowActionButtons({ id: null })}\n {((hasRowReordering && onReorderRows) || rowActionMenuItems) && (\n <Box>\n <Button\n endIcon={<MoreIcon />}\n size=\"small\"\n variant=\"floating\"\n ariaLabel={t(\"table.moreactions.arialabel\")}\n isDisabled\n />\n </Box>\n )}\n </Box>\n ),\n },\n },\n \"mrt-row-drag\": {\n header: \"\",\n muiTableBodyCellProps: {\n sx: {\n minWidth: 0,\n width: \"auto\",\n },\n className: \"ods-drag-handle\",\n },\n muiTableHeadCellProps: {\n sx: {\n minWidth: 0,\n width: \"auto\",\n },\n children: (\n // Add a spacer to simulate the width of the drag handle in the column.\n // Without this, the head cells are offset from their body cell counterparts\n <Box sx={{ marginInline: \"-0.1rem\" }}>\n <DragIndicatorIcon sx={{ marginInline: 1, opacity: 0 }} />\n </Box>\n ),\n },\n },\n \"mrt-row-select\": {\n muiTableHeadCellProps: {\n padding: \"checkbox\",\n },\n muiTableBodyCellProps: {\n padding: \"checkbox\",\n },\n },\n \"mrt-row-expand\": {\n header: \"\",\n },\n },\n muiTableBodyProps: () => ({\n className: rowDensityClassName,\n }),\n defaultColumn: {\n Cell: defaultCell,\n },\n muiTableBodyCellProps: ({ column }) => ({\n className: column.getIsResizing() ? \"isResizing\" : \"\",\n }),\n\n // Reordering\n enableRowOrdering: hasRowReordering && Boolean(onReorderRows),\n enableRowDragging: hasRowReordering && Boolean(onReorderRows),\n muiTableBodyRowProps: ({ table, row }) => ({\n className: draggableTableBodyRowClassName({\n currentRowId: row.id,\n draggingRowId: draggingRow?.id,\n hoveredRowId: table.getState().hoveredRow?.id,\n }),\n }),\n muiRowDragHandleProps: ({ table, row }) => ({\n onKeyDown: (event) => handleDragHandleKeyDown({ table, row, event }),\n onBlur: () => resetDraggingAndHoveredRow(table),\n onDragEnd: () => handleDragHandleOnDragEnd(table),\n onDragCapture: () => handleDragHandleOnDragCapture(table),\n sx: dragHandleStyles,\n ...dragHandleText,\n }),\n\n // Row actions\n enableRowActions: shouldDisplayRowActions,\n positionActionsColumn:\n \"last\" as MRT_TableOptions<DataTableRowData>[\"positionActionsColumn\"],\n renderRowActions: ({ row }) => renderRowActions({ row }),\n\n // Row selection\n enableRowSelection: hasRowSelection,\n onRowSelectionChange: setRowSelection,\n\n // Sorting\n enableSorting: hasSorting,\n onSortingChange: setColumnSorting,\n muiTableHeadCellProps: ({ column: currentColumn }) => ({\n className: columnSorting.find(\n (sortedColumn) => sortedColumn.id === currentColumn.id,\n )\n ? \"isSorted\"\n : \"isUnsorted\",\n }),\n\n // Virtualization\n enableRowVirtualization:\n paginationType !== \"loadMore\" && pagination.pageSize > 50,\n rowVirtualizerInstanceRef:\n useRef<MRT_RowVirtualizer<HTMLDivElement, HTMLTableRowElement>>(null),\n rowVirtualizerOptions: {\n overscan: 4,\n },\n\n // States\n renderEmptyRowsFallback: emptyState,\n\n // Refs\n muiTableProps: {\n ref: tableContentRef,\n className:\n !shouldDisplayRowActions && hasColumnResizing\n ? \"ods-hide-spacer-column\"\n : \"\",\n },\n\n muiTableContainerProps: {\n ref: tableInnerContainerRef,\n },\n\n // Row expansion\n enableExpandAll: false,\n renderDetailPanel: renderDetailPanel,\n });\n\n // Effects\n const bulkActionMenuButton = useMemo(\n () => (\n <>\n <MenuButton\n buttonVariant=\"secondary\"\n endIcon={<MoreIcon />}\n isDisabled={Object.keys(rowSelection).length === 0}\n ariaLabel=\"More actions\"\n >\n {bulkActionMenuItems?.(rowSelection)}\n </MenuButton>\n </>\n ),\n [bulkActionMenuItems, rowSelection],\n );\n\n useEffect(() => {\n (async () => {\n setIsLoading(true);\n setErrorMessage(errorMessageProp);\n try {\n const incomingData = await getData?.({\n page: pagination.pageIndex,\n resultsPerPage: pagination.pageSize,\n search,\n filters,\n sort: columnSorting,\n });\n setData(incomingData);\n } catch (error) {\n setErrorMessage(typeof error === \"string\" ? error : t(\"table.error\"));\n } finally {\n setIsLoading(false);\n }\n })();\n }, [\n columnSorting,\n errorMessageProp,\n filters,\n getData,\n pagination,\n search,\n t,\n ]);\n\n useEffect(() => {\n if (!initialFilters && filters) {\n setInitialFilters(filters);\n }\n\n setIsEmpty(\n pagination.pageIndex === currentPage &&\n pagination.pageSize === resultsPerPage &&\n search === \"\" &&\n filters === initialFilters &&\n data.length === 0,\n );\n }, [\n filters,\n pagination,\n search,\n data,\n currentPage,\n initialFilters,\n resultsPerPage,\n ]);\n\n useEffect(() => {\n setPagination((prev) => ({\n pageIndex: 1,\n pageSize: prev.pageSize,\n }));\n }, [filters, search]);\n\n useEffect(() => {\n onChangeRowSelection?.(rowSelection);\n }, [rowSelection, onChangeRowSelection]);\n\n const { lastRow } = usePagination({\n currentRowsCount: data.length,\n pageIndex: pagination.pageIndex,\n pageSize: pagination.pageSize,\n totalRows,\n });\n\n // Render the table\n return (\n <>\n {(hasSearch ||\n hasFilters ||\n hasChangeableDensity ||\n hasColumnVisibility ||\n bulkActionMenuItems ||\n additionalActionButton ||\n additionalActionMenuItems) && (\n <Box sx={{ marginBottom: 5 }}>\n <DataFilters\n onChangeSearch={hasSearch ? setSearch : undefined}\n onChangeFilters={hasFilters ? setFilters : undefined}\n hasSearchSubmitButton={hasSearchSubmitButton}\n searchDelayTime={searchDelayTime}\n filters={hasFilters ? dataTableFilters : undefined}\n defaultSearchTerm={initialSearchValue}\n isDisabled={isEmpty}\n additionalActions={\n <>\n <DataTableSettings\n hasChangeableDensity={hasChangeableDensity}\n rowDensity={rowDensity}\n setRowDensity={setRowDensity}\n hasColumnVisibility={hasColumnVisibility}\n columns={columns}\n columnVisibility={columnVisibility}\n setColumnVisibility={setColumnVisibility}\n />\n {bulkActionMenuItems && bulkActionMenuButton}\n {additionalActionButton}\n {additionalActionMenuItems && (\n <MenuButton\n endIcon={<MoreIcon />}\n ariaLabel={t(\"table.moreactions.arialabel\")}\n buttonVariant=\"secondary\"\n menuAlignment=\"right\"\n >\n {additionalActionMenuItems}\n </MenuButton>\n )}\n </>\n }\n />\n </Box>\n )}\n\n {errorMessage && (\n <Box sx={{ marginBlockEnd: 2 }}>\n <Callout severity=\"error\" text={errorMessage} />\n </Box>\n )}\n\n <ScrollableTableContainer\n odysseyDesignTokens={odysseyDesignTokens}\n isScrollableStart={!isTableContainerScrolledToStart}\n isScrollableEnd={!isTableContainerScrolledToEnd}\n ref={tableOuterContainerRef}\n >\n <MRT_TableContainer table={dataTable} />\n </ScrollableTableContainer>\n\n {hasPagination && (\n <Pagination\n pageIndex={pagination.pageIndex}\n pageSize={pagination.pageSize}\n maxPageIndex={maxPages}\n maxPageSize={maxResultsPerPage}\n onPaginationChange={setPagination}\n lastRow={lastRow}\n totalRows={totalRows}\n currentRowsCount={data.length}\n isDisabled={isEmpty}\n isMoreDisabled={isPaginationMoreDisabled}\n variant={paginationType}\n rowsPerPageLabel={t(\"pagination.rowsperpage\")}\n currentPageLabel={t(\"pagination.page\")}\n previousLabel={t(\"pagination.previous\")}\n nextLabel={t(\"pagination.next\")}\n loadMoreLabel={t(\"pagination.loadmore\")}\n />\n )}\n </>\n );\n};\n\nconst MemoizedDataTable = memo(DataTable);\nMemoizedDataTable.displayName = \"DataTable\";\n\nexport { MemoizedDataTable as DataTable };\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,mBAAA,GAAAD,OAAA;AAeA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAOA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAKA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AAIA,IAAAQ,iBAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,IAAA,GAAAV,OAAA;AAEA,IAAAW,2BAAA,GAAAX,OAAA;AAIA,IAAAY,oBAAA,GAAAZ,OAAA;AACA,IAAAa,OAAA,GAAAC,sBAAA,CAAAd,OAAA;AACA,IAAAe,WAAA,GAAAf,OAAA;AACA,IAAAgB,OAAA,GAAAhB,OAAA;AACA,IAAAiB,QAAA,GAAAjB,OAAA;AAAwC,IAAAkB,WAAA,GAAAlB,OAAA;AAAA,SAAAc,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAnExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwQA,MAAMG,wBAAwB,GAAG,I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AI,EAAC/Q,SAAS,CAAC;AACzC6Q,iBAAiB,CAACG,WAAW,GAAG,WAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"DataTable.cjs","names":["_react","require","_materialReactTable","_reactI18next","_index","_constants","_index2","_DataFilters","_DataTableRowActions","_useRowReordering","_DataTableSettings","_Box","_OdysseyDesignTokensContext","_useScrollIndication","_styled","_interopRequireDefault","_EmptyState","_index3","_Callout","_jsxRuntime","e","__esModule","default","ScrollableTableContainer","styled","shouldForwardProp","prop","odysseyDesignTokens","isScrollableStart","isScrollableEnd","marginBlockEnd","Spacing4","position","borderInlineStartColor","HueNeutral200","borderInlineStartStyle","borderInlineStartWidth","BorderWidthMain","background","content","opacity","pointerEvents","top","left","bottom","width","Spacing6","zIndex","transition","TransitionDurationMain","TransitionTimingMain","borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth","right","defaultGetRowId","row","id","DataTable","additionalActionButton","additionalActionMenuItems","bulkActionMenuItems","columns","currentPage","emptyPlaceholder","errorMessage","errorMessageProp","filters","filtersProp","getData","getRowId","hasChangeableDensity","hasColumnResizing","hasColumnVisibility","hasFilters","hasPagination","hasRowReordering","hasRowSelection","hasSearch","hasSearchSubmitButton","hasSorting","initialDensity","densityValues","initialSearchValue","isPaginationMoreDisabled","noResultsPlaceholder","onChangeRowSelection","onReorderRows","paginationType","renderDetailPanel","resultsPerPage","maxResultsPerPage","maxPages","rowActionButtons","rowActionMenuItems","searchDelayTime","selectedRows","totalRows","t","useTranslation","data","setData","useState","pagination","setPagination","pageIndex","pageSize","draggingRow","setDraggingRow","isTableContainerScrolledToStart","setIsTableContainerScrolledToStart","isTableContainerScrolledToEnd","setIsTableContainerScrolledToEnd","tableInnerContainerWidth","setTableInnerContainerWidth","tableOuterContainerRef","useRef","tableInnerContainerRef","tableContentRef","columnSorting","setColumnSorting","columnVisibility","setColumnVisibility","rowDensity","setRowDensity","search","setSearch","setFilters","initialFilters","setInitialFilters","isLoading","setIsLoading","isEmpty","setIsEmpty","setErrorMessage","_rowSelection","setRowSelection","rowSelection","useScrollIndication","tableOuterContainer","current","tableInnerContainer","useOdysseyDesignTokens","dragHandleStyles","dragHandleText","draggableTableBodyRowClassName","handleDragHandleKeyDown","handleDragHandleOnDragCapture","handleDragHandleOnDragEnd","resetDraggingAndHoveredRow","updateRowOrder","useRowReordering","page","rowDensityClassName","useMemo","renderRowActions","useCallback","currentIndex","index","jsx","DataTableRowActions","rowIndex","undefined","convertFilterSelectOptions","options","map","option","label","value","convertColumnToFilter","column","enableColumnFilter","accessorKey","header","variant","filterVariant","filterSelectOptions","dataTableFilters","providedFilters","reduce","accumulator","item","foundColumn","find","filter","concat","defaultCell","cell","getValue","hasTextWrapping","columnDef","enableWrapping","Box","sx","whiteSpace","textOverflow","overflow","children","emptyState","noResultsInnerContent","EmptyState","heading","description","emptyStateInnerContent","columnIds","columnOrder","shouldDisplayRowActions","muiTableBodyProps","className","muiTableBodyCellProps","getIsResizing","overflowWrap","muiDetailPanelProps","paddingBlock","getIsExpanded","Spacing3","muiTableBodyRowProps","table","isDetailPanel","currentRowId","draggingRowId","hoveredRowId","getState","hoveredRow","border","backgroundColor","muiRowDragHandleProps","onKeyDown","event","onBlur","onDragEnd","onDragCapture","muiTableHeadCellProps","currentColumn","sortedColumn","hasColumnWithGrow","some","grow","dataTable","useMaterialReactTable","state","sorting","globalFilter","icons","ArrowDownwardIcon","ArrowDownIcon","DragHandleIcon","DragIndicatorIcon","SyncAltIcon","ArrowUnsortedIcon","ExpandMoreIcon","ChevronDownIcon","enableColumnActions","enableColumnResizing","enableDensityToggle","enableFilters","enableFullScreenToggle","enableGlobalFilter","enableHiding","enablePagination","layoutMode","manualFiltering","manualSorting","muiTablePaperProps","elevation","selectAllMode","displayColumnDefOptions","align","jsxs","display","visibility","Button","endIcon","MoreIcon","size","ariaLabel","isDisabled","minWidth","marginInline","padding","defaultColumn","Cell","enableRowOrdering","Boolean","enableRowDragging","enableRowActions","positionActionsColumn","enableRowSelection","onRowSelectionChange","enableSorting","onSortingChange","enableRowVirtualization","rowVirtualizerInstanceRef","rowVirtualizerOptions","overscan","renderEmptyRowsFallback","muiTableProps","ref","muiTableContainerProps","enableExpandAll","bulkActionMenuButton","Fragment","MenuButton","buttonVariant","Object","keys","length","useEffect","incomingData","sort","error","prev","lastRow","usePagination","currentRowsCount","marginBottom","DataFilters","onChangeSearch","onChangeFilters","defaultSearchTerm","additionalActions","DataTableSettings","menuAlignment","Callout","severity","text","MRT_TableContainer","Pagination","maxPageIndex","maxPageSize","onPaginationChange","isMoreDisabled","rowsPerPageLabel","currentPageLabel","previousLabel","nextLabel","loadMoreLabel","MemoizedDataTable","exports","memo","displayName"],"sources":["../../../src/DataTable/DataTable.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n memo,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n MRT_Cell,\n MRT_Column,\n MRT_ColumnDef,\n MRT_DensityState,\n MRT_Row,\n MRT_RowData,\n MRT_RowSelectionState,\n MRT_RowVirtualizer,\n MRT_SortingState,\n MRT_TableContainer,\n MRT_TableInstance,\n MRT_TableOptions,\n MRT_VisibilityState,\n useMaterialReactTable,\n} from \"material-react-table\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n ArrowDownIcon,\n ArrowUnsortedIcon,\n ChevronDownIcon,\n DragIndicatorIcon,\n MoreIcon,\n} from \"../icons.generated/index.js\";\nimport { densityValues } from \"./constants.js\";\nimport {\n Pagination,\n paginationTypeValues,\n usePagination,\n} from \"../Pagination/index.js\";\nimport { DataFilter, DataFilters } from \"../labs/DataFilters.js\";\nimport {\n DataTableRowActions,\n DataTableRowActionsProps,\n} from \"./DataTableRowActions.js\";\nimport { useRowReordering } from \"./useRowReordering.js\";\nimport { DataTableSettings } from \"./DataTableSettings.js\";\nimport { Box } from \"../Box.js\";\nimport { DataTableRowData, DataTableRowSelectionState } from \"./index.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { useScrollIndication } from \"./useScrollIndication.js\";\nimport styled from \"@emotion/styled\";\nimport { EmptyState } from \"../EmptyState.js\";\nimport { Button, MenuButton, MenuButtonProps } from \"../Buttons/index.js\";\nimport { Callout } from \"../Callout.js\";\n\nexport type DataTableColumn<T extends DataTableRowData> = MRT_ColumnDef<T> & {\n /**\n * @deprecated use hasTextWrapping instead of enableWrapping\n */\n enableWrapping?: boolean;\n hasTextWrapping?: boolean;\n};\n\ntype DataTableColumnInstance<T extends DataTableRowData> = Omit<\n MRT_Column<T, unknown>,\n \"columnDef\"\n> & {\n columnDef: DataTableColumn<T>;\n};\n\ntype DataTableCell<T extends DataTableRowData> = Omit<MRT_Cell<T>, \"column\"> & {\n column: DataTableColumnInstance<T>;\n};\n\n/**\n * Utility type to extract a callback function type from a given key of `MRT_TableOptions`.\n *\n * The `Extract<>` utility is used to filter out only the function type from the property,\n * as some `MRT_TableOptions` properties can be union types (e.g., `function` | `object`).\n *\n * The `@typescript-eslint/no-unsafe-function-type` rule is disabled here because we must extract\n * a function type from a property of `MRT_TableOptions`, but the exact function signature varies\n * depending on the key.\n */\ntype MRT_TableOptionsCallback<\n TableOptionKey extends keyof Required<MRT_TableOptions<MRT_RowData>>,\n TData extends MRT_RowData = MRT_RowData,\n> = Extract<\n Required<MRT_TableOptions<TData>>[TableOptionKey],\n Function // eslint-disable-line @typescript-eslint/no-unsafe-function-type\n>;\n\nexport type DataTableGetDataType = {\n page?: number;\n resultsPerPage?: number;\n search?: string;\n filters?: DataFilter[];\n sort?: MRT_SortingState;\n};\n\nexport type DataTableOnReorderRowsType = {\n rowId: string;\n newRowIndex: number;\n};\n\nexport type DataTableRenderDetailPanelType = {\n row: MRT_Row<DataTableRowData>;\n table: MRT_TableInstance<DataTableRowData>;\n};\n\nexport type DataTableProps = {\n /**\n * An optional action button above the table.\n */\n additionalActionButton?: ReactNode;\n /**\n * MenuItems that go in an optional action menu above the table.\n */\n additionalActionMenuItems?: ReactNode;\n /**\n * Menu items to include in the bulk actions menu, which appears above the table if a row or rows are selected\n */\n bulkActionMenuItems?: (\n selectedRows: MRT_RowSelectionState,\n ) => MenuButtonProps[\"children\"];\n /**\n * The columns that make up the table\n */\n columns: DataTableColumn<DataTableRowData>[];\n /**\n * The current page number.\n */\n currentPage?: number;\n /**\n * If `error` is not undefined, the DataTable will indicate an error.\n */\n errorMessage?: string;\n /**\n * The component to display when the table is displaying the initial empty state\n */\n emptyPlaceholder?: ReactNode;\n /**\n * An optional set of filters to render in the filters menu\n */\n filters?: Array<DataFilter | DataTableColumn<DataTableRowData> | string>;\n /**\n * The function to get the ID of a row\n */\n getRowId?: MRT_TableOptions<DataTableRowData>[\"getRowId\"];\n /**\n * Callback that fires whenever the table needs to fetch new data, due to changes in\n * page, results per page, search input, filters, or sorting\n */\n getData: ({\n page,\n resultsPerPage,\n search,\n filters,\n sort,\n }: DataTableGetDataType) =>\n | MRT_TableOptions<DataTableRowData>[\"data\"]\n | Promise<MRT_TableOptions<DataTableRowData>[\"data\"]>;\n /**\n * If true, the end user can resize individual columns.\n */\n hasColumnResizing?: boolean;\n /**\n * If true, the end user will be able to show/hide columns.\n */\n hasColumnVisibility?: boolean;\n /**\n * If true, the end user will be able to filter columns.\n */\n hasFilters?: boolean;\n /**\n * If true, the table will include pagination controls.\n */\n hasPagination?: boolean;\n /**\n * If true, the end user can reorder rows via a drag-and-drop interface\n */\n hasRowReordering?: boolean;\n /**\n * If true, the table will include checkboxes on each row, enabling\n * the user to select some or all rows.\n */\n hasRowSelection?: boolean;\n /**\n * If true, the global table search controls will be shown.\n */\n hasSearch?: boolean;\n /**\n * If true, the search field will include a Search button, rather than\n * firing on input change.\n */\n hasSearchSubmitButton?: boolean;\n /**\n * If true, the end user can sort columns (ascending, descending, or neither)\n */\n hasSorting?: boolean;\n /**\n * If true, the end user will be able to change the table density.\n */\n hasChangeableDensity?: boolean;\n /**\n * The initial density (height & padding) of the table rows. This is available even if the\n * table density isn't changeable by the end user via hasChangeableDensity.\n */\n initialDensity?: (typeof densityValues)[number];\n /**\n * The initial search value\n */\n initialSearchValue?: string;\n /**\n * Is the next or show-more button disabled\n */\n isPaginationMoreDisabled?: boolean;\n /**\n * The component to display when the query returns no results\n */\n noResultsPlaceholder?: ReactNode;\n /**\n * The number of results per page.\n */\n resultsPerPage?: number;\n /**\n * The optional component to display when expanding a row.\n */\n renderDetailPanel?: MRT_TableOptions<DataTableRowData>[\"renderDetailPanel\"];\n /**\n * Action buttons to display in each row\n */\n rowActionButtons?: DataTableRowActionsProps[\"rowActionButtons\"];\n /**\n * Menu items to include in the optional actions menu on each row.\n */\n rowActionMenuItems?: DataTableRowActionsProps[\"rowActionMenuItems\"];\n /**\n * The debounce time, in milliseconds, for the search input firing\n * `onChangeSearch` when changed. If `hasSearchSubmitButton` is true,\n * this doesn't do anything.\n */\n searchDelayTime?: number;\n /**\n * Allows for external control of the selected row state\n * use in tandem with onChangeRowSelection to manage your state\n */\n selectedRows?: DataTableRowSelectionState;\n /**\n * Callback that fires when a row (or rows) is selected or unselected.\n */\n onChangeRowSelection?: (rowSelection: DataTableRowSelectionState) => void;\n /**\n * Callback that fires when the user reorders rows within the table. Can be used\n * to propagate order change to the backend.\n */\n onReorderRows?: ({ rowId, newRowIndex }: DataTableOnReorderRowsType) => void;\n /**\n * The type of pagination controls shown. Defaults to next/prev buttons, but can be\n * set to a simple \"Load more\" button by setting to \"loadMore\".\n */\n paginationType?: (typeof paginationTypeValues)[number];\n /**\n * The total number of rows in the table. Optional, because it's sometimes impossible\n * to calculate. Used in table pagination to know when to disable the \"next\"/\"more\" button.\n */\n totalRows?: number;\n /**\n * The largest number of rows allowed to be shown per page. This only affects the row input\n * in pagination.\n */\n maxResultsPerPage?: number;\n /**\n * The highest page number allowed to be manually input in pagination\n */\n maxPages?: number;\n};\n\nconst ScrollableTableContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isScrollableStart\" &&\n prop !== \"isScrollableEnd\",\n})<{\n odysseyDesignTokens: DesignTokens;\n isScrollableStart: boolean;\n isScrollableEnd: boolean;\n}>(({ odysseyDesignTokens, isScrollableStart, isScrollableEnd }) => ({\n marginBlockEnd: odysseyDesignTokens.Spacing4,\n position: \"relative\",\n borderInlineStartColor: isScrollableStart\n ? odysseyDesignTokens.HueNeutral200\n : \"transparent\",\n borderInlineStartStyle: \"solid\",\n borderInlineStartWidth: odysseyDesignTokens.BorderWidthMain,\n \"::before\": {\n background:\n \"linear-gradient(-90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.33) 50%, rgba(0, 0, 0, 1) 100%)\",\n content: '\"\"',\n opacity: isScrollableStart ? \"0.075\" : \"0\",\n pointerEvents: \"none\",\n position: \"absolute\",\n top: 0,\n left: 0,\n bottom: 0,\n width: odysseyDesignTokens.Spacing6,\n zIndex: 100,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n },\n borderInlineEndColor: isScrollableEnd\n ? odysseyDesignTokens.HueNeutral200\n : \"transparent\",\n borderInlineEndStyle: \"solid\",\n borderInlineEndWidth: odysseyDesignTokens.BorderWidthMain,\n \"::after\": {\n background:\n \"linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.33) 50%, rgba(0, 0, 0, 1) 100%)\",\n content: '\"\"',\n opacity: isScrollableEnd ? \"0.075\" : \"0\",\n pointerEvents: \"none\",\n position: \"absolute\",\n top: 0,\n right: 0,\n bottom: 0,\n width: odysseyDesignTokens.Spacing6,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n },\n}));\n\nconst defaultGetRowId: DataTableProps[\"getRowId\"] = (row) => row.id as string;\n\nconst DataTable = ({\n additionalActionButton,\n additionalActionMenuItems,\n bulkActionMenuItems,\n columns,\n currentPage = 1,\n emptyPlaceholder,\n errorMessage: errorMessageProp,\n filters: filtersProp,\n getData,\n getRowId = defaultGetRowId,\n hasChangeableDensity,\n hasColumnResizing,\n hasColumnVisibility,\n hasFilters,\n hasPagination,\n hasRowReordering,\n hasRowSelection,\n hasSearch,\n hasSearchSubmitButton,\n hasSorting,\n initialDensity = densityValues[0],\n initialSearchValue = \"\",\n isPaginationMoreDisabled,\n noResultsPlaceholder,\n onChangeRowSelection,\n onReorderRows,\n paginationType = \"paged\",\n renderDetailPanel,\n resultsPerPage = 20,\n maxResultsPerPage,\n maxPages,\n rowActionButtons,\n rowActionMenuItems,\n searchDelayTime,\n selectedRows,\n totalRows,\n}: DataTableProps) => {\n const { t } = useTranslation();\n\n const [data, setData] = useState<DataTableRowData[]>([]);\n const [pagination, setPagination] = useState({\n pageIndex: currentPage,\n pageSize: resultsPerPage,\n });\n const [draggingRow, setDraggingRow] =\n useState<MRT_Row<DataTableRowData> | null>();\n const [isTableContainerScrolledToStart, setIsTableContainerScrolledToStart] =\n useState(true);\n const [isTableContainerScrolledToEnd, setIsTableContainerScrolledToEnd] =\n useState(true);\n const [tableInnerContainerWidth, setTableInnerContainerWidth] =\n useState<string>(\"100%\");\n const tableOuterContainerRef = useRef<HTMLDivElement>(null);\n const tableInnerContainerRef = useRef<HTMLDivElement>(null);\n const tableContentRef = useRef<HTMLTableElement>(null);\n\n // Table states\n const [columnSorting, setColumnSorting] = useState<MRT_SortingState>([]);\n const [columnVisibility, setColumnVisibility] =\n useState<MRT_VisibilityState>();\n const [rowDensity, setRowDensity] =\n useState<MRT_DensityState>(initialDensity);\n const [search, setSearch] = useState<string>(initialSearchValue);\n const [filters, setFilters] = useState<DataFilter[]>();\n const [initialFilters, setInitialFilters] = useState<DataFilter[]>();\n const [isLoading, setIsLoading] = useState<boolean | undefined>(true);\n const [isEmpty, setIsEmpty] = useState<boolean | undefined>();\n const [errorMessage, setErrorMessage] = useState<string | undefined>(\n errorMessageProp,\n );\n const [_rowSelection, setRowSelection] = useState<MRT_RowSelectionState>({});\n const rowSelection = selectedRows || _rowSelection;\n\n useScrollIndication({\n tableOuterContainer: tableOuterContainerRef.current,\n tableInnerContainer: tableInnerContainerRef.current,\n setIsTableContainerScrolledToStart: setIsTableContainerScrolledToStart,\n setIsTableContainerScrolledToEnd: setIsTableContainerScrolledToEnd,\n setTableInnerContainerWidth: setTableInnerContainerWidth,\n });\n\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const {\n dragHandleStyles,\n dragHandleText,\n draggableTableBodyRowClassName,\n handleDragHandleKeyDown,\n handleDragHandleOnDragCapture,\n handleDragHandleOnDragEnd,\n resetDraggingAndHoveredRow,\n updateRowOrder,\n } = useRowReordering({\n totalRows,\n onReorderRows,\n data,\n setData,\n draggingRow,\n setDraggingRow,\n resultsPerPage: pagination.pageSize,\n page: pagination.pageIndex,\n });\n\n const rowDensityClassName = useMemo(() => {\n return rowDensity === \"spacious\"\n ? \"MuiTableBody-spacious\"\n : rowDensity === \"compact\"\n ? \"MuiTableBody-compact\"\n : \"MuiTableBody-default\";\n }, [rowDensity]);\n\n const renderRowActions = useCallback(\n ({ row }: { row: MRT_Row<DataTableRowData> }) => {\n const currentIndex =\n row.index + (pagination.pageIndex - 1) * pagination.pageSize;\n return (\n <DataTableRowActions\n row={row}\n rowIndex={currentIndex}\n rowActionButtons={rowActionButtons}\n rowActionMenuItems={rowActionMenuItems}\n totalRows={totalRows}\n updateRowOrder={\n hasRowReordering && onReorderRows ? updateRowOrder : undefined\n }\n />\n );\n },\n [\n pagination,\n rowActionButtons,\n rowActionMenuItems,\n hasRowReordering,\n onReorderRows,\n totalRows,\n updateRowOrder,\n ],\n );\n\n /**\n * This hack is to provide compatibility with Material-React-Table's\n * filterOptions format, which allows for strings and { label: string, value: string }\n */\n const convertFilterSelectOptions = useCallback(\n (options: DataTableColumn<DataTableRowData>[\"filterSelectOptions\"]) =>\n options?.map((option) =>\n typeof option === \"string\"\n ? {\n label: option,\n value: option,\n }\n : {\n // If the option isn't a string, it must have value and/or option defined\n // If either is undefined, use the other\n // These shouldn't need `as`, but this is a legacy file now. --Kevin Ghadyani\n label: (option.label ?? option.value) as string,\n value: (option.value ?? option.label) as string,\n },\n ),\n [],\n );\n\n const convertColumnToFilter = useCallback(\n (column: DataTableColumn<DataTableRowData>) =>\n column.enableColumnFilter !== false && column.accessorKey\n ? ({\n id: column.accessorKey,\n label: column.header,\n variant: column.filterVariant,\n options: convertFilterSelectOptions(column.filterSelectOptions),\n } satisfies DataFilter as DataFilter)\n : null,\n [convertFilterSelectOptions],\n );\n\n /**\n * Filters default to the columns, but can be overridden\n * with the `filters` prop. `filters` should be an array\n * of column accessorKeys, column defs, or DataFilters.\n */\n const dataTableFilters = useMemo(() => {\n const providedFilters = filtersProp || columns;\n return providedFilters.reduce<DataFilter[]>((accumulator, item) => {\n if (typeof item === \"string\") {\n const foundColumn = columns.find(\n (column) => column.accessorKey === item,\n );\n if (foundColumn) {\n const filter = convertColumnToFilter(foundColumn);\n if (filter) {\n return accumulator.concat(filter);\n }\n }\n } else if (\"accessorKey\" in item) {\n // Checks if it's a column\n const filter = convertColumnToFilter(item);\n if (filter) {\n return accumulator.concat(filter);\n }\n } else if (\"label\" in item) {\n // Checks if it's a DataFilter\n return accumulator.concat(item);\n }\n // If none of the conditions match, item is ignored (not mapping to undefined)\n return accumulator;\n }, []);\n }, [columns, filtersProp, convertColumnToFilter]);\n\n const defaultCell = useCallback(\n ({ cell }: { cell: DataTableCell<DataTableRowData> }) => {\n const value = cell.getValue<string>();\n const hasTextWrapping =\n cell.column.columnDef.hasTextWrapping ||\n cell.column.columnDef.enableWrapping;\n\n return hasTextWrapping ? (\n value\n ) : (\n <Box\n sx={{\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n }}\n >\n {value}\n </Box>\n );\n },\n [],\n );\n\n const emptyState = useCallback(() => {\n const noResultsInnerContent = noResultsPlaceholder || (\n <EmptyState\n heading={t(\"table.noresults.heading\")}\n description={t(\"table.noresults.text\")}\n />\n );\n\n const emptyStateInnerContent =\n emptyPlaceholder && isEmpty ? emptyPlaceholder : noResultsInnerContent;\n\n return (\n <Box sx={{ width: tableInnerContainerWidth }}>\n {emptyStateInnerContent}\n </Box>\n );\n }, [\n emptyPlaceholder,\n isEmpty,\n noResultsPlaceholder,\n t,\n tableInnerContainerWidth,\n ]);\n\n const columnIds = useMemo(() => {\n return columns.map((column) => column.accessorKey);\n }, [columns]);\n\n const columnOrder = useMemo(\n () => [\n \"mrt-row-drag\",\n \"mrt-row-select\",\n \"mrt-row-expand\",\n ...columnIds,\n \"mrt-row-actions\",\n ],\n [columnIds],\n ) as string[];\n\n const shouldDisplayRowActions = useMemo(\n () =>\n (hasRowReordering === true && onReorderRows) ||\n rowActionButtons ||\n rowActionMenuItems\n ? true\n : false,\n [hasRowReordering, onReorderRows, rowActionButtons, rowActionMenuItems],\n );\n\n const muiTableBodyProps = useCallback<\n MRT_TableOptionsCallback<\"muiTableBodyProps\">\n >(\n () => ({\n className: rowDensityClassName,\n }),\n [rowDensityClassName],\n );\n\n const muiTableBodyCellProps = useCallback<\n MRT_TableOptionsCallback<\"muiTableBodyCellProps\">\n >(\n ({ column }) => ({\n className: column.getIsResizing() ? \"isResizing\" : \"\",\n sx: {\n overflowWrap: \"anywhere\",\n },\n }),\n [],\n );\n\n const muiDetailPanelProps = useCallback<\n MRT_TableOptionsCallback<\"muiDetailPanelProps\">\n >(\n ({ row }) => ({\n sx: {\n paddingBlock: row.getIsExpanded()\n ? `${odysseyDesignTokens.Spacing3} !important`\n : undefined,\n },\n }),\n [odysseyDesignTokens.Spacing3],\n );\n\n const muiTableBodyRowProps = useCallback<\n MRT_TableOptionsCallback<\"muiTableBodyRowProps\">\n >(\n ({ table, row, isDetailPanel }) => ({\n className: draggableTableBodyRowClassName({\n currentRowId: row.id,\n draggingRowId: draggingRow?.id,\n hoveredRowId: table.getState().hoveredRow?.id,\n }),\n sx: {\n ...(isDetailPanel && {\n paddingBlock: \"0 !important\",\n border: 0,\n [\"&:hover\"]: {\n backgroundColor: `transparent !important`,\n },\n }),\n },\n }),\n [draggableTableBodyRowClassName, draggingRow?.id],\n );\n\n const muiRowDragHandleProps = useCallback<\n MRT_TableOptionsCallback<\"muiRowDragHandleProps\">\n >(\n ({ table, row }) => ({\n onKeyDown: (event) => handleDragHandleKeyDown({ table, row, event }),\n onBlur: () => resetDraggingAndHoveredRow(table),\n onDragEnd: () => handleDragHandleOnDragEnd(table),\n onDragCapture: () => handleDragHandleOnDragCapture(table),\n sx: dragHandleStyles,\n ...dragHandleText,\n }),\n [\n dragHandleStyles,\n dragHandleText,\n handleDragHandleKeyDown,\n resetDraggingAndHoveredRow,\n handleDragHandleOnDragEnd,\n handleDragHandleOnDragCapture,\n ],\n );\n\n const muiTableHeadCellProps = useCallback<\n MRT_TableOptionsCallback<\"muiTableHeadCellProps\">\n >(\n ({ column: currentColumn }) => ({\n className: columnSorting.find(\n (sortedColumn) => sortedColumn.id === currentColumn.id,\n )\n ? \"isSorted\"\n : \"isUnsorted\",\n }),\n [columnSorting],\n );\n\n const hasColumnWithGrow = useMemo(\n () => columns.some((column) => column.grow === true),\n [columns],\n );\n\n const dataTable = useMaterialReactTable({\n columns: columns,\n data: data,\n getRowId,\n state: {\n sorting: columnSorting,\n globalFilter: search,\n columnVisibility,\n isLoading,\n rowSelection,\n columnOrder,\n },\n icons: {\n ArrowDownwardIcon: ArrowDownIcon,\n DragHandleIcon: DragIndicatorIcon,\n SyncAltIcon: ArrowUnsortedIcon,\n ExpandMoreIcon: ChevronDownIcon,\n },\n\n // Base table settings\n enableColumnActions: false,\n enableColumnResizing: hasColumnResizing,\n enableDensityToggle: false,\n enableFilters: false,\n enableFullScreenToggle: false,\n enableGlobalFilter: false,\n enableHiding: false,\n enablePagination: false,\n layoutMode: \"grid-no-grow\",\n manualFiltering: true,\n manualSorting: true,\n muiTablePaperProps: {\n elevation: 0,\n sx: {\n overflow: \"visible\",\n },\n },\n selectAllMode: \"all\",\n displayColumnDefOptions: {\n \"mrt-row-actions\": {\n header: \"\",\n grow: true,\n muiTableBodyCellProps: {\n align: \"right\",\n sx: {\n overflow: \"visible\",\n width: \"unset\",\n },\n className: \"ods-actions-cell\",\n },\n muiTableHeadCellProps: {\n align: \"right\",\n sx: {\n width: \"unset\",\n },\n className: \"ods-actions-cell\",\n children: (\n <Box sx={{ display: \"flex\", visibility: \"hidden\" }}>\n {rowActionButtons && rowActionButtons({ id: null })}\n {((hasRowReordering && onReorderRows) || rowActionMenuItems) && (\n <Box>\n <Button\n endIcon={<MoreIcon />}\n size=\"small\"\n variant=\"floating\"\n ariaLabel={t(\"table.moreactions.arialabel\")}\n isDisabled\n />\n </Box>\n )}\n </Box>\n ),\n },\n },\n \"mrt-row-drag\": {\n header: \"\",\n muiTableBodyCellProps: {\n sx: {\n minWidth: 0,\n width: \"auto\",\n },\n className: \"ods-drag-handle\",\n },\n muiTableHeadCellProps: {\n sx: {\n minWidth: 0,\n width: \"auto\",\n },\n children: (\n // Add a spacer to simulate the width of the drag handle in the column.\n // Without this, the head cells are offset from their body cell counterparts\n <Box sx={{ marginInline: \"-0.1rem\" }}>\n <DragIndicatorIcon sx={{ marginInline: 1, opacity: 0 }} />\n </Box>\n ),\n },\n },\n \"mrt-row-select\": {\n muiTableHeadCellProps: {\n padding: \"checkbox\",\n },\n muiTableBodyCellProps: {\n padding: \"checkbox\",\n },\n },\n \"mrt-row-expand\": {\n header: \"\",\n },\n },\n muiTableBodyProps,\n defaultColumn: {\n Cell: defaultCell,\n },\n muiTableBodyCellProps,\n\n // Reordering\n enableRowOrdering: hasRowReordering && Boolean(onReorderRows),\n enableRowDragging: hasRowReordering && Boolean(onReorderRows),\n muiDetailPanelProps,\n muiTableBodyRowProps,\n muiRowDragHandleProps,\n\n // Row actions\n enableRowActions: shouldDisplayRowActions,\n positionActionsColumn:\n \"last\" as MRT_TableOptions<DataTableRowData>[\"positionActionsColumn\"],\n renderRowActions: ({ row }) => renderRowActions({ row }),\n\n // Row selection\n enableRowSelection: hasRowSelection,\n onRowSelectionChange: setRowSelection,\n\n // Sorting\n enableSorting: hasSorting,\n onSortingChange: setColumnSorting,\n muiTableHeadCellProps,\n\n // Virtualization\n enableRowVirtualization:\n paginationType !== \"loadMore\" && pagination.pageSize > 50,\n rowVirtualizerInstanceRef:\n useRef<MRT_RowVirtualizer<HTMLDivElement, HTMLTableRowElement>>(null),\n rowVirtualizerOptions: {\n overscan: 4,\n },\n\n // States\n renderEmptyRowsFallback: emptyState,\n\n // Refs\n muiTableProps: {\n ref: tableContentRef,\n className:\n !shouldDisplayRowActions && hasColumnResizing\n ? hasColumnWithGrow\n ? \"ods-hide-spacer-column\"\n : \"ods-hide-spacer-column ods-column-grow\"\n : \"\",\n },\n\n muiTableContainerProps: {\n ref: tableInnerContainerRef,\n },\n\n // Row expansion\n enableExpandAll: false,\n renderDetailPanel: renderDetailPanel,\n });\n\n // Effects\n const bulkActionMenuButton = useMemo(\n () => (\n <>\n <MenuButton\n buttonVariant=\"secondary\"\n endIcon={<MoreIcon />}\n isDisabled={Object.keys(rowSelection).length === 0}\n ariaLabel=\"More actions\"\n >\n {bulkActionMenuItems?.(rowSelection)}\n </MenuButton>\n </>\n ),\n [bulkActionMenuItems, rowSelection],\n );\n\n useEffect(() => {\n (async () => {\n setIsLoading(true);\n setErrorMessage(errorMessageProp);\n try {\n const incomingData = await getData?.({\n page: pagination.pageIndex,\n resultsPerPage: pagination.pageSize,\n search,\n filters,\n sort: columnSorting,\n });\n setData(incomingData);\n } catch (error) {\n setErrorMessage(typeof error === \"string\" ? error : t(\"table.error\"));\n } finally {\n setIsLoading(false);\n }\n })();\n }, [\n columnSorting,\n errorMessageProp,\n filters,\n getData,\n pagination,\n search,\n t,\n ]);\n\n useEffect(() => {\n if (!initialFilters && filters) {\n setInitialFilters(filters);\n }\n\n setIsEmpty(\n pagination.pageIndex === currentPage &&\n pagination.pageSize === resultsPerPage &&\n search === \"\" &&\n filters === initialFilters &&\n data.length === 0,\n );\n }, [\n filters,\n pagination,\n search,\n data,\n currentPage,\n initialFilters,\n resultsPerPage,\n ]);\n\n useEffect(() => {\n setPagination((prev) => ({\n pageIndex: 1,\n pageSize: prev.pageSize,\n }));\n }, [filters, search]);\n\n useEffect(() => {\n onChangeRowSelection?.(rowSelection);\n }, [rowSelection, onChangeRowSelection]);\n\n const { lastRow } = usePagination({\n currentRowsCount: data.length,\n pageIndex: pagination.pageIndex,\n pageSize: pagination.pageSize,\n totalRows,\n });\n\n // Render the table\n return (\n <>\n {(hasSearch ||\n hasFilters ||\n hasChangeableDensity ||\n hasColumnVisibility ||\n bulkActionMenuItems ||\n additionalActionButton ||\n additionalActionMenuItems) && (\n <Box sx={{ marginBottom: 5 }}>\n <DataFilters\n onChangeSearch={hasSearch ? setSearch : undefined}\n onChangeFilters={hasFilters ? setFilters : undefined}\n hasSearchSubmitButton={hasSearchSubmitButton}\n searchDelayTime={searchDelayTime}\n filters={hasFilters ? dataTableFilters : undefined}\n defaultSearchTerm={initialSearchValue}\n isDisabled={isEmpty}\n additionalActions={\n <>\n <DataTableSettings\n hasChangeableDensity={hasChangeableDensity}\n rowDensity={rowDensity}\n setRowDensity={setRowDensity}\n hasColumnVisibility={hasColumnVisibility}\n columns={columns}\n columnVisibility={columnVisibility}\n setColumnVisibility={setColumnVisibility}\n />\n {bulkActionMenuItems && bulkActionMenuButton}\n {additionalActionButton}\n {additionalActionMenuItems && (\n <MenuButton\n endIcon={<MoreIcon />}\n ariaLabel={t(\"table.moreactions.arialabel\")}\n buttonVariant=\"secondary\"\n menuAlignment=\"right\"\n >\n {additionalActionMenuItems}\n </MenuButton>\n )}\n </>\n }\n />\n </Box>\n )}\n\n {errorMessage && (\n <Box sx={{ marginBlockEnd: 2 }}>\n <Callout severity=\"error\" text={errorMessage} />\n </Box>\n )}\n\n <ScrollableTableContainer\n odysseyDesignTokens={odysseyDesignTokens}\n isScrollableStart={!isTableContainerScrolledToStart}\n isScrollableEnd={!isTableContainerScrolledToEnd}\n ref={tableOuterContainerRef}\n >\n <MRT_TableContainer table={dataTable} />\n </ScrollableTableContainer>\n\n {hasPagination && (\n <Pagination\n pageIndex={pagination.pageIndex}\n pageSize={pagination.pageSize}\n maxPageIndex={maxPages}\n maxPageSize={maxResultsPerPage}\n onPaginationChange={setPagination}\n lastRow={lastRow}\n totalRows={totalRows}\n currentRowsCount={data.length}\n isDisabled={isEmpty}\n isMoreDisabled={isPaginationMoreDisabled}\n variant={paginationType}\n rowsPerPageLabel={t(\"pagination.rowsperpage\")}\n currentPageLabel={t(\"pagination.page\")}\n previousLabel={t(\"pagination.previous\")}\n nextLabel={t(\"pagination.next\")}\n loadMoreLabel={t(\"pagination.loadmore\")}\n />\n )}\n </>\n );\n};\n\nconst MemoizedDataTable = memo(DataTable);\nMemoizedDataTable.displayName = \"DataTable\";\n\nexport { MemoizedDataTable as DataTable };\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,mBAAA,GAAAD,OAAA;AAgBA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAOA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAKA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AAIA,IAAAQ,iBAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,IAAA,GAAAV,OAAA;AAEA,IAAAW,2BAAA,GAAAX,OAAA;AAIA,IAAAY,oBAAA,G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P,gBAAgB,EAAE1O,CAAC,CAAC,wBAAwB,CAAE;MAC9C2O,gBAAgB,EAAE3O,CAAC,CAAC,iBAAiB,CAAE;MACvC4O,aAAa,EAAE5O,CAAC,CAAC,qBAAqB,CAAE;MACxC6O,SAAS,EAAE7O,CAAC,CAAC,iBAAiB,CAAE;MAChC8O,aAAa,EAAE9O,CAAC,CAAC,qBAAqB;IAAE,CACzC,CACF;EAAA,CACD,CAAC;AAEP,CAAC;AAED,MAAM+O,iBAAiB,GAAAC,OAAA,CAAAxR,SAAA,GAAG,IAAAyR,WAAI,EAACzR,SAAS,CAAC;AACzCuR,iBAAiB,CAACG,WAAW,GAAG,WAAW","ignoreList":[]}
|
package/dist/cjs/Drawer.cjs
CHANGED
|
@@ -28,7 +28,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
28
28
|
|
|
29
29
|
const variantValues = exports.variantValues = ["temporary", "persistent"];
|
|
30
30
|
const DrawerHeader = (0, _styled.default)("div", {
|
|
31
|
-
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
31
|
+
shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "hasDividers"
|
|
32
32
|
})`
|
|
33
33
|
position: sticky;
|
|
34
34
|
top: 0;
|
|
@@ -49,9 +49,9 @@ const DrawerHeader = (0, _styled.default)("div", {
|
|
|
49
49
|
odysseyDesignTokens
|
|
50
50
|
}) => odysseyDesignTokens.HueNeutralWhite};
|
|
51
51
|
border-bottom: ${({
|
|
52
|
-
|
|
52
|
+
hasDividers,
|
|
53
53
|
odysseyDesignTokens
|
|
54
|
-
}) =>
|
|
54
|
+
}) => hasDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : "none"};
|
|
55
55
|
`;
|
|
56
56
|
const DrawerContentWrapper = (0, _styled.default)("div", {
|
|
57
57
|
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
@@ -59,15 +59,15 @@ const DrawerContentWrapper = (0, _styled.default)("div", {
|
|
|
59
59
|
overflow-y: auto;
|
|
60
60
|
`;
|
|
61
61
|
const DrawerContent = (0, _styled.default)("div", {
|
|
62
|
-
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
62
|
+
shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "hasDividers"
|
|
63
63
|
})`
|
|
64
64
|
padding: ${({
|
|
65
|
-
|
|
65
|
+
hasDividers,
|
|
66
66
|
odysseyDesignTokens
|
|
67
|
-
}) =>
|
|
67
|
+
}) => hasDividers ? `${odysseyDesignTokens.Spacing5}` : `0 ${odysseyDesignTokens.Spacing5}`};
|
|
68
68
|
`;
|
|
69
69
|
const DrawerFooter = (0, _styled.default)("div", {
|
|
70
|
-
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
70
|
+
shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "hasDividers"
|
|
71
71
|
})`
|
|
72
72
|
position: sticky;
|
|
73
73
|
bottom: 0;
|
|
@@ -79,9 +79,9 @@ const DrawerFooter = (0, _styled.default)("div", {
|
|
|
79
79
|
odysseyDesignTokens
|
|
80
80
|
}) => odysseyDesignTokens.Spacing4};
|
|
81
81
|
border-top: ${({
|
|
82
|
-
|
|
82
|
+
hasDividers,
|
|
83
83
|
odysseyDesignTokens
|
|
84
|
-
}) =>
|
|
84
|
+
}) => hasDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : "none"};
|
|
85
85
|
background-color: ${({
|
|
86
86
|
odysseyDesignTokens
|
|
87
87
|
}) => odysseyDesignTokens.HueNeutralWhite};
|
|
@@ -89,6 +89,7 @@ const DrawerFooter = (0, _styled.default)("div", {
|
|
|
89
89
|
const Drawer = ({
|
|
90
90
|
ariaLabel,
|
|
91
91
|
children,
|
|
92
|
+
hasDividers: hasDividersProp = false,
|
|
92
93
|
isOpen,
|
|
93
94
|
onClose,
|
|
94
95
|
primaryCallToActionComponent,
|
|
@@ -103,6 +104,7 @@ const Drawer = ({
|
|
|
103
104
|
const [isContentScrollable, setIsContentScrollable] = (0, _react.useState)(false);
|
|
104
105
|
const drawerContentRef = (0, _react.useRef)(null);
|
|
105
106
|
const odysseyDesignTokens = (0, _OdysseyDesignTokensContext.useOdysseyDesignTokens)();
|
|
107
|
+
const hasDividers = hasDividersProp || showDividers;
|
|
106
108
|
const {
|
|
107
109
|
i18n
|
|
108
110
|
} = (0, _reactI18next.useTranslation)();
|
|
@@ -125,8 +127,8 @@ const Drawer = ({
|
|
|
125
127
|
};
|
|
126
128
|
}, [isOpen]);
|
|
127
129
|
const dividersVisible = (0, _react.useMemo)(() => {
|
|
128
|
-
return
|
|
129
|
-
}, [
|
|
130
|
+
return hasDividers || isContentScrollable;
|
|
131
|
+
}, [hasDividers, isContentScrollable]);
|
|
130
132
|
const hasFooter = (0, _react.useMemo)(() => primaryCallToActionComponent || secondaryCallToActionComponent || tertiaryCallToActionComponent, [primaryCallToActionComponent, secondaryCallToActionComponent, tertiaryCallToActionComponent]);
|
|
131
133
|
return (0, _jsxRuntime.jsxs)(_Drawer2.default, {
|
|
132
134
|
"data-se": testId,
|
|
@@ -150,7 +152,7 @@ const Drawer = ({
|
|
|
150
152
|
children: [(0, _jsxRuntime.jsxs)(DrawerHeader, {
|
|
151
153
|
translate: translate,
|
|
152
154
|
odysseyDesignTokens: odysseyDesignTokens,
|
|
153
|
-
|
|
155
|
+
hasDividers: dividersVisible,
|
|
154
156
|
children: [(0, _jsxRuntime.jsx)(_Typography.Heading5, {
|
|
155
157
|
children: title
|
|
156
158
|
}), (0, _jsxRuntime.jsx)(_index.Button, {
|
|
@@ -161,13 +163,13 @@ const Drawer = ({
|
|
|
161
163
|
variant: "floating"
|
|
162
164
|
})]
|
|
163
165
|
}), (0, _jsxRuntime.jsx)(DrawerContent, {
|
|
164
|
-
|
|
166
|
+
hasDividers: dividersVisible,
|
|
165
167
|
odysseyDesignTokens: odysseyDesignTokens,
|
|
166
168
|
children: children
|
|
167
169
|
})]
|
|
168
170
|
}), hasFooter && (0, _jsxRuntime.jsxs)(DrawerFooter, {
|
|
169
171
|
odysseyDesignTokens: odysseyDesignTokens,
|
|
170
|
-
|
|
172
|
+
hasDividers: dividersVisible,
|
|
171
173
|
children: [tertiaryCallToActionComponent, secondaryCallToActionComponent, primaryCallToActionComponent]
|
|
172
174
|
})]
|
|
173
175
|
});
|
package/dist/cjs/Drawer.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.cjs","names":["_react","require","_styled","_interopRequireDefault","_reactI18next","_index","_index2","_OdysseyDesignTokensContext","_Typography","_jsxRuntime","e","__esModule","default","variantValues","exports","DrawerHeader","styled","shouldForwardProp","prop","odysseyDesignTokens","Spacing4","Spacing5","HueNeutral900","HueNeutralWhite","showDividers","HueNeutral200","DrawerContentWrapper","DrawerContent","DrawerFooter","Drawer","ariaLabel","children","isOpen","onClose","primaryCallToActionComponent","secondaryCallToActionComponent","tertiaryCallToActionComponent","testId","title","translate","variant","isContentScrollable","setIsContentScrollable","useState","drawerContentRef","useRef","useOdysseyDesignTokens","i18n","useTranslation","anchorDirection","dir","useEffect","frameId","handleContentScroll","drawerContentElement","current","cancelAnimationFrame","scrollHeight","clientHeight","requestAnimationFrame","dividersVisible","useMemo","hasFooter","jsxs","_Drawer2","anchor","open","sx","transition","tabIndex","ref","jsx","Heading5","Button","onClick","size","startIcon","CloseIcon","MemoizedDrawer","memo","displayName"],"sources":["../../src/Drawer.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n memo,\n ReactElement,\n ReactNode,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport { Drawer as MuiDrawer } from \"@mui/material\";\nimport styled from \"@emotion/styled\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { Button } from \"./Buttons/index.js\";\nimport { CloseIcon } from \"./icons.generated/index.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext.js\";\nimport { Heading5 } from \"./Typography.js\";\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nexport const variantValues = [\"temporary\", \"persistent\"] as const;\n\nexport type DrawerProps = {\n /**\n * An optional Button object to be situated in the Drawerfooter. Should almost always be of variant `primary`.\n */\n primaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Drawer footer, alongside the `callToActionPrimaryComponent`.\n */\n secondaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Drawer footer, alongside the other two `callToAction` components.\n */\n tertiaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * The content of the Drawer. May be a `string` or any other `ReactNode` or array of `ReactNode`s.\n */\n children?: ReactNode;\n /**\n * When set to `true`, the Drawer will be visible.\n */\n isOpen?: boolean;\n /**\n * Callback that controls what happens when the Drawer is dismissed\n */\n onClose: () => void;\n /**\n * Shows divider lines separating header, content, and footer (if using action buttons)\n */\n showDividers: boolean;\n /**\n * The title of the Drawer\n */\n title?: string;\n /**\n * Type of Drawer\n */\n variant?: (typeof variantValues)[number];\n} & Pick<HtmlProps, \"ariaLabel\" | \"testId\" | \"translate\">;\n\ninterface DrawerStyleProps {\n odysseyDesignTokens: DesignTokens;\n showDividers: boolean;\n}\nconst DrawerHeader = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<DrawerStyleProps>`\n position: sticky;\n top: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0;\n padding: ${({ odysseyDesignTokens }) => odysseyDesignTokens.Spacing4}\n ${({ odysseyDesignTokens }) => odysseyDesignTokens.Spacing5};\n color: ${({ odysseyDesignTokens }) => odysseyDesignTokens.HueNeutral900};\n background-color: ${({ odysseyDesignTokens }) =>\n odysseyDesignTokens.HueNeutralWhite};\n border-bottom: ${({ showDividers, odysseyDesignTokens }) =>\n showDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : \"none\"};\n`;\n\nconst DrawerContentWrapper = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>`\n overflow-y: auto;\n`;\n\nconst DrawerContent = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<DrawerStyleProps>`\n padding: ${({ showDividers, odysseyDesignTokens }) =>\n showDividers\n ? `${odysseyDesignTokens.Spacing5}`\n : `0 ${odysseyDesignTokens.Spacing5}`};\n`;\n\nconst DrawerFooter = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<DrawerStyleProps>`\n position: sticky;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n align-content: center;\n padding: ${({ odysseyDesignTokens }) => odysseyDesignTokens.Spacing4};\n border-top: ${({ showDividers, odysseyDesignTokens }) =>\n showDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : \"none\"};\n background-color: ${({ odysseyDesignTokens }) =>\n odysseyDesignTokens.HueNeutralWhite};\n`;\n\nconst Drawer = ({\n ariaLabel,\n children,\n isOpen,\n onClose,\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n showDividers = false,\n tertiaryCallToActionComponent,\n testId,\n title,\n translate,\n variant = \"temporary\",\n}: DrawerProps) => {\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const drawerContentRef = useRef<HTMLDivElement>(null);\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n //If RTL is set in the theme, align the drawer on the left side of the screen, uses right by default.\n const { i18n } = useTranslation();\n const anchorDirection = i18n.dir() === \"rtl\" ? \"left\" : \"right\";\n\n useEffect(() => {\n let frameId: number;\n\n const handleContentScroll = () => {\n const drawerContentElement = drawerContentRef.current;\n if (drawerContentElement) {\n cancelAnimationFrame(frameId);\n setIsContentScrollable(\n drawerContentElement.scrollHeight > drawerContentElement.clientHeight,\n );\n }\n frameId = requestAnimationFrame(handleContentScroll);\n };\n\n if (isOpen) {\n frameId = requestAnimationFrame(handleContentScroll);\n }\n\n return () => {\n cancelAnimationFrame(frameId);\n };\n }, [isOpen]);\n\n const dividersVisible = useMemo(() => {\n return showDividers || isContentScrollable;\n }, [showDividers, isContentScrollable]);\n\n const hasFooter = useMemo(\n () =>\n primaryCallToActionComponent ||\n secondaryCallToActionComponent ||\n tertiaryCallToActionComponent,\n [\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n tertiaryCallToActionComponent,\n ],\n );\n\n return (\n <MuiDrawer\n data-se={testId}\n anchor={anchorDirection}\n open={isOpen}\n onClose={onClose}\n variant={variant}\n sx={{\n //Overrides default MUI inline style\n ...(variant === \"persistent\" && {\n \"& .MuiDrawer-paper\": {\n transition: \"none\",\n },\n }),\n }}\n >\n <DrawerContentWrapper\n {...(isContentScrollable && {\n //Sets tabIndex on content element if scrollable so content is easier to navigate with the keyboard\n tabIndex: 0,\n })}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={drawerContentRef}\n >\n <DrawerHeader\n translate={translate}\n odysseyDesignTokens={odysseyDesignTokens}\n showDividers={dividersVisible}\n >\n <Heading5>{title}</Heading5>\n <Button\n ariaLabel={ariaLabel}\n onClick={onClose}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n </DrawerHeader>\n <DrawerContent\n showDividers={dividersVisible}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {children}\n </DrawerContent>\n </DrawerContentWrapper>\n {hasFooter && (\n <DrawerFooter\n odysseyDesignTokens={odysseyDesignTokens}\n showDividers={dividersVisible}\n >\n {tertiaryCallToActionComponent}\n {secondaryCallToActionComponent}\n {primaryCallToActionComponent}\n </DrawerFooter>\n )}\n </MuiDrawer>\n );\n};\n\nconst MemoizedDrawer = memo(Drawer);\nMemoizedDrawer.displayName = \"Drawer\";\n\nexport { MemoizedDrawer as Drawer };\n"],"mappings":";;;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAWA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,2BAAA,GAAAN,OAAA;AAIA,IAAAO,WAAA,GAAAP,OAAA;AAA2C,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAhC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBO,MAAMG,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,CAAC,WAAW,EAAE,YAAY,CAAU;AA6CjE,MAAME,YAAY,GAAG,IAAAC,eAAM,EAAC,KAAK,EAAE;EACjCC,iBAAiB,EAAGC,IAAI,IAAKA,IAAI,KAAK;AACxC,CAAC,CAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,CAAC;EAAEC;AAAoB,CAAC,KAAKA,mBAAmB,CAACC,QAAQ;AACtE,MAAM,CAAC;EAAED;AAAoB,CAAC,KAAKA,mBAAmB,CAACE,QAAQ;AAC/D,WAAW,CAAC;EAAEF;AAAoB,CAAC,KAAKA,mBAAmB,CAACG,aAAa;AACzE,sBAAsB,CAAC;EAAEH;AAAoB,CAAC,KAC1CA,mBAAmB,CAACI,eAAe;AACvC,mBAAmB,CAAC;EAAEC,YAAY;EAAEL;AAAoB,CAAC,KACrDK,YAAY,GAAG,aAAaL,mBAAmB,CAACM,aAAa,EAAE,GAAG,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D,8BAA8B,EAC9BD,4BAA4B;IAAA,CACjB,CACf;EAAA,CACQ,CAAC;AAEhB,CAAC;AAED,MAAM4C,cAAc,GAAAhE,OAAA,CAAAe,MAAA,GAAG,IAAAkD,WAAI,EAAClD,MAAM,CAAC;AACnCiD,cAAc,CAACE,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Drawer.cjs","names":["_react","require","_styled","_interopRequireDefault","_reactI18next","_index","_index2","_OdysseyDesignTokensContext","_Typography","_jsxRuntime","e","__esModule","default","variantValues","exports","DrawerHeader","styled","shouldForwardProp","prop","odysseyDesignTokens","Spacing4","Spacing5","HueNeutral900","HueNeutralWhite","hasDividers","HueNeutral200","DrawerContentWrapper","DrawerContent","DrawerFooter","Drawer","ariaLabel","children","hasDividersProp","isOpen","onClose","primaryCallToActionComponent","secondaryCallToActionComponent","showDividers","tertiaryCallToActionComponent","testId","title","translate","variant","isContentScrollable","setIsContentScrollable","useState","drawerContentRef","useRef","useOdysseyDesignTokens","i18n","useTranslation","anchorDirection","dir","useEffect","frameId","handleContentScroll","drawerContentElement","current","cancelAnimationFrame","scrollHeight","clientHeight","requestAnimationFrame","dividersVisible","useMemo","hasFooter","jsxs","_Drawer2","anchor","open","sx","transition","tabIndex","ref","jsx","Heading5","Button","onClick","size","startIcon","CloseIcon","MemoizedDrawer","memo","displayName"],"sources":["../../src/Drawer.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n memo,\n ReactElement,\n ReactNode,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport { Drawer as MuiDrawer } from \"@mui/material\";\nimport styled from \"@emotion/styled\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { Button } from \"./Buttons/index.js\";\nimport { CloseIcon } from \"./icons.generated/index.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext.js\";\nimport { Heading5 } from \"./Typography.js\";\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nexport const variantValues = [\"temporary\", \"persistent\"] as const;\n\nexport type DrawerProps = {\n /**\n * An optional Button object to be situated in the Drawerfooter. Should almost always be of variant `primary`.\n */\n primaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Drawer footer, alongside the `callToActionPrimaryComponent`.\n */\n secondaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Drawer footer, alongside the other two `callToAction` components.\n */\n tertiaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * The content of the Drawer. May be a `string` or any other `ReactNode` or array of `ReactNode`s.\n */\n children?: ReactNode;\n /**\n * When set to `true`, the Drawer will be visible.\n */\n isOpen?: boolean;\n /**\n * Callback that controls what happens when the Drawer is dismissed\n */\n onClose: () => void;\n /**\n * The title of the Drawer\n */\n title?: string;\n /**\n * Type of Drawer\n */\n variant?: (typeof variantValues)[number];\n} & Pick<HtmlProps, \"ariaLabel\" | \"testId\" | \"translate\"> &\n (\n | {\n /**\n * Shows divider lines separating header, content, and footer (if using action buttons).\n */\n hasDividers?: never;\n /**\n * @deprecated use `hasDividers` instead.\n *\n * Shows divider lines separating header, content, and footer (if using action buttons).\n */\n showDividers: boolean;\n }\n | {\n /**\n * Shows divider lines separating header, content, and footer (if using action buttons).\n */\n hasDividers: boolean;\n /**\n * @deprecated use `hasDividers` instead.\n *\n * Shows divider lines separating header, content, and footer (if using action buttons).\n */\n showDividers?: never;\n }\n );\n\ninterface DrawerStyleProps {\n odysseyDesignTokens: DesignTokens;\n hasDividers: boolean;\n}\nconst DrawerHeader = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"hasDividers\",\n})<DrawerStyleProps>`\n position: sticky;\n top: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0;\n padding: ${({ odysseyDesignTokens }) => odysseyDesignTokens.Spacing4}\n ${({ odysseyDesignTokens }) => odysseyDesignTokens.Spacing5};\n color: ${({ odysseyDesignTokens }) => odysseyDesignTokens.HueNeutral900};\n background-color: ${({ odysseyDesignTokens }) =>\n odysseyDesignTokens.HueNeutralWhite};\n border-bottom: ${({ hasDividers, odysseyDesignTokens }) =>\n hasDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : \"none\"};\n`;\n\nconst DrawerContentWrapper = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>`\n overflow-y: auto;\n`;\n\nconst DrawerContent = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"hasDividers\",\n})<DrawerStyleProps>`\n padding: ${({ hasDividers, odysseyDesignTokens }) =>\n hasDividers\n ? `${odysseyDesignTokens.Spacing5}`\n : `0 ${odysseyDesignTokens.Spacing5}`};\n`;\n\nconst DrawerFooter = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"hasDividers\",\n})<DrawerStyleProps>`\n position: sticky;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n align-content: center;\n padding: ${({ odysseyDesignTokens }) => odysseyDesignTokens.Spacing4};\n border-top: ${({ hasDividers, odysseyDesignTokens }) =>\n hasDividers ? `1px solid ${odysseyDesignTokens.HueNeutral200}` : \"none\"};\n background-color: ${({ odysseyDesignTokens }) =>\n odysseyDesignTokens.HueNeutralWhite};\n`;\n\nconst Drawer = ({\n ariaLabel,\n children,\n hasDividers: hasDividersProp = false,\n isOpen,\n onClose,\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n showDividers = false,\n tertiaryCallToActionComponent,\n testId,\n title,\n translate,\n variant = \"temporary\",\n}: DrawerProps) => {\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const drawerContentRef = useRef<HTMLDivElement>(null);\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const hasDividers = hasDividersProp || showDividers;\n\n //If RTL is set in the theme, align the drawer on the left side of the screen, uses right by default.\n const { i18n } = useTranslation();\n const anchorDirection = i18n.dir() === \"rtl\" ? \"left\" : \"right\";\n\n useEffect(() => {\n let frameId: number;\n\n const handleContentScroll = () => {\n const drawerContentElement = drawerContentRef.current;\n if (drawerContentElement) {\n cancelAnimationFrame(frameId);\n setIsContentScrollable(\n drawerContentElement.scrollHeight > drawerContentElement.clientHeight,\n );\n }\n frameId = requestAnimationFrame(handleContentScroll);\n };\n\n if (isOpen) {\n frameId = requestAnimationFrame(handleContentScroll);\n }\n\n return () => {\n cancelAnimationFrame(frameId);\n };\n }, [isOpen]);\n\n const dividersVisible = useMemo(() => {\n return hasDividers || isContentScrollable;\n }, [hasDividers, isContentScrollable]);\n\n const hasFooter = useMemo(\n () =>\n primaryCallToActionComponent ||\n secondaryCallToActionComponent ||\n tertiaryCallToActionComponent,\n [\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n tertiaryCallToActionComponent,\n ],\n );\n\n return (\n <MuiDrawer\n data-se={testId}\n anchor={anchorDirection}\n open={isOpen}\n onClose={onClose}\n variant={variant}\n sx={{\n //Overrides default MUI inline style\n ...(variant === \"persistent\" && {\n \"& .MuiDrawer-paper\": {\n transition: \"none\",\n },\n }),\n }}\n >\n <DrawerContentWrapper\n {...(isContentScrollable && {\n //Sets tabIndex on content element if scrollable so content is easier to navigate with the keyboard\n tabIndex: 0,\n })}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={drawerContentRef}\n >\n <DrawerHeader\n translate={translate}\n odysseyDesignTokens={odysseyDesignTokens}\n hasDividers={dividersVisible}\n >\n <Heading5>{title}</Heading5>\n <Button\n ariaLabel={ariaLabel}\n onClick={onClose}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n </DrawerHeader>\n <DrawerContent\n hasDividers={dividersVisible}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {children}\n </DrawerContent>\n </DrawerContentWrapper>\n {hasFooter && (\n <DrawerFooter\n odysseyDesignTokens={odysseyDesignTokens}\n hasDividers={dividersVisible}\n >\n {tertiaryCallToActionComponent}\n {secondaryCallToActionComponent}\n {primaryCallToActionComponent}\n </DrawerFooter>\n )}\n </MuiDrawer>\n );\n};\n\nconst MemoizedDrawer = memo(Drawer);\nMemoizedDrawer.displayName = \"Drawer\";\n\nexport { MemoizedDrawer as Drawer };\n"],"mappings":";;;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAWA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,2BAAA,GAAAN,OAAA;AAIA,IAAAO,WAAA,GAAAP,OAAA;AAA2C,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAhC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBO,MAAMG,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,CAAC,WAAW,EAAE,YAAY,CAAU;AAmEjE,MAAME,YAAY,GAAG,IAAAC,eAAM,EAAC,KAAK,EAAE;EACjCC,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,qBAAqB,IAAIA,IAAI,KAAK;AAC/C,CAAC,CAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,a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,SAAU;UACrB8C,OAAO,EAAE1C,OAAQ;UACjB2C,IAAI,EAAC,OAAO;UACZC,SAAS,EAAE,IAAArE,WAAA,CAAAgE,GAAA,EAACnE,OAAA,CAAAyE,SAAS,IAAE,CAAE;UACzBrC,OAAO,EAAC;QAAU,CACnB,CAAC;MAAA,CACU,CAAC,EACf,IAAAjC,WAAA,CAAAgE,GAAA,EAAC9C,aAAa;QACZH,WAAW,EAAEsC,eAAgB;QAC7B3C,mBAAmB,EAAEA,mBAAoB;QAAAY,QAAA,EAExCA;MAAQ,CACI,CAAC;IAAA,CACI,CAAC,EACtBiC,SAAS,IACR,IAAAvD,WAAA,CAAAwD,IAAA,EAACrC,YAAY;MACXT,mBAAmB,EAAEA,mBAAoB;MACzCK,WAAW,EAAEsC,eAAgB;MAAA/B,QAAA,GAE5BO,6BAA6B,EAC7BF,8BAA8B,EAC9BD,4BAA4B;IAAA,CACjB,CACf;EAAA,CACQ,CAAC;AAEhB,CAAC;AAED,MAAM6C,cAAc,GAAAlE,OAAA,CAAAe,MAAA,GAAG,IAAAoD,WAAI,EAACpD,MAAM,CAAC;AACnCmD,cAAc,CAACE,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -92,7 +92,7 @@ const PasswordField = (0, _react.forwardRef)(({
|
|
|
92
92
|
position: "end",
|
|
93
93
|
children: (0, _jsxRuntime.jsx)(_IconButton2.default, {
|
|
94
94
|
"aria-controls": id,
|
|
95
|
-
"aria-label":
|
|
95
|
+
"aria-label": t("passwordfield.icon.label.show"),
|
|
96
96
|
"aria-pressed": inputType === "text",
|
|
97
97
|
onClick: togglePasswordVisibility,
|
|
98
98
|
children: inputType === "password" ? (0, _jsxRuntime.jsx)(_index.ShowIcon, {}) : (0, _jsxRuntime.jsx)(_index.HideIcon, {})
|