@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,89 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import { Select } from "../../mui/Select";
|
|
4
|
+
import { Tooltip } from "../../mui/Tooltip";
|
|
5
|
+
import { Icon } from "../../mui/Icon";
|
|
6
|
+
import { makeStyles } from '@mui/styles';
|
|
7
|
+
import { AppBar, Stack } from '@mui/material';
|
|
8
|
+
import sortBy from 'lodash/sortBy';
|
|
9
|
+
import { capitalize } from "../../helpers/capitalize";
|
|
10
|
+
import { TransTooltip } from "../../i18n/trans/tooltip";
|
|
11
|
+
import { LanguageSelect } from './LanguageSelect';
|
|
12
|
+
import { MenuItems } from './MenuItems';
|
|
13
|
+
import { ModuleIcon } from "./ModuleIcon";
|
|
14
|
+
import { getRedirectedPath } from "../../utils/redirect";
|
|
15
|
+
import { setSigningOut } from "../../services/api";
|
|
16
|
+
import { AllowedBusinessEntityModal } from "./AllowedBusinessEntityModal";
|
|
17
|
+
import { BusinessEntityType, useAllowedBusinessEntities } from "../../hooks";
|
|
18
|
+
import { AccessibilityModal } from "./AccessibilityModal";
|
|
19
|
+
import { getAccessabilityValue } from "../../utils";
|
|
20
|
+
import { useTranslation } from "../../hooks/useTranslation";
|
|
21
|
+
import classNames from 'classnames';
|
|
22
|
+
const useStyles = makeStyles((theme) => ({
|
|
23
|
+
root: {
|
|
24
|
+
height: '48px',
|
|
25
|
+
boxShadow: '0 1px 4px rgba(0, 0, 0, 0.1)',
|
|
26
|
+
background: 'white',
|
|
27
|
+
display: 'flex',
|
|
28
|
+
flexDirection: 'row',
|
|
29
|
+
justifyContent: 'space-between',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
position: 'sticky',
|
|
32
|
+
top: 0,
|
|
33
|
+
zIndex: theme.zIndex.drawer + 1,
|
|
34
|
+
},
|
|
35
|
+
businessEntitySelect: {
|
|
36
|
+
width: 250,
|
|
37
|
+
'&& .MuiOutlinedInput-root': {
|
|
38
|
+
'& > span': {
|
|
39
|
+
pointerEvents: 'none',
|
|
40
|
+
},
|
|
41
|
+
border: 'none',
|
|
42
|
+
height: 48,
|
|
43
|
+
padding: 0,
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
'&.Mui-focused': {
|
|
46
|
+
boxShadow: 'none',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
'& .MuiAutocomplete-endAdornment': {
|
|
50
|
+
marginRight: 4,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
accessibilityBusinessEntitySelect: {
|
|
54
|
+
border: `1px solid ${theme.palette.secondary.main}`,
|
|
55
|
+
borderRadius: 3,
|
|
56
|
+
},
|
|
57
|
+
}), {
|
|
58
|
+
name: 'Header',
|
|
59
|
+
});
|
|
60
|
+
export const Header = (props) => {
|
|
61
|
+
const { additionalControls, backLinks, pathname, steps, onMenuClick, onLogout, businessEntities = [], currentBusinessEntityId, onBusinessEntityChange, helpPath, moduleItems, allowedRoles = Object.values(BusinessEntityType), iconUrl, } = props;
|
|
62
|
+
const allowedBusinessEntities = useAllowedBusinessEntities(businessEntities, allowedRoles);
|
|
63
|
+
const allowedBusinessEntityIds = useMemo(() => allowedBusinessEntities.map(({ id }) => id), [allowedBusinessEntities]);
|
|
64
|
+
const classes = useStyles();
|
|
65
|
+
const { t } = useTranslation();
|
|
66
|
+
const accessibility = useMemo(getAccessabilityValue, []);
|
|
67
|
+
const businessEntityOptions = useMemo(() => sortBy(businessEntities, 'contactType', 'name').map(({ id, name, contactType }) => ({
|
|
68
|
+
value: id,
|
|
69
|
+
label: name,
|
|
70
|
+
contactType,
|
|
71
|
+
isValid: allowedBusinessEntityIds.includes(id),
|
|
72
|
+
})), [allowedBusinessEntityIds, businessEntities]);
|
|
73
|
+
const currentBusinessEntity = useMemo(() => businessEntityOptions.find(({ value }) => value === currentBusinessEntityId), [businessEntityOptions, currentBusinessEntityId]);
|
|
74
|
+
const handleBusinessEntityChange = useCallback((value) => {
|
|
75
|
+
if (onBusinessEntityChange) {
|
|
76
|
+
onBusinessEntityChange(value);
|
|
77
|
+
}
|
|
78
|
+
window.location.replace(getRedirectedPath(pathname));
|
|
79
|
+
}, [onBusinessEntityChange, pathname]);
|
|
80
|
+
return (_jsxs(AppBar, { className: classes.root, color: "default", "data-testid": "app-header", children: [_jsx(ModuleIcon, { moduleItems: moduleItems, iconUrl: iconUrl }), _jsx(MenuItems, { backLinks: backLinks, pathname: pathname, steps: steps, onMenuClick: onMenuClick }), _jsxs(Stack, { direction: "row", alignItems: "center", spacing: 2, pr: 2, height: "100%", children: [additionalControls, onBusinessEntityChange && (_jsxs(_Fragment, { children: [_jsx(Select, { "aria-label": t('field.organisation', 'Organisation'), className: classNames(classes.businessEntitySelect, {
|
|
81
|
+
[classes.accessibilityBusinessEntitySelect]: accessibility,
|
|
82
|
+
}), value: currentBusinessEntity, options: businessEntityOptions, onChange: handleBusinessEntityChange, startAdornment: _jsx(Icon, { name: "profile", size: 18, margin: true }), variant: "base", margin: "none",
|
|
83
|
+
// TODO, translate contactType
|
|
84
|
+
groupBy: (option) => capitalize(option.contactType.toLowerCase().replace(/_/g, ' ')) }), currentBusinessEntity?.isValid === false && (_jsx(AllowedBusinessEntityModal, { options: businessEntityOptions, onSelect: handleBusinessEntityChange }))] })), _jsx(LanguageSelect, {}), _jsx(AccessibilityModal, {}), _jsx(Tooltip, { content: _jsx(TransTooltip, { i18nKey: "help" }), children: _jsx(Icon, { id: "header-help-button", name: "question", ...(helpPath && { onClick: () => window.open(helpPath, '_blank') }), "data-testid": "header-help-tooltip", size: 18 }) }), onLogout && (_jsx(Tooltip, { content: _jsx(TransTooltip, { i18nKey: "logout" }), children: _jsx(Icon, { name: "logout", onClick: () => {
|
|
85
|
+
setSigningOut(true);
|
|
86
|
+
onLogout();
|
|
87
|
+
localStorage.removeItem('businessEntityId');
|
|
88
|
+
}, size: 18, "data-testid": "header-logout-button" }) }))] })] }));
|
|
89
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@mui/styles';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import Box from '@mui/material/Box';
|
|
5
|
+
const useStyles = makeStyles(() => ({
|
|
6
|
+
root: ({ width }) => ({
|
|
7
|
+
flexGrow: 1,
|
|
8
|
+
flexShrink: 1,
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'column',
|
|
11
|
+
// TODO, implement custom scrollbar styles
|
|
12
|
+
overflow: 'auto',
|
|
13
|
+
minHeight: 0,
|
|
14
|
+
...(typeof width !== 'undefined' && {
|
|
15
|
+
flexBasis: width,
|
|
16
|
+
maxWidth: width,
|
|
17
|
+
}),
|
|
18
|
+
}),
|
|
19
|
+
}), {
|
|
20
|
+
name: 'LayoutCol',
|
|
21
|
+
});
|
|
22
|
+
export const LayoutCol = (inProps) => {
|
|
23
|
+
const { className, width, children, ...props } = inProps;
|
|
24
|
+
const classes = useStyles({ width });
|
|
25
|
+
return (_jsx(Box, { className: classNames(classes.root, className), ...props, children: children }));
|
|
26
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { FC, ReactElement } from 'react';
|
|
2
|
+
import type { Theme } from "../../mui";
|
|
3
|
+
import type { BoxProps, CardProps } from '@mui/material';
|
|
4
|
+
import type { ClassKeyOfStyles, ClassNameMap } from '@mui/styles/withStyles/withStyles';
|
|
5
|
+
export declare type LayoutComponent = BoxProps['component'];
|
|
6
|
+
export interface LayoutProps extends Omit<BoxProps, 'classes' | 'padding'>, Pick<CardProps, 'elevation' | 'variant'> {
|
|
7
|
+
padding?: boolean;
|
|
8
|
+
header?: ReactElement;
|
|
9
|
+
footer?: ReactElement;
|
|
10
|
+
drawer?: ReactElement;
|
|
11
|
+
width?: [number, number?, number?];
|
|
12
|
+
height?: 'fit' | 'auto';
|
|
13
|
+
components?: {
|
|
14
|
+
root?: LayoutComponent;
|
|
15
|
+
paper?: LayoutComponent;
|
|
16
|
+
header?: LayoutComponent;
|
|
17
|
+
content?: LayoutComponent;
|
|
18
|
+
footer?: LayoutComponent;
|
|
19
|
+
};
|
|
20
|
+
className?: string;
|
|
21
|
+
classes?: Partial<ClassNameMap<ClassKeyOfStyles<typeof layoutStyles>>>;
|
|
22
|
+
/** @deprecated use classes instead */
|
|
23
|
+
componentClasses?: {
|
|
24
|
+
root?: string;
|
|
25
|
+
paper?: string;
|
|
26
|
+
content?: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
declare type ClassKey = 'root' | 'paper' | 'content' | 'col' | 'colLeft' | 'colMid' | 'colRight';
|
|
30
|
+
declare const layoutStyles: (theme: Theme) => import("@mui/styles").StyleRules<LayoutProps, ClassKey>;
|
|
31
|
+
export declare const Layout: FC<LayoutProps>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Children, Fragment } from 'react';
|
|
3
|
+
import { createStyles, makeStyles } from '@mui/styles';
|
|
4
|
+
import { Box, Card, CardContent, Divider } from '@mui/material';
|
|
5
|
+
import { LayoutCol } from "./LayoutCol";
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
const layoutStyles = (theme) => createStyles({
|
|
8
|
+
root: {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flex: ({ height }) => (height === 'auto' ? 'auto' : 1),
|
|
11
|
+
minHeight: ({ height }) => (height === 'auto' ? 'none' : 0),
|
|
12
|
+
padding: ({ padding = true }) => padding && theme.spacing(3),
|
|
13
|
+
},
|
|
14
|
+
paper: {
|
|
15
|
+
display: 'flex',
|
|
16
|
+
flexDirection: 'column',
|
|
17
|
+
justifyContent: 'space-between',
|
|
18
|
+
flex: 1,
|
|
19
|
+
minHeight: 0,
|
|
20
|
+
},
|
|
21
|
+
content: {
|
|
22
|
+
position: 'relative',
|
|
23
|
+
display: 'flex',
|
|
24
|
+
justifyContent: 'space-between',
|
|
25
|
+
flex: 1,
|
|
26
|
+
minHeight: 0,
|
|
27
|
+
padding: 0,
|
|
28
|
+
'&:last-child': {
|
|
29
|
+
padding: 0,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
col: {
|
|
33
|
+
'& ~ $col': {
|
|
34
|
+
borderLeft: `1px solid ${theme.palette.divider}`,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
colLeft: {},
|
|
38
|
+
colMid: {
|
|
39
|
+
flex: 1,
|
|
40
|
+
},
|
|
41
|
+
colRight: {},
|
|
42
|
+
});
|
|
43
|
+
const useStyles = makeStyles(layoutStyles, {
|
|
44
|
+
name: 'Layout',
|
|
45
|
+
});
|
|
46
|
+
export const Layout = (props) => {
|
|
47
|
+
const {
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
49
|
+
padding, header, drawer, footer, children, sx, width: [leftWidth, midWidth, rightWidth] = [240], components: { root: RootComponent = 'main', paper: CardComponent = 'div', header: HeaderComponent = Fragment, content: ContentComponent = 'div', footer: FooterComponent = 'div', } = {}, className, classes, componentClasses = {}, elevation = 2, variant, ...rest } = props;
|
|
50
|
+
const styles = useStyles(props);
|
|
51
|
+
const [left, mid, right] = Children.toArray(children);
|
|
52
|
+
return (_jsx(Box, { component: RootComponent, className: classNames(styles.root, className, componentClasses?.root, classes?.root), sx: sx, "data-testid": "layout-component", ...rest, children: _jsxs(Card, { component: CardComponent, className: classNames(styles.paper, componentClasses?.paper, classes?.paper), elevation: elevation, variant: variant, children: [header && (_jsxs(HeaderComponent, { children: [header, _jsx(Divider, {})] })), _jsxs(CardContent, { component: ContentComponent, className: classNames(styles.content, componentClasses?.content, classes?.content), children: [drawer, _jsx(LayoutCol, { className: classNames(styles.col, classes?.col, {
|
|
53
|
+
[classNames(styles.colLeft, classes?.colLeft)]: !!mid,
|
|
54
|
+
[classNames(styles.colMid, classes?.colMid)]: !mid,
|
|
55
|
+
}), ...(mid && { width: leftWidth }), children: left }), mid && (_jsx(LayoutCol, { className: classNames(styles.col, classes?.col, styles.colMid, classes?.colMid), sx: { '&&': { flexBasis: midWidth } }, children: mid })), right && (_jsx(LayoutCol, { component: "aside", className: classNames(styles.col, classes?.col, styles.colRight, classes?.colRight), width: rightWidth ?? leftWidth, children: right }))] }), footer && _jsx(FooterComponent, { children: footer })] }) }));
|
|
56
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
export interface LoadableChildrenProps {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface LoadableProps {
|
|
6
|
+
loading: boolean;
|
|
7
|
+
portal?: boolean;
|
|
8
|
+
loader?: ReactNode | null;
|
|
9
|
+
children: ReactNode | ((props: LoadableChildrenProps) => ReactNode);
|
|
10
|
+
}
|
|
11
|
+
export declare const Loadable: FC<LoadableProps>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Loader } from "../mui";
|
|
3
|
+
export const Loadable = ({ loading, children, portal = false, }) => (_jsxs(_Fragment, { children: [loading && (_jsx(Loader, { active: true, size: portal ? 'fullscreen' : 'container', disableAutoFocus: true })), typeof children === 'function' ? children({ loading }) : children] }));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import { CardProps } from '@mui/material/Card';
|
|
3
|
+
export interface SearchCardProps extends Omit<CardProps, 'title'> {
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
list: Array<[string, ReactNode, ReactNode]>;
|
|
6
|
+
isActive?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const SearchCard: FC<SearchCardProps>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TransLabel } from "../i18n/trans/label";
|
|
3
|
+
import Card from '@mui/material/Card';
|
|
4
|
+
import { makeStyles } from '@mui/styles';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
6
|
+
import List from '@mui/material/List';
|
|
7
|
+
import ListItem from '@mui/material/ListItem';
|
|
8
|
+
import ListItemText from '@mui/material/ListItemText';
|
|
9
|
+
import { alpha } from '@mui/material/styles';
|
|
10
|
+
import { Icon } from "../mui";
|
|
11
|
+
import classNames from 'classnames';
|
|
12
|
+
const useStyles = makeStyles((theme) => ({
|
|
13
|
+
root: {
|
|
14
|
+
display: 'block',
|
|
15
|
+
padding: theme.spacing(2),
|
|
16
|
+
color: 'inherit',
|
|
17
|
+
textDecoration: 'none',
|
|
18
|
+
cursor: 'pointer',
|
|
19
|
+
position: 'relative',
|
|
20
|
+
height: '100%',
|
|
21
|
+
background: theme.palette.background.default,
|
|
22
|
+
// color: theme.palette.text.primary,
|
|
23
|
+
'& .MuiListItem-root': {
|
|
24
|
+
color: 'inherit',
|
|
25
|
+
},
|
|
26
|
+
'& .MuiListItemText-primary': {
|
|
27
|
+
color: theme.palette.text.secondary,
|
|
28
|
+
},
|
|
29
|
+
'& .MuiListItemText-secondary': {
|
|
30
|
+
color: 'inherit',
|
|
31
|
+
},
|
|
32
|
+
'&:hover': {
|
|
33
|
+
background: alpha(theme.palette.primary.main, 0.1),
|
|
34
|
+
'& $edit': {
|
|
35
|
+
visibility: 'visible',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
disabled: {
|
|
40
|
+
color: theme.palette.action.disabled,
|
|
41
|
+
},
|
|
42
|
+
title: {
|
|
43
|
+
display: 'flex',
|
|
44
|
+
justifyContent: 'space-between',
|
|
45
|
+
wordBreak: 'break-word',
|
|
46
|
+
'& i': {
|
|
47
|
+
fontSize: 12,
|
|
48
|
+
fontWeight: 400,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
edit: {
|
|
52
|
+
visibility: 'hidden',
|
|
53
|
+
position: 'absolute',
|
|
54
|
+
display: 'inline-flex',
|
|
55
|
+
top: 5,
|
|
56
|
+
right: 5,
|
|
57
|
+
width: 24,
|
|
58
|
+
height: 24,
|
|
59
|
+
padding: 4,
|
|
60
|
+
borderRadius: 3,
|
|
61
|
+
background: theme.palette.common.white,
|
|
62
|
+
},
|
|
63
|
+
}), {
|
|
64
|
+
name: 'SearchCard',
|
|
65
|
+
});
|
|
66
|
+
const listItemProps = {
|
|
67
|
+
primaryTypographyProps: {
|
|
68
|
+
variant: 'body2',
|
|
69
|
+
color: 'secondary.light',
|
|
70
|
+
},
|
|
71
|
+
secondaryTypographyProps: {
|
|
72
|
+
variant: 'body2',
|
|
73
|
+
color: 'text.primary',
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
export const SearchCard = ({ title, list, isActive = true, ...props }) => {
|
|
77
|
+
const classes = useStyles();
|
|
78
|
+
return (_jsxs(Card, { sx: { p: 2 }, variant: "outlined", className: classNames(classes.root, {
|
|
79
|
+
[classes.disabled]: !isActive,
|
|
80
|
+
}), square: true, ...props, children: [_jsx("span", { className: classes.edit, children: _jsx(Icon, { name: "edit" }) }), _jsxs(Typography, { className: classes.title, variant: "body1", color: "inherit", children: [_jsx("strong", { children: title }), !isActive && (_jsx("i", { children: _jsx(TransLabel, { i18nKey: "inactive" }) }))] }), _jsx(List, { disablePadding: true, children: list.map(([key, primary, secondary]) => (_jsx(ListItem, { disablePadding: true, children: _jsx(ListItemText, { primary: primary, secondary: secondary, ...listItemProps }) }, key))) })] }));
|
|
81
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps } from '@mui/material';
|
|
3
|
+
export interface SearchFormProps {
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
action?: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
'data-testid'?: string;
|
|
8
|
+
expandButtonColor?: Exclude<ButtonProps['color'], 'inherit' | 'info'>;
|
|
9
|
+
isLight?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const SearchFormExpand: ({ color, }: {
|
|
12
|
+
color: Exclude<ButtonProps['color'], 'inherit' | 'info'>;
|
|
13
|
+
}) => JSX.Element;
|
|
14
|
+
export declare const SearchForm: FC<SearchFormProps>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useContext, useState } from 'react';
|
|
3
|
+
import { makeStyles } from '@mui/styles';
|
|
4
|
+
import Button from '@mui/material/Button';
|
|
5
|
+
import Accordion from '@mui/material/Accordion';
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import AccordionContext from '@mui/material/Accordion/AccordionContext';
|
|
8
|
+
import AccordionDetails from '@mui/material/AccordionDetails';
|
|
9
|
+
import { Icon } from "../mui/Icon";
|
|
10
|
+
import classNames from 'classnames';
|
|
11
|
+
import { TransButton } from "../i18n/trans/button";
|
|
12
|
+
import Paper from '@mui/material/Paper';
|
|
13
|
+
import { CardHeader } from "../mui";
|
|
14
|
+
const useStyles = makeStyles((theme) => ({
|
|
15
|
+
root: {
|
|
16
|
+
borderRadius: 0,
|
|
17
|
+
},
|
|
18
|
+
accordion: {
|
|
19
|
+
'&.Mui-expanded': { margin: 0 },
|
|
20
|
+
},
|
|
21
|
+
cardHeader: {
|
|
22
|
+
'&.Mui-expanded .MuiButton-startIcon': {
|
|
23
|
+
transform: 'rotate(180deg)',
|
|
24
|
+
},
|
|
25
|
+
'& .MuiButton-startIcon': {
|
|
26
|
+
transform: 'rotate(0deg)',
|
|
27
|
+
transition: theme.transitions.create('transform', {
|
|
28
|
+
duration: theme.transitions.duration.shortest,
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
accordionDetails: {
|
|
33
|
+
padding: theme.spacing(3),
|
|
34
|
+
},
|
|
35
|
+
}), {
|
|
36
|
+
name: 'SearchForm',
|
|
37
|
+
});
|
|
38
|
+
export const SearchFormExpand = ({ color, }) => {
|
|
39
|
+
const { expanded, toggle } = useContext(AccordionContext);
|
|
40
|
+
return (_jsx(Button, { variant: "text", color: color, startIcon: _jsx(Icon, { name: "chevron-down", color: color }), onClick: toggle, children: _jsx(TransButton, { i18nKey: expanded ? 'collapseSearch' : 'expandSearch' }) }));
|
|
41
|
+
};
|
|
42
|
+
export const SearchForm = ({ title, action, className, children, expandButtonColor = 'yellow', isLight, ...rest }) => {
|
|
43
|
+
const classes = useStyles();
|
|
44
|
+
const [expanded, setExpanded] = useState(true);
|
|
45
|
+
const handleChange = useCallback((event, isExpanded) => {
|
|
46
|
+
setExpanded(isExpanded);
|
|
47
|
+
}, []);
|
|
48
|
+
return (_jsx(Paper, { className: classNames(classes.root, className), elevation: 2, children: _jsxs(Accordion, { className: classes.accordion, elevation: 0, expanded: expanded, onChange: handleChange, "data-testid": rest['data-testid'] ?? 'search-form', children: [_jsx(CardHeader, { title: title, action: _jsx(SearchFormExpand, { color: expandButtonColor }), disableTypography: true, isLight: isLight, className: classNames(classes.cardHeader, {
|
|
49
|
+
['Mui-expanded']: expanded,
|
|
50
|
+
}), children: action }), _jsx(AccordionDetails, { className: classes.accordionDetails, children: children })] }) }));
|
|
51
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormTableTableInstance } from "../hooks/useFormTable";
|
|
3
|
+
interface SearchFormTableProps<D extends object> {
|
|
4
|
+
height?: 'fit' | 'auto';
|
|
5
|
+
table: FormTableTableInstance<D>;
|
|
6
|
+
}
|
|
7
|
+
export declare function SearchFormTable<D extends object>(props: SearchFormTableProps<D>): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@mui/styles';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { Table } from "./Table";
|
|
5
|
+
import { FormProvider } from "../form";
|
|
6
|
+
import Paper from '@mui/material/Paper';
|
|
7
|
+
const useStyles = makeStyles((theme) => ({
|
|
8
|
+
root: {
|
|
9
|
+
borderRadius: 0,
|
|
10
|
+
},
|
|
11
|
+
form: {
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
justifyContent: 'space-between',
|
|
15
|
+
margin: theme.spacing(3),
|
|
16
|
+
},
|
|
17
|
+
table: {
|
|
18
|
+
display: 'flex',
|
|
19
|
+
flexDirection: 'column',
|
|
20
|
+
justifyContent: 'space-between',
|
|
21
|
+
flex: 1,
|
|
22
|
+
minHeight: 0,
|
|
23
|
+
overflow: 'auto',
|
|
24
|
+
},
|
|
25
|
+
}), {
|
|
26
|
+
name: 'SearchFormTable',
|
|
27
|
+
});
|
|
28
|
+
export function SearchFormTable(props) {
|
|
29
|
+
const { table } = props;
|
|
30
|
+
const classes = useStyles(props);
|
|
31
|
+
return (_jsx(Paper, { className: classNames(classes.root, classes.table), elevation: 2, children: _jsx(FormProvider, { form: table.form, children: _jsx(Table, { table: table }) }) }));
|
|
32
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import { type IconProps } from "../mui";
|
|
3
|
+
export declare type SearchResultI18Keys = 'noResultsFound' | 'noDataAdded' | 'pressSearchToSeeResults';
|
|
4
|
+
interface SearchResultProps {
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
loaded?: boolean;
|
|
7
|
+
results: unknown;
|
|
8
|
+
icon?: false | IconProps['name'];
|
|
9
|
+
i18nKey?: SearchResultI18Keys;
|
|
10
|
+
message?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const SearchResult: FC<SearchResultProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { makeStyles } from '@mui/styles';
|
|
4
|
+
import { Typography } from '@mui/material';
|
|
5
|
+
import { Icon } from "../mui";
|
|
6
|
+
import { TransLabel } from "../i18n/trans/label";
|
|
7
|
+
import classNames from 'classnames';
|
|
8
|
+
const useStyles = makeStyles((theme) => ({
|
|
9
|
+
root: {
|
|
10
|
+
display: 'flex',
|
|
11
|
+
flex: 1,
|
|
12
|
+
flexDirection: 'column',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
padding: theme.spacing(3),
|
|
16
|
+
'&$loading': {
|
|
17
|
+
visibility: 'hidden',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
message: {
|
|
21
|
+
whiteSpace: 'pre',
|
|
22
|
+
},
|
|
23
|
+
icon: {
|
|
24
|
+
color: theme.palette.secondary.main,
|
|
25
|
+
background: theme.palette.action.hover,
|
|
26
|
+
borderRadius: '50%',
|
|
27
|
+
width: '5rem',
|
|
28
|
+
height: '5rem',
|
|
29
|
+
display: 'inline-flex',
|
|
30
|
+
marginBottom: theme.spacing(2),
|
|
31
|
+
'& > *': {
|
|
32
|
+
margin: 'auto',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
loading: {},
|
|
36
|
+
}), {
|
|
37
|
+
name: 'SearchResult',
|
|
38
|
+
});
|
|
39
|
+
export const SearchResult = ({ loading, loaded: loadedProp = false, results, icon = 'search', i18nKey = 'noResultsFound', message, children, }) => {
|
|
40
|
+
const classes = useStyles();
|
|
41
|
+
const [loaded, setLoaded] = useState(loadedProp);
|
|
42
|
+
const prevLoading = useRef();
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (!loaded && !loading && prevLoading.current)
|
|
45
|
+
setLoaded(true);
|
|
46
|
+
prevLoading.current = loading;
|
|
47
|
+
}, [loaded, loading]);
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (results && !loading)
|
|
50
|
+
setLoaded(true);
|
|
51
|
+
}, [results, loading]);
|
|
52
|
+
const emptyState = useCallback((i18nKey) => (_jsxs("div", { className: classNames(classes.root, {
|
|
53
|
+
[classes.loading]: loading,
|
|
54
|
+
}), children: [icon && (_jsx("div", { className: classes.icon, children: _jsx(Icon, { name: icon, size: 36 }) })), _jsx(Typography, { variant: "body1", align: "center", className: classes.message, children: message ?? _jsx(TransLabel, { i18nKey: i18nKey }) })] })), [
|
|
55
|
+
classes.icon,
|
|
56
|
+
classes.loading,
|
|
57
|
+
classes.message,
|
|
58
|
+
classes.root,
|
|
59
|
+
icon,
|
|
60
|
+
loading,
|
|
61
|
+
message,
|
|
62
|
+
]);
|
|
63
|
+
if (typeof loading !== 'undefined' && !loaded) {
|
|
64
|
+
return emptyState('pressSearchToSeeResults');
|
|
65
|
+
}
|
|
66
|
+
return _jsx(_Fragment, { children: Boolean(results) ? children : emptyState(i18nKey) });
|
|
67
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { makeStyles } from '@mui/styles';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { getAccessabilityValue } from "../../utils";
|
|
6
|
+
const useStyles = makeStyles((theme) => ({
|
|
7
|
+
root: {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
minHeight: 36,
|
|
11
|
+
padding: `0 ${theme.spacing(3)}`,
|
|
12
|
+
},
|
|
13
|
+
accessibilityRoot: {
|
|
14
|
+
'& .MuiTypography-root': { color: theme.palette.secondary.main },
|
|
15
|
+
},
|
|
16
|
+
}), {
|
|
17
|
+
name: 'TableCaption',
|
|
18
|
+
});
|
|
19
|
+
export const TableCaption = ({ className, children, }) => {
|
|
20
|
+
const accessibility = useMemo(getAccessabilityValue, []);
|
|
21
|
+
const classes = useStyles();
|
|
22
|
+
return (_jsx("div", { className: classNames(classes.root, className, {
|
|
23
|
+
[classes.accessibilityRoot]: accessibility,
|
|
24
|
+
}), children: children }));
|
|
25
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import { TableCellProps as MuiTableCellProps } from '@mui/material/TableCell';
|
|
3
|
+
import { TableCellProps as RTTableCellProps } from 'react-table';
|
|
4
|
+
interface TableCellProps extends Omit<MuiTableCellProps, 'role' | 'onClick'>, RTTableCellProps {
|
|
5
|
+
isDragOccurring: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface TableCellSnapshot {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class TableCell extends Component<TableCellProps> {
|
|
12
|
+
private ref;
|
|
13
|
+
getSnapshotBeforeUpdate(prevProps: TableCellProps): TableCellSnapshot | null;
|
|
14
|
+
componentDidUpdate(prevProps: TableCellProps, prevState: unknown, snapshot?: TableCellSnapshot): void;
|
|
15
|
+
render(): JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Component, createRef } from 'react';
|
|
3
|
+
import MuiTableCell from '@mui/material/TableCell';
|
|
4
|
+
export class TableCell extends Component {
|
|
5
|
+
ref = createRef();
|
|
6
|
+
getSnapshotBeforeUpdate(prevProps) {
|
|
7
|
+
if (!this.ref.current) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
const isDragStarting = this.props.isDragOccurring && !prevProps.isDragOccurring;
|
|
11
|
+
if (!isDragStarting) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
const { width, height } = this.ref.current.getBoundingClientRect();
|
|
15
|
+
return { width, height };
|
|
16
|
+
}
|
|
17
|
+
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
18
|
+
const { current: ref } = this.ref;
|
|
19
|
+
if (!ref) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (snapshot) {
|
|
23
|
+
if (parseInt(ref.style.width) === snapshot.width) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
ref.style.width = `${snapshot.width}px`;
|
|
27
|
+
ref.style.height = `${snapshot.height}px`;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (this.props.isDragOccurring) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
// inline styles not applied
|
|
34
|
+
if (ref.style.width == null) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
// no snapshot and drag is finished - clear the inline styles
|
|
38
|
+
ref.style.removeProperty('height');
|
|
39
|
+
ref.style.removeProperty('width');
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
const { isDragOccurring, ...props } = this.props;
|
|
43
|
+
return (_jsx(MuiTableCell, { ref: this.ref, variant: "head", "data-dragging": isDragOccurring, ...props }));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { FormFieldAdapterProps } from "../../form";
|
|
3
|
+
import type { Condition, TableCellEditableFieldProps } from "./TableCellEditableField";
|
|
4
|
+
import { CheckboxProps, DatePickerProps, FileInputCommonProps, SelectProps } from "../../mui";
|
|
5
|
+
import { FieldState } from 'final-form';
|
|
6
|
+
import { FieldPath, FieldPathValue } from 'react-hook-form';
|
|
7
|
+
export declare type TableColumnConditionsKeys = 'disabled' | 'hidden';
|
|
8
|
+
export declare type TableColumnConditions<D extends object> = {
|
|
9
|
+
[key in TableColumnConditionsKeys]?: Condition<D> | Array<Condition<D>>;
|
|
10
|
+
};
|
|
11
|
+
export declare type TableCellEditableType = 'editor' | 'file' | 'text' | 'select' | 'timezone' | 'checkbox' | 'date' | 'color';
|
|
12
|
+
export declare type TableCellEditableProps<D extends object> = Partial<Pick<CheckboxProps, 'size' | 'disabled'> | (Pick<DatePickerProps, 'dateFormat' | 'showTimeInput'> & {
|
|
13
|
+
minDate: (row?: Partial<D>) => Date;
|
|
14
|
+
maxDate: (row?: Partial<D>) => Date;
|
|
15
|
+
}) | Pick<SelectProps, 'options' | 'multiple'> | Pick<FileInputCommonProps, 'accept' | 'multiple'>> & Partial<Omit<FormFieldAdapterProps<FieldPathValue<D, FieldPath<D>>>, 'validate'>> & {
|
|
16
|
+
validate?: TableCellEditableFieldValidator<FieldPathValue<D, FieldPath<D>>, D>;
|
|
17
|
+
} & {
|
|
18
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
19
|
+
};
|
|
20
|
+
export declare type TableCellEditableFieldValidator<FieldValue, D extends object = object> = (value: FieldValue, allValues?: D, meta?: FieldState<FieldValue>) => unknown | Promise<unknown>;
|
|
21
|
+
declare type TableCellEditableWrapper<D extends object = {}> = (field: ReactNode, cell: TableCellEditableFieldProps<D>) => ReactNode;
|
|
22
|
+
export declare type ColumnEditableProps<D extends object> = {
|
|
23
|
+
type?: TableCellEditableType;
|
|
24
|
+
editableProps?: TableCellEditableProps<D> | ((cell: TableCellEditableFieldProps<D>) => TableCellEditableProps<D>);
|
|
25
|
+
wrapper?: TableCellEditableWrapper<D>;
|
|
26
|
+
};
|
|
27
|
+
export declare const TableCellEditable: <D extends object>(cell: TableCellEditableFieldProps<D>) => JSX.Element;
|
|
28
|
+
export {};
|