@turnit-ou/shared 0.0.0-stage → 2.18.1
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 +89 -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,125 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { Theme } from '../../mui/theme';
|
|
3
|
+
import type { PaperClasses as MuiPaperClasses } from '@mui/material/Paper/paperClasses';
|
|
4
|
+
|
|
5
|
+
import type { TooltipProps as MuiTooltipProps } from '@mui/material/Tooltip';
|
|
6
|
+
import {
|
|
7
|
+
PaletteColor,
|
|
8
|
+
PaletteColorOptions,
|
|
9
|
+
} from '@mui/material/styles/createPalette';
|
|
10
|
+
|
|
11
|
+
declare module '@mui/material/styles' {
|
|
12
|
+
interface TypographyVariants {
|
|
13
|
+
title: CSSProperties;
|
|
14
|
+
subtitle: CSSProperties;
|
|
15
|
+
paragraph: CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// allow configuration using `createTheme`
|
|
19
|
+
interface TypographyVariantsOptions {
|
|
20
|
+
title?: CSSProperties;
|
|
21
|
+
subtitle?: CSSProperties;
|
|
22
|
+
paragraph?: CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface TypeText {
|
|
26
|
+
warning: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface TypeAction {
|
|
30
|
+
hoverText: string;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare module '@mui/material/styles/createPalette' {
|
|
35
|
+
interface PaletteOptions {
|
|
36
|
+
icons?: {
|
|
37
|
+
main: string;
|
|
38
|
+
hover: string;
|
|
39
|
+
};
|
|
40
|
+
yellow?: PaletteColorOptions;
|
|
41
|
+
}
|
|
42
|
+
interface Palette {
|
|
43
|
+
icons?: {
|
|
44
|
+
main: string;
|
|
45
|
+
hover: string;
|
|
46
|
+
};
|
|
47
|
+
yellow?: PaletteColor;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare module '@mui/private-theming/defaultTheme' {
|
|
52
|
+
export interface DefaultTheme extends Theme {}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare module '@mui/material/Divider' {
|
|
56
|
+
interface DividerClasses {
|
|
57
|
+
transparent: true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface DividerPropsVariantOverrides {
|
|
61
|
+
transparent: true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
declare module '@mui/material/Button' {
|
|
66
|
+
interface ButtonClasses {
|
|
67
|
+
textYellow: true;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface ButtonPropsColorOverrides {
|
|
71
|
+
yellow: true;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare module '@mui/material/Paper/Paper' {
|
|
76
|
+
export interface PaperPropsVariantOverrides {
|
|
77
|
+
surface: true;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare module '@mui/material/Paper/paperClasses' {
|
|
82
|
+
export interface PaperClasses extends MuiPaperClasses {
|
|
83
|
+
surface: true;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare module '@mui/material/Tooltip/Tooltip' {
|
|
88
|
+
interface TooltipProps extends MuiTooltipProps {
|
|
89
|
+
theme?: 'light' | 'dark';
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
declare module '@mui/material/Typography/Typography' {
|
|
94
|
+
interface TypographyPropsVariantOverrides {
|
|
95
|
+
title: true;
|
|
96
|
+
h1: true;
|
|
97
|
+
h2: true;
|
|
98
|
+
subtitle: true;
|
|
99
|
+
paragraph: true;
|
|
100
|
+
h3: false;
|
|
101
|
+
h4: false;
|
|
102
|
+
h5: false;
|
|
103
|
+
h6: false;
|
|
104
|
+
subtitle1: false;
|
|
105
|
+
subtitle2: false;
|
|
106
|
+
body1: true;
|
|
107
|
+
body2: true;
|
|
108
|
+
caption: true;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare module '@mui/material/Typography/Typography/typographyClasses' {
|
|
113
|
+
interface TypographyClasses {
|
|
114
|
+
title: string;
|
|
115
|
+
h1: string;
|
|
116
|
+
h2: string;
|
|
117
|
+
subtitle: string;
|
|
118
|
+
paragraph: string;
|
|
119
|
+
body1: string;
|
|
120
|
+
body2: string;
|
|
121
|
+
caption: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
type TypographyClassKey = keyof TypographyClasses;
|
|
125
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
type SortingRules = import('../../utils/sort').SortingRules;
|
|
2
|
+
|
|
3
|
+
type LowercaseKeys<T> = {
|
|
4
|
+
[K in keyof T as K extends string ? Uncapitalize<K> : never]: T[K];
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type SortBy<T> = 'SortBy' extends keyof T
|
|
8
|
+
? Omit<T, 'SortBy'> & { sortBy: SortingRules }
|
|
9
|
+
: 'sortBy' extends keyof T
|
|
10
|
+
? Omit<T, 'sortBy'> & { sortBy: SortingRules }
|
|
11
|
+
: T;
|
|
12
|
+
|
|
13
|
+
type RemoveAfterLastDot<
|
|
14
|
+
S extends string,
|
|
15
|
+
Delimiter extends string = '.',
|
|
16
|
+
> = S extends `${infer Prefix}${Delimiter}${infer Rest}`
|
|
17
|
+
? RemoveAfterLastDot<Rest, Delimiter>
|
|
18
|
+
: S;
|
|
19
|
+
|
|
20
|
+
export type RemoveAfterLastDotObject<T, Delimiter extends string = '.'> = {
|
|
21
|
+
[K in keyof T as RemoveAfterLastDot<string & K, Delimiter>]: T[K];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type QueryParams<
|
|
25
|
+
Schema,
|
|
26
|
+
Path extends keyof Schema,
|
|
27
|
+
Method extends keyof Schema[Path],
|
|
28
|
+
> = Schema[Path][Method] extends { parameters: { query?: infer Q } }
|
|
29
|
+
? 'SortBy' extends keyof Q
|
|
30
|
+
? LowercaseKeys<Omit<Q, 'SortBy'>> & { sortBy: SortingRules }
|
|
31
|
+
: 'sortBy' extends keyof Q
|
|
32
|
+
? LowercaseKeys<Omit<Q, 'sortBy'>> & { sortBy: SortingRules }
|
|
33
|
+
: LowercaseKeys<Q>
|
|
34
|
+
: never;
|
|
35
|
+
|
|
36
|
+
export type PathParams<
|
|
37
|
+
Schema,
|
|
38
|
+
Path extends keyof Schema,
|
|
39
|
+
Method extends keyof Schema[Path],
|
|
40
|
+
> = Schema[Path][Method] extends { parameters: { path?: object } }
|
|
41
|
+
? LowercaseKeys<Schema[Path][Method]['parameters']['path']>
|
|
42
|
+
: never;
|
|
43
|
+
|
|
44
|
+
export type Response<
|
|
45
|
+
Schema,
|
|
46
|
+
Path extends keyof Schema,
|
|
47
|
+
Method extends keyof Schema[Path],
|
|
48
|
+
> = Schema[Path][Method] extends {
|
|
49
|
+
responses: { ['200']: { content: { ['application/json']: object } } };
|
|
50
|
+
}
|
|
51
|
+
? Schema[Path][Method]['responses']['200']['content']['application/json']
|
|
52
|
+
: never;
|
|
53
|
+
|
|
54
|
+
export type Request<
|
|
55
|
+
Schema,
|
|
56
|
+
Path extends keyof Schema,
|
|
57
|
+
Method extends keyof Schema[Path],
|
|
58
|
+
> = Schema[Path][Method] extends {
|
|
59
|
+
requestBody?: { content: { ['application/json']: object } };
|
|
60
|
+
}
|
|
61
|
+
? Schema[Path][Method]['requestBody'] extends undefined
|
|
62
|
+
? never
|
|
63
|
+
: NonNullable<
|
|
64
|
+
Schema[Path][Method]['requestBody']
|
|
65
|
+
>['content']['application/json']
|
|
66
|
+
: never;
|
|
67
|
+
|
|
68
|
+
export type ArrayElement<ArrayType extends readonly unknown[]> =
|
|
69
|
+
ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
|
|
70
|
+
|
|
71
|
+
export type Nullable<T> = T | null | undefined;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { FieldState } from 'final-form';
|
|
3
|
+
import { UseFieldConfig } from 'react-final-form';
|
|
4
|
+
export const version: string;
|
|
5
|
+
|
|
6
|
+
declare module 'react-final-form-arrays' {
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
+
export interface FieldArrayRenderProps<FieldValue, T extends HTMLElement> {
|
|
9
|
+
fields: {
|
|
10
|
+
forEach: (iterator: (name: string, index: number) => void) => void;
|
|
11
|
+
insert: (index: number, value: FieldValue) => void;
|
|
12
|
+
map: <R>(iterator: (name: string, index: number) => R) => R[];
|
|
13
|
+
move: (from: number, to: number) => void;
|
|
14
|
+
update: (index: number, value: FieldValue) => void;
|
|
15
|
+
name: string;
|
|
16
|
+
pop: () => FieldValue;
|
|
17
|
+
push: (value: FieldValue) => void;
|
|
18
|
+
remove: (index: number) => FieldValue;
|
|
19
|
+
removeBatch: (index: Array<number>) => FieldValue;
|
|
20
|
+
shift: () => FieldValue;
|
|
21
|
+
swap: (indexA: number, indexB: number) => void;
|
|
22
|
+
unshift: (value: FieldValue) => void;
|
|
23
|
+
value: FieldValue[];
|
|
24
|
+
} & FieldState<FieldValue[]>;
|
|
25
|
+
meta: Partial<{
|
|
26
|
+
// TODO: Make a diff of `FieldState` without all the functions
|
|
27
|
+
active: boolean;
|
|
28
|
+
dirty: boolean;
|
|
29
|
+
dirtySinceLastSubmit: boolean;
|
|
30
|
+
error: any;
|
|
31
|
+
initial: FieldValue[];
|
|
32
|
+
invalid: boolean;
|
|
33
|
+
pristine: boolean;
|
|
34
|
+
submitError: any;
|
|
35
|
+
submitFailed: boolean;
|
|
36
|
+
submitSucceeded: boolean;
|
|
37
|
+
touched: boolean;
|
|
38
|
+
valid: boolean;
|
|
39
|
+
visited: boolean;
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface RenderableProps<T> {
|
|
44
|
+
children?: ((props: T) => React.ReactNode) | React.ReactNode;
|
|
45
|
+
component?: React.ComponentType<T> | string;
|
|
46
|
+
render?: (props: T) => React.ReactNode;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface UseFieldArrayConfig<FieldValue>
|
|
50
|
+
extends UseFieldConfig<FieldValue[]> {
|
|
51
|
+
isEqual?: (a: any[], b: any[]) => boolean;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface FieldArrayProps<FieldValue, T extends HTMLElement>
|
|
55
|
+
extends UseFieldArrayConfig<FieldValue>,
|
|
56
|
+
RenderableProps<FieldArrayRenderProps<FieldValue, T>> {
|
|
57
|
+
name: string;
|
|
58
|
+
[otherProp: string]: any;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const FieldArray: <
|
|
62
|
+
FieldValue = any,
|
|
63
|
+
T extends HTMLElement = HTMLElement,
|
|
64
|
+
>(
|
|
65
|
+
props: FieldArrayProps<FieldValue, T>
|
|
66
|
+
) => React.ReactElement;
|
|
67
|
+
|
|
68
|
+
export function useFieldArray<
|
|
69
|
+
FieldValue = any,
|
|
70
|
+
T extends HTMLElement = HTMLElement,
|
|
71
|
+
>(
|
|
72
|
+
name: string,
|
|
73
|
+
config?: UseFieldArrayConfig<FieldValue>
|
|
74
|
+
): FieldArrayRenderProps<FieldValue, T>;
|
|
75
|
+
}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Column,
|
|
3
|
+
IdType,
|
|
4
|
+
PropGetter,
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6
|
+
TableCommonProps,
|
|
7
|
+
UseColumnOrderInstanceProps,
|
|
8
|
+
UseColumnOrderState,
|
|
9
|
+
UseExpandedHooks,
|
|
10
|
+
UseExpandedInstanceProps,
|
|
11
|
+
UseExpandedOptions,
|
|
12
|
+
UseExpandedRowProps,
|
|
13
|
+
UseExpandedState,
|
|
14
|
+
UseFiltersColumnOptions,
|
|
15
|
+
UseFiltersColumnProps,
|
|
16
|
+
UseFiltersInstanceProps,
|
|
17
|
+
UseFiltersOptions,
|
|
18
|
+
UseFiltersState,
|
|
19
|
+
UseGlobalFiltersColumnOptions,
|
|
20
|
+
UseGlobalFiltersInstanceProps,
|
|
21
|
+
UseGlobalFiltersOptions,
|
|
22
|
+
UseGlobalFiltersState,
|
|
23
|
+
UseGroupByCellProps,
|
|
24
|
+
UseGroupByColumnOptions,
|
|
25
|
+
UseGroupByColumnProps,
|
|
26
|
+
UseGroupByHooks,
|
|
27
|
+
UseGroupByInstanceProps,
|
|
28
|
+
UseGroupByOptions,
|
|
29
|
+
UseGroupByRowProps,
|
|
30
|
+
UseGroupByState,
|
|
31
|
+
UsePaginationInstanceProps,
|
|
32
|
+
UsePaginationOptions,
|
|
33
|
+
UsePaginationState,
|
|
34
|
+
UseResizeColumnsColumnOptions,
|
|
35
|
+
UseResizeColumnsColumnProps,
|
|
36
|
+
UseResizeColumnsOptions,
|
|
37
|
+
UseResizeColumnsState,
|
|
38
|
+
// UseRowActiveHooks,
|
|
39
|
+
// UseRowActiveInstanceProps,
|
|
40
|
+
// UseRowActiveOptions,
|
|
41
|
+
// UseRowActiveRowProps,
|
|
42
|
+
// UseRowActiveState,
|
|
43
|
+
UseRowSelectHooks,
|
|
44
|
+
UseRowSelectInstanceProps,
|
|
45
|
+
UseRowSelectOptions,
|
|
46
|
+
UseRowSelectRowProps,
|
|
47
|
+
UseRowSelectState,
|
|
48
|
+
UseRowStateInstanceProps,
|
|
49
|
+
UseRowStateLocalState,
|
|
50
|
+
UseRowStateOptions,
|
|
51
|
+
UseRowStateState,
|
|
52
|
+
UseSortByColumnOptions,
|
|
53
|
+
UseSortByColumnProps,
|
|
54
|
+
UseSortByHooks,
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
56
|
+
UseSortByInstanceProps,
|
|
57
|
+
UseSortByOptions,
|
|
58
|
+
UseSortByState,
|
|
59
|
+
} from 'react-table';
|
|
60
|
+
import { FieldArrayRenderProps } from '@types/react-final-form-arrays';
|
|
61
|
+
import { SxProps } from '@mui/system';
|
|
62
|
+
import { Theme } from '@mui/material';
|
|
63
|
+
import { PaginationParams, Pagination } from 'dto/pagination';
|
|
64
|
+
import { MouseEventHandler, MutableRefObject } from 'react';
|
|
65
|
+
import { FormApi } from 'final-form';
|
|
66
|
+
|
|
67
|
+
type SortingRules = import('../../utils/sort').SortingRules;
|
|
68
|
+
|
|
69
|
+
declare module 'react-table' {
|
|
70
|
+
/**
|
|
71
|
+
* Custom hooks
|
|
72
|
+
*/
|
|
73
|
+
//#region useRowActive
|
|
74
|
+
export function useRowActive<D extends object = {}>(hooks: Hooks<D>): void;
|
|
75
|
+
|
|
76
|
+
export namespace useRowActive {
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
78
|
+
const pluginName = 'useRowActive';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface TableCommonProps {
|
|
82
|
+
sx?: SxProps<Theme>;
|
|
83
|
+
onClick?: MouseEventHandler;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface TableToggleActiveCommonProps extends TableCommonProps {
|
|
87
|
+
onChange?: (() => void) | undefined;
|
|
88
|
+
active?: boolean | undefined;
|
|
89
|
+
title?: string | undefined;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface TableToggleRowActiveProps
|
|
93
|
+
extends TableToggleActiveCommonProps {}
|
|
94
|
+
|
|
95
|
+
export type UseRowActiveOptions<D extends object> = Partial<{
|
|
96
|
+
manualRowActiveKey: IdType<D>;
|
|
97
|
+
autoResetSelectedRow: boolean;
|
|
98
|
+
activeSubRow: boolean;
|
|
99
|
+
}>;
|
|
100
|
+
|
|
101
|
+
export interface UseRowActiveHooks<D extends object> {
|
|
102
|
+
getToggleRowActiveProps: Array<PropGetter<D, TableToggleRowActiveProps>>;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface UseRowActiveState {
|
|
106
|
+
activeRowId: string | number;
|
|
107
|
+
}
|
|
108
|
+
// custom props for server side pagination
|
|
109
|
+
export interface UseServerSidePaginationProps<D extends object> {
|
|
110
|
+
total?: number;
|
|
111
|
+
offset?: number;
|
|
112
|
+
limit?: number;
|
|
113
|
+
sortBy?: SortingRules;
|
|
114
|
+
onPageChange?: (params: PaginationParams) => Promise<void | Pagination<D>>;
|
|
115
|
+
onSortingChange?: (params: SortingRules) => Promise<void>;
|
|
116
|
+
}
|
|
117
|
+
export type FormTableRowValue<D extends object> = Array<D>;
|
|
118
|
+
export type FormTableValues<D, E extends object = unknown> = E extends infer R
|
|
119
|
+
? {
|
|
120
|
+
rows: Array<D>;
|
|
121
|
+
} & {
|
|
122
|
+
[key in keyof R]: R[key];
|
|
123
|
+
}
|
|
124
|
+
: {
|
|
125
|
+
rows: Array<D>;
|
|
126
|
+
[key: string]: unknown;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// customFieldArray prop
|
|
130
|
+
export interface UseFormTableInstanceProps<D extends object> {
|
|
131
|
+
form?: FormApi<FormTableValues<D>>;
|
|
132
|
+
fieldArray?: FieldArrayRenderProps<D, HTMLElement>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface UseFormTableProps<D extends object, E extends object = {}> {
|
|
136
|
+
form?: FormApi<FormTableValues<D, E>>;
|
|
137
|
+
fieldArray?: FieldArrayRenderProps<D, HTMLElement>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface UseRowActiveInstanceProps<D extends object> {
|
|
141
|
+
toggleRowActive: (rowId: IdType<D>, set?: boolean) => void;
|
|
142
|
+
resetRowActive: () => void;
|
|
143
|
+
activeFlatRow: Row<D>;
|
|
144
|
+
manualRowActiveKey?: 'isActive' | string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
148
|
+
export interface UseRowActiveRowProps<D extends object> {
|
|
149
|
+
isActive: boolean;
|
|
150
|
+
toggleRowActive: (set?: boolean) => void;
|
|
151
|
+
getToggleRowActiveProps: (
|
|
152
|
+
props?: Partial<TableToggleRowActiveProps>
|
|
153
|
+
) => TableToggleRowActiveProps;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface UseSortByInstanceProps<D extends object> {
|
|
157
|
+
sortedRows: Array<Row<D>>;
|
|
158
|
+
sortedFlatRows: Array<Row<D>>;
|
|
159
|
+
}
|
|
160
|
+
//#endregion
|
|
161
|
+
/**
|
|
162
|
+
* __end Custom hooks
|
|
163
|
+
*/
|
|
164
|
+
|
|
165
|
+
// take this file as-is, or comment out the sections that don't apply to your plugin configuration
|
|
166
|
+
|
|
167
|
+
export interface TableOptions<D extends object, E extends object = {}>
|
|
168
|
+
extends UseExpandedOptions<D>,
|
|
169
|
+
UseFiltersOptions<D>,
|
|
170
|
+
UseGlobalFiltersOptions<D>,
|
|
171
|
+
UseGroupByOptions<D>,
|
|
172
|
+
UsePaginationOptions<D>,
|
|
173
|
+
UseResizeColumnsOptions<D>,
|
|
174
|
+
UseRowSelectOptions<D>,
|
|
175
|
+
UseRowActiveOptions<D>,
|
|
176
|
+
UseRowStateOptions<D>,
|
|
177
|
+
UseSortByOptions<D>,
|
|
178
|
+
UseFormTableProps<D, E>,
|
|
179
|
+
UseServerSidePaginationProps<D>,
|
|
180
|
+
// note that having Record here allows you to add anything to the options, this matches the spirit of the
|
|
181
|
+
// underlying js library, but might be cleaner if it's replaced by a more specific type that matches your
|
|
182
|
+
// feature set, this is a safe default.
|
|
183
|
+
Record<string, unknown> {
|
|
184
|
+
columns: ReadonlyArray<Column<D>>;
|
|
185
|
+
data: Array<D>;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export interface Hooks<
|
|
189
|
+
D extends Record<string, unknown> = Record<string, unknown>,
|
|
190
|
+
> extends UseExpandedHooks<D>,
|
|
191
|
+
UseGroupByHooks<D>,
|
|
192
|
+
UseRowSelectHooks<D>,
|
|
193
|
+
UseRowActiveHooks<D>,
|
|
194
|
+
UseSortByHooks<D> {}
|
|
195
|
+
|
|
196
|
+
export interface TableInstance<
|
|
197
|
+
D extends Record<string, unknown> = Record<string, unknown>,
|
|
198
|
+
> extends UseColumnOrderInstanceProps<D>,
|
|
199
|
+
UseExpandedInstanceProps<D>,
|
|
200
|
+
UseFiltersInstanceProps<D>,
|
|
201
|
+
UseGlobalFiltersInstanceProps<D>,
|
|
202
|
+
UseGroupByInstanceProps<D>,
|
|
203
|
+
UsePaginationInstanceProps<D>,
|
|
204
|
+
UseRowSelectInstanceProps<D>,
|
|
205
|
+
UseRowActiveInstanceProps<D>,
|
|
206
|
+
UseRowStateInstanceProps<D>,
|
|
207
|
+
UseSortByInstanceProps<D>,
|
|
208
|
+
UseFormTableInstanceProps<D>,
|
|
209
|
+
UseServerSidePaginationProps<D> {
|
|
210
|
+
node: MutableRefObject<HTMLTableElement>;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export interface TableState<
|
|
214
|
+
D extends Record<string, unknown> = Record<string, unknown>,
|
|
215
|
+
> extends UseColumnOrderState<D>,
|
|
216
|
+
UseExpandedState<D>,
|
|
217
|
+
UseFiltersState<D>,
|
|
218
|
+
UseGlobalFiltersState<D>,
|
|
219
|
+
UseGroupByState<D>,
|
|
220
|
+
UsePaginationState<D>,
|
|
221
|
+
UseResizeColumnsState<D>,
|
|
222
|
+
UseRowSelectState<D>,
|
|
223
|
+
UseRowActiveState,
|
|
224
|
+
UseRowStateState<D>,
|
|
225
|
+
UseSortByState<D> {}
|
|
226
|
+
|
|
227
|
+
export interface ColumnInterface<
|
|
228
|
+
D extends Record<string, unknown> = Record<string, unknown>,
|
|
229
|
+
> extends UseFiltersColumnOptions<D>,
|
|
230
|
+
UseGlobalFiltersColumnOptions<D>,
|
|
231
|
+
UseGroupByColumnOptions<D>,
|
|
232
|
+
UseResizeColumnsColumnOptions<D>,
|
|
233
|
+
UseSortByColumnOptions<D> {}
|
|
234
|
+
|
|
235
|
+
export interface ColumnInstance<
|
|
236
|
+
D extends Record<string, unknown> = Record<string, unknown>,
|
|
237
|
+
> extends UseFiltersColumnProps<D>,
|
|
238
|
+
UseGroupByColumnProps<D>,
|
|
239
|
+
UseResizeColumnsColumnProps<D>,
|
|
240
|
+
UseSortByColumnProps<D> {
|
|
241
|
+
className?: string; // custom property
|
|
242
|
+
ellipsisLines?: number; // custom property
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// custom cell updater
|
|
246
|
+
export type StateUpdater<T> = T | ((prev: T) => T);
|
|
247
|
+
|
|
248
|
+
// custom UseRowStateRowCustomProps
|
|
249
|
+
type CellState = {
|
|
250
|
+
[key: string]: unknown;
|
|
251
|
+
};
|
|
252
|
+
export interface UseRowStatCellCustomProps<D extends object> {
|
|
253
|
+
state: UseRowStateLocalState<D>;
|
|
254
|
+
setState: <T extends CellState>(updater: StateUpdater<T>) => void;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface Cell<
|
|
258
|
+
D extends Record<string, unknown> = Record<string, unknown>,
|
|
259
|
+
> extends UseGroupByCellProps<D>,
|
|
260
|
+
UseRowStatCellCustomProps<D> {}
|
|
261
|
+
|
|
262
|
+
export type UseRowStateCustomLocalState = {
|
|
263
|
+
creatable?: boolean;
|
|
264
|
+
editable?: boolean;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
// custom UseRowStateRowCustomProps
|
|
268
|
+
type RowState = UseRowStateCustomLocalState & {
|
|
269
|
+
cellState: CellState;
|
|
270
|
+
[key: string]: unknown;
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
export interface UseRowStateRowCustomProps<D extends object> {
|
|
274
|
+
state: UseRowStateLocalState<D> & UseRowStateCustomLocalState;
|
|
275
|
+
setState: <T extends RowState>(updater: StateUpdater<T>) => void;
|
|
276
|
+
hidden?: boolean;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface Row<
|
|
280
|
+
D extends Record<string, unknown> = Record<string, unknown>,
|
|
281
|
+
> extends UseExpandedRowProps<D>,
|
|
282
|
+
UseGroupByRowProps<D>,
|
|
283
|
+
UseRowSelectRowProps<D>,
|
|
284
|
+
UseRowActiveRowProps<D>,
|
|
285
|
+
UseRowStateRowCustomProps<D> {}
|
|
286
|
+
|
|
287
|
+
export interface MetaBase<D extends object> {
|
|
288
|
+
instance: TableInstance<D>;
|
|
289
|
+
userProps: unknown;
|
|
290
|
+
row: Partial<Row<D>>;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { Icon } from "../../mui/Icon";
|
|
5
|
+
import { Stack, Typography } from '@mui/material';
|
|
6
|
+
import { makeStyles } from '@mui/styles';
|
|
7
|
+
import { alpha } from '@mui/material/styles';
|
|
8
|
+
const useStyles = makeStyles((theme) => ({
|
|
9
|
+
root: {
|
|
10
|
+
width: '80vw',
|
|
11
|
+
color: theme.palette.secondary.main,
|
|
12
|
+
background: theme.palette.common.white,
|
|
13
|
+
'&, & $content': {
|
|
14
|
+
borderRadius: 3,
|
|
15
|
+
},
|
|
16
|
+
marginBottom: 8,
|
|
17
|
+
},
|
|
18
|
+
content: {
|
|
19
|
+
padding: '11px 18px',
|
|
20
|
+
border: '1px solid transparent',
|
|
21
|
+
},
|
|
22
|
+
icon: {},
|
|
23
|
+
error: {
|
|
24
|
+
background: alpha(theme.palette.error.main, 0.1),
|
|
25
|
+
borderColor: theme.palette.error.main,
|
|
26
|
+
'& $icon': {
|
|
27
|
+
color: theme.palette.error.main,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
success: {
|
|
31
|
+
background: alpha(theme.palette.success.main, 0.1),
|
|
32
|
+
borderColor: theme.palette.success.main,
|
|
33
|
+
'& $icon': {
|
|
34
|
+
color: theme.palette.success.main,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
info: {
|
|
38
|
+
background: alpha(theme.palette.icons.hover, 0.1),
|
|
39
|
+
borderColor: theme.palette.icons.hover,
|
|
40
|
+
'& $icon': {
|
|
41
|
+
color: theme.palette.icons.hover,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
closeIcon: {
|
|
45
|
+
cursor: 'pointer',
|
|
46
|
+
},
|
|
47
|
+
}), {
|
|
48
|
+
name: 'AlertTemplate',
|
|
49
|
+
});
|
|
50
|
+
export const AlertTemplate = ({ message, options, close, }) => {
|
|
51
|
+
const classes = useStyles();
|
|
52
|
+
const iconName = useMemo(() => {
|
|
53
|
+
switch (options.type) {
|
|
54
|
+
case 'info': {
|
|
55
|
+
return 'info-circle';
|
|
56
|
+
}
|
|
57
|
+
case 'success': {
|
|
58
|
+
return 'check-circle';
|
|
59
|
+
}
|
|
60
|
+
case 'error': {
|
|
61
|
+
return 'alert-circle';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}, [options.type]);
|
|
65
|
+
return (_jsx("div", { className: classes.root, children: _jsxs(Stack, { direction: "row", alignItems: "center", className: classNames(classes.content, classes[options.type]), children: [_jsx(Icon, { className: classes.icon, name: iconName, size: 24 }), _jsx(Typography, { sx: { px: 1, flexGrow: 1 }, "data-testid": "alert-message", children: message }), _jsx(Icon, { name: "close", className: classes.closeIcon, onClick: close, "data-testid": "alert-close" })] }) }));
|
|
66
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { positions } from 'react-alert';
|
|
2
|
+
import { AlertTemplate } from "./AlertTemplate";
|
|
3
|
+
import { theme } from "../../mui";
|
|
4
|
+
export { AlertTemplate };
|
|
5
|
+
export const alertProviderProps = {
|
|
6
|
+
template: AlertTemplate,
|
|
7
|
+
position: positions.TOP_CENTER,
|
|
8
|
+
timeout: 3000,
|
|
9
|
+
containerStyle: {
|
|
10
|
+
marginTop: 56,
|
|
11
|
+
pointerEvents: 'all',
|
|
12
|
+
zIndex: theme.zIndex.modal + 1,
|
|
13
|
+
left: '10vw',
|
|
14
|
+
right: '10vw',
|
|
15
|
+
width: 'auto',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps, ModalProps } from "../mui";
|
|
3
|
+
export declare type ConfirmButtonProps = Partial<Pick<ModalProps, 'title'>> & Omit<ButtonProps, 'title' | 'onClick' | 'onClickAsync'> & {
|
|
4
|
+
onConfirm: Function;
|
|
5
|
+
onCancel?: (e: unknown) => void;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
/** Props forwarded to the confirmation dialog, e.g. its data-testid. */
|
|
9
|
+
modalProps?: Partial<ModalProps>;
|
|
10
|
+
};
|
|
11
|
+
export declare function ConfirmButton({ onConfirm, onCancel, className, title, children, color, description, modalProps, ...props }: PropsWithChildren<ConfirmButtonProps>): JSX.Element;
|
|
12
|
+
export declare type ConfirmDeleteButtonProps = Omit<ConfirmButtonProps, 'children'> & Partial<Pick<ConfirmButtonProps, 'children'>> & {
|
|
13
|
+
isOnlyIcon?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare function ConfirmDeleteButton({ children, isOnlyIcon, ...props }: ConfirmDeleteButtonProps): JSX.Element;
|