@turnit-ou/shared 0.0.0-stage → 2.18.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/@types/@mui/index.d.ts +125 -0
- package/@types/axios/index.d.ts +7 -0
- package/@types/openapi-client-axios/index.d.ts +5 -0
- package/@types/openapi-typescript/index.d.ts +71 -0
- package/@types/react-final-form-arrays/index.d.ts +75 -0
- package/@types/react-table/index.d.ts +292 -0
- package/components/Alert/AlertTemplate.d.ts +3 -0
- package/components/Alert/AlertTemplate.js +66 -0
- package/components/Alert/index.d.ts +4 -0
- package/components/Alert/index.js +17 -0
- package/components/ConfirmButton.d.ts +15 -0
- package/components/ConfirmButton.js +47 -0
- package/components/Drawer.d.ts +4 -0
- package/components/Drawer.js +24 -0
- package/components/DrawerForm/DrawerFormCardActions.d.ts +5 -0
- package/components/DrawerForm/DrawerFormCardActions.js +21 -0
- package/components/DrawerForm/DrawerFormCloseButton.d.ts +3 -0
- package/components/DrawerForm/DrawerFormCloseButton.js +5 -0
- package/components/DrawerForm/DrawerFormContext.d.ts +7 -0
- package/components/DrawerForm/DrawerFormContext.js +4 -0
- package/components/DrawerForm.d.ts +10 -0
- package/components/DrawerForm.js +84 -0
- package/components/Editor/Editor.d.ts +9 -0
- package/components/Editor/Editor.js +36 -0
- package/components/Editor/Toolbar.d.ts +7 -0
- package/components/Editor/Toolbar.js +31 -0
- package/components/Editor/buttons/FormatLinkButton.d.ts +5 -0
- package/components/Editor/buttons/FormatLinkButton.js +64 -0
- package/components/Editor/buttons/InsertImageButton.d.ts +5 -0
- package/components/Editor/buttons/InsertImageButton.js +59 -0
- package/components/Editor/buttons.d.ts +15 -0
- package/components/Editor/buttons.js +70 -0
- package/components/Editor/createButton.d.ts +28 -0
- package/components/Editor/createButton.js +68 -0
- package/components/Editor/editor.scss +45 -0
- package/components/Ellipsis.d.ts +9 -0
- package/components/Ellipsis.js +22 -0
- package/components/EllipsisText.d.ts +8 -0
- package/components/EllipsisText.js +25 -0
- package/components/EnvironmentBanner.d.ts +8 -0
- package/components/EnvironmentBanner.js +25 -0
- package/components/Header/AccessibilityModal.d.ts +5 -0
- package/components/Header/AccessibilityModal.js +28 -0
- package/components/Header/AllowedBusinessEntityModal.d.ts +9 -0
- package/components/Header/AllowedBusinessEntityModal.js +24 -0
- package/components/Header/LanguageSelect.d.ts +2 -0
- package/components/Header/LanguageSelect.js +80 -0
- package/components/Header/MenuItems.d.ts +9 -0
- package/components/Header/MenuItems.js +55 -0
- package/components/Header/ModuleIcon.d.ts +7 -0
- package/components/Header/ModuleIcon.js +119 -0
- package/components/Header/index.d.ts +44 -0
- package/components/Header/index.js +89 -0
- package/components/Layout/LayoutCol.d.ts +8 -0
- package/components/Layout/LayoutCol.js +26 -0
- package/components/Layout/index.d.ts +32 -0
- package/components/Layout/index.js +56 -0
- package/components/Loadable.d.ts +11 -0
- package/components/Loadable.js +3 -0
- package/components/SearchCard.d.ts +8 -0
- package/components/SearchCard.js +81 -0
- package/components/SearchForm.d.ts +14 -0
- package/components/SearchForm.js +51 -0
- package/components/SearchFormTable.d.ts +8 -0
- package/components/SearchFormTable.js +32 -0
- package/components/SearchResult.d.ts +13 -0
- package/components/SearchResult.js +67 -0
- package/components/Table/TableCaption.d.ts +6 -0
- package/components/Table/TableCaption.js +25 -0
- package/components/Table/TableCell.d.ts +17 -0
- package/components/Table/TableCell.js +45 -0
- package/components/Table/TableCellEditable.d.ts +28 -0
- package/components/Table/TableCellEditable.js +151 -0
- package/components/Table/TableCellEditableAction.d.ts +13 -0
- package/components/Table/TableCellEditableAction.js +70 -0
- package/components/Table/TableCellEditableField.d.ts +17 -0
- package/components/Table/TableCellEditableField.js +1 -0
- package/components/Table/TableCellEditableTimeDuration.d.ts +13 -0
- package/components/Table/TableCellEditableTimeDuration.js +12 -0
- package/components/Table/TableContext.d.ts +11 -0
- package/components/Table/TableContext.js +4 -0
- package/components/Table/TablePagination.d.ts +5 -0
- package/components/Table/TablePagination.js +84 -0
- package/components/Table.d.ts +53 -0
- package/components/Table.js +389 -0
- package/components/Version.d.ts +5 -0
- package/components/Version.js +23 -0
- package/dto/businessEntity.d.ts +15 -0
- package/dto/businessEntity.js +1 -0
- package/dto/classification.d.ts +9 -0
- package/dto/classification.js +1 -0
- package/dto/classifier.d.ts +13 -0
- package/dto/classifier.js +4 -0
- package/dto/common.d.ts +5 -0
- package/dto/common.js +1 -0
- package/dto/fare.d.ts +11 -0
- package/dto/fare.js +1 -0
- package/dto/line-network.d.ts +23 -0
- package/dto/line-network.js +1 -0
- package/dto/option.d.ts +7 -0
- package/dto/option.js +1 -0
- package/dto/pagination.d.ts +10 -0
- package/dto/pagination.js +1 -0
- package/fields/FormCheckbox.d.ts +11 -0
- package/fields/FormCheckbox.js +5 -0
- package/fields/FormCheckboxGroup.d.ts +6 -0
- package/fields/FormCheckboxGroup.js +20 -0
- package/fields/FormController.d.ts +7 -0
- package/fields/FormController.js +16 -0
- package/fields/FormDatepicker.d.ts +8 -0
- package/fields/FormDatepicker.js +7 -0
- package/fields/FormInput.d.ts +8 -0
- package/fields/FormInput.js +4 -0
- package/fields/FormRadioGroup.d.ts +10 -0
- package/fields/FormRadioGroup.js +6 -0
- package/fields/FormSelect.d.ts +11 -0
- package/fields/FormSelect.js +9 -0
- package/fields/FormSwitch.d.ts +11 -0
- package/fields/FormSwitch.js +5 -0
- package/fields/FormTimeZoneSelect.d.ts +4 -0
- package/fields/FormTimeZoneSelect.js +8 -0
- package/fields/index.d.ts +9 -0
- package/fields/index.js +9 -0
- package/form/ArrayField.d.ts +27 -0
- package/form/ArrayField.js +69 -0
- package/form/CheckboxField.d.ts +8 -0
- package/form/CheckboxField.js +14 -0
- package/form/CheckboxGroupField.d.ts +6 -0
- package/form/CheckboxGroupField.js +15 -0
- package/form/ConditionField.d.ts +7 -0
- package/form/ConditionField.js +20 -0
- package/form/ContentField.d.ts +7 -0
- package/form/ContentField.js +15 -0
- package/form/CounterField.d.ts +5 -0
- package/form/CounterField.js +7 -0
- package/form/DateField.d.ts +8 -0
- package/form/DateField.js +52 -0
- package/form/DatesArrayField.d.ts +8 -0
- package/form/DatesArrayField.js +79 -0
- package/form/DependSelectField.d.ts +8 -0
- package/form/DependSelectField.js +12 -0
- package/form/EditorField.d.ts +5 -0
- package/form/EditorField.js +7 -0
- package/form/FileField.d.ts +12 -0
- package/form/FileField.js +9 -0
- package/form/FormField.d.ts +15 -0
- package/form/FormField.js +22 -0
- package/form/ModalFieldArray.d.ts +13 -0
- package/form/ModalFieldArray.js +62 -0
- package/form/PeriodField.d.ts +24 -0
- package/form/PeriodField.js +111 -0
- package/form/RadioGroupField.d.ts +10 -0
- package/form/RadioGroupField.js +21 -0
- package/form/SearchField.d.ts +19 -0
- package/form/SearchField.js +51 -0
- package/form/SelectField.d.ts +8 -0
- package/form/SelectField.js +13 -0
- package/form/SelectOwnerField.d.ts +11 -0
- package/form/SelectOwnerField.js +11 -0
- package/form/StopsSelect/StopSelectWithSearch.d.ts +28 -0
- package/form/StopsSelect/StopSelectWithSearch.js +181 -0
- package/form/StopsSelect/StopsSelect.d.ts +19 -0
- package/form/StopsSelect/StopsSelect.js +65 -0
- package/form/StopsSelect/StopsSelectModal.d.ts +26 -0
- package/form/StopsSelect/StopsSelectModal.js +280 -0
- package/form/StopsSelect/StopsSelectSearchForm.d.ts +22 -0
- package/form/StopsSelect/StopsSelectSearchForm.js +43 -0
- package/form/SwitchField.d.ts +9 -0
- package/form/SwitchField.js +16 -0
- package/form/TextField.d.ts +6 -0
- package/form/TextField.js +21 -0
- package/form/TimeDurationField.d.ts +6 -0
- package/form/TimeDurationField.js +54 -0
- package/form/TimeZoneField.d.ts +6 -0
- package/form/TimeZoneField.js +8 -0
- package/form/ToggleButtonGroupField.d.ts +12 -0
- package/form/ToggleButtonGroupField.js +16 -0
- package/form/hooks/addLazyFieldMetaState.d.ts +3 -0
- package/form/hooks/addLazyFieldMetaState.js +55 -0
- package/form/hooks/getValue.d.ts +3 -0
- package/form/hooks/getValue.js +60 -0
- package/form/hooks/useConstant.d.ts +13 -0
- package/form/hooks/useConstant.js +20 -0
- package/form/hooks/useConstantCallback.d.ts +7 -0
- package/form/hooks/useConstantCallback.js +14 -0
- package/form/hooks/useField.d.ts +3 -0
- package/form/hooks/useField.js +175 -0
- package/form/hooks/useFieldArray.d.ts +6 -0
- package/form/hooks/useFieldArray.js +87 -0
- package/form/hooks/useLatest.d.ts +3 -0
- package/form/hooks/useLatest.js +8 -0
- package/form/hooks/useModalTableSelectedRows.d.ts +12 -0
- package/form/hooks/useModalTableSelectedRows.js +66 -0
- package/form/hooks/useWatch.d.ts +12 -0
- package/form/hooks/useWatch.js +16 -0
- package/form/index.d.ts +45 -0
- package/form/index.js +58 -0
- package/form/mutators/change.d.ts +2 -0
- package/form/mutators/change.js +9 -0
- package/form/validate.d.ts +14 -0
- package/form/validate.js +39 -0
- package/helpers/capitalize.d.ts +1 -0
- package/helpers/capitalize.js +1 -0
- package/helpers/filter.d.ts +4 -0
- package/helpers/filter.js +21 -0
- package/helpers/formSubmit.d.ts +5 -0
- package/helpers/formSubmit.js +21 -0
- package/helpers/index.d.ts +7 -0
- package/helpers/index.js +7 -0
- package/helpers/makeClassificationOptions.d.ts +30 -0
- package/helpers/makeClassificationOptions.js +29 -0
- package/helpers/map.d.ts +1 -0
- package/helpers/map.js +1 -0
- package/helpers/openapi.d.ts +10 -0
- package/helpers/openapi.js +10 -0
- package/helpers/renderRangeError.d.ts +1 -0
- package/helpers/renderRangeError.js +20 -0
- package/helpers/sentry/assertEnvVariable.d.ts +1 -0
- package/helpers/sentry/assertEnvVariable.js +7 -0
- package/helpers/sentry/sentryConfig.d.ts +2 -0
- package/helpers/sentry/sentryConfig.js +18 -0
- package/helpers/serializeErrors.d.ts +2 -0
- package/helpers/serializeErrors.js +13 -0
- package/hooks/index.d.ts +26 -0
- package/hooks/index.js +26 -0
- package/hooks/useAllowedBusinessEntities.d.ts +4 -0
- package/hooks/useAllowedBusinessEntities.js +9 -0
- package/hooks/useBusinessEntitiesByType.d.ts +8 -0
- package/hooks/useBusinessEntitiesByType.js +17 -0
- package/hooks/useChangePassword.d.ts +14 -0
- package/hooks/useChangePassword.js +48 -0
- package/hooks/useClassification.d.ts +9 -0
- package/hooks/useClassification.js +16 -0
- package/hooks/useDraggable.d.ts +5 -0
- package/hooks/useDraggable.js +11 -0
- package/hooks/useEllipsis.d.ts +10 -0
- package/hooks/useEllipsis.js +79 -0
- package/hooks/useFavicon.d.ts +1 -0
- package/hooks/useFavicon.js +13 -0
- package/hooks/useFormTable.d.ts +24 -0
- package/hooks/useFormTable.js +105 -0
- package/hooks/useFormTableControls.d.ts +31 -0
- package/hooks/useFormTableControls.js +34 -0
- package/hooks/useInertBackground.d.ts +20 -0
- package/hooks/useInertBackground.js +57 -0
- package/hooks/useIsMounted.d.ts +2 -0
- package/hooks/useIsMounted.js +11 -0
- package/hooks/useLanguage.d.ts +1 -0
- package/hooks/useLanguage.js +2 -0
- package/hooks/useLoaded.d.ts +1 -0
- package/hooks/useLoaded.js +19 -0
- package/hooks/useLocale.d.ts +1 -0
- package/hooks/useLocale.js +7 -0
- package/hooks/useModal.d.ts +307 -0
- package/hooks/useModal.js +12 -0
- package/hooks/useOptions.d.ts +13 -0
- package/hooks/useOptions.js +24 -0
- package/hooks/usePrevious.d.ts +1 -0
- package/hooks/usePrevious.js +12 -0
- package/hooks/usePrompt.d.ts +8 -0
- package/hooks/usePrompt.js +17 -0
- package/hooks/useRowActive.d.ts +6 -0
- package/hooks/useRowActive.js +104 -0
- package/hooks/useRowEditActions.d.ts +5 -0
- package/hooks/useRowEditActions.js +12 -0
- package/hooks/useRowExpandToggle.d.ts +5 -0
- package/hooks/useRowExpandToggle.js +13 -0
- package/hooks/useRowHidden.d.ts +4 -0
- package/hooks/useRowHidden.js +6 -0
- package/hooks/useRowSelectCheckbox.d.ts +27 -0
- package/hooks/useRowSelectCheckbox.js +48 -0
- package/hooks/useTable.d.ts +4 -0
- package/hooks/useTable.js +38 -0
- package/hooks/useTableRowHighlight.d.ts +4 -0
- package/hooks/useTableRowHighlight.js +16 -0
- package/hooks/useTranslation.d.ts +3 -0
- package/hooks/useTranslation.js +3 -0
- package/hooks/useWeekdayOptions.d.ts +40 -0
- package/hooks/useWeekdayOptions.js +66 -0
- package/i18n/index.d.ts +13 -0
- package/i18n/index.js +82 -0
- package/i18n/resources/de.json +115 -0
- package/i18n/resources/el.json +116 -0
- package/i18n/resources/en-AE.json +115 -0
- package/i18n/resources/en.json +118 -0
- package/i18n/resources/es.json +115 -0
- package/i18n/resources/fr.json +115 -0
- package/i18n/resources/index.d.ts +1295 -0
- package/i18n/resources/index.js +24 -0
- package/i18n/resources/it.json +115 -0
- package/i18n/resources/lt.json +115 -0
- package/i18n/resources/pt.json +115 -0
- package/i18n/resources/sk.json +115 -0
- package/i18n/resources/sv.json +116 -0
- package/i18n/trans/alert.d.ts +8 -0
- package/i18n/trans/alert.js +10 -0
- package/i18n/trans/button.d.ts +24 -0
- package/i18n/trans/button.js +26 -0
- package/i18n/trans/error.d.ts +10 -0
- package/i18n/trans/error.js +12 -0
- package/i18n/trans/field.d.ts +19 -0
- package/i18n/trans/field.js +21 -0
- package/i18n/trans/index.d.ts +13 -0
- package/i18n/trans/index.js +20 -0
- package/i18n/trans/label.d.ts +18 -0
- package/i18n/trans/label.js +20 -0
- package/i18n/trans/option.d.ts +6 -0
- package/i18n/trans/option.js +8 -0
- package/i18n/trans/qty.d.ts +5 -0
- package/i18n/trans/qty.js +7 -0
- package/i18n/trans/table.d.ts +8 -0
- package/i18n/trans/table.js +10 -0
- package/i18n/trans/title.d.ts +6 -0
- package/i18n/trans/title.js +8 -0
- package/i18n/trans/tooltip.d.ts +8 -0
- package/i18n/trans/tooltip.js +10 -0
- package/icons/1-class.svg +4 -0
- package/icons/2-class-calm.svg +5 -0
- package/icons/2-class-crossed.svg +5 -0
- package/icons/2-class.svg +4 -0
- package/icons/3-class.svg +4 -0
- package/icons/4-class.svg +4 -0
- package/icons/ac-crossed.svg +6 -0
- package/icons/ac.svg +9 -0
- package/icons/accessibility.svg +5 -0
- package/icons/add-journey-segment.svg +9 -0
- package/icons/add-person.svg +6 -0
- package/icons/add.svg +4 -0
- package/icons/air-condition.svg +11 -0
- package/icons/airport.svg +4 -0
- package/icons/alert-circle.svg +5 -0
- package/icons/arrow-down.svg +4 -0
- package/icons/arrow-left-circle.svg +5 -0
- package/icons/arrow-left.svg +4 -0
- package/icons/arrow-right.svg +4 -0
- package/icons/arrow-up.svg +4 -0
- package/icons/baby-care.svg +7 -0
- package/icons/bar.svg +6 -0
- package/icons/bed.svg +3 -0
- package/icons/bicycle-crossed.svg +6 -0
- package/icons/bicycle.svg +8 -0
- package/icons/bin.svg +6 -0
- package/icons/break.svg +5 -0
- package/icons/breakfast-1-class.svg +5 -0
- package/icons/breakfast-2-class.svg +5 -0
- package/icons/breakfast.svg +3 -0
- package/icons/bus.svg +7 -0
- package/icons/business-area.svg +6 -0
- package/icons/by-aisle.svg +8 -0
- package/icons/by-window.svg +6 -0
- package/icons/cafe-1-class.svg +5 -0
- package/icons/calendar.svg +6 -0
- package/icons/cancel.svg +5 -0
- package/icons/cargo.svg +4 -0
- package/icons/carriage-bot.svg +6 -0
- package/icons/carriage-mid.svg +4 -0
- package/icons/carriage-top.svg +12 -0
- package/icons/carriage.svg +3 -0
- package/icons/cart.svg +3 -0
- package/icons/cd.svg +4 -0
- package/icons/check-circle.svg +4 -0
- package/icons/check.svg +3 -0
- package/icons/checkbox-checked.svg +4 -0
- package/icons/checkbox-indeterminate.svg +5 -0
- package/icons/checkbox-mark.svg +3 -0
- package/icons/checkbox.svg +3 -0
- package/icons/chevron-down.svg +3 -0
- package/icons/chevron-left.svg +3 -0
- package/icons/chevron-right.svg +3 -0
- package/icons/chevron-up.svg +3 -0
- package/icons/circle.svg +3 -0
- package/icons/clock.svg +5 -0
- package/icons/clone.svg +4 -0
- package/icons/close-bold.svg +4 -0
- package/icons/close.svg +4 -0
- package/icons/coffee-machine-crossed.svg +6 -0
- package/icons/coffee-machine.svg +7 -0
- package/icons/coin.svg +4 -0
- package/icons/comment.svg +3 -0
- package/icons/compartment.svg +6 -0
- package/icons/couchette.svg +6 -0
- package/icons/cube.svg +1 -0
- package/icons/currency.svg +4 -0
- package/icons/deactivate.svg +4 -0
- package/icons/delete.svg +4 -0
- package/icons/dining.svg +7 -0
- package/icons/direction-bottom.svg +4 -0
- package/icons/direction-forward-v.svg +4 -0
- package/icons/direction-forward.svg +4 -0
- package/icons/direction-left.svg +4 -0
- package/icons/direction-reverse-v.svg +4 -0
- package/icons/direction-reverse.svg +4 -0
- package/icons/direction-right.svg +4 -0
- package/icons/direction-top.svg +4 -0
- package/icons/dots.svg +5 -0
- package/icons/download.svg +5 -0
- package/icons/drag-n-drop.svg +3 -0
- package/icons/draggable.svg +5 -0
- package/icons/duplicate.svg +4 -0
- package/icons/dvd.svg +5 -0
- package/icons/edit.svg +3 -0
- package/icons/empty-search.svg +9 -0
- package/icons/empty-state.svg +13 -0
- package/icons/empty.svg +9 -0
- package/icons/empty_search_purple.svg +6 -0
- package/icons/error-circle.svg +4 -0
- package/icons/eu-law.svg +5 -0
- package/icons/external_link.svg +5 -0
- package/icons/family-area.svg +7 -0
- package/icons/file-settings.svg +3 -0
- package/icons/file.svg +11 -0
- package/icons/filter.svg +3 -0
- package/icons/flip.svg +11 -0
- package/icons/food-1-class.svg +5 -0
- package/icons/food-plus.svg +5 -0
- package/icons/food.svg +7 -0
- package/icons/grid-cell.svg +1 -0
- package/icons/grid.svg +6 -0
- package/icons/headphones.svg +5 -0
- package/icons/helping-hand-crossed.svg +12 -0
- package/icons/helping-hand.svg +3 -0
- package/icons/hide.svg +4 -0
- package/icons/home.svg +4 -0
- package/icons/index.json +228 -0
- package/icons/info-circle.svg +5 -0
- package/icons/insurance.svg +6 -0
- package/icons/journey-changeover.svg +5 -0
- package/icons/journey-light.svg +5 -0
- package/icons/journey.svg +5 -0
- package/icons/key.svg +4 -0
- package/icons/language.svg +3 -0
- package/icons/link.svg +4 -0
- package/icons/list.svg +8 -0
- package/icons/locker.svg +8 -0
- package/icons/logout.svg +5 -0
- package/icons/luggage.svg +9 -0
- package/icons/mail.svg +4 -0
- package/icons/meeting-lounge.svg +10 -0
- package/icons/metro.svg +3 -0
- package/icons/middle-seat.svg +7 -0
- package/icons/minus.svg +3 -0
- package/icons/minus24.svg +3 -0
- package/icons/mobile-crossed.svg +7 -0
- package/icons/mobile.svg +6 -0
- package/icons/movingo.svg +3 -0
- package/icons/multimedia.svg +9 -0
- package/icons/near-bicycle.svg +5 -0
- package/icons/near-pet.svg +5 -0
- package/icons/near-wheelchair.svg +8 -0
- package/icons/night-train.svg +4 -0
- package/icons/nonstop.svg +3 -0
- package/icons/occupancy-seat-hover.svg +11 -0
- package/icons/occupancy-seat-selected.svg +11 -0
- package/icons/occupancy-seat.svg +4 -0
- package/icons/oneway.svg +4 -0
- package/icons/pet-crossed.svg +5 -0
- package/icons/pet.svg +7 -0
- package/icons/pic.svg +5 -0
- package/icons/playground.svg +7 -0
- package/icons/plus.svg +4 -0
- package/icons/plus24.svg +4 -0
- package/icons/popup-controls.svg +15 -0
- package/icons/power-socket.svg +6 -0
- package/icons/preview.svg +3 -0
- package/icons/print.svg +5 -0
- package/icons/priority-seat-elderly.svg +6 -0
- package/icons/priority-seat-pregnant.svg +5 -0
- package/icons/profile.svg +4 -0
- package/icons/question.svg +5 -0
- package/icons/radio-filled.svg +4 -0
- package/icons/radio.svg +3 -0
- package/icons/reclining-seat.svg +9 -0
- package/icons/refresh.svg +6 -0
- package/icons/reload.svg +4 -0
- package/icons/remove-circle.svg +3 -0
- package/icons/replace.svg +6 -0
- package/icons/reservation-crossed.svg +4 -0
- package/icons/reservation-mandatory.svg +4 -0
- package/icons/reservation-optional.svg +5 -0
- package/icons/resplus-horizontal.svg +1 -0
- package/icons/resplus.svg +3 -0
- package/icons/restaurant.svg +3 -0
- package/icons/roundtrip.svg +6 -0
- package/icons/save.svg +5 -0
- package/icons/search.svg +4 -0
- package/icons/seat-compartment.svg +8 -0
- package/icons/seat-selected.svg +3 -0
- package/icons/seat.svg +5 -0
- package/icons/sent.svg +34 -0
- package/icons/service-dog.svg +4 -0
- package/icons/settings.svg +4 -0
- package/icons/shift.svg +3 -0
- package/icons/ship.svg +3 -0
- package/icons/show.svg +4 -0
- package/icons/shower.svg +9 -0
- package/icons/silence.svg +6 -0
- package/icons/sink.svg +5 -0
- package/icons/skis.svg +8 -0
- package/icons/sleeper-car-bedding.svg +6 -0
- package/icons/sleeper-car.svg +5 -0
- package/icons/smoking-crossed.svg +6 -0
- package/icons/sort.svg +6 -0
- package/icons/stairs-down.svg +5 -0
- package/icons/stairs-up.svg +5 -0
- package/icons/star-filled.svg +3 -0
- package/icons/star.svg +3 -0
- package/icons/stroller.svg +6 -0
- package/icons/sw-law.svg +5 -0
- package/icons/switch.svg +3 -0
- package/icons/table.svg +6 -0
- package/icons/tag.svg +4 -0
- package/icons/taxi.svg +3 -0
- package/icons/tick.svg +3 -0
- package/icons/ticket-cancel.svg +8 -0
- package/icons/ticket-change.svg +3 -0
- package/icons/ticket-manage.svg +7 -0
- package/icons/ticket-refund.svg +8 -0
- package/icons/ticket-travel-pass.svg +4 -0
- package/icons/ticket.svg +6 -0
- package/icons/tickets.svg +4 -0
- package/icons/train.svg +3 -0
- package/icons/transfer.svg +3 -0
- package/icons/trash.svg +6 -0
- package/icons/triange.svg +17 -0
- package/icons/tv.svg +5 -0
- package/icons/unaccompanied-minor.svg +8 -0
- package/icons/upload.svg +5 -0
- package/icons/usb.svg +9 -0
- package/icons/visibility-off.svg +4 -0
- package/icons/visibility-on.svg +4 -0
- package/icons/voucher.svg +5 -0
- package/icons/wardrobe.svg +4 -0
- package/icons/warning.svg +3 -0
- package/icons/water.svg +5 -0
- package/icons/wc.svg +4 -0
- package/icons/wheelchair-lift-reservation.svg +8 -0
- package/icons/wheelchair-lift.svg +6 -0
- package/icons/wheelchair-ramp.svg +8 -0
- package/icons/wheelchair-space-reservation.svg +13 -0
- package/icons/wheelchair-space.svg +4 -0
- package/icons/wheelchair.svg +5 -0
- package/icons/wifi-crossed.svg +9 -0
- package/icons/wifi.svg +6 -0
- package/index.css +327 -0
- package/index.d.ts +31 -0
- package/index.js +32 -0
- package/mui/Accordion.d.ts +17 -0
- package/mui/Accordion.js +46 -0
- package/mui/Button/index.d.ts +16 -0
- package/mui/Button/index.js +35 -0
- package/mui/Card/CardHeader.d.ts +7 -0
- package/mui/Card/CardHeader.js +43 -0
- package/mui/Card/index.d.ts +4 -0
- package/mui/Card/index.js +4 -0
- package/mui/Checkbox/CheckboxGroup.d.ts +26 -0
- package/mui/Checkbox/CheckboxGroup.js +81 -0
- package/mui/Checkbox/index.d.ts +18 -0
- package/mui/Checkbox/index.js +40 -0
- package/mui/Chip/ChipSecondarySmall.d.ts +10 -0
- package/mui/Chip/ChipSecondarySmall.js +40 -0
- package/mui/CircularProgress/index.d.ts +3 -0
- package/mui/CircularProgress/index.js +36 -0
- package/mui/Collapsible/index.d.ts +9 -0
- package/mui/Collapsible/index.js +66 -0
- package/mui/Counter/index.d.ts +9 -0
- package/mui/Counter/index.js +37 -0
- package/mui/DatePicker/DatePicker.scss +276 -0
- package/mui/DatePicker/DatePickerContext.d.ts +8 -0
- package/mui/DatePicker/DatePickerContext.js +2 -0
- package/mui/DatePicker/DatePickerHeader.d.ts +3 -0
- package/mui/DatePicker/DatePickerHeader.js +63 -0
- package/mui/DatePicker/DatePickerHeaderSelect.d.ts +10 -0
- package/mui/DatePicker/DatePickerHeaderSelect.js +72 -0
- package/mui/DatePicker/DatePickerInput.d.ts +6 -0
- package/mui/DatePicker/DatePickerInput.js +28 -0
- package/mui/DatePicker/TimeInput.d.ts +10 -0
- package/mui/DatePicker/TimeInput.js +63 -0
- package/mui/DatePicker/index.d.ts +52 -0
- package/mui/DatePicker/index.js +187 -0
- package/mui/Dropdown/index.d.ts +22 -0
- package/mui/Dropdown/index.js +90 -0
- package/mui/EditableLabel/index.d.ts +7 -0
- package/mui/EditableLabel/index.js +81 -0
- package/mui/ExternalLink/index.d.ts +8 -0
- package/mui/ExternalLink/index.js +11 -0
- package/mui/FileInput/index.d.ts +27 -0
- package/mui/FileInput/index.js +66 -0
- package/mui/FormControl/index.d.ts +23 -0
- package/mui/FormControl/index.js +36 -0
- package/mui/FormField/index.d.ts +8 -0
- package/mui/FormField/index.js +12 -0
- package/mui/Icon/index.d.ts +21 -0
- package/mui/Icon/index.js +47 -0
- package/mui/Input/index.d.ts +28 -0
- package/mui/Input/index.js +102 -0
- package/mui/Loader/index.d.ts +9 -0
- package/mui/Loader/index.js +47 -0
- package/mui/Modal/index.d.ts +16 -0
- package/mui/Modal/index.js +64 -0
- package/mui/Pagination/index.d.ts +6 -0
- package/mui/Pagination/index.js +23 -0
- package/mui/Paper/index.d.ts +4 -0
- package/mui/Paper/index.js +3 -0
- package/mui/Popper/index.d.ts +13 -0
- package/mui/Popper/index.js +139 -0
- package/mui/RadioGroup/index.d.ts +26 -0
- package/mui/RadioGroup/index.js +41 -0
- package/mui/ReadOnlyField/index.d.ts +8 -0
- package/mui/ReadOnlyField/index.js +35 -0
- package/mui/Select/index.d.ts +47 -0
- package/mui/Select/index.js +164 -0
- package/mui/Stepper/StepIconComponent.d.ts +6 -0
- package/mui/Stepper/StepIconComponent.js +93 -0
- package/mui/Stepper/index.d.ts +6 -0
- package/mui/Stepper/index.js +13 -0
- package/mui/Switch/index.d.ts +3 -0
- package/mui/Switch/index.js +2 -0
- package/mui/Tab/index.d.ts +60 -0
- package/mui/Tab/index.js +12 -0
- package/mui/Tabs/index.d.ts +22 -0
- package/mui/Tabs/index.js +70 -0
- package/mui/TimeDurationLabel/index.d.ts +7 -0
- package/mui/TimeDurationLabel/index.js +13 -0
- package/mui/ToggleButton/index.d.ts +4 -0
- package/mui/ToggleButton/index.js +57 -0
- package/mui/ToggleButtonGroup/index.d.ts +25 -0
- package/mui/ToggleButtonGroup/index.js +61 -0
- package/mui/ToggleList/index.d.ts +11 -0
- package/mui/ToggleList/index.js +54 -0
- package/mui/Tooltip/index.d.ts +11 -0
- package/mui/Tooltip/index.js +36 -0
- package/mui/index.d.ts +36 -0
- package/mui/index.js +36 -0
- package/mui/provider.d.ts +9 -0
- package/mui/provider.js +22 -0
- package/mui/theme.d.ts +17 -0
- package/mui/theme.js +1228 -0
- package/package.json +197 -4
- package/services/api.d.ts +28 -0
- package/services/api.js +141 -0
- package/services/index.d.ts +2 -0
- package/services/index.js +2 -0
- package/services/openapi.d.ts +6 -0
- package/services/openapi.js +112 -0
- package/store/index.d.ts +6 -0
- package/store/index.js +1 -0
- package/store/useClassificationOptions.d.ts +3 -0
- package/store/useClassificationOptions.js +2 -0
- package/types.d.ts +2423 -0
- package/utils/array.d.ts +2 -0
- package/utils/array.js +21 -0
- package/utils/auth.d.ts +2 -0
- package/utils/auth.js +31 -0
- package/utils/color.d.ts +29 -0
- package/utils/color.js +132 -0
- package/utils/date.d.ts +40 -0
- package/utils/date.js +51 -0
- package/utils/filter.d.ts +3 -0
- package/utils/filter.js +11 -0
- package/utils/getScrollbarSize.d.ts +1 -0
- package/utils/getScrollbarSize.js +8 -0
- package/utils/index.d.ts +12 -0
- package/utils/index.js +12 -0
- package/utils/input.d.ts +2 -0
- package/utils/input.js +2 -0
- package/utils/knowledge-owl-script.d.ts +64 -0
- package/utils/knowledge-owl-script.js +226 -0
- package/utils/locales.d.ts +3 -0
- package/utils/locales.js +24 -0
- package/utils/noop.d.ts +1 -0
- package/utils/noop.js +1 -0
- package/utils/percentage.d.ts +6 -0
- package/utils/percentage.js +43 -0
- package/utils/redirect.d.ts +1 -0
- package/utils/redirect.js +6 -0
- package/utils/sort.d.ts +21 -0
- package/utils/sort.js +32 -0
- package/utils/storage.d.ts +2 -0
- package/utils/storage.js +2 -0
- package/utils/timeDuration.d.ts +26 -0
- package/utils/timeDuration.js +78 -0
- package/utils/wallClock.d.ts +17 -0
- package/utils/wallClock.js +178 -0
- package/wrappers/ApiInitializer.d.ts +9 -0
- package/wrappers/ApiInitializer.js +21 -0
- package/wrappers/AuthWrapper.d.ts +6 -0
- package/wrappers/AuthWrapper.js +38 -0
- package/wrappers/AxiosErrorsInterceptorWrapper.d.ts +2 -0
- package/wrappers/AxiosErrorsInterceptorWrapper.js +30 -0
- package/README.md +0 -3
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { DialogProps } from '@mui/material/Dialog';
|
|
3
|
+
export declare function useModal<T extends HTMLElement = HTMLElement>({ open, ...props }?: Partial<DialogProps>): {
|
|
4
|
+
onOpen: (event?: MouseEvent<T>) => void;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
open: boolean;
|
|
7
|
+
'aria-describedby'?: string;
|
|
8
|
+
'aria-labelledby'?: string;
|
|
9
|
+
children?: import("react").ReactNode;
|
|
10
|
+
classes?: Partial<import("@mui/material/Dialog").DialogClasses>;
|
|
11
|
+
disableEscapeKeyDown?: boolean;
|
|
12
|
+
fullScreen?: boolean;
|
|
13
|
+
fullWidth?: boolean;
|
|
14
|
+
maxWidth?: false | import("@mui/system").Breakpoint;
|
|
15
|
+
onBackdropClick?: import("react").ReactEventHandler<{}>;
|
|
16
|
+
PaperComponent?: import("react").JSXElementConstructor<import("@mui/material").PaperProps<"div", {}>>;
|
|
17
|
+
PaperProps?: Partial<import("@mui/material").PaperProps<"div", {}>>;
|
|
18
|
+
scroll?: "body" | "paper";
|
|
19
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
20
|
+
TransitionComponent?: import("react").JSXElementConstructor<import("@mui/material/transitions").TransitionProps & {
|
|
21
|
+
children: import("react").ReactElement<any, any>;
|
|
22
|
+
}>;
|
|
23
|
+
transitionDuration?: number | {
|
|
24
|
+
appear?: number;
|
|
25
|
+
enter?: number;
|
|
26
|
+
exit?: number;
|
|
27
|
+
} | {
|
|
28
|
+
appear?: number;
|
|
29
|
+
enter?: number;
|
|
30
|
+
exit?: number;
|
|
31
|
+
};
|
|
32
|
+
TransitionProps?: import("@mui/material/transitions").TransitionProps;
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
defaultChecked?: boolean;
|
|
35
|
+
defaultValue?: string | number | readonly string[];
|
|
36
|
+
suppressContentEditableWarning?: boolean;
|
|
37
|
+
suppressHydrationWarning?: boolean;
|
|
38
|
+
accessKey?: string;
|
|
39
|
+
className?: string;
|
|
40
|
+
contentEditable?: (boolean | "true" | "false") | "inherit";
|
|
41
|
+
contextMenu?: string;
|
|
42
|
+
dir?: string;
|
|
43
|
+
draggable?: boolean | "true" | "false";
|
|
44
|
+
hidden?: boolean;
|
|
45
|
+
id?: string;
|
|
46
|
+
lang?: string;
|
|
47
|
+
slot?: string;
|
|
48
|
+
spellCheck?: boolean | "true" | "false";
|
|
49
|
+
style?: import("react").CSSProperties;
|
|
50
|
+
tabIndex?: number;
|
|
51
|
+
title?: string;
|
|
52
|
+
translate?: "yes" | "no";
|
|
53
|
+
radioGroup?: string;
|
|
54
|
+
role?: import("react").AriaRole;
|
|
55
|
+
about?: string;
|
|
56
|
+
datatype?: string;
|
|
57
|
+
inlist?: any;
|
|
58
|
+
prefix?: string;
|
|
59
|
+
property?: string;
|
|
60
|
+
resource?: string;
|
|
61
|
+
typeof?: string;
|
|
62
|
+
vocab?: string;
|
|
63
|
+
autoCapitalize?: string;
|
|
64
|
+
autoCorrect?: string;
|
|
65
|
+
autoSave?: string;
|
|
66
|
+
color?: string;
|
|
67
|
+
itemProp?: string;
|
|
68
|
+
itemScope?: boolean;
|
|
69
|
+
itemType?: string;
|
|
70
|
+
itemID?: string;
|
|
71
|
+
itemRef?: string;
|
|
72
|
+
results?: number;
|
|
73
|
+
security?: string;
|
|
74
|
+
unselectable?: "on" | "off";
|
|
75
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
76
|
+
is?: string;
|
|
77
|
+
'aria-activedescendant'?: string;
|
|
78
|
+
'aria-atomic'?: boolean | "true" | "false";
|
|
79
|
+
'aria-autocomplete'?: "list" | "none" | "inline" | "both";
|
|
80
|
+
'aria-busy'?: boolean | "true" | "false";
|
|
81
|
+
'aria-checked'?: boolean | "true" | "false" | "mixed";
|
|
82
|
+
'aria-colcount'?: number;
|
|
83
|
+
'aria-colindex'?: number;
|
|
84
|
+
'aria-colspan'?: number;
|
|
85
|
+
'aria-controls'?: string;
|
|
86
|
+
'aria-current'?: boolean | "step" | "time" | "true" | "false" | "page" | "location" | "date";
|
|
87
|
+
'aria-details'?: string;
|
|
88
|
+
'aria-disabled'?: boolean | "true" | "false";
|
|
89
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup";
|
|
90
|
+
'aria-errormessage'?: string;
|
|
91
|
+
'aria-expanded'?: boolean | "true" | "false";
|
|
92
|
+
'aria-flowto'?: string;
|
|
93
|
+
'aria-grabbed'?: boolean | "true" | "false";
|
|
94
|
+
'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree";
|
|
95
|
+
'aria-hidden'?: boolean | "true" | "false";
|
|
96
|
+
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
97
|
+
'aria-keyshortcuts'?: string;
|
|
98
|
+
'aria-label'?: string;
|
|
99
|
+
'aria-level'?: number;
|
|
100
|
+
'aria-live'?: "off" | "assertive" | "polite";
|
|
101
|
+
'aria-modal'?: boolean | "true" | "false";
|
|
102
|
+
'aria-multiline'?: boolean | "true" | "false";
|
|
103
|
+
'aria-multiselectable'?: boolean | "true" | "false";
|
|
104
|
+
'aria-orientation'?: "horizontal" | "vertical";
|
|
105
|
+
'aria-owns'?: string;
|
|
106
|
+
'aria-placeholder'?: string;
|
|
107
|
+
'aria-posinset'?: number;
|
|
108
|
+
'aria-pressed'?: boolean | "true" | "false" | "mixed";
|
|
109
|
+
'aria-readonly'?: boolean | "true" | "false";
|
|
110
|
+
'aria-relevant'?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
|
|
111
|
+
'aria-required'?: boolean | "true" | "false";
|
|
112
|
+
'aria-roledescription'?: string;
|
|
113
|
+
'aria-rowcount'?: number;
|
|
114
|
+
'aria-rowindex'?: number;
|
|
115
|
+
'aria-rowspan'?: number;
|
|
116
|
+
'aria-selected'?: boolean | "true" | "false";
|
|
117
|
+
'aria-setsize'?: number;
|
|
118
|
+
'aria-sort'?: "other" | "none" | "ascending" | "descending";
|
|
119
|
+
'aria-valuemax'?: number;
|
|
120
|
+
'aria-valuemin'?: number;
|
|
121
|
+
'aria-valuenow'?: number;
|
|
122
|
+
'aria-valuetext'?: string;
|
|
123
|
+
dangerouslySetInnerHTML?: {
|
|
124
|
+
__html: string;
|
|
125
|
+
};
|
|
126
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLDivElement>;
|
|
127
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLDivElement>;
|
|
128
|
+
onCut?: import("react").ClipboardEventHandler<HTMLDivElement>;
|
|
129
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLDivElement>;
|
|
130
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLDivElement>;
|
|
131
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLDivElement>;
|
|
132
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLDivElement>;
|
|
133
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLDivElement>;
|
|
134
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLDivElement>;
|
|
135
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLDivElement>;
|
|
136
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLDivElement>;
|
|
137
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLDivElement>;
|
|
138
|
+
onFocus?: import("react").FocusEventHandler<HTMLDivElement>;
|
|
139
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLDivElement>;
|
|
140
|
+
onBlur?: import("react").FocusEventHandler<HTMLDivElement>;
|
|
141
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement>;
|
|
142
|
+
onChange?: import("react").FormEventHandler<HTMLDivElement>;
|
|
143
|
+
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement>;
|
|
144
|
+
onBeforeInput?: import("react").FormEventHandler<HTMLDivElement>;
|
|
145
|
+
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement>;
|
|
146
|
+
onInput?: import("react").FormEventHandler<HTMLDivElement>;
|
|
147
|
+
onInputCapture?: import("react").FormEventHandler<HTMLDivElement>;
|
|
148
|
+
onReset?: import("react").FormEventHandler<HTMLDivElement>;
|
|
149
|
+
onResetCapture?: import("react").FormEventHandler<HTMLDivElement>;
|
|
150
|
+
onSubmit?: import("react").FormEventHandler<HTMLDivElement>;
|
|
151
|
+
onSubmitCapture?: import("react").FormEventHandler<HTMLDivElement>;
|
|
152
|
+
onInvalid?: import("react").FormEventHandler<HTMLDivElement>;
|
|
153
|
+
onInvalidCapture?: import("react").FormEventHandler<HTMLDivElement>;
|
|
154
|
+
onLoad?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
155
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
156
|
+
onError?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
157
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
158
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLDivElement>;
|
|
159
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLDivElement>;
|
|
160
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLDivElement>;
|
|
161
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLDivElement>;
|
|
162
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLDivElement>;
|
|
163
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLDivElement>;
|
|
164
|
+
onAbort?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
165
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
166
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
167
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
168
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
169
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
170
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
171
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
172
|
+
onEmptied?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
173
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
174
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
175
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
176
|
+
onEnded?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
177
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
178
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
179
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
180
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
181
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
182
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
183
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
184
|
+
onPause?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
185
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
186
|
+
onPlay?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
187
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
188
|
+
onPlaying?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
189
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
190
|
+
onProgress?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
191
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
192
|
+
onRateChange?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
193
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
194
|
+
onSeeked?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
195
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
196
|
+
onSeeking?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
197
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
198
|
+
onStalled?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
199
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
200
|
+
onSuspend?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
201
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
202
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
203
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
204
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
205
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
206
|
+
onWaiting?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
207
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
208
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
209
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
210
|
+
onClick?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
211
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
212
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
213
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
214
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
215
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
216
|
+
onDrag?: import("react").DragEventHandler<HTMLDivElement>;
|
|
217
|
+
onDragCapture?: import("react").DragEventHandler<HTMLDivElement>;
|
|
218
|
+
onDragEnd?: import("react").DragEventHandler<HTMLDivElement>;
|
|
219
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLDivElement>;
|
|
220
|
+
onDragEnter?: import("react").DragEventHandler<HTMLDivElement>;
|
|
221
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLDivElement>;
|
|
222
|
+
onDragExit?: import("react").DragEventHandler<HTMLDivElement>;
|
|
223
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLDivElement>;
|
|
224
|
+
onDragLeave?: import("react").DragEventHandler<HTMLDivElement>;
|
|
225
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLDivElement>;
|
|
226
|
+
onDragOver?: import("react").DragEventHandler<HTMLDivElement>;
|
|
227
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLDivElement>;
|
|
228
|
+
onDragStart?: import("react").DragEventHandler<HTMLDivElement>;
|
|
229
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLDivElement>;
|
|
230
|
+
onDrop?: import("react").DragEventHandler<HTMLDivElement>;
|
|
231
|
+
onDropCapture?: import("react").DragEventHandler<HTMLDivElement>;
|
|
232
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
233
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
234
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
235
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
236
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
237
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
238
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
239
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
240
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
241
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
242
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
243
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLDivElement>;
|
|
244
|
+
onSelect?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
245
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLDivElement>;
|
|
246
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLDivElement>;
|
|
247
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLDivElement>;
|
|
248
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLDivElement>;
|
|
249
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLDivElement>;
|
|
250
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLDivElement>;
|
|
251
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLDivElement>;
|
|
252
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLDivElement>;
|
|
253
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLDivElement>;
|
|
254
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
255
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
256
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
257
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
258
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
259
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
260
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
261
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
262
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
263
|
+
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
264
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
265
|
+
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
266
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
267
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
268
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
269
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
270
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
271
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
272
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
273
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
274
|
+
onScroll?: import("react").UIEventHandler<HTMLDivElement>;
|
|
275
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLDivElement>;
|
|
276
|
+
onWheel?: import("react").WheelEventHandler<HTMLDivElement>;
|
|
277
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLDivElement>;
|
|
278
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLDivElement>;
|
|
279
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLDivElement>;
|
|
280
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLDivElement>;
|
|
281
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLDivElement>;
|
|
282
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLDivElement>;
|
|
283
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement>;
|
|
284
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement>;
|
|
285
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement>;
|
|
286
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
287
|
+
key?: import("react").Key;
|
|
288
|
+
components?: {
|
|
289
|
+
Root?: import("react").ElementType<any>;
|
|
290
|
+
};
|
|
291
|
+
componentsProps?: {
|
|
292
|
+
root?: import("react").HTMLAttributes<HTMLDivElement> & import("@mui/base").ModalUnstyledComponentsPropsOverrides;
|
|
293
|
+
};
|
|
294
|
+
disablePortal?: boolean;
|
|
295
|
+
container?: Element | (() => Element);
|
|
296
|
+
keepMounted?: boolean;
|
|
297
|
+
BackdropComponent?: import("react").ElementType<import("@mui/material").BackdropProps<"div", {}>> & import("react").ElementType<any>;
|
|
298
|
+
BackdropProps?: Partial<import("@mui/material").BackdropProps<"div", {}>> & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
299
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
300
|
+
};
|
|
301
|
+
closeAfterTransition?: boolean;
|
|
302
|
+
disableAutoFocus?: boolean;
|
|
303
|
+
disableEnforceFocus?: boolean;
|
|
304
|
+
disableRestoreFocus?: boolean;
|
|
305
|
+
disableScrollLock?: boolean;
|
|
306
|
+
hideBackdrop?: boolean;
|
|
307
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
2
|
+
export function useModal({ open = false, ...props } = {}) {
|
|
3
|
+
const [isOpen, setOpen] = useState(open);
|
|
4
|
+
const onOpen = useCallback((event) => {
|
|
5
|
+
event?.preventDefault();
|
|
6
|
+
setOpen(true);
|
|
7
|
+
}, [setOpen]);
|
|
8
|
+
const onClose = useCallback(() => {
|
|
9
|
+
setOpen(false);
|
|
10
|
+
}, [setOpen]);
|
|
11
|
+
return useMemo(() => ({ ...props, onOpen, onClose, open: isOpen }), [onOpen, onClose, isOpen, props]);
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare enum OptionsGroup {
|
|
3
|
+
BOOL = 0,
|
|
4
|
+
BOOL_ONLY = 1
|
|
5
|
+
}
|
|
6
|
+
export declare type OptionsGroupType = keyof typeof OptionsGroup;
|
|
7
|
+
export declare const useOptions: <T extends unknown[]>(optionsGroup: T | "BOOL" | "BOOL_ONLY") => T | ({
|
|
8
|
+
value: boolean;
|
|
9
|
+
label: JSX.Element;
|
|
10
|
+
} | {
|
|
11
|
+
value: string;
|
|
12
|
+
label: JSX.Element;
|
|
13
|
+
})[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { TransOption } from "../i18n/trans/option";
|
|
4
|
+
export var OptionsGroup;
|
|
5
|
+
(function (OptionsGroup) {
|
|
6
|
+
OptionsGroup[OptionsGroup["BOOL"] = 0] = "BOOL";
|
|
7
|
+
OptionsGroup[OptionsGroup["BOOL_ONLY"] = 1] = "BOOL_ONLY";
|
|
8
|
+
})(OptionsGroup || (OptionsGroup = {}));
|
|
9
|
+
export const useOptions = (optionsGroup) => {
|
|
10
|
+
const options = useMemo(() => ({
|
|
11
|
+
[OptionsGroup.BOOL]: [
|
|
12
|
+
{ value: true, label: _jsx(TransOption, { i18nKey: "yes" }) },
|
|
13
|
+
{ value: false, label: _jsx(TransOption, { i18nKey: "no" }) },
|
|
14
|
+
{ value: '', label: _jsx(TransOption, { i18nKey: "all" }) },
|
|
15
|
+
],
|
|
16
|
+
[OptionsGroup.BOOL_ONLY]: [
|
|
17
|
+
{ value: true, label: _jsx(TransOption, { i18nKey: "yes" }) },
|
|
18
|
+
{ value: false, label: _jsx(TransOption, { i18nKey: "no" }) },
|
|
19
|
+
],
|
|
20
|
+
}), []);
|
|
21
|
+
if (Array.isArray(optionsGroup))
|
|
22
|
+
return optionsGroup;
|
|
23
|
+
return options[OptionsGroup[optionsGroup]];
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePrevious<D>(value: D): D;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
export function usePrevious(value) {
|
|
3
|
+
// The ref object is a generic container whose current property is mutable ...
|
|
4
|
+
// ... and can hold any value, similar to an instance property on a class
|
|
5
|
+
const ref = useRef(value);
|
|
6
|
+
// Store current value in ref
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
ref.current = value;
|
|
9
|
+
}, [value]); // Only re-run if value changes
|
|
10
|
+
// Return previous value (happens before update in useEffect above)
|
|
11
|
+
return ref.current;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PROMPT_REJECT_REASON = "PROMPT_REJECTED";
|
|
2
|
+
export declare class Prompt {
|
|
3
|
+
private promise?;
|
|
4
|
+
show: () => Promise<unknown>;
|
|
5
|
+
cancel(callback?: Function): Promise<void>;
|
|
6
|
+
confirm(callback?: Function): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare const usePrompt: () => Prompt;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
export const PROMPT_REJECT_REASON = 'PROMPT_REJECTED';
|
|
3
|
+
export class Prompt {
|
|
4
|
+
promise;
|
|
5
|
+
show = () => new Promise((resolve, reject) => {
|
|
6
|
+
this.promise = { resolve, reject };
|
|
7
|
+
});
|
|
8
|
+
async cancel(callback) {
|
|
9
|
+
await callback?.(PROMPT_REJECT_REASON);
|
|
10
|
+
await this.promise?.reject(PROMPT_REJECT_REASON);
|
|
11
|
+
}
|
|
12
|
+
async confirm(callback) {
|
|
13
|
+
await callback?.();
|
|
14
|
+
await this.promise?.resolve();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export const usePrompt = () => useMemo(() => new Prompt(), []);
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { actions, ensurePluginOrder, makePropGetter, useGetLatest, useMountedLayoutEffect, } from 'react-table';
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
|
+
actions.initRowActive = 'initRowActive';
|
|
4
|
+
actions.toggleRowActive = 'toggleRowActive';
|
|
5
|
+
actions.resetRowActive = 'resetRowActive';
|
|
6
|
+
export const useRowActive = (hooks) => {
|
|
7
|
+
hooks.getToggleRowActiveProps = [defaultGetToggleRowActiveProps];
|
|
8
|
+
hooks.stateReducers.push(reducer);
|
|
9
|
+
hooks.useInstance.push(useInstance);
|
|
10
|
+
hooks.prepareRow.push(prepareRow);
|
|
11
|
+
};
|
|
12
|
+
const defaultGetToggleRowActiveProps = (props, { instance, row }) => {
|
|
13
|
+
const { manualRowActiveKey = 'isActive' } = instance;
|
|
14
|
+
let active = false;
|
|
15
|
+
if (row.original &&
|
|
16
|
+
// @ts-ignore `manualRowActiveKey`
|
|
17
|
+
row.original[manualRowActiveKey]) {
|
|
18
|
+
active = true;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
active = row.isActive;
|
|
22
|
+
}
|
|
23
|
+
return [
|
|
24
|
+
props,
|
|
25
|
+
{
|
|
26
|
+
onChange: () => row.toggleRowActive(active),
|
|
27
|
+
style: {
|
|
28
|
+
cursor: 'pointer',
|
|
29
|
+
},
|
|
30
|
+
active,
|
|
31
|
+
title: 'Toggle Row Active',
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
};
|
|
35
|
+
export const pluginName = 'useRowActive';
|
|
36
|
+
useRowActive.pluginName = pluginName;
|
|
37
|
+
function reducer(state, action, previousState, instance) {
|
|
38
|
+
if (action.type === actions.init)
|
|
39
|
+
return { activeRowId: undefined, ...state };
|
|
40
|
+
if (action.type === actions.initRowActive)
|
|
41
|
+
// @ts-ignore activeRowId
|
|
42
|
+
return { activeRowId: instance.initialState?.activeRowId, ...state };
|
|
43
|
+
if (action.type === actions.toggleRowActive) {
|
|
44
|
+
const { id, value: setActive } = action;
|
|
45
|
+
return {
|
|
46
|
+
...state,
|
|
47
|
+
activeRowId: setActive ? id : undefined,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
if (action.type === actions.resetRowActive)
|
|
51
|
+
return { ...state, activeRowId: undefined };
|
|
52
|
+
return state;
|
|
53
|
+
}
|
|
54
|
+
function useInstance(instance) {
|
|
55
|
+
const { data, rows, autoResetActive = true, plugins, dispatch, state: { activeRowId }, } = instance;
|
|
56
|
+
ensurePluginOrder(plugins, ['useFilters', 'useGroupBy', 'useSortBy'], pluginName);
|
|
57
|
+
const isRowActive = useCallback((row) => activeRowId &&
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
(activeRowId === row.id || activeRowId === row.original?.id), [activeRowId]);
|
|
60
|
+
const activeFlatRow = useMemo(() => {
|
|
61
|
+
let activeFlatRow;
|
|
62
|
+
rows.forEach((row) => {
|
|
63
|
+
const isActive = isRowActive(row);
|
|
64
|
+
row.isActive = !!isActive;
|
|
65
|
+
if (isActive)
|
|
66
|
+
activeFlatRow = row;
|
|
67
|
+
});
|
|
68
|
+
return activeFlatRow;
|
|
69
|
+
}, [isRowActive, rows]);
|
|
70
|
+
const getAutoResetActive = useGetLatest(autoResetActive);
|
|
71
|
+
// Bypass any effects from firing when this changes
|
|
72
|
+
useMountedLayoutEffect(() => {
|
|
73
|
+
if (getAutoResetActive()) {
|
|
74
|
+
dispatch({ type: actions.initRowActive });
|
|
75
|
+
}
|
|
76
|
+
}, [dispatch, data]);
|
|
77
|
+
const toggleRowActive = useCallback((id, value) => {
|
|
78
|
+
dispatch({ type: actions.toggleRowActive, id, value });
|
|
79
|
+
}, [dispatch]);
|
|
80
|
+
const resetRowActive = useCallback(() => {
|
|
81
|
+
dispatch({ type: actions.resetRowActive });
|
|
82
|
+
}, [dispatch]);
|
|
83
|
+
const activeRows = useMemo(() => {
|
|
84
|
+
const activeRows = [];
|
|
85
|
+
const handleRow = (row) => {
|
|
86
|
+
row.isActive = isRowActive(row);
|
|
87
|
+
activeRows.push(row);
|
|
88
|
+
};
|
|
89
|
+
rows.forEach((row) => handleRow(row));
|
|
90
|
+
return rows;
|
|
91
|
+
}, [isRowActive, rows]);
|
|
92
|
+
Object.assign(instance, {
|
|
93
|
+
activeFlatRow,
|
|
94
|
+
rows: activeRows,
|
|
95
|
+
toggleRowActive,
|
|
96
|
+
resetRowActive,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function prepareRow(row, { instance }) {
|
|
100
|
+
row.toggleRowActive = (set) => instance.toggleRowActive(row.id, set);
|
|
101
|
+
row.getToggleRowActiveProps = makePropGetter(
|
|
102
|
+
// @ts-ignore
|
|
103
|
+
instance.getHooks().getToggleRowActiveProps, { instance, row });
|
|
104
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TableCellEditableAction } from "../components/Table/TableCellEditableAction";
|
|
2
|
+
export const useRowEditActions = (hooks) => hooks.visibleColumns.push((columns) => [
|
|
3
|
+
...columns,
|
|
4
|
+
{
|
|
5
|
+
id: 'actions',
|
|
6
|
+
Cell: TableCellEditableAction,
|
|
7
|
+
// specify width, so table-layout: fixed could be used
|
|
8
|
+
width: 56,
|
|
9
|
+
disableSortBy: true,
|
|
10
|
+
},
|
|
11
|
+
]);
|
|
12
|
+
useRowEditActions.pluginName = 'useRowEditActions';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from "../mui";
|
|
3
|
+
const ROW_SELECT_CHECKBOX_COLUMN_ID = 'selection';
|
|
4
|
+
export const useRowExpandToggle = (hooks) => hooks.visibleColumns.push((columns) => [
|
|
5
|
+
columns.find((col) => col.id === ROW_SELECT_CHECKBOX_COLUMN_ID),
|
|
6
|
+
{
|
|
7
|
+
id: 'expandToggle',
|
|
8
|
+
width: 32,
|
|
9
|
+
Cell: ({ row }) => (_jsx(Icon, { ...row.getToggleRowExpandedProps(), name: `chevron-${row.isExpanded ? 'down' : 'right'}`, "data-testid": "toggle-row-expanded-button" })),
|
|
10
|
+
},
|
|
11
|
+
...columns.filter((col) => col.id !== ROW_SELECT_CHECKBOX_COLUMN_ID),
|
|
12
|
+
].filter(Boolean));
|
|
13
|
+
useRowExpandToggle.pluginName = 'useRowExpandToggle';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Hooks, TableToggleRowsSelectedProps } from 'react-table';
|
|
3
|
+
export declare const IndeterminateCheckbox: import("react").ForwardRefExoticComponent<Partial<TableToggleRowsSelectedProps> & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export declare const IndeterminateRadio: import("react").ForwardRefExoticComponent<Partial<TableToggleRowsSelectedProps> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
interface RowSelectCheckboxProps {
|
|
6
|
+
pluginName: string;
|
|
7
|
+
id: string;
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
radio?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const createRowSelectCheckbox: ({ pluginName, id, indeterminate, radio, }: RowSelectCheckboxProps) => {
|
|
12
|
+
<D extends object>(hooks: Hooks<D>): number;
|
|
13
|
+
pluginName: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const useRowSelectCheckbox: {
|
|
16
|
+
<D extends object>(hooks: Hooks<D>): number;
|
|
17
|
+
pluginName: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const useIndeterminateRowSelectCheckbox: {
|
|
20
|
+
<D extends object>(hooks: Hooks<D>): number;
|
|
21
|
+
pluginName: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const useRowSelectRadio: {
|
|
24
|
+
<D extends object>(hooks: Hooks<D>): number;
|
|
25
|
+
pluginName: string;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Checkbox } from "../mui";
|
|
4
|
+
import { Radio } from '@mui/material';
|
|
5
|
+
export const IndeterminateCheckbox = forwardRef((props, ref) => _jsx(Checkbox, { ref: ref, ...props, size: "small", inline: true }));
|
|
6
|
+
export const IndeterminateRadio = forwardRef(({ indeterminate, ...props }, ref) => (_jsx(Radio, { ref: ref, ...props, size: "small" })));
|
|
7
|
+
export const createRowSelectCheckbox = ({ pluginName, id, indeterminate = false, radio = false, }) => {
|
|
8
|
+
const hook = (hooks) => hooks.visibleColumns.push((columns) => [
|
|
9
|
+
{
|
|
10
|
+
id,
|
|
11
|
+
// The header can use the table's getToggleAllRowsSelectedProps method
|
|
12
|
+
// to render a checkbox
|
|
13
|
+
Header: ({ getToggleAllRowsSelectedProps }) => indeterminate && !radio ? (_jsx(IndeterminateCheckbox, { ...getToggleAllRowsSelectedProps(), "data-testid": "select-all-rows-checkbox", "aria-label": "Select all rows" })) : null,
|
|
14
|
+
// The cell can use the individual row's getToggleRowSelectedProps method
|
|
15
|
+
// to the render a checkbox
|
|
16
|
+
Cell: ({ row, toggleAllRowsSelected, toggleRowSelected, }) => {
|
|
17
|
+
if (row.hidden) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return radio ? (_jsx(IndeterminateRadio, { "data-testid": "row-radio-select", ...row.getToggleRowSelectedProps({
|
|
21
|
+
onChange: () => {
|
|
22
|
+
toggleAllRowsSelected(false);
|
|
23
|
+
toggleRowSelected(row.id, true);
|
|
24
|
+
},
|
|
25
|
+
}) })) : (_jsx(IndeterminateCheckbox, { ...row.getToggleRowSelectedProps(), "data-testid": "row-checkbox-select", "aria-label": "Select row" }));
|
|
26
|
+
},
|
|
27
|
+
// specify width, so table-layout: fixed could be used
|
|
28
|
+
width: 40,
|
|
29
|
+
},
|
|
30
|
+
...columns,
|
|
31
|
+
]);
|
|
32
|
+
hook.pluginName = pluginName;
|
|
33
|
+
return hook;
|
|
34
|
+
};
|
|
35
|
+
export const useRowSelectCheckbox = createRowSelectCheckbox({
|
|
36
|
+
pluginName: 'useRowSelectCheckbox',
|
|
37
|
+
id: 'selection',
|
|
38
|
+
});
|
|
39
|
+
export const useIndeterminateRowSelectCheckbox = createRowSelectCheckbox({
|
|
40
|
+
pluginName: 'useRowSelectCheckbox',
|
|
41
|
+
id: 'selection',
|
|
42
|
+
indeterminate: true,
|
|
43
|
+
});
|
|
44
|
+
export const useRowSelectRadio = createRowSelectCheckbox({
|
|
45
|
+
pluginName: 'useRowSelectRadio',
|
|
46
|
+
id: 'radioSelection',
|
|
47
|
+
radio: true,
|
|
48
|
+
});
|