@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
package/utils/array.d.ts
ADDED
package/utils/array.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function swap(from, to, arr) {
|
|
2
|
+
const copy = [...arr];
|
|
3
|
+
const [item] = copy.splice(from, 1);
|
|
4
|
+
copy.splice(to, 0, item);
|
|
5
|
+
return copy;
|
|
6
|
+
}
|
|
7
|
+
export const sortBy = (arr, key) => {
|
|
8
|
+
const collator = new Intl.Collator(undefined, {
|
|
9
|
+
numeric: true,
|
|
10
|
+
sensitivity: 'base',
|
|
11
|
+
});
|
|
12
|
+
return [...arr].sort((...args) => {
|
|
13
|
+
const value = (o) => {
|
|
14
|
+
if (typeof key === 'function')
|
|
15
|
+
return key(o);
|
|
16
|
+
return key ? o[key] : o;
|
|
17
|
+
};
|
|
18
|
+
const [a, b] = args.map((i) => `${value(i)}`.toLowerCase());
|
|
19
|
+
return collator.compare(a, b);
|
|
20
|
+
});
|
|
21
|
+
};
|
package/utils/auth.d.ts
ADDED
package/utils/auth.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const isProduction = (process.env.NODE_ENV || import.meta.env?.MODE) === 'production';
|
|
2
|
+
export const baseOidcConfig = {
|
|
3
|
+
accessTokenExpiringNotificationTimeInSeconds: 300,
|
|
4
|
+
authority: process.env.REACT_APP_AUTH_URL || import.meta.env?.VITE_APP_AUTH_URL,
|
|
5
|
+
automaticSilentRenew: true,
|
|
6
|
+
checkSessionIntervalInSeconds: 2,
|
|
7
|
+
client_id: process.env.REACT_APP_IDENTITY_CLIENT_ID ||
|
|
8
|
+
import.meta.env?.VITE_APP_IDENTITY_CLIENT_ID,
|
|
9
|
+
loadUserInfo: true,
|
|
10
|
+
monitorSession: isProduction,
|
|
11
|
+
onSigninCallback: () => {
|
|
12
|
+
const redirectUri = sessionStorage.getItem('REDIRECT_URI');
|
|
13
|
+
if (redirectUri) {
|
|
14
|
+
window.sessionStorage.removeItem('REDIRECT_URI');
|
|
15
|
+
window.location.replace(redirectUri);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
window.location.replace('/');
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
post_logout_redirect_uri: (process.env.REACT_APP_BASE_URL || import.meta.env?.VITE_APP_BASE_URL) +
|
|
22
|
+
'/signout-oidc',
|
|
23
|
+
redirect_uri: (process.env.REACT_APP_BASE_URL || import.meta.env?.VITE_APP_BASE_URL) +
|
|
24
|
+
'/signin-oidc',
|
|
25
|
+
response_type: 'code',
|
|
26
|
+
revokeTokensOnSignout: true,
|
|
27
|
+
scope: `openid profile ${process.env.REACT_APP_API_SCOPE || import.meta.env?.VITE_APP_API_SCOPE}`,
|
|
28
|
+
silentRequestTimeoutInSeconds: 20,
|
|
29
|
+
silent_redirect_uri: (process.env.REACT_APP_BASE_URL || import.meta.env?.VITE_APP_BASE_URL) +
|
|
30
|
+
'/signin-silent',
|
|
31
|
+
};
|
package/utils/color.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface OrganizationBranding {
|
|
2
|
+
colors: {
|
|
3
|
+
generalColors: BrandColors;
|
|
4
|
+
transportColors: {
|
|
5
|
+
bus: string;
|
|
6
|
+
taxi: string;
|
|
7
|
+
tram: string;
|
|
8
|
+
ferry: string;
|
|
9
|
+
metro: string;
|
|
10
|
+
train: string;
|
|
11
|
+
commuter: string;
|
|
12
|
+
highSpeed: string;
|
|
13
|
+
expressBus: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
logoUrl: string;
|
|
17
|
+
faviconUrl: string;
|
|
18
|
+
}
|
|
19
|
+
export declare type BrandColors = {
|
|
20
|
+
dark: string;
|
|
21
|
+
primary: string;
|
|
22
|
+
tint: string;
|
|
23
|
+
accent: string;
|
|
24
|
+
};
|
|
25
|
+
export declare type Color = 'primary' | 'primary-dark' | 'primary-medium' | 'primary-light' | 'primary-pale' | 'tint' | 'tint-light' | 'tint-pale' | 'accent' | 'accent-light' | 'accent-pale' | 'neutral' | 'neutral-medium' | 'neutral-light' | 'neutral-pale' | 'greyscale-800' | 'greyscale-100' | 'success-border' | 'success-text' | 'success-surface' | 'success-surface-hover' | 'warning-border' | 'warning-surface' | 'warning-surface-hover' | 'error-border' | 'error-text' | 'error-surface' | 'error-surface-hover' | 'info-border' | 'info-text' | 'info-surface' | 'info-surface-hover' | 'white' | 'dark';
|
|
26
|
+
export declare const hexToHSL: (hex: string) => `${number}, ${number}%, ${number}%`;
|
|
27
|
+
export declare const hslToHex: (hsl: string) => string;
|
|
28
|
+
export declare const createBrandColorTint: (hex: string, lightnessChange: number, lightnessMode?: 'add' | 'subtract' | 'set', saturationSubtractionAmount?: number) => string;
|
|
29
|
+
export declare const generateColorsList: (brandColors: BrandColors) => Record<Color, string>;
|
package/utils/color.js
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export const hexToHSL = (hex) => {
|
|
2
|
+
// Convert hex to RGB
|
|
3
|
+
const r = parseInt(hex.slice(1, 3), 16) / 255;
|
|
4
|
+
const g = parseInt(hex.slice(3, 5), 16) / 255;
|
|
5
|
+
const b = parseInt(hex.slice(5, 7), 16) / 255;
|
|
6
|
+
// Find min and max RGB components
|
|
7
|
+
const cmin = Math.min(r, g, b);
|
|
8
|
+
const cmax = Math.max(r, g, b);
|
|
9
|
+
const delta = cmax - cmin;
|
|
10
|
+
let h, s, l;
|
|
11
|
+
// Calculate hue
|
|
12
|
+
if (delta === 0)
|
|
13
|
+
h = 0;
|
|
14
|
+
else if (cmax === r)
|
|
15
|
+
h = ((g - b) / delta) % 6;
|
|
16
|
+
else if (cmax === g)
|
|
17
|
+
h = (b - r) / delta + 2;
|
|
18
|
+
else
|
|
19
|
+
h = (r - g) / delta + 4;
|
|
20
|
+
h = Math.round(h * 60);
|
|
21
|
+
if (h < 0)
|
|
22
|
+
h += 360;
|
|
23
|
+
// Calculate lightness
|
|
24
|
+
l = (cmax + cmin) / 2;
|
|
25
|
+
// Calculate saturation
|
|
26
|
+
s = delta === 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));
|
|
27
|
+
// Convert to percentages
|
|
28
|
+
s = s * 100;
|
|
29
|
+
l = l * 100;
|
|
30
|
+
return `${Math.round(h)}, ${Math.round(s)}%, ${Math.round(l)}%`;
|
|
31
|
+
};
|
|
32
|
+
export const hslToHex = (hsl) => {
|
|
33
|
+
const [h, s, l] = hsl
|
|
34
|
+
.split(',')
|
|
35
|
+
.map((value, index) => index === 0 ? parseFloat(value) : parseFloat(value) / 100);
|
|
36
|
+
const c = (1 - Math.abs(2 * l - 1)) * s;
|
|
37
|
+
const x = c * (1 - Math.abs(((h / 60) % 2) - 1));
|
|
38
|
+
const m = l - c / 2;
|
|
39
|
+
let r = 0, g = 0, b = 0;
|
|
40
|
+
if (h >= 0 && h < 60) {
|
|
41
|
+
r = c;
|
|
42
|
+
g = x;
|
|
43
|
+
b = 0;
|
|
44
|
+
}
|
|
45
|
+
else if (h >= 60 && h < 120) {
|
|
46
|
+
r = x;
|
|
47
|
+
g = c;
|
|
48
|
+
b = 0;
|
|
49
|
+
}
|
|
50
|
+
else if (h >= 120 && h < 180) {
|
|
51
|
+
r = 0;
|
|
52
|
+
g = c;
|
|
53
|
+
b = x;
|
|
54
|
+
}
|
|
55
|
+
else if (h >= 180 && h < 240) {
|
|
56
|
+
r = 0;
|
|
57
|
+
g = x;
|
|
58
|
+
b = c;
|
|
59
|
+
}
|
|
60
|
+
else if (h >= 240 && h < 300) {
|
|
61
|
+
r = x;
|
|
62
|
+
g = 0;
|
|
63
|
+
b = c;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
r = c;
|
|
67
|
+
g = 0;
|
|
68
|
+
b = x;
|
|
69
|
+
}
|
|
70
|
+
const toHex = (value) => {
|
|
71
|
+
const hex = Math.round((value + m) * 255).toString(16);
|
|
72
|
+
return hex.length === 1 ? '0' + hex : hex;
|
|
73
|
+
};
|
|
74
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
75
|
+
};
|
|
76
|
+
export const createBrandColorTint = (hex, lightnessChange, lightnessMode = 'set', saturationSubtractionAmount) => {
|
|
77
|
+
const hslString = hexToHSL(hex);
|
|
78
|
+
const [h, s, l] = hslString.match(/\d+/g).map(Number);
|
|
79
|
+
let newColorLightness;
|
|
80
|
+
const newColorSaturation = saturationSubtractionAmount !== undefined
|
|
81
|
+
? Math.max(0, Math.min(100, s - saturationSubtractionAmount))
|
|
82
|
+
: s;
|
|
83
|
+
switch (lightnessMode) {
|
|
84
|
+
case 'add':
|
|
85
|
+
newColorLightness = Math.min(100, l + lightnessChange);
|
|
86
|
+
break;
|
|
87
|
+
case 'subtract':
|
|
88
|
+
newColorLightness = Math.max(0, l - lightnessChange);
|
|
89
|
+
break;
|
|
90
|
+
case 'set':
|
|
91
|
+
default:
|
|
92
|
+
newColorLightness = Math.max(0, Math.min(100, lightnessChange));
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
return hslToHex(`${Math.round(h)}, ${Math.round(newColorSaturation)}%, ${Math.round(newColorLightness)}%`);
|
|
96
|
+
};
|
|
97
|
+
export const generateColorsList = (brandColors) => ({
|
|
98
|
+
primary: brandColors.primary,
|
|
99
|
+
'primary-dark': createBrandColorTint(brandColors.primary, 15, 'subtract'),
|
|
100
|
+
'primary-medium': createBrandColorTint(brandColors.primary, 5, 'add', 10),
|
|
101
|
+
'primary-light': createBrandColorTint(brandColors.primary, 95, 'set'),
|
|
102
|
+
'primary-pale': createBrandColorTint(brandColors.primary, 97, 'set'),
|
|
103
|
+
tint: brandColors.tint,
|
|
104
|
+
'tint-light': createBrandColorTint(brandColors.tint, 95, 'set'),
|
|
105
|
+
'tint-pale': createBrandColorTint(brandColors.tint, 97, 'set'),
|
|
106
|
+
accent: brandColors.accent,
|
|
107
|
+
'accent-light': createBrandColorTint(brandColors.accent, 73, 'set'),
|
|
108
|
+
'accent-pale': createBrandColorTint(brandColors.accent, 83, 'set'),
|
|
109
|
+
neutral: createBrandColorTint(brandColors.dark, 45, 'set', 75),
|
|
110
|
+
'neutral-medium': createBrandColorTint(brandColors.dark, 60, 'set', 80),
|
|
111
|
+
'neutral-light': createBrandColorTint(brandColors.dark, 80, 'set', 80),
|
|
112
|
+
'neutral-pale': createBrandColorTint(brandColors.dark, 93, 'set', 75),
|
|
113
|
+
'greyscale-800': '#474747',
|
|
114
|
+
'greyscale-100': '#F9F9F9',
|
|
115
|
+
'success-border': '#008E4C',
|
|
116
|
+
'success-text': '#007941',
|
|
117
|
+
'success-surface': '#EBF6F1',
|
|
118
|
+
'success-surface-hover': '#E0F1EA',
|
|
119
|
+
'warning-border': '#E57A00',
|
|
120
|
+
'warning-surface': '#FDF4EB',
|
|
121
|
+
'warning-surface-hover': '#FCEFE0',
|
|
122
|
+
'error-border': '#E00004',
|
|
123
|
+
'error-text': '#BE0003',
|
|
124
|
+
'error-surface': '#FDEBEB',
|
|
125
|
+
'error-surface-hover': '#FBE0E1',
|
|
126
|
+
'info-border': '#006DCC',
|
|
127
|
+
'info-text': '#005DAD',
|
|
128
|
+
'info-surface': '#EBF3FB',
|
|
129
|
+
'info-surface-hover': '#E0EDF9',
|
|
130
|
+
white: '#FFFFFF',
|
|
131
|
+
dark: brandColors.dark,
|
|
132
|
+
});
|
package/utils/date.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Locale } from "./locales";
|
|
2
|
+
export interface Period {
|
|
3
|
+
from: string | null;
|
|
4
|
+
to: string | null;
|
|
5
|
+
}
|
|
6
|
+
declare type formatDateOverload = {
|
|
7
|
+
(date: null, customFormat?: string, options?: {
|
|
8
|
+
locale?: Locale;
|
|
9
|
+
}): string;
|
|
10
|
+
(date: string, customFormat?: string, options?: {
|
|
11
|
+
locale?: Locale;
|
|
12
|
+
}): string;
|
|
13
|
+
(date: Date, customFormat?: string, options?: {
|
|
14
|
+
locale?: Locale;
|
|
15
|
+
}): string;
|
|
16
|
+
};
|
|
17
|
+
export declare const isoDateTimeFormat = "yyyy-MM-dd'T'HH:mm:ss";
|
|
18
|
+
export declare const currentDateTimeFormat: string;
|
|
19
|
+
export declare const startDateTimeFormat: string;
|
|
20
|
+
export declare const parseDateString: (str?: string) => Date | undefined;
|
|
21
|
+
export declare const parseISODateString: (str?: string) => Date;
|
|
22
|
+
export declare const formatDate: formatDateOverload;
|
|
23
|
+
/**
|
|
24
|
+
* Turns a date-fns pattern into a hint a user can read, e.g. `dd/MM/yyyy` into
|
|
25
|
+
* `dd/mm/yyyy`, so date inputs can show which format they expect.
|
|
26
|
+
*/
|
|
27
|
+
export declare const getDateFormatHint: (dateFormat: string) => string;
|
|
28
|
+
export declare const formatTime: (timeStr: string) => string;
|
|
29
|
+
export declare const formatPeriodDatesWithoutTime: (period: Period | undefined) => {
|
|
30
|
+
from: string;
|
|
31
|
+
to: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const getStartOfDate: (date: Date, values?: Partial<{
|
|
34
|
+
hours: number;
|
|
35
|
+
minutes: number;
|
|
36
|
+
seconds: number;
|
|
37
|
+
milliseconds: number;
|
|
38
|
+
}>) => Date;
|
|
39
|
+
export declare const getEndOfDate: (date: Date) => Date;
|
|
40
|
+
export {};
|
package/utils/date.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { format, isValid, parseISO } from 'date-fns';
|
|
2
|
+
import set from 'date-fns/set';
|
|
3
|
+
import { currentLocaleConfiguration, i18nInstance } from "../i18n";
|
|
4
|
+
import { locales } from "./locales";
|
|
5
|
+
export const isoDateTimeFormat = "yyyy-MM-dd'T'HH:mm:ss";
|
|
6
|
+
export const currentDateTimeFormat = `${currentLocaleConfiguration.dateFormat} ${currentLocaleConfiguration.timeFormat}`;
|
|
7
|
+
const [dateFormat] = isoDateTimeFormat.split("'T'");
|
|
8
|
+
export const startDateTimeFormat = `${dateFormat}'T'00:00:00`;
|
|
9
|
+
export const parseDateString = (str) => {
|
|
10
|
+
if (!str)
|
|
11
|
+
return;
|
|
12
|
+
const parsedDate = str.endsWith('Z') ? parseISO(str) : new Date(str);
|
|
13
|
+
return isValid(parsedDate) ? parsedDate : undefined;
|
|
14
|
+
};
|
|
15
|
+
export const parseISODateString = (str) => parseDateString(str);
|
|
16
|
+
export const formatDate = (date, customFormat = currentLocaleConfiguration.dateFormat, options) => {
|
|
17
|
+
if (!date)
|
|
18
|
+
return '';
|
|
19
|
+
let preparedDate;
|
|
20
|
+
if (date instanceof Date && isValid(date)) {
|
|
21
|
+
preparedDate = date;
|
|
22
|
+
}
|
|
23
|
+
else if (typeof date === 'string') {
|
|
24
|
+
preparedDate = parseDateString(date);
|
|
25
|
+
}
|
|
26
|
+
return preparedDate
|
|
27
|
+
? format(preparedDate, customFormat, {
|
|
28
|
+
...options,
|
|
29
|
+
locale: locales[i18nInstance.language],
|
|
30
|
+
})
|
|
31
|
+
: '';
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Turns a date-fns pattern into a hint a user can read, e.g. `dd/MM/yyyy` into
|
|
35
|
+
* `dd/mm/yyyy`, so date inputs can show which format they expect.
|
|
36
|
+
*/
|
|
37
|
+
export const getDateFormatHint = (dateFormat) => dateFormat.replace(/M/g, 'm');
|
|
38
|
+
export const formatTime = (timeStr) => {
|
|
39
|
+
const [hours, minutes] = timeStr.split(':').map(Number);
|
|
40
|
+
const timeDate = set(Date.now(), { hours, minutes });
|
|
41
|
+
return format(timeDate, currentLocaleConfiguration.timeFormat);
|
|
42
|
+
};
|
|
43
|
+
export const formatPeriodDatesWithoutTime = (period) => period && (period.from || period.to)
|
|
44
|
+
? {
|
|
45
|
+
from: period.from &&
|
|
46
|
+
formatDate(period.from, isoDateTimeFormat.split("'T'")[0]),
|
|
47
|
+
to: period.to && formatDate(period.to, isoDateTimeFormat.split("'T'")[0]),
|
|
48
|
+
}
|
|
49
|
+
: undefined;
|
|
50
|
+
export const getStartOfDate = (date, values) => set(date, { hours: 0, minutes: 0, seconds: 0, milliseconds: 0, ...values });
|
|
51
|
+
export const getEndOfDate = (date) => set(date, { hours: 23, minutes: 59, seconds: 59, milliseconds: 999 });
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { QueryFilterParams, QueryFilterRequest } from "./sort";
|
|
2
|
+
export declare const getQueryFromFilter: <T extends QueryFilterParams>(filter: T) => QueryFilterRequest;
|
|
3
|
+
export declare const getPayloadFromFilter: <T extends QueryFilterParams>(filter: T) => Omit<T, keyof QueryFilterParams>;
|
package/utils/filter.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { omit, pick } from 'lodash';
|
|
2
|
+
import { SORT_PARAMS, parseSortArrayToString, } from "./sort";
|
|
3
|
+
const PAGINATION_PARAMS = ['limit', 'offset'];
|
|
4
|
+
const QUERY_PARAMS = [...PAGINATION_PARAMS, ...SORT_PARAMS];
|
|
5
|
+
export const getQueryFromFilter = (filter) => ({
|
|
6
|
+
...pick(filter, PAGINATION_PARAMS),
|
|
7
|
+
...(filter.sortBy && {
|
|
8
|
+
sortBy: parseSortArrayToString(filter.sortBy),
|
|
9
|
+
}),
|
|
10
|
+
});
|
|
11
|
+
export const getPayloadFromFilter = (filter) => omit(filter, QUERY_PARAMS);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getScrollbarSize(): number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// A change of the browser zoom change the scrollbar size.
|
|
2
|
+
// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18
|
|
3
|
+
export default function getScrollbarSize() {
|
|
4
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
|
|
5
|
+
const { document: doc, innerWidth } = window;
|
|
6
|
+
const documentWidth = doc.documentElement.clientWidth;
|
|
7
|
+
return Math.abs(innerWidth - documentWidth);
|
|
8
|
+
}
|
package/utils/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./array";
|
|
2
|
+
export * from "./color";
|
|
3
|
+
export * from "./date";
|
|
4
|
+
export * from "./wallClock";
|
|
5
|
+
export * from "./percentage";
|
|
6
|
+
export * from "./redirect";
|
|
7
|
+
export * from "./timeDuration";
|
|
8
|
+
export * from "./auth";
|
|
9
|
+
export * from "./filter";
|
|
10
|
+
export * from "./sort";
|
|
11
|
+
export * from "./storage";
|
|
12
|
+
export * from "./knowledge-owl-script";
|
package/utils/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./array";
|
|
2
|
+
export * from "./color";
|
|
3
|
+
export * from "./date";
|
|
4
|
+
export * from "./wallClock";
|
|
5
|
+
export * from "./percentage";
|
|
6
|
+
export * from "./redirect";
|
|
7
|
+
export * from "./timeDuration";
|
|
8
|
+
export * from "./auth";
|
|
9
|
+
export * from "./filter";
|
|
10
|
+
export * from "./sort";
|
|
11
|
+
export * from "./storage";
|
|
12
|
+
export * from "./knowledge-owl-script";
|
package/utils/input.d.ts
ADDED
package/utils/input.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KnowledgeOwl Widget Integration
|
|
3
|
+
*
|
|
4
|
+
* This module handles the integration of KnowledgeOwl widget with OAuth2 authentication.
|
|
5
|
+
* It provides seamless SSO for logged-in users without requiring separate login.
|
|
6
|
+
*/
|
|
7
|
+
declare global {
|
|
8
|
+
interface Window {
|
|
9
|
+
_ko19?: KnowledgeOwlWidget;
|
|
10
|
+
koWidgetRouteChanged?: (currentUrl: string) => void;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
interface KnowledgeOwlWidget {
|
|
14
|
+
__pc?: string;
|
|
15
|
+
__ptl?: string;
|
|
16
|
+
base_url?: string;
|
|
17
|
+
onLoad?: () => void;
|
|
18
|
+
onAuthResp?: (resp: AuthResponse) => void;
|
|
19
|
+
onAuthError?: () => void;
|
|
20
|
+
authenticate?: (config: AuthConfig) => void;
|
|
21
|
+
reset?: () => void;
|
|
22
|
+
updateRecommended?: (url: string) => void;
|
|
23
|
+
open?: () => void;
|
|
24
|
+
close?: () => void;
|
|
25
|
+
toggle?: () => void;
|
|
26
|
+
}
|
|
27
|
+
interface AuthResponse {
|
|
28
|
+
error?: string;
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
interface AuthConfig {
|
|
32
|
+
type: 'oauth';
|
|
33
|
+
token: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Configuration for KnowledgeOwl widget
|
|
37
|
+
* Get these values from KB Settings → Widget in your KnowledgeOwl admin panel
|
|
38
|
+
*/
|
|
39
|
+
export interface KnowledgeOwlConfig {
|
|
40
|
+
widgetCode: string;
|
|
41
|
+
baseUrl: string;
|
|
42
|
+
tokenEndpoint: string;
|
|
43
|
+
launchElementId?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Initialize KnowledgeOwl widget with OAuth2 authentication.
|
|
47
|
+
* Call this once when your app loads (e.g., in App.tsx or index.tsx).
|
|
48
|
+
*
|
|
49
|
+
* For SPAs/React apps: Uses _ko19.open() for launch element clicks instead of
|
|
50
|
+
* relying on KO's __ptl element lookup, which can fail with dynamic DOM updates.
|
|
51
|
+
* This follows KO's recommended pattern for programmatic widget control.
|
|
52
|
+
* @see https://support.knowledgeowl.com/help/widget-20-using-the-widget-on-single-page-applications
|
|
53
|
+
*/
|
|
54
|
+
export declare function initializeKnowledgeOwlWidget(config: KnowledgeOwlConfig): void;
|
|
55
|
+
/**
|
|
56
|
+
* Call this function whenever your route changes in the SPA
|
|
57
|
+
* This updates the "Recommended" tab in the widget based on the current page
|
|
58
|
+
*/
|
|
59
|
+
export declare function notifyKnowledgeOwlRouteChange(currentPath: string): void;
|
|
60
|
+
/**
|
|
61
|
+
* Cleanup function - call when unmounting or cleaning up
|
|
62
|
+
*/
|
|
63
|
+
export declare function cleanupKnowledgeOwlWidget(): void;
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KnowledgeOwl Widget Integration
|
|
3
|
+
*
|
|
4
|
+
* This module handles the integration of KnowledgeOwl widget with OAuth2 authentication.
|
|
5
|
+
* It provides seamless SSO for logged-in users without requiring separate login.
|
|
6
|
+
*/
|
|
7
|
+
let refreshTimer = null;
|
|
8
|
+
let launchElementObserver = null;
|
|
9
|
+
const getAccessToken = () => {
|
|
10
|
+
const sessionKeys = Object.keys(sessionStorage);
|
|
11
|
+
const oidcUserKey = sessionKeys.find((key) => key.startsWith('oidc.user'));
|
|
12
|
+
if (oidcUserKey) {
|
|
13
|
+
try {
|
|
14
|
+
const oidcUser = JSON.parse(sessionStorage.getItem(oidcUserKey) || '');
|
|
15
|
+
return oidcUser.access_token;
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
console.error('Error parsing OIDC user data:', error);
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return null;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Fetches KnowledgeOwl OAuth access token from backend
|
|
26
|
+
*/
|
|
27
|
+
async function fetchKoAccessTokenFromBackend(tokenEndpoint) {
|
|
28
|
+
try {
|
|
29
|
+
const accessToken = getAccessToken();
|
|
30
|
+
const response = await fetch(tokenEndpoint, {
|
|
31
|
+
method: 'GET',
|
|
32
|
+
credentials: 'include',
|
|
33
|
+
headers: {
|
|
34
|
+
'Content-Type': 'application/json',
|
|
35
|
+
...(accessToken && { Authorization: `Bearer ${accessToken}` }),
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
if (!response.ok) {
|
|
39
|
+
throw new Error(`Token request failed: ${response.status}`);
|
|
40
|
+
}
|
|
41
|
+
const data = await response.json();
|
|
42
|
+
return data;
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
console.error('Failed to fetch KO access token:', error);
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Helper to authenticate into the widget and schedule token refresh
|
|
51
|
+
*/
|
|
52
|
+
function getKoTokenAndAuth(tokenEndpoint, isRetry = false) {
|
|
53
|
+
fetchKoAccessTokenFromBackend(tokenEndpoint)
|
|
54
|
+
.then(({ accessToken, expiresIn }) => {
|
|
55
|
+
if (!accessToken) {
|
|
56
|
+
throw new Error('No KO accessToken returned from backend');
|
|
57
|
+
}
|
|
58
|
+
// Authenticate the widget with the OAuth token
|
|
59
|
+
if (window._ko19?.authenticate) {
|
|
60
|
+
window._ko19.authenticate({ type: 'oauth', token: accessToken });
|
|
61
|
+
}
|
|
62
|
+
// Schedule proactive token refresh at 90% of TTL
|
|
63
|
+
if (refreshTimer) {
|
|
64
|
+
clearTimeout(refreshTimer);
|
|
65
|
+
}
|
|
66
|
+
if (typeof expiresIn === 'number' && expiresIn > 0) {
|
|
67
|
+
const refreshMs = Math.floor(expiresIn * 0.9 * 1000);
|
|
68
|
+
refreshTimer = setTimeout(() => {
|
|
69
|
+
getKoTokenAndAuth(tokenEndpoint, false);
|
|
70
|
+
}, refreshMs);
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
.catch((err) => {
|
|
74
|
+
console.error('Failed to get KO token', err);
|
|
75
|
+
// Implement backoff retry on initial failure
|
|
76
|
+
if (!isRetry) {
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
getKoTokenAndAuth(tokenEndpoint, true);
|
|
79
|
+
}, 5000);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Attaches a click handler to the launch element that opens the widget.
|
|
85
|
+
* Uses _ko19.open() which is the KO-recommended approach for SPAs.
|
|
86
|
+
* @see https://support.knowledgeowl.com/help/open-widget-to-specific-tab
|
|
87
|
+
*/
|
|
88
|
+
function attachLaunchClickHandler(element) {
|
|
89
|
+
// Prevent duplicate handlers using a data attribute marker
|
|
90
|
+
if (element.dataset.koClickAttached === 'true') {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
element.dataset.koClickAttached = 'true';
|
|
94
|
+
element.style.cursor = 'pointer';
|
|
95
|
+
element.addEventListener('click', (e) => {
|
|
96
|
+
e.preventDefault();
|
|
97
|
+
// Use _ko19.open() as recommended by KO documentation
|
|
98
|
+
if (window._ko19?.open) {
|
|
99
|
+
window._ko19.open();
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Observes the DOM for the launch element and attaches click handler.
|
|
105
|
+
* Continuously watches for React remounts to re-attach the handler.
|
|
106
|
+
*/
|
|
107
|
+
function setupLaunchElementObserver(elementId) {
|
|
108
|
+
// Clean up any existing observer
|
|
109
|
+
if (launchElementObserver) {
|
|
110
|
+
launchElementObserver.disconnect();
|
|
111
|
+
launchElementObserver = null;
|
|
112
|
+
}
|
|
113
|
+
// Helper to check and attach handler
|
|
114
|
+
const checkAndAttach = () => {
|
|
115
|
+
const element = document.getElementById(elementId);
|
|
116
|
+
if (element) {
|
|
117
|
+
attachLaunchClickHandler(element);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
// Try immediately
|
|
121
|
+
checkAndAttach();
|
|
122
|
+
// Set up observer to handle React remounts (element getting recreated)
|
|
123
|
+
launchElementObserver = new MutationObserver(checkAndAttach);
|
|
124
|
+
// Start observing when document.body is ready
|
|
125
|
+
if (document.body) {
|
|
126
|
+
launchElementObserver.observe(document.body, {
|
|
127
|
+
childList: true,
|
|
128
|
+
subtree: true,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
133
|
+
launchElementObserver?.observe(document.body, {
|
|
134
|
+
childList: true,
|
|
135
|
+
subtree: true,
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Initialize KnowledgeOwl widget with OAuth2 authentication.
|
|
142
|
+
* Call this once when your app loads (e.g., in App.tsx or index.tsx).
|
|
143
|
+
*
|
|
144
|
+
* For SPAs/React apps: Uses _ko19.open() for launch element clicks instead of
|
|
145
|
+
* relying on KO's __ptl element lookup, which can fail with dynamic DOM updates.
|
|
146
|
+
* This follows KO's recommended pattern for programmatic widget control.
|
|
147
|
+
* @see https://support.knowledgeowl.com/help/widget-20-using-the-widget-on-single-page-applications
|
|
148
|
+
*/
|
|
149
|
+
export function initializeKnowledgeOwlWidget(config) {
|
|
150
|
+
// Initialize global KO object
|
|
151
|
+
window._ko19 = window._ko19 || {};
|
|
152
|
+
window._ko19.__pc = config.widgetCode;
|
|
153
|
+
window._ko19.base_url = config.baseUrl;
|
|
154
|
+
// For SPA compatibility: Create a hidden placeholder element for KO's __ptl lookup.
|
|
155
|
+
// The external KO script needs to find this element, but the actual click handling
|
|
156
|
+
// is done by our MutationObserver on the real UI element (launchElementId).
|
|
157
|
+
const koPlaceholderId = 'ko-widget-placeholder';
|
|
158
|
+
if (!document.getElementById(koPlaceholderId)) {
|
|
159
|
+
const placeholder = document.createElement('div');
|
|
160
|
+
placeholder.id = koPlaceholderId;
|
|
161
|
+
placeholder.style.display = 'none';
|
|
162
|
+
document.body.appendChild(placeholder);
|
|
163
|
+
}
|
|
164
|
+
window._ko19.__ptl = koPlaceholderId;
|
|
165
|
+
// Set up lifecycle hooks
|
|
166
|
+
window._ko19.onLoad = () => {
|
|
167
|
+
getKoTokenAndAuth(config.tokenEndpoint);
|
|
168
|
+
};
|
|
169
|
+
window._ko19.onAuthResp = (resp) => {
|
|
170
|
+
if (resp?.error) {
|
|
171
|
+
console.warn('KO auth response error:', resp);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
window._ko19.onAuthError = () => {
|
|
175
|
+
console.warn('KO auth error; re-authorizing…');
|
|
176
|
+
getKoTokenAndAuth(config.tokenEndpoint, true);
|
|
177
|
+
};
|
|
178
|
+
// Load the widget script
|
|
179
|
+
const script = document.createElement('script');
|
|
180
|
+
script.type = 'text/javascript';
|
|
181
|
+
script.async = true;
|
|
182
|
+
script.src = `${config.baseUrl}/widget/load`;
|
|
183
|
+
script.onerror = () => {
|
|
184
|
+
console.error('Failed to load KnowledgeOwl widget script');
|
|
185
|
+
};
|
|
186
|
+
document.head.appendChild(script);
|
|
187
|
+
// For SPA compatibility: Set up our own click handler using MutationObserver
|
|
188
|
+
// This handles React's dynamic DOM and element remounting
|
|
189
|
+
if (config.launchElementId) {
|
|
190
|
+
setupLaunchElementObserver(config.launchElementId);
|
|
191
|
+
}
|
|
192
|
+
// Set up SPA route change handler
|
|
193
|
+
window.koWidgetRouteChanged = (currentUrlString) => {
|
|
194
|
+
try {
|
|
195
|
+
// Update recommended articles based on current page
|
|
196
|
+
if (typeof window._ko19?.updateRecommended === 'function') {
|
|
197
|
+
window._ko19.updateRecommended(currentUrlString);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
catch (e) {
|
|
201
|
+
console.warn('KO updateRecommended failed', e);
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Call this function whenever your route changes in the SPA
|
|
207
|
+
* This updates the "Recommended" tab in the widget based on the current page
|
|
208
|
+
*/
|
|
209
|
+
export function notifyKnowledgeOwlRouteChange(currentPath) {
|
|
210
|
+
if (window.koWidgetRouteChanged) {
|
|
211
|
+
window.koWidgetRouteChanged(currentPath);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Cleanup function - call when unmounting or cleaning up
|
|
216
|
+
*/
|
|
217
|
+
export function cleanupKnowledgeOwlWidget() {
|
|
218
|
+
if (refreshTimer) {
|
|
219
|
+
clearTimeout(refreshTimer);
|
|
220
|
+
refreshTimer = null;
|
|
221
|
+
}
|
|
222
|
+
if (launchElementObserver) {
|
|
223
|
+
launchElementObserver.disconnect();
|
|
224
|
+
launchElementObserver = null;
|
|
225
|
+
}
|
|
226
|
+
}
|