@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,68 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Button } from '@mui/material';
|
|
4
|
+
import { useActive, useRemirrorContext, useChainedCommands, useCommands, useHelpers, } from '@remirror/react';
|
|
5
|
+
import { makeStyles } from '@mui/styles';
|
|
6
|
+
const preventBubblingUp = (event) => {
|
|
7
|
+
event.preventDefault();
|
|
8
|
+
};
|
|
9
|
+
export const createButton = (props) => () => (_jsx(ToolbarButton, { ...props }));
|
|
10
|
+
const useToolbarButtonLabelStyles = makeStyles(() => ({
|
|
11
|
+
root: {
|
|
12
|
+
lineHeight: '20px',
|
|
13
|
+
fontWeight: 'bold',
|
|
14
|
+
fontSize: 18,
|
|
15
|
+
alignSelf: 'baseline',
|
|
16
|
+
},
|
|
17
|
+
}), {
|
|
18
|
+
name: 'ToolbarButtonLabel',
|
|
19
|
+
});
|
|
20
|
+
export const ToolbarButtonLabel = ({ children, }) => {
|
|
21
|
+
const classes = useToolbarButtonLabelStyles();
|
|
22
|
+
return _jsx("span", { className: classes.root, children: children });
|
|
23
|
+
};
|
|
24
|
+
export const ToolbarButton = forwardRef(({ commandName, attrs, children, onClick, ...props }, ref) => {
|
|
25
|
+
const commands = useCommands();
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
const chain = useChainedCommands();
|
|
28
|
+
const { getCommandOptions } = useHelpers();
|
|
29
|
+
// Will cause the editor to rerender for each state update.
|
|
30
|
+
const active = useActive();
|
|
31
|
+
const context = useRemirrorContext();
|
|
32
|
+
const options = getCommandOptions(commandName);
|
|
33
|
+
if (!options) {
|
|
34
|
+
return _jsx(_Fragment, {});
|
|
35
|
+
}
|
|
36
|
+
const enabled = commands[commandName]?.enabled(attrs) ?? false;
|
|
37
|
+
let { name } = options;
|
|
38
|
+
const isAlign = [
|
|
39
|
+
'leftAlign',
|
|
40
|
+
'centerAlign',
|
|
41
|
+
'rightAlign',
|
|
42
|
+
'justifyAlign',
|
|
43
|
+
].includes(commandName);
|
|
44
|
+
if (isAlign)
|
|
45
|
+
name = 'paragraph';
|
|
46
|
+
const isActive = active[name]?.(attrs) ?? false;
|
|
47
|
+
const handleClick = (event) => {
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
if (onClick) {
|
|
50
|
+
onClick(event, context);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (options.disableChaining) {
|
|
54
|
+
if (isAlign && isActive) {
|
|
55
|
+
commands.setTextAlignment('none');
|
|
56
|
+
}
|
|
57
|
+
else
|
|
58
|
+
commands[commandName]?.(attrs);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const chainCommand = isAlign && isActive
|
|
62
|
+
? chain.setTextAlignment('none')
|
|
63
|
+
: chain[commandName]?.(attrs);
|
|
64
|
+
chainCommand?.focus?.();
|
|
65
|
+
chainCommand?.run();
|
|
66
|
+
};
|
|
67
|
+
return (_jsx("span", { ref: ref, ...props, onMouseDown: preventBubblingUp, children: _jsx(Button, { type: "button", children: children, onClick: handleClick, color: isActive ? 'primary' : 'inherit', disabled: !enabled, size: "small", sx: { minWidth: 0 } }) }));
|
|
68
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//@import '~remirror/styles/components';
|
|
2
|
+
//@import '~remirror/styles/core';
|
|
3
|
+
@import '~remirror/styles/extension-blockquote';
|
|
4
|
+
//@import '~remirror/styles/extension-callout';
|
|
5
|
+
//@import '~remirror/styles/extension-code-block';
|
|
6
|
+
//@import '~remirror/styles/extension-file';
|
|
7
|
+
//@import '~remirror/styles/extension-gap-cursor';
|
|
8
|
+
@import '~remirror/styles/extension-list';
|
|
9
|
+
@import '~remirror/styles/extension-mention-atom';
|
|
10
|
+
@import '~remirror/styles/extension-node-formatting';
|
|
11
|
+
//@import '~remirror/styles/extension-positioner';
|
|
12
|
+
//@import '~remirror/styles/extension-tables';
|
|
13
|
+
@import '~remirror/styles/extension-whitespace';
|
|
14
|
+
//@import '~remirror/styles/extension-yjs';
|
|
15
|
+
@import '~remirror/styles/theme';
|
|
16
|
+
|
|
17
|
+
.remirror-theme {
|
|
18
|
+
//[class^='Toolbar-root'] {
|
|
19
|
+
> div {
|
|
20
|
+
flex-wrap: wrap;
|
|
21
|
+
|
|
22
|
+
.MuiButton-root {
|
|
23
|
+
padding: 4px;
|
|
24
|
+
transform: scale(0.75);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.remirror-theme .ProseMirror {
|
|
29
|
+
box-shadow: none;
|
|
30
|
+
min-height: var(--rmr-space-6);
|
|
31
|
+
padding: var(--rmr-space-2);
|
|
32
|
+
border-radius: var(--rmr-radius-border);
|
|
33
|
+
border: 1px solid transparent;
|
|
34
|
+
outline: none;
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
border-color: #003fbf;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:active,
|
|
41
|
+
&:focus {
|
|
42
|
+
border-color: #003fbf;
|
|
43
|
+
box-shadow: #003fbf 0 0 3px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, isValidElement, useMemo, useRef } from 'react';
|
|
3
|
+
import { useEllipsis } from "../hooks/useEllipsis";
|
|
4
|
+
import { Tooltip } from "../mui";
|
|
5
|
+
export const Ellipsis = ({ tooltip, ellipsis, content = '', lines, }) => {
|
|
6
|
+
const nodeRef = useRef(null);
|
|
7
|
+
const canEllipsis = useMemo(() => !isValidElement(content), [content]);
|
|
8
|
+
const isEllipsis = useEllipsis({
|
|
9
|
+
nodeRef,
|
|
10
|
+
lines,
|
|
11
|
+
text: canEllipsis ? content : '',
|
|
12
|
+
});
|
|
13
|
+
const processedContent = useMemo(() => {
|
|
14
|
+
if (canEllipsis && typeof content === 'string' && content.includes('\n')) {
|
|
15
|
+
const parts = content.split('\n');
|
|
16
|
+
return (_jsx(_Fragment, { children: parts.map((part, index) => (_jsxs(Fragment, { children: [part, index < parts.length - 1 && _jsx("br", {})] }, index))) }));
|
|
17
|
+
}
|
|
18
|
+
return content;
|
|
19
|
+
}, [content, canEllipsis]);
|
|
20
|
+
const node = _jsx("div", { ref: nodeRef, children: processedContent });
|
|
21
|
+
return ellipsis && canEllipsis ? (isEllipsis && tooltip ? (_jsx(Tooltip, { content: processedContent, children: node })) : (node)) : (_jsx(_Fragment, { children: content }));
|
|
22
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { TypographyProps } from '@mui/material';
|
|
3
|
+
interface OverflowEllipsisProps extends TypographyProps {
|
|
4
|
+
text: ReactNode;
|
|
5
|
+
lines?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const EllipsisText: FC<OverflowEllipsisProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip } from "../mui";
|
|
3
|
+
import { useMemo, useRef } from 'react';
|
|
4
|
+
import { Typography } from '@mui/material';
|
|
5
|
+
import { makeStyles } from '@mui/styles';
|
|
6
|
+
const useStyles = makeStyles(() => ({
|
|
7
|
+
root: {
|
|
8
|
+
display: '-webkit-box',
|
|
9
|
+
overflow: 'hidden',
|
|
10
|
+
textOverflow: 'ellipsis',
|
|
11
|
+
'-webkit-line-clamp': ({ lines }) => lines,
|
|
12
|
+
'-webkit-box-orient': 'vertical',
|
|
13
|
+
},
|
|
14
|
+
}), { name: 'EllipsisText' });
|
|
15
|
+
export const EllipsisText = (props) => {
|
|
16
|
+
const { text, variant = 'inherit', lines = 1, ...typographyProps } = props;
|
|
17
|
+
const classes = useStyles(props);
|
|
18
|
+
const textRef = useRef(null);
|
|
19
|
+
const isOverflown = useMemo(() => {
|
|
20
|
+
return (lines > 1 ||
|
|
21
|
+
(!!textRef.current &&
|
|
22
|
+
textRef.current.scrollWidth > textRef.current.clientWidth));
|
|
23
|
+
}, [text, textRef.current]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
24
|
+
return (_jsx(Tooltip, { content: isOverflown ? text : null, children: _jsx(Typography, { ...typographyProps, className: classes.root, variant: variant, ref: textRef, noWrap: lines < 2, children: text }) }));
|
|
25
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export declare const EnvBannerClass = "EnvironmentBanner";
|
|
3
|
+
export declare const EnvBannerHeight = 20;
|
|
4
|
+
interface EnvironmentBannerProps {
|
|
5
|
+
envName: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const EnvironmentBanner: FC<EnvironmentBannerProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@mui/styles';
|
|
3
|
+
import { Typography } from '@mui/material';
|
|
4
|
+
export const EnvBannerClass = 'EnvironmentBanner';
|
|
5
|
+
export const EnvBannerHeight = 20;
|
|
6
|
+
const useStyles = makeStyles(() => ({
|
|
7
|
+
wrapper: {
|
|
8
|
+
width: '100%',
|
|
9
|
+
height: `${EnvBannerHeight}px`,
|
|
10
|
+
backgroundColor: 'gold',
|
|
11
|
+
display: 'flex',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
},
|
|
15
|
+
}), {
|
|
16
|
+
name: EnvBannerClass,
|
|
17
|
+
});
|
|
18
|
+
export const EnvironmentBanner = ({ envName }) => {
|
|
19
|
+
const classes = useStyles();
|
|
20
|
+
const envNameLowerCased = envName.toLowerCase();
|
|
21
|
+
if (envNameLowerCased === 'live' || envNameLowerCased === 'development') {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return (_jsx("div", { className: classes.wrapper, children: _jsx(Typography, { variant: "body2", fontSize: "14px", fontWeight: "bold", children: envNameLowerCased }) }));
|
|
25
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import { Tooltip } from "../../mui/Tooltip";
|
|
4
|
+
import { TransTooltip } from "../../i18n/trans/tooltip";
|
|
5
|
+
import { makeStyles } from '@mui/styles';
|
|
6
|
+
import { Icon, Modal } from "../../mui";
|
|
7
|
+
import { TransButton } from "../../i18n/trans/button";
|
|
8
|
+
import { useModal } from "../../hooks";
|
|
9
|
+
import { TransTitle } from "../../i18n/trans/title";
|
|
10
|
+
import { TransLabel } from "../../i18n/trans/label";
|
|
11
|
+
import { ACCESSIBILITY_KEY, getAccessabilityValue } from "../../utils";
|
|
12
|
+
const useStyles = makeStyles(() => ({ accessibility: { '&:hover': { cursor: 'pointer' } } }), {
|
|
13
|
+
name: 'Header',
|
|
14
|
+
});
|
|
15
|
+
export const AccessibilityModal = () => {
|
|
16
|
+
const classes = useStyles();
|
|
17
|
+
const { open: isOpen, onOpen, onClose } = useModal();
|
|
18
|
+
const accessibility = useMemo(getAccessabilityValue, []);
|
|
19
|
+
const handleConfirm = useCallback(() => {
|
|
20
|
+
onClose();
|
|
21
|
+
localStorage.setItem(ACCESSIBILITY_KEY, (!accessibility).toString());
|
|
22
|
+
window.location.reload();
|
|
23
|
+
}, [accessibility, onClose]);
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsx(Tooltip, { content: _jsx(TransTooltip, { i18nKey: "accessibility" }), children: _jsx(Icon, { name: "accessibility", className: classes.accessibility, size: 18, onClick: onOpen }) }), _jsx(Modal, { title: _jsx(TransTitle, { i18nKey: "accessibilityMode" }), actionButton: {
|
|
25
|
+
label: _jsx(TransButton, { i18nKey: accessibility ? 'disable' : 'enable' }),
|
|
26
|
+
onClick: handleConfirm,
|
|
27
|
+
}, maxWidth: "xs", open: isOpen, onClose: onClose, children: _jsx(TransLabel, { i18nKey: "accessibility" }) })] }));
|
|
28
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectValue } from "../../mui/Select";
|
|
3
|
+
import { BusinessEntityOption } from "../../dto/businessEntity";
|
|
4
|
+
interface AllowedBusinessEntityModalProps<T extends SelectValue> {
|
|
5
|
+
options: Array<BusinessEntityOption<T>>;
|
|
6
|
+
onSelect: (value: T) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const AllowedBusinessEntityModal: <T extends SelectValue>({ options, onSelect, }: AllowedBusinessEntityModalProps<T>) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles } from '@mui/styles';
|
|
3
|
+
import { Modal, Select } from "../../mui";
|
|
4
|
+
import { Stack } from '@mui/material';
|
|
5
|
+
import { TransTitle } from "../../i18n/trans/title";
|
|
6
|
+
const useStyles = makeStyles(() => ({
|
|
7
|
+
root: {
|
|
8
|
+
'& .MuiBackdrop-root': {
|
|
9
|
+
background: 'rgba(0, 0, 0, 0.5)',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
paper: {
|
|
13
|
+
margin: 0,
|
|
14
|
+
maxWidth: 'none',
|
|
15
|
+
width: 500,
|
|
16
|
+
},
|
|
17
|
+
}), { name: 'AllowedBusinessEntityModal' });
|
|
18
|
+
export const AllowedBusinessEntityModal = ({ options, onSelect, }) => {
|
|
19
|
+
const classes = useStyles();
|
|
20
|
+
return (_jsx(Modal, { classes: {
|
|
21
|
+
root: classes.root,
|
|
22
|
+
paper: classes.paper,
|
|
23
|
+
}, title: _jsx(TransTitle, { i18nKey: "chooseBusinessEntityToContinueWith" }), closeButton: false, cancelButton: false, open: true, disableBackdropClick: true, disableEscapeKeyDown: true, children: _jsx(Stack, { children: _jsx(Select, { name: "businessEntityId", label: "", options: options, onChange: onSelect, required: true }) }) }));
|
|
24
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { Button, Typography } from '@mui/material';
|
|
4
|
+
import { Icon } from "../../mui";
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { localeConfigurations } from "../../i18n";
|
|
7
|
+
import { useTranslation } from "../../hooks/useTranslation";
|
|
8
|
+
import { makeStyles } from '@mui/styles';
|
|
9
|
+
import _kebabCase from 'lodash/kebabCase';
|
|
10
|
+
import { getAccessabilityValue } from "../../utils";
|
|
11
|
+
import { listBottomBorder } from "../../mui/theme";
|
|
12
|
+
const useStyles = makeStyles((theme) => ({
|
|
13
|
+
languageDropdown: {
|
|
14
|
+
position: 'relative',
|
|
15
|
+
display: 'inline-flex',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
padding: '0 5px',
|
|
18
|
+
height: '100%',
|
|
19
|
+
whiteSpace: 'nowrap',
|
|
20
|
+
'&:hover > span': {
|
|
21
|
+
color: theme.palette.action.hoverText,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
menuLink: {
|
|
25
|
+
color: theme.palette.text.primary,
|
|
26
|
+
},
|
|
27
|
+
languageToggle: {
|
|
28
|
+
padding: '2px 4px',
|
|
29
|
+
minWidth: 0,
|
|
30
|
+
},
|
|
31
|
+
languageListWrapper: {
|
|
32
|
+
display: 'none',
|
|
33
|
+
position: 'absolute',
|
|
34
|
+
right: '-15px',
|
|
35
|
+
top: '48px',
|
|
36
|
+
paddingTop: '10px',
|
|
37
|
+
'$languageDropdown:hover > &': {
|
|
38
|
+
display: 'block',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
languageList: {
|
|
42
|
+
background: 'white',
|
|
43
|
+
borderRadius: '3px',
|
|
44
|
+
boxShadow: '0 0 20px 4px rgb(154 161 177 / 15%), 0 4px 80px -8px rgb(36 40 47 / 25%), 0 4px 4px -2px rgb(91 94 105 / 15%)',
|
|
45
|
+
'& > p': {
|
|
46
|
+
textAlign: 'left',
|
|
47
|
+
padding: '6px 17px',
|
|
48
|
+
cursor: 'pointer',
|
|
49
|
+
'&:hover': {
|
|
50
|
+
background: theme.palette.primary.light,
|
|
51
|
+
},
|
|
52
|
+
'&:first-of-type': {
|
|
53
|
+
borderTopLeftRadius: '3px',
|
|
54
|
+
borderTopRightRadius: '3px',
|
|
55
|
+
},
|
|
56
|
+
'&:last-of-type': {
|
|
57
|
+
borderBottomLeftRadius: '3px',
|
|
58
|
+
borderBottomRightRadius: '3px',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
accessibilityLanguage: {
|
|
63
|
+
position: 'relative',
|
|
64
|
+
'&:not(:last-child):before': listBottomBorder,
|
|
65
|
+
},
|
|
66
|
+
}), {
|
|
67
|
+
name: 'LanguageSelect',
|
|
68
|
+
});
|
|
69
|
+
export const LanguageSelect = () => {
|
|
70
|
+
const classes = useStyles();
|
|
71
|
+
const accessibility = useMemo(getAccessabilityValue, []);
|
|
72
|
+
const { i18n: { changeLanguage, resolvedLanguage }, } = useTranslation();
|
|
73
|
+
return (_jsxs("div", { className: classes.languageDropdown, "data-testid": "header-language-select", children: [_jsx(Button, { variant: "text", startIcon: _jsx(Icon, { name: "language" }), className: classNames(classes.menuLink, classes.languageToggle), "data-testid": "language-select-button", children: resolvedLanguage.toLocaleUpperCase() }), _jsx("div", { className: classes.languageListWrapper, children: _jsx("div", { className: classes.languageList, "data-testid": "language-list", children: Object.entries(localeConfigurations).map(([key, value]) => (_jsx(Typography, { onClick: async () => {
|
|
74
|
+
await changeLanguage(key);
|
|
75
|
+
// browser refresh is needed so that modules as well as the utility methods would get up-to-date language
|
|
76
|
+
window.location.reload();
|
|
77
|
+
}, "data-testid": _kebabCase(`language-list-element-${key}`), className: classNames({
|
|
78
|
+
[classes.accessibilityLanguage]: accessibility,
|
|
79
|
+
}), children: value.label }, key))) }) })] }));
|
|
80
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { BackLinks, Steps } from "./index";
|
|
3
|
+
export interface MenuItemsProps {
|
|
4
|
+
steps: Steps;
|
|
5
|
+
backLinks: BackLinks;
|
|
6
|
+
pathname: string;
|
|
7
|
+
onMenuClick: (path: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const MenuItems: FC<MenuItemsProps>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { Button, Stack } from '@mui/material';
|
|
4
|
+
import { Dropdown, Icon } from "../../mui";
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import _startsWith from 'lodash/startsWith';
|
|
7
|
+
import { makeStyles } from '@mui/styles';
|
|
8
|
+
const useStyles = makeStyles((theme) => ({
|
|
9
|
+
manageDropdown: {
|
|
10
|
+
'& .MuiButton-root': {
|
|
11
|
+
lineHeight: 1,
|
|
12
|
+
},
|
|
13
|
+
'& .Icon-root': {
|
|
14
|
+
margin: 0,
|
|
15
|
+
marginTop: 2,
|
|
16
|
+
width: 16,
|
|
17
|
+
height: 16,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
menuLink: {
|
|
21
|
+
color: theme.palette.text.primary,
|
|
22
|
+
lineHeight: 1,
|
|
23
|
+
},
|
|
24
|
+
active: {
|
|
25
|
+
'&&': {
|
|
26
|
+
color: theme.palette.primary.main,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
}), {
|
|
30
|
+
name: 'MenuItems',
|
|
31
|
+
});
|
|
32
|
+
export const MenuItems = ({ backLinks, pathname, onMenuClick, steps, }) => {
|
|
33
|
+
const classes = useStyles();
|
|
34
|
+
const returnLink = useMemo(() => {
|
|
35
|
+
return backLinks.find(({ regex }) => regex.test(pathname));
|
|
36
|
+
}, [backLinks, pathname]);
|
|
37
|
+
const isPathActive = (pathname, basePath, regex) => {
|
|
38
|
+
if (regex)
|
|
39
|
+
return regex.test(pathname);
|
|
40
|
+
if (_startsWith(pathname, basePath)) {
|
|
41
|
+
const unmatchedPart = pathname.replace(basePath, '');
|
|
42
|
+
if (unmatchedPart.length === 0 || unmatchedPart[0] === '/') {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
};
|
|
48
|
+
return (_jsx(Stack, { direction: "row", alignItems: "center", gap: 0.5, flex: 1, children: returnLink ? (_jsx(Button, { variant: "text", className: classes.menuLink, onClick: () => onMenuClick(returnLink.path), startIcon: _jsx(Icon, { name: "direction-left", color: "black" }), children: returnLink.label })) : (steps.map(({ label, path, basePath, children }) => children ? (_jsx(Dropdown, { className: classes.manageDropdown, active: isPathActive(pathname, basePath, new RegExp(children.map(({ path }) => path).join('|'))), label: label, options: children.map(({ label, path }) => ({
|
|
49
|
+
label,
|
|
50
|
+
active: isPathActive(pathname, path),
|
|
51
|
+
onClick: () => onMenuClick(path),
|
|
52
|
+
})) }, basePath)) : (_jsx(Button, { variant: "text", onClick: () => onMenuClick(path), className: classNames(classes.menuLink, {
|
|
53
|
+
[classes.active]: isPathActive(pathname, basePath),
|
|
54
|
+
}), children: label }, path)))) }));
|
|
55
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import { Icon } from "../../mui";
|
|
5
|
+
import { makeStyles } from '@mui/styles';
|
|
6
|
+
import { Avatar, Stack, Typography } from '@mui/material';
|
|
7
|
+
import { getAccessabilityValue } from "../../utils";
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import { listBottomBorder } from "../../mui/theme";
|
|
10
|
+
const useStyles = makeStyles((theme) => ({
|
|
11
|
+
headerLogo: {
|
|
12
|
+
background: theme.palette.secondary.main,
|
|
13
|
+
outline: `1rem solid ${theme.palette.secondary.main}`,
|
|
14
|
+
margin: '1rem',
|
|
15
|
+
},
|
|
16
|
+
moduleDropdown: {
|
|
17
|
+
height: '100%',
|
|
18
|
+
marginRight: '4px',
|
|
19
|
+
'&:hover > span': {
|
|
20
|
+
cursor: 'pointer',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
moduleListWrapper: {
|
|
24
|
+
left: '10px',
|
|
25
|
+
top: '48px',
|
|
26
|
+
paddingTop: '10px',
|
|
27
|
+
'$moduleDropdown:hover > &': {
|
|
28
|
+
display: 'inline-block',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
moduleList: {
|
|
32
|
+
background: 'white',
|
|
33
|
+
borderRadius: '3px',
|
|
34
|
+
boxShadow: '0 0 20px 4px rgb(154 161 177 / 15%), 0 4px 80px -8px rgb(36 40 47 / 25%), 0 4px 4px -2px rgb(91 94 105 / 15%)',
|
|
35
|
+
'& > div': {
|
|
36
|
+
cursor: 'pointer',
|
|
37
|
+
'&:hover': {
|
|
38
|
+
background: theme.palette.primary.light,
|
|
39
|
+
color: theme.palette.text.primary,
|
|
40
|
+
'& > div > img': {
|
|
41
|
+
filter: 'none',
|
|
42
|
+
},
|
|
43
|
+
'& > div > svg': {
|
|
44
|
+
color: theme.palette.primary.main,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
'& > div > p': {
|
|
49
|
+
textAlign: 'left',
|
|
50
|
+
padding: '6px 16px 6px 8px',
|
|
51
|
+
'&:first-of-type': {
|
|
52
|
+
borderTopLeftRadius: '3px',
|
|
53
|
+
borderTopRightRadius: '3px',
|
|
54
|
+
},
|
|
55
|
+
'&:last-of-type': {
|
|
56
|
+
borderBottomLeftRadius: '3px',
|
|
57
|
+
borderBottomRightRadius: '3px',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
moduleListAccessibilityItem: {
|
|
62
|
+
position: 'relative',
|
|
63
|
+
'&:not(:last-child):before': listBottomBorder,
|
|
64
|
+
},
|
|
65
|
+
selected: {
|
|
66
|
+
background: theme.palette.secondary.main,
|
|
67
|
+
color: theme.palette.common.white,
|
|
68
|
+
'& > div > img': {
|
|
69
|
+
filter: 'brightness(50) saturate(0)',
|
|
70
|
+
},
|
|
71
|
+
'& > div > svg': {
|
|
72
|
+
color: theme.palette.common.white,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
avatar: {
|
|
76
|
+
backgroundColor: 'transparent',
|
|
77
|
+
color: theme.palette.primary.main,
|
|
78
|
+
'& > img': {
|
|
79
|
+
width: '60%',
|
|
80
|
+
height: '60%',
|
|
81
|
+
},
|
|
82
|
+
'& > svg': {
|
|
83
|
+
width: '50%',
|
|
84
|
+
height: '50%',
|
|
85
|
+
color: theme.palette.primary.main,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
logo: {
|
|
89
|
+
cursor: 'pointer',
|
|
90
|
+
transition: 'all 0.1s ease-in-out',
|
|
91
|
+
'&:hover': {
|
|
92
|
+
boxShadow: `inset 0 -4px 0 0 ${theme.palette.primary.main}`,
|
|
93
|
+
},
|
|
94
|
+
height: '100%',
|
|
95
|
+
display: 'flex',
|
|
96
|
+
alignItems: 'center',
|
|
97
|
+
justifyContent: 'center',
|
|
98
|
+
'& img': {
|
|
99
|
+
width: '100%',
|
|
100
|
+
maxHeight: '60%',
|
|
101
|
+
maxWidth: '150px',
|
|
102
|
+
padding: '0 8px',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
}), {
|
|
106
|
+
name: 'ModuleSelect',
|
|
107
|
+
});
|
|
108
|
+
export const ModuleIcon = ({ moduleItems, iconUrl }) => {
|
|
109
|
+
const classes = useStyles();
|
|
110
|
+
const accessibility = useMemo(getAccessabilityValue, []);
|
|
111
|
+
const preparedIcon = useMemo(() => iconUrl ? (_jsx(Box, { className: classes.logo, children: _jsx("img", { src: iconUrl, alt: "Logo" }) })) : (_jsx(Icon, { name: "grid", color: "white", className: classes.headerLogo })), [classes.headerLogo, classes.logo, iconUrl]);
|
|
112
|
+
if (!moduleItems) {
|
|
113
|
+
return preparedIcon;
|
|
114
|
+
}
|
|
115
|
+
return (_jsxs(Stack, { display: "inline-flex", alignItems: "center", position: "relative", className: classes.moduleDropdown, children: [preparedIcon, _jsx(Stack, { display: "none", position: "absolute", className: classes.moduleListWrapper, children: _jsx("div", { className: classes.moduleList, children: moduleItems.map(({ name, url, small_icon_url }) => (_jsxs(Stack, { direction: "row", alignItems: "center", className: classNames({
|
|
116
|
+
[classes.selected]: window.location.href.includes(url),
|
|
117
|
+
[classes.moduleListAccessibilityItem]: accessibility,
|
|
118
|
+
}), children: [_jsx(Avatar, { src: small_icon_url, className: classes.avatar }), _jsx(Typography, { onClick: () => window.open(url, '_blank').focus(), noWrap: true, children: name }, name)] }, name))) }) })] }));
|
|
119
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SelectValue } from "../../mui/Select";
|
|
3
|
+
import { BusinessEntities } from "../../dto/businessEntity";
|
|
4
|
+
import { BusinessEntityType } from "../../hooks";
|
|
5
|
+
export interface Step {
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
path?: string;
|
|
8
|
+
basePath?: string;
|
|
9
|
+
regex?: RegExp;
|
|
10
|
+
children?: Array<{
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
path: string;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
export declare type Steps = Array<Step>;
|
|
16
|
+
export interface BackLink {
|
|
17
|
+
regex: RegExp;
|
|
18
|
+
label: string;
|
|
19
|
+
path: string;
|
|
20
|
+
}
|
|
21
|
+
export declare type BackLinks = Array<BackLink>;
|
|
22
|
+
export interface ModuleItem {
|
|
23
|
+
name?: string;
|
|
24
|
+
code?: string;
|
|
25
|
+
url?: string;
|
|
26
|
+
small_icon_url?: string;
|
|
27
|
+
small_svg_icon_url?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface HeaderProps<D extends SelectValue = SelectValue> {
|
|
30
|
+
steps: Steps;
|
|
31
|
+
backLinks: BackLinks;
|
|
32
|
+
pathname: string;
|
|
33
|
+
additionalControls?: ReactNode;
|
|
34
|
+
onMenuClick: (path: string) => void;
|
|
35
|
+
businessEntities?: BusinessEntities<D>;
|
|
36
|
+
currentBusinessEntityId?: D;
|
|
37
|
+
onBusinessEntityChange?: (value: D) => void;
|
|
38
|
+
onLogout?: () => void;
|
|
39
|
+
helpPath?: string;
|
|
40
|
+
moduleItems?: Array<ModuleItem>;
|
|
41
|
+
allowedRoles?: Array<BusinessEntityType>;
|
|
42
|
+
iconUrl?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare const Header: <D extends SelectValue>(props: HeaderProps<D>) => JSX.Element;
|