@sfperusacdev/sf-ui 0.1.11
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/README.md +116 -0
- package/dist/sf-ui.css +2 -0
- package/dist/sf-ui.js +13228 -0
- package/dist/sf-ui.js.map +1 -0
- package/dist/sf-ui.umd.cjs +21 -0
- package/dist/sf-ui.umd.cjs.map +1 -0
- package/dist/theme/dark.css +156 -0
- package/dist/theme/erp.css +84 -0
- package/dist/theme/sark.css +117 -0
- package/dist/theme/sf-tokens.css +474 -0
- package/dist/types/src/adapters/maps/google/index.d.ts +18 -0
- package/dist/types/src/adapters/maps/index.d.ts +2 -0
- package/dist/types/src/adapters/maps/leaflet/index.d.ts +10 -0
- package/dist/types/src/components/advanced-inputs/CodeEditor.d.ts +20 -0
- package/dist/types/src/components/advanced-inputs/MapFlyTo.d.ts +9 -0
- package/dist/types/src/components/advanced-inputs/MapGeocoderBar.d.ts +8 -0
- package/dist/types/src/components/advanced-inputs/MapPicker.d.ts +22 -0
- package/dist/types/src/components/advanced-inputs/MapPickerMap.d.ts +10 -0
- package/dist/types/src/components/advanced-inputs/PhotoInput.d.ts +18 -0
- package/dist/types/src/components/advanced-inputs/RichTextEditor.d.ts +16 -0
- package/dist/types/src/components/advanced-inputs/SignaturePad.d.ts +17 -0
- package/dist/types/src/components/advanced-inputs/codeEditorClassName.d.ts +7 -0
- package/dist/types/src/components/advanced-inputs/codeEditorExtensions.d.ts +3 -0
- package/dist/types/src/components/advanced-inputs/index.d.ts +8 -0
- package/dist/types/src/components/advanced-inputs/mapPickerUtils.d.ts +19 -0
- package/dist/types/src/components/advanced-inputs/types.d.ts +5 -0
- package/dist/types/src/components/buttons/ActionButton.d.ts +11 -0
- package/dist/types/src/components/buttons/Button.d.ts +12 -0
- package/dist/types/src/components/buttons/ButtonGroup.d.ts +7 -0
- package/dist/types/src/components/buttons/FormActions.d.ts +12 -0
- package/dist/types/src/components/buttons/RowActions.d.ts +10 -0
- package/dist/types/src/components/buttons/ToolbarButton.d.ts +10 -0
- package/dist/types/src/components/buttons/buttonClassName.d.ts +9 -0
- package/dist/types/src/components/buttons/index.d.ts +9 -0
- package/dist/types/src/components/cards/Badge.d.ts +11 -0
- package/dist/types/src/components/cards/EntityCard.d.ts +28 -0
- package/dist/types/src/components/cards/KPICard.d.ts +22 -0
- package/dist/types/src/components/cards/MetricBar.d.ts +13 -0
- package/dist/types/src/components/cards/ModuleCard.d.ts +34 -0
- package/dist/types/src/components/cards/RecommendationCard.d.ts +13 -0
- package/dist/types/src/components/cards/badgeClassName.d.ts +8 -0
- package/dist/types/src/components/cards/index.d.ts +12 -0
- package/dist/types/src/components/cards/types.d.ts +16 -0
- package/dist/types/src/components/charts/Chart.d.ts +3 -0
- package/dist/types/src/components/charts/Sparkline.d.ts +2 -0
- package/dist/types/src/components/charts/chartUtils.d.ts +14 -0
- package/dist/types/src/components/charts/index.d.ts +5 -0
- package/dist/types/src/components/charts/types.d.ts +32 -0
- package/dist/types/src/components/dashboard/Calendar.d.ts +10 -0
- package/dist/types/src/components/dashboard/DashboardCard.d.ts +43 -0
- package/dist/types/src/components/dashboard/DonutGauge.d.ts +25 -0
- package/dist/types/src/components/dashboard/EventLog.d.ts +37 -0
- package/dist/types/src/components/dashboard/Stepper.d.ts +14 -0
- package/dist/types/src/components/dashboard/calendarUtils.d.ts +5 -0
- package/dist/types/src/components/dashboard/index.d.ts +11 -0
- package/dist/types/src/components/dashboard/types.d.ts +39 -0
- package/dist/types/src/components/display/AuditTimeline.d.ts +20 -0
- package/dist/types/src/components/display/Avatar.d.ts +22 -0
- package/dist/types/src/components/display/Carousel.d.ts +10 -0
- package/dist/types/src/components/display/LiveChip.d.ts +6 -0
- package/dist/types/src/components/display/LiveStatusBar.d.ts +23 -0
- package/dist/types/src/components/display/PassengerBoardCard.d.ts +22 -0
- package/dist/types/src/components/display/RecordList.d.ts +26 -0
- package/dist/types/src/components/display/Timeline.d.ts +17 -0
- package/dist/types/src/components/display/index.d.ts +16 -0
- package/dist/types/src/components/document-inputs/CurrencyInput.d.ts +21 -0
- package/dist/types/src/components/document-inputs/DniInput.d.ts +17 -0
- package/dist/types/src/components/document-inputs/DocumentInputs.fuzz.test.d.ts +1 -0
- package/dist/types/src/components/document-inputs/OtpInput.d.ts +15 -0
- package/dist/types/src/components/document-inputs/PhoneInput.d.ts +18 -0
- package/dist/types/src/components/document-inputs/RucInput.d.ts +17 -0
- package/dist/types/src/components/document-inputs/documentUtils.d.ts +11 -0
- package/dist/types/src/components/document-inputs/index.d.ts +7 -0
- package/dist/types/src/components/feedback/AccessDenied.d.ts +8 -0
- package/dist/types/src/components/feedback/Alert.d.ts +13 -0
- package/dist/types/src/components/feedback/EmptyState.d.ts +9 -0
- package/dist/types/src/components/feedback/ErrorView.d.ts +8 -0
- package/dist/types/src/components/feedback/LoadingView.d.ts +5 -0
- package/dist/types/src/components/feedback/RetryBlock.d.ts +11 -0
- package/dist/types/src/components/feedback/Skeleton.d.ts +9 -0
- package/dist/types/src/components/feedback/Spinner.d.ts +6 -0
- package/dist/types/src/components/feedback/Toast.d.ts +27 -0
- package/dist/types/src/components/feedback/index.d.ts +13 -0
- package/dist/types/src/components/icons/SyncIcon.d.ts +4 -0
- package/dist/types/src/components/icons/index.d.ts +2 -0
- package/dist/types/src/components/inputs/AsyncCardSelect.d.ts +17 -0
- package/dist/types/src/components/inputs/AsyncSearchSelect.d.ts +20 -0
- package/dist/types/src/components/inputs/AsyncSearchTableSelect.d.ts +21 -0
- package/dist/types/src/components/inputs/BooleanCheckbox.d.ts +14 -0
- package/dist/types/src/components/inputs/CardSelect.d.ts +18 -0
- package/dist/types/src/components/inputs/Checkbox.d.ts +16 -0
- package/dist/types/src/components/inputs/CheckboxGroup.d.ts +18 -0
- package/dist/types/src/components/inputs/DateInput.d.ts +20 -0
- package/dist/types/src/components/inputs/DatePicker.d.ts +19 -0
- package/dist/types/src/components/inputs/DisplayField.d.ts +15 -0
- package/dist/types/src/components/inputs/FieldLayout.d.ts +13 -0
- package/dist/types/src/components/inputs/FileInput.d.ts +21 -0
- package/dist/types/src/components/inputs/FileInput.security.test.d.ts +1 -0
- package/dist/types/src/components/inputs/Input.d.ts +21 -0
- package/dist/types/src/components/inputs/NumberInput.d.ts +21 -0
- package/dist/types/src/components/inputs/PasswordInput.d.ts +17 -0
- package/dist/types/src/components/inputs/RadioGroup.d.ts +18 -0
- package/dist/types/src/components/inputs/SearchSelect.d.ts +24 -0
- package/dist/types/src/components/inputs/SearchTableSelect.d.ts +22 -0
- package/dist/types/src/components/inputs/Select.d.ts +18 -0
- package/dist/types/src/components/inputs/SelectOption.d.ts +4 -0
- package/dist/types/src/components/inputs/SmartDateInput.d.ts +35 -0
- package/dist/types/src/components/inputs/SmartDateInput.test.d.ts +1 -0
- package/dist/types/src/components/inputs/SmartInput.d.ts +84 -0
- package/dist/types/src/components/inputs/SmartInput.test.d.ts +1 -0
- package/dist/types/src/components/inputs/SmartSelect.d.ts +77 -0
- package/dist/types/src/components/inputs/SmartSelect.test.d.ts +1 -0
- package/dist/types/src/components/inputs/TextArea.d.ts +19 -0
- package/dist/types/src/components/inputs/Toggle.d.ts +18 -0
- package/dist/types/src/components/inputs/Transfer.d.ts +10 -0
- package/dist/types/src/components/inputs/TreeSelect.d.ts +21 -0
- package/dist/types/src/components/inputs/YesNoSelect.d.ts +17 -0
- package/dist/types/src/components/inputs/fieldClassName.d.ts +8 -0
- package/dist/types/src/components/inputs/index.d.ts +37 -0
- package/dist/types/src/components/inputs/inputFocusTransition.d.ts +2 -0
- package/dist/types/src/components/inputs/passwordStrength.d.ts +7 -0
- package/dist/types/src/components/inputs/textareaClassName.d.ts +7 -0
- package/dist/types/src/components/inputs/treeSelectUtils.d.ts +9 -0
- package/dist/types/src/components/inputs/types-form.d.ts +12 -0
- package/dist/types/src/components/inputs/useAsyncOptions.d.ts +15 -0
- package/dist/types/src/components/interactive-inputs/CardRadioGroup.d.ts +15 -0
- package/dist/types/src/components/interactive-inputs/ColorInput.d.ts +15 -0
- package/dist/types/src/components/interactive-inputs/KeyValueInput.d.ts +16 -0
- package/dist/types/src/components/interactive-inputs/NumberStepper.d.ts +17 -0
- package/dist/types/src/components/interactive-inputs/ProgressBar.d.ts +15 -0
- package/dist/types/src/components/interactive-inputs/ProgressBarReadonly.d.ts +15 -0
- package/dist/types/src/components/interactive-inputs/RangeSliderInput.d.ts +20 -0
- package/dist/types/src/components/interactive-inputs/RatingInput.d.ts +16 -0
- package/dist/types/src/components/interactive-inputs/SliderInput.d.ts +19 -0
- package/dist/types/src/components/interactive-inputs/SortableList.d.ts +12 -0
- package/dist/types/src/components/interactive-inputs/TagsInput.d.ts +16 -0
- package/dist/types/src/components/interactive-inputs/index.d.ts +24 -0
- package/dist/types/src/components/interactive-inputs/interactiveUtils.d.ts +14 -0
- package/dist/types/src/components/interactive-inputs/types.d.ts +8 -0
- package/dist/types/src/components/layout/Accordion.d.ts +17 -0
- package/dist/types/src/components/layout/AppShell.d.ts +100 -0
- package/dist/types/src/components/layout/AppShell.test.d.ts +1 -0
- package/dist/types/src/components/layout/Breadcrumb.d.ts +14 -0
- package/dist/types/src/components/layout/DateWeekStrip.d.ts +12 -0
- package/dist/types/src/components/layout/FilterBar.d.ts +54 -0
- package/dist/types/src/components/layout/FormWizard.d.ts +11 -0
- package/dist/types/src/components/layout/HeightProvider.d.ts +7 -0
- package/dist/types/src/components/layout/ItineraryEditor.d.ts +20 -0
- package/dist/types/src/components/layout/LiveRouteBoard.d.ts +50 -0
- package/dist/types/src/components/layout/MaestroLayout.d.ts +15 -0
- package/dist/types/src/components/layout/MasterDetailLayout.d.ts +21 -0
- package/dist/types/src/components/layout/PageContainer.d.ts +8 -0
- package/dist/types/src/components/layout/PageHeader.d.ts +13 -0
- package/dist/types/src/components/layout/ScrollArea.d.ts +9 -0
- package/dist/types/src/components/layout/Separator.d.ts +6 -0
- package/dist/types/src/components/layout/SidePanel.d.ts +15 -0
- package/dist/types/src/components/layout/SidePanelContainer.d.ts +21 -0
- package/dist/types/src/components/layout/TablePageLayout.d.ts +9 -0
- package/dist/types/src/components/layout/Tabs.d.ts +17 -0
- package/dist/types/src/components/layout/UnitSelector.d.ts +14 -0
- package/dist/types/src/components/layout/Visibility.d.ts +10 -0
- package/dist/types/src/components/layout/WeekdayToggleStrip.d.ts +12 -0
- package/dist/types/src/components/layout/flotaLayout.test.d.ts +1 -0
- package/dist/types/src/components/layout/index.d.ts +40 -0
- package/dist/types/src/components/layout/transportApi.test.d.ts +1 -0
- package/dist/types/src/components/layout/useFormWizard.d.ts +40 -0
- package/dist/types/src/components/maps/base/MapFrame.d.ts +8 -0
- package/dist/types/src/components/maps/base/MapStatus.d.ts +5 -0
- package/dist/types/src/components/maps/base/index.d.ts +4 -0
- package/dist/types/src/components/maps/forms/AddressSearchInput.d.ts +16 -0
- package/dist/types/src/components/maps/forms/AreaInput.d.ts +7 -0
- package/dist/types/src/components/maps/forms/CoordinatesInput.d.ts +6 -0
- package/dist/types/src/components/maps/forms/LocationPicker.d.ts +16 -0
- package/dist/types/src/components/maps/forms/LocationPicker.test.d.ts +1 -0
- package/dist/types/src/components/maps/forms/RouteInput.d.ts +7 -0
- package/dist/types/src/components/maps/forms/ShapeInput.d.ts +19 -0
- package/dist/types/src/components/maps/forms/ShapeInput.test.d.ts +1 -0
- package/dist/types/src/components/maps/forms/SmartMapInput.d.ts +39 -0
- package/dist/types/src/components/maps/forms/SmartMapInput.test.d.ts +1 -0
- package/dist/types/src/components/maps/forms/index.d.ts +12 -0
- package/dist/types/src/components/maps/index.d.ts +3 -0
- package/dist/types/src/components/maps/renderers/google/GoogleMapRenderer.d.ts +6 -0
- package/dist/types/src/components/maps/renderers/google/index.d.ts +1 -0
- package/dist/types/src/components/maps/renderers/index.d.ts +2 -0
- package/dist/types/src/components/maps/renderers/leaflet/LeafletMapRenderer.d.ts +7 -0
- package/dist/types/src/components/maps/renderers/leaflet/index.d.ts +1 -0
- package/dist/types/src/components/maps/views/MapView.d.ts +9 -0
- package/dist/types/src/components/maps/views/index.d.ts +2 -0
- package/dist/types/src/components/media-inputs/FileDropInput.d.ts +21 -0
- package/dist/types/src/components/media-inputs/MultiPhotoInput.d.ts +20 -0
- package/dist/types/src/components/media-inputs/MultiPhotoInput.security.test.d.ts +1 -0
- package/dist/types/src/components/media-inputs/PhotoCropEditor.d.ts +9 -0
- package/dist/types/src/components/media-inputs/PhotoCropInput.d.ts +19 -0
- package/dist/types/src/components/media-inputs/PhotoInput.d.ts +1 -0
- package/dist/types/src/components/media-inputs/SignaturePad.d.ts +1 -0
- package/dist/types/src/components/media-inputs/SmartMediaInput.d.ts +43 -0
- package/dist/types/src/components/media-inputs/SmartMediaInput.test.d.ts +1 -0
- package/dist/types/src/components/media-inputs/cropImageFromArea.d.ts +7 -0
- package/dist/types/src/components/media-inputs/index.d.ts +13 -0
- package/dist/types/src/components/media-inputs/mediaUtils.d.ts +9 -0
- package/dist/types/src/components/media-inputs/types.d.ts +6 -0
- package/dist/types/src/components/overlays/CommandPalette.d.ts +17 -0
- package/dist/types/src/components/overlays/ConfirmDialog.d.ts +14 -0
- package/dist/types/src/components/overlays/ContextMenu.d.ts +15 -0
- package/dist/types/src/components/overlays/Drawer.d.ts +23 -0
- package/dist/types/src/components/overlays/DropdownMenu.d.ts +21 -0
- package/dist/types/src/components/overlays/MessageDialog.d.ts +11 -0
- package/dist/types/src/components/overlays/Modal.d.ts +31 -0
- package/dist/types/src/components/overlays/NotificationBell.d.ts +12 -0
- package/dist/types/src/components/overlays/OptionItem.d.ts +11 -0
- package/dist/types/src/components/overlays/Popover.d.ts +18 -0
- package/dist/types/src/components/overlays/ProductTour.d.ts +15 -0
- package/dist/types/src/components/overlays/QRView.d.ts +9 -0
- package/dist/types/src/components/overlays/TabMenuOption.d.ts +9 -0
- package/dist/types/src/components/overlays/Tooltip.d.ts +10 -0
- package/dist/types/src/components/overlays/index.d.ts +27 -0
- package/dist/types/src/components/range-inputs/DateRangeInput.d.ts +19 -0
- package/dist/types/src/components/range-inputs/DateRangeUtcInput.d.ts +3 -0
- package/dist/types/src/components/range-inputs/TimeRangeInput.d.ts +18 -0
- package/dist/types/src/components/range-inputs/index.d.ts +8 -0
- package/dist/types/src/components/range-inputs/rangeUtils.d.ts +8 -0
- package/dist/types/src/components/range-inputs/types.d.ts +10 -0
- package/dist/types/src/components/table/ActiveFiltersBar.d.ts +10 -0
- package/dist/types/src/components/table/AsyncCustomTable.d.ts +13 -0
- package/dist/types/src/components/table/CustomTable.d.ts +83 -0
- package/dist/types/src/components/table/EditableDataGrid.d.ts +15 -0
- package/dist/types/src/components/table/EditableDataGrid.test.d.ts +1 -0
- package/dist/types/src/components/table/ExpandableTableSection.d.ts +26 -0
- package/dist/types/src/components/table/PaginationRangeInput.d.ts +14 -0
- package/dist/types/src/components/table/TableColumnSettings.d.ts +13 -0
- package/dist/types/src/components/table/TableFiltersPanel.d.ts +17 -0
- package/dist/types/src/components/table/TableSortingPanel.d.ts +16 -0
- package/dist/types/src/components/table/activeFilterUtils.d.ts +9 -0
- package/dist/types/src/components/table/asyncStateStore.d.ts +6 -0
- package/dist/types/src/components/table/customTableController.d.ts +51 -0
- package/dist/types/src/components/table/index.d.ts +26 -0
- package/dist/types/src/components/table/tableFilters.d.ts +21 -0
- package/dist/types/src/components/table/useTableColumnSettings.d.ts +29 -0
- package/dist/types/src/components/visualization/NetworkLegend.d.ts +8 -0
- package/dist/types/src/components/visualization/NetworkMap.d.ts +19 -0
- package/dist/types/src/components/visualization/OrgTree.d.ts +20 -0
- package/dist/types/src/components/visualization/index.d.ts +9 -0
- package/dist/types/src/components/visualization/networkMapUtils.d.ts +32 -0
- package/dist/types/src/components/visualization/orgTreeUtils.d.ts +6 -0
- package/dist/types/src/components/visualization/types.d.ts +38 -0
- package/dist/types/src/constants/index.d.ts +1 -0
- package/dist/types/src/constants/maps/index.d.ts +8 -0
- package/dist/types/src/contracts/maps/index.d.ts +27 -0
- package/dist/types/src/engines/maps/google/googleMapEngine.d.ts +3 -0
- package/dist/types/src/engines/maps/google/index.d.ts +1 -0
- package/dist/types/src/engines/maps/index.d.ts +2 -0
- package/dist/types/src/engines/maps/leaflet/index.d.ts +1 -0
- package/dist/types/src/engines/maps/leaflet/leafletMapEngine.d.ts +3 -0
- package/dist/types/src/hooks/index.d.ts +11 -0
- package/dist/types/src/hooks/maps/index.d.ts +3 -0
- package/dist/types/src/hooks/maps/useAddressSearch.d.ts +7 -0
- package/dist/types/src/hooks/maps/useAddressSearch.test.d.ts +1 -0
- package/dist/types/src/hooks/maps/useMapEngine.d.ts +5 -0
- package/dist/types/src/hooks/maps/useMapsConfig.d.ts +1 -0
- package/dist/types/src/hooks/useArrayPaginator.d.ts +21 -0
- package/dist/types/src/hooks/useClickAway.d.ts +2 -0
- package/dist/types/src/hooks/useCustomForm.d.ts +26 -0
- package/dist/types/src/hooks/useFilterData.d.ts +10 -0
- package/dist/types/src/hooks/useIsClient.d.ts +2 -0
- package/dist/types/src/hooks/useMaestroFilter.d.ts +15 -0
- package/dist/types/src/hooks/useMaestroFilter.test.d.ts +1 -0
- package/dist/types/src/hooks/useQueryStringState.d.ts +2 -0
- package/dist/types/src/hooks/useStoredState.d.ts +2 -0
- package/dist/types/src/index.d.ts +24 -0
- package/dist/types/src/performance/catalogPhases.performance.test.d.ts +1 -0
- package/dist/types/src/performance/componentRender.performance.test.d.ts +1 -0
- package/dist/types/src/providers/SfProvider.d.ts +21 -0
- package/dist/types/src/providers/SfProvider.maps.test.d.ts +1 -0
- package/dist/types/src/providers/index.d.ts +2 -0
- package/dist/types/src/services/maps/distance/basicDistanceService.d.ts +2 -0
- package/dist/types/src/services/maps/distance/basicDistanceService.test.d.ts +1 -0
- package/dist/types/src/services/maps/distance/index.d.ts +1 -0
- package/dist/types/src/services/maps/geocoding/googleGeocodingService.d.ts +3 -0
- package/dist/types/src/services/maps/geocoding/index.d.ts +2 -0
- package/dist/types/src/services/maps/geocoding/nominatimGeocodingService.d.ts +2 -0
- package/dist/types/src/services/maps/googleMapsLoader.d.ts +66 -0
- package/dist/types/src/services/maps/index.d.ts +5 -0
- package/dist/types/src/services/maps/places/index.d.ts +1 -0
- package/dist/types/src/services/maps/places/mapsPlacesService.d.ts +2 -0
- package/dist/types/src/services/maps/routing/basicRouteService.d.ts +2 -0
- package/dist/types/src/services/maps/routing/basicRouteService.test.d.ts +1 -0
- package/dist/types/src/services/maps/routing/index.d.ts +1 -0
- package/dist/types/src/types/maps/index.d.ts +155 -0
- package/dist/types/src/utils/exportTableCsv.d.ts +11 -0
- package/dist/types/src/utils/exportTableXlsx.d.ts +5 -0
- package/dist/types/src/utils/index.d.ts +9 -0
- package/dist/types/src/utils/maps/geocoder.d.ts +8 -0
- package/dist/types/src/utils/maps/index.d.ts +10 -0
- package/dist/types/src/utils/maps/index.test.d.ts +1 -0
- package/dist/types/src/utils/queryParams.d.ts +3 -0
- package/dist/types/src/utils/resolveCssVar.d.ts +2 -0
- package/dist/types/src/utils/sanitizeRichHtml.d.ts +1 -0
- package/dist/types/src/utils/sanitizeRichHtml.test.d.ts +1 -0
- package/dist/types/src/utils/spreadsheetSanitizer.d.ts +1 -0
- package/dist/types/src/utils/spreadsheetSanitizer.test.d.ts +1 -0
- package/dist/types/src/utils/toStringArray.d.ts +1 -0
- package/dist/types/src/utils/validators.d.ts +52 -0
- package/package.json +128 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type OrgTreeNode = {
|
|
2
|
+
id: string;
|
|
3
|
+
parentId?: string | null;
|
|
4
|
+
label: string;
|
|
5
|
+
type: string;
|
|
6
|
+
shortLabel?: string | null;
|
|
7
|
+
order?: number;
|
|
8
|
+
meta?: Record<string, unknown>;
|
|
9
|
+
};
|
|
10
|
+
export type OrgTreeNodeRow<T extends OrgTreeNode = OrgTreeNode> = T & {
|
|
11
|
+
depth: number;
|
|
12
|
+
hasChildren: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type OrgTreeTheme = {
|
|
15
|
+
label: string;
|
|
16
|
+
labelShort: string;
|
|
17
|
+
rowClass: string;
|
|
18
|
+
barClass: string;
|
|
19
|
+
};
|
|
20
|
+
export type NetworkNodeStatus = "normal" | "warning" | "critical" | "maintenance";
|
|
21
|
+
export type NetworkNodeKind = "default" | "nap" | "olt" | "splitter";
|
|
22
|
+
export type NetworkEdgeType = "backbone" | "distribution" | "maintenance";
|
|
23
|
+
export type NetworkBasemap = "street" | "satellite";
|
|
24
|
+
export type NetworkNode = {
|
|
25
|
+
id: string;
|
|
26
|
+
label: string;
|
|
27
|
+
lat: number;
|
|
28
|
+
lng: number;
|
|
29
|
+
status: NetworkNodeStatus;
|
|
30
|
+
kind?: NetworkNodeKind;
|
|
31
|
+
value?: number;
|
|
32
|
+
icon?: string;
|
|
33
|
+
};
|
|
34
|
+
export type NetworkEdge = {
|
|
35
|
+
from: string;
|
|
36
|
+
to: string;
|
|
37
|
+
type?: NetworkEdgeType;
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './maps';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SfLatLng, SfMapEngineCapabilities } from '../../types/maps';
|
|
2
|
+
export declare const SF_MAPS_CONFIG_ERROR = "Maps config not found. Wrap your app with <SfProvider maps={...}>.";
|
|
3
|
+
export declare const SF_DEFAULT_MAP_CENTER: SfLatLng;
|
|
4
|
+
export declare const SF_DEFAULT_MAP_ZOOM = 13;
|
|
5
|
+
export declare const SF_OSM_TILE_URL = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
|
|
6
|
+
export declare const SF_OSM_ATTRIBUTION = "© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>";
|
|
7
|
+
export declare const SF_LEAFLET_ENGINE_CAPABILITIES: SfMapEngineCapabilities;
|
|
8
|
+
export declare const SF_GOOGLE_ENGINE_CAPABILITIES: SfMapEngineCapabilities;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SfDistanceCapabilities, SfDistanceInput, SfDistanceResult, SfGeocodingCapabilities, SfLatLng, SfMapEngineCapabilities, SfMapRenderer, SfPlace, SfPlacesCapabilities, SfRoute, SfRouteInput, SfRoutingCapabilities } from '../../types/maps';
|
|
2
|
+
export interface IMapEngine {
|
|
3
|
+
id: string;
|
|
4
|
+
capabilities: SfMapEngineCapabilities;
|
|
5
|
+
createRenderer(): SfMapRenderer;
|
|
6
|
+
}
|
|
7
|
+
export interface IGeocoderService {
|
|
8
|
+
id: string;
|
|
9
|
+
capabilities: SfGeocodingCapabilities;
|
|
10
|
+
geocode(query: string): Promise<SfPlace[]>;
|
|
11
|
+
reverseGeocode(point: SfLatLng): Promise<SfPlace | null>;
|
|
12
|
+
}
|
|
13
|
+
export interface IRouteService {
|
|
14
|
+
id: string;
|
|
15
|
+
capabilities: SfRoutingCapabilities;
|
|
16
|
+
calculateRoute(input: SfRouteInput): Promise<SfRoute>;
|
|
17
|
+
}
|
|
18
|
+
export interface IDistanceService {
|
|
19
|
+
id: string;
|
|
20
|
+
capabilities: SfDistanceCapabilities;
|
|
21
|
+
calculateDistance(input: SfDistanceInput): Promise<SfDistanceResult>;
|
|
22
|
+
}
|
|
23
|
+
export interface IPlacesService {
|
|
24
|
+
id: string;
|
|
25
|
+
capabilities: SfPlacesCapabilities;
|
|
26
|
+
searchPlaces(query: string): Promise<SfPlace[]>;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createGoogleMapEngine } from './googleMapEngine';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createLeafletMapEngine } from './leafletMapEngine';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { useMaestroFilter } from './useMaestroFilter';
|
|
2
|
+
export type { UseMaestroFilterOptions, UseMaestroFilterResult } from './useMaestroFilter';
|
|
3
|
+
export { useFilterData } from './useFilterData';
|
|
4
|
+
export { useArrayPaginator, defaultOnSortFunc } from './useArrayPaginator';
|
|
5
|
+
export { useStoredState } from './useStoredState';
|
|
6
|
+
export { useQueryStringState } from './useQueryStringState';
|
|
7
|
+
export { useClickAway } from './useClickAway';
|
|
8
|
+
export { useIsClient } from './useIsClient';
|
|
9
|
+
export { useCustomForm } from './useCustomForm';
|
|
10
|
+
export type { UseCustomFormProps } from './useCustomForm';
|
|
11
|
+
export * from './maps';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useMapsConfig: () => import('../..').SfMapsConfig;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SortingState } from '@tanstack/react-table';
|
|
2
|
+
type LimitOffset = {
|
|
3
|
+
limit: number;
|
|
4
|
+
offset: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const defaultOnSortFunc: <T>(a: T, b: T, columnId: string) => number;
|
|
7
|
+
export declare const useArrayPaginator: <T>(array: T[], opts?: {
|
|
8
|
+
limit?: number;
|
|
9
|
+
onSortFunc?: (a: T, b: T, columnId: string) => number;
|
|
10
|
+
strictSort?: boolean;
|
|
11
|
+
}) => {
|
|
12
|
+
pageConstraints: {
|
|
13
|
+
limitItems: number;
|
|
14
|
+
offsetItems: number;
|
|
15
|
+
totalItems: number;
|
|
16
|
+
};
|
|
17
|
+
setLimitOffset: ({ limit, offset }: LimitOffset) => void;
|
|
18
|
+
onSortChange: import('react').Dispatch<import('react').SetStateAction<SortingState>>;
|
|
19
|
+
pageData: T[];
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DefaultValues, FieldValues } from 'react-hook-form';
|
|
2
|
+
import type * as yup from "yup";
|
|
3
|
+
type UseCustomFormProps<TValues extends FieldValues> = {
|
|
4
|
+
defaultValues?: DefaultValues<TValues>;
|
|
5
|
+
};
|
|
6
|
+
export declare const useCustomForm: <TSchema extends yup.ObjectSchema<FieldValues>>(schema: TSchema, props?: UseCustomFormProps<yup.Asserts<TSchema>>) => {
|
|
7
|
+
handleSubmit: import('react-hook-form').UseFormHandleSubmit<yup.Asserts<TSchema>, yup.Asserts<TSchema>>;
|
|
8
|
+
watch: import('react-hook-form').UseFormWatch<yup.Asserts<TSchema>>;
|
|
9
|
+
getValues: import('react-hook-form').UseFormGetValues<yup.Asserts<TSchema>>;
|
|
10
|
+
getFieldState: import('react-hook-form').UseFormGetFieldState<yup.Asserts<TSchema>>;
|
|
11
|
+
setError: import('react-hook-form').UseFormSetError<yup.Asserts<TSchema>>;
|
|
12
|
+
clearErrors: import('react-hook-form').UseFormClearErrors<yup.Asserts<TSchema>>;
|
|
13
|
+
setValue: import('react-hook-form').UseFormSetValue<yup.Asserts<TSchema>>;
|
|
14
|
+
setValues: import('react-hook-form').UseFormSetValues<yup.Asserts<TSchema>>;
|
|
15
|
+
trigger: import('react-hook-form').UseFormTrigger<yup.Asserts<TSchema>>;
|
|
16
|
+
formState: import('react-hook-form').FormState<yup.Asserts<TSchema>>;
|
|
17
|
+
resetField: import('react-hook-form').UseFormResetField<yup.Asserts<TSchema>>;
|
|
18
|
+
reset: import('react-hook-form').UseFormReset<yup.Asserts<TSchema>>;
|
|
19
|
+
resetDefaultValues: import('react-hook-form').UseFormResetDefaultValues<yup.Asserts<TSchema>>;
|
|
20
|
+
unregister: import('react-hook-form').UseFormUnregister<yup.Asserts<TSchema>>;
|
|
21
|
+
control: import('react-hook-form').Control<yup.Asserts<TSchema>, any, yup.Asserts<TSchema>>;
|
|
22
|
+
register: import('react-hook-form').UseFormRegister<yup.Asserts<TSchema>>;
|
|
23
|
+
setFocus: import('react-hook-form').UseFormSetFocus<yup.Asserts<TSchema>>;
|
|
24
|
+
subscribe: import('react-hook-form').UseFormSubscribe<yup.Asserts<TSchema>>;
|
|
25
|
+
};
|
|
26
|
+
export type { UseCustomFormProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
type SearchableRecord = Record<string, unknown>;
|
|
3
|
+
type FilterFn<T> = (item: T) => boolean;
|
|
4
|
+
type UseFilterDataOptions<T extends SearchableRecord> = {
|
|
5
|
+
filters?: FilterFn<T>[];
|
|
6
|
+
searchableKeys?: readonly (keyof T & string)[];
|
|
7
|
+
ignoredKeys?: readonly (keyof T & string)[];
|
|
8
|
+
};
|
|
9
|
+
export declare const useFilterData: <T extends SearchableRecord>(data: T[] | undefined, options?: UseFilterDataOptions<T>) => [T[], Dispatch<SetStateAction<string>>];
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type UseMaestroFilterOptions = {
|
|
2
|
+
initialPageSize?: number;
|
|
3
|
+
};
|
|
4
|
+
export type UseMaestroFilterResult<T extends Record<string, unknown>> = {
|
|
5
|
+
query: string;
|
|
6
|
+
setQuery: (value: string) => void;
|
|
7
|
+
pageIndex: number;
|
|
8
|
+
setPageIndex: (index: number) => void;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
setPageSize: (size: number) => void;
|
|
11
|
+
filteredRows: T[];
|
|
12
|
+
pageRows: T[];
|
|
13
|
+
totalItems: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const useMaestroFilter: <T extends Record<string, unknown>>(rows: T[], { initialPageSize }?: UseMaestroFilterOptions) => UseMaestroFilterResult<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from './components/inputs';
|
|
2
|
+
export * from './components/table';
|
|
3
|
+
export * from './components/buttons';
|
|
4
|
+
export * from './components/feedback';
|
|
5
|
+
export * from './components/overlays';
|
|
6
|
+
export * from './components/layout';
|
|
7
|
+
export * from './components/advanced-inputs';
|
|
8
|
+
export * from './components/cards';
|
|
9
|
+
export * from './components/dashboard';
|
|
10
|
+
export * from './components/document-inputs';
|
|
11
|
+
export * from './components/range-inputs';
|
|
12
|
+
export * from './components/media-inputs';
|
|
13
|
+
export * from './components/maps';
|
|
14
|
+
export * from './components/interactive-inputs';
|
|
15
|
+
export * from './components/visualization';
|
|
16
|
+
export * from './components/display';
|
|
17
|
+
export * from './components/charts';
|
|
18
|
+
export * from './components/icons';
|
|
19
|
+
export * from './providers';
|
|
20
|
+
export * from './types/maps';
|
|
21
|
+
export * from './contracts/maps';
|
|
22
|
+
export * from './constants';
|
|
23
|
+
export * from './hooks';
|
|
24
|
+
export * from './utils';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { IDistanceService, IGeocoderService, IMapEngine, IPlacesService, IRouteService } from '../contracts/maps';
|
|
3
|
+
import { SfMapsConfig } from '../types/maps';
|
|
4
|
+
export type SfProviderProps = PropsWithChildren<{
|
|
5
|
+
maps?: SfMapsConfig;
|
|
6
|
+
}>;
|
|
7
|
+
export type SfMapsRuntime = {
|
|
8
|
+
config: SfMapsConfig;
|
|
9
|
+
engine: IMapEngine;
|
|
10
|
+
geocodingService: IGeocoderService;
|
|
11
|
+
placesService: IPlacesService;
|
|
12
|
+
routingService: IRouteService;
|
|
13
|
+
distanceService: IDistanceService;
|
|
14
|
+
};
|
|
15
|
+
type SfProviderValue = {
|
|
16
|
+
maps?: SfMapsRuntime;
|
|
17
|
+
};
|
|
18
|
+
export declare const SfProvider: ({ maps, children }: SfProviderProps) => import("react").JSX.Element;
|
|
19
|
+
export declare const useSf: () => SfProviderValue;
|
|
20
|
+
export declare const useSfMaps: () => SfMapsRuntime;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createBasicDistanceService } from './basicDistanceService';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { SfGoogleMapsEngineConfig } from '../../types/maps';
|
|
2
|
+
export type GoogleMapsListener = {
|
|
3
|
+
remove?: () => void;
|
|
4
|
+
};
|
|
5
|
+
export type GoogleMapInstance = {
|
|
6
|
+
setCenter?: (center: {
|
|
7
|
+
lat: number;
|
|
8
|
+
lng: number;
|
|
9
|
+
}) => void;
|
|
10
|
+
setZoom?: (zoom: number) => void;
|
|
11
|
+
addListener?: (eventName: string, handler: (event: {
|
|
12
|
+
latLng?: {
|
|
13
|
+
lat: () => number;
|
|
14
|
+
lng: () => number;
|
|
15
|
+
};
|
|
16
|
+
}) => void) => GoogleMapsListener;
|
|
17
|
+
};
|
|
18
|
+
type GoogleMapsNamespace = {
|
|
19
|
+
maps?: {
|
|
20
|
+
Map: new (element: HTMLElement, options: Record<string, unknown>) => GoogleMapInstance;
|
|
21
|
+
Marker: new (options: Record<string, unknown>) => {
|
|
22
|
+
addListener?: (eventName: string, handler: () => void) => GoogleMapsListener;
|
|
23
|
+
getPosition?: () => {
|
|
24
|
+
lat: () => number;
|
|
25
|
+
lng: () => number;
|
|
26
|
+
} | null;
|
|
27
|
+
setMap?: (map: unknown | null) => void;
|
|
28
|
+
setOptions?: (options: Record<string, unknown>) => void;
|
|
29
|
+
setPosition?: (position: {
|
|
30
|
+
lat: number;
|
|
31
|
+
lng: number;
|
|
32
|
+
}) => void;
|
|
33
|
+
};
|
|
34
|
+
Geocoder: new () => {
|
|
35
|
+
geocode: (request: Record<string, unknown>, callback: (results: unknown[] | null, status: string) => void) => void;
|
|
36
|
+
};
|
|
37
|
+
LatLngBounds: new () => {
|
|
38
|
+
extend: (point: {
|
|
39
|
+
lat: number;
|
|
40
|
+
lng: number;
|
|
41
|
+
}) => void;
|
|
42
|
+
};
|
|
43
|
+
Polyline: new (options: Record<string, unknown>) => {
|
|
44
|
+
setMap?: (map: unknown | null) => void;
|
|
45
|
+
setOptions?: (options: Record<string, unknown>) => void;
|
|
46
|
+
setPath?: (path: {
|
|
47
|
+
lat: number;
|
|
48
|
+
lng: number;
|
|
49
|
+
}[]) => void;
|
|
50
|
+
};
|
|
51
|
+
Polygon: new (options: Record<string, unknown>) => {
|
|
52
|
+
setMap?: (map: unknown | null) => void;
|
|
53
|
+
setOptions?: (options: Record<string, unknown>) => void;
|
|
54
|
+
setPaths?: (paths: {
|
|
55
|
+
lat: number;
|
|
56
|
+
lng: number;
|
|
57
|
+
}[]) => void;
|
|
58
|
+
};
|
|
59
|
+
event?: {
|
|
60
|
+
clearInstanceListeners: (instance: unknown) => void;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export declare const getGoogleMapsNamespace: () => GoogleMapsNamespace | undefined;
|
|
65
|
+
export declare const loadGoogleMaps: (config: SfGoogleMapsEngineConfig) => Promise<GoogleMapsNamespace>;
|
|
66
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createMapsPlacesService } from './mapsPlacesService';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createBasicRouteService } from './basicRouteService';
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type SfMapEngineId = "leaflet" | "google" | (string & {});
|
|
3
|
+
export type SfMapServiceId = "leaflet" | "google" | "nominatim" | "osrm" | (string & {});
|
|
4
|
+
export type SfDistanceUnit = "km" | "mi";
|
|
5
|
+
export type SfAreaUnit = "m2" | "ha";
|
|
6
|
+
export type SfLatLng = {
|
|
7
|
+
lat: number;
|
|
8
|
+
lng: number;
|
|
9
|
+
};
|
|
10
|
+
export type SfBounds = {
|
|
11
|
+
north: number;
|
|
12
|
+
south: number;
|
|
13
|
+
east: number;
|
|
14
|
+
west: number;
|
|
15
|
+
};
|
|
16
|
+
export type SfPlace = {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
address?: string;
|
|
20
|
+
location: SfLatLng;
|
|
21
|
+
provider?: string;
|
|
22
|
+
raw?: unknown;
|
|
23
|
+
};
|
|
24
|
+
export type SfAddress = SfPlace;
|
|
25
|
+
export type SfRoute = {
|
|
26
|
+
origin: SfLatLng;
|
|
27
|
+
destination: SfLatLng;
|
|
28
|
+
waypoints: SfLatLng[];
|
|
29
|
+
distanceMeters?: number;
|
|
30
|
+
durationSeconds?: number;
|
|
31
|
+
polyline?: SfLatLng[];
|
|
32
|
+
};
|
|
33
|
+
export type SfRouteInput = {
|
|
34
|
+
origin: SfLatLng;
|
|
35
|
+
destination: SfLatLng;
|
|
36
|
+
waypoints?: SfLatLng[];
|
|
37
|
+
travelMode?: SfTravelMode;
|
|
38
|
+
};
|
|
39
|
+
export type SfDistanceInput = {
|
|
40
|
+
origins: SfLatLng[];
|
|
41
|
+
destinations: SfLatLng[];
|
|
42
|
+
travelMode?: SfTravelMode;
|
|
43
|
+
};
|
|
44
|
+
export type SfDistanceResult = {
|
|
45
|
+
distanceMeters: number;
|
|
46
|
+
durationSeconds?: number;
|
|
47
|
+
};
|
|
48
|
+
export type SfGeofence = {
|
|
49
|
+
id: string;
|
|
50
|
+
name?: string;
|
|
51
|
+
polygon: SfLatLng[];
|
|
52
|
+
};
|
|
53
|
+
export type SfVehicleLocation = {
|
|
54
|
+
vehicleId: string;
|
|
55
|
+
location: SfLatLng;
|
|
56
|
+
timestamp: string;
|
|
57
|
+
accuracyMeters?: number;
|
|
58
|
+
speedMps?: number;
|
|
59
|
+
heading?: number;
|
|
60
|
+
};
|
|
61
|
+
export type SfTravelMode = "driving" | "walking" | "bicycling" | "transit";
|
|
62
|
+
export type SfMapMarker = {
|
|
63
|
+
id: string;
|
|
64
|
+
position: SfLatLng;
|
|
65
|
+
label?: string;
|
|
66
|
+
title?: string;
|
|
67
|
+
color?: string;
|
|
68
|
+
options?: SfMapMarkerOptions;
|
|
69
|
+
data?: unknown;
|
|
70
|
+
};
|
|
71
|
+
export type SfMapMarkerOptions = {
|
|
72
|
+
draggable?: boolean;
|
|
73
|
+
selectable?: boolean;
|
|
74
|
+
};
|
|
75
|
+
export type SfMapShape = {
|
|
76
|
+
id: string;
|
|
77
|
+
points: SfLatLng[];
|
|
78
|
+
color?: string;
|
|
79
|
+
fillColor?: string;
|
|
80
|
+
label?: string;
|
|
81
|
+
};
|
|
82
|
+
export type SfMapClickEvent = {
|
|
83
|
+
location: SfLatLng;
|
|
84
|
+
};
|
|
85
|
+
export type SfMarkerClickEvent = {
|
|
86
|
+
marker: SfMapMarker;
|
|
87
|
+
};
|
|
88
|
+
export type SfMarkerDragEvent = {
|
|
89
|
+
marker: SfMapMarker;
|
|
90
|
+
location: SfLatLng;
|
|
91
|
+
};
|
|
92
|
+
export type SfMapEngineCapabilities = {
|
|
93
|
+
drawing: "none" | "basic" | "advanced";
|
|
94
|
+
streetView: "none" | "static" | "interactive";
|
|
95
|
+
clustering: "none" | "client" | "server";
|
|
96
|
+
heatmap: "none" | "basic" | "weighted";
|
|
97
|
+
};
|
|
98
|
+
export type SfGeocodingCapabilities = {
|
|
99
|
+
geocoding: "none" | "basic" | "full";
|
|
100
|
+
};
|
|
101
|
+
export type SfRoutingCapabilities = {
|
|
102
|
+
routing: "none" | "basic" | "waypoints" | "optimized";
|
|
103
|
+
traffic?: "none" | "basic" | "full";
|
|
104
|
+
};
|
|
105
|
+
export type SfPlacesCapabilities = {
|
|
106
|
+
places: "none" | "basic" | "full";
|
|
107
|
+
};
|
|
108
|
+
export type SfDistanceCapabilities = {
|
|
109
|
+
distance: "none" | "point-to-point" | "matrix";
|
|
110
|
+
traffic?: "none" | "basic" | "full";
|
|
111
|
+
};
|
|
112
|
+
export type SfGoogleMapsEngineConfig = {
|
|
113
|
+
apiKey: string;
|
|
114
|
+
language?: string;
|
|
115
|
+
region?: string;
|
|
116
|
+
libraries?: string[];
|
|
117
|
+
mapId?: string;
|
|
118
|
+
};
|
|
119
|
+
export type SfLeafletEngineConfig = {
|
|
120
|
+
tileUrl?: string;
|
|
121
|
+
attribution?: string;
|
|
122
|
+
};
|
|
123
|
+
export type SfMapsConfig = {
|
|
124
|
+
defaultEngine: SfMapEngineId;
|
|
125
|
+
engines: Partial<{
|
|
126
|
+
google: SfGoogleMapsEngineConfig;
|
|
127
|
+
leaflet: SfLeafletEngineConfig;
|
|
128
|
+
}> & Record<string, unknown>;
|
|
129
|
+
services?: Partial<{
|
|
130
|
+
geocoding: SfMapServiceId;
|
|
131
|
+
routing: SfMapServiceId;
|
|
132
|
+
places: SfMapServiceId;
|
|
133
|
+
distance: SfMapServiceId;
|
|
134
|
+
}>;
|
|
135
|
+
units?: {
|
|
136
|
+
distance?: SfDistanceUnit;
|
|
137
|
+
area?: SfAreaUnit;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
export type SfMapRendererProps = {
|
|
141
|
+
center?: SfLatLng;
|
|
142
|
+
zoom?: number;
|
|
143
|
+
markers?: SfMapMarker[];
|
|
144
|
+
routes?: SfMapShape[];
|
|
145
|
+
areas?: SfMapShape[];
|
|
146
|
+
height?: number | string;
|
|
147
|
+
className?: string;
|
|
148
|
+
readOnly?: boolean;
|
|
149
|
+
onClick?: (event: SfMapClickEvent) => void;
|
|
150
|
+
onMarkerClick?: (event: SfMarkerClickEvent) => void;
|
|
151
|
+
onMarkerDoubleClick?: (event: SfMarkerClickEvent) => void;
|
|
152
|
+
onMarkerDrag?: (event: SfMarkerDragEvent) => void;
|
|
153
|
+
onMarkerDragEnd?: (event: SfMarkerDragEvent) => void;
|
|
154
|
+
};
|
|
155
|
+
export type SfMapRenderer = (props: SfMapRendererProps) => ReactNode;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ExportTableColumn<T> = {
|
|
2
|
+
id: string;
|
|
3
|
+
header: string;
|
|
4
|
+
getValue: (row: T) => unknown;
|
|
5
|
+
};
|
|
6
|
+
export type ExportTableCsvOptions<T> = {
|
|
7
|
+
filename?: string;
|
|
8
|
+
columns: ExportTableColumn<T>[];
|
|
9
|
+
};
|
|
10
|
+
/** Exporta filas visibles a CSV (UTF-8 BOM para Excel). */
|
|
11
|
+
export declare const exportTableCsv: <T>(rows: T[], options: ExportTableCsvOptions<T>) => void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ExportTableColumn, ExportTableCsvOptions } from './exportTableCsv';
|
|
2
|
+
export type ExportTableXlsxOptions<T> = ExportTableCsvOptions<T>;
|
|
3
|
+
/** Exporta filas a Excel (.xls SpreadsheetML) sin peer externo. */
|
|
4
|
+
export declare const exportTableXlsx: <T>(rows: T[], options: ExportTableXlsxOptions<T>) => void;
|
|
5
|
+
export type { ExportTableColumn };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { toStringArray } from './toStringArray';
|
|
2
|
+
export { readQueryValue, updateQueryValue, removeQueryValue } from './queryParams';
|
|
3
|
+
export { exportTableCsv } from './exportTableCsv';
|
|
4
|
+
export type { ExportTableColumn, ExportTableCsvOptions } from './exportTableCsv';
|
|
5
|
+
export { exportTableXlsx } from './exportTableXlsx';
|
|
6
|
+
export type { ExportTableXlsxOptions } from './exportTableXlsx';
|
|
7
|
+
export { createFormSchema, nullableBoolean, nullableCelular, nullableEmail, nullableNumber, nullableOrMatchString, nullablePositiveInteger, nullablePositiveNumber, nullableString, nullableStringArray, nullableStringNumbersOnly, requiredBoolean, requiredCelular, requiredEmail, requiredMatchString, requiredNumber, requiredPositiveInteger, requiredPositiveNumber, requiredString, requiredStringArray, requiredStringNumbersOnly, transformNullIfEmpty, validators, } from './validators';
|
|
8
|
+
export type { ShapeFactory } from './validators';
|
|
9
|
+
export * from './maps';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type MapGeocoderResult = {
|
|
2
|
+
lat: number;
|
|
3
|
+
lng: number;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const MIN_MAP_GEOCODER_QUERY_LENGTH = 3;
|
|
7
|
+
export declare const searchMapAddresses: (query: string, limit?: number) => Promise<MapGeocoderResult[]>;
|
|
8
|
+
export declare const formatMapGeocoderLabel: (label: string, maxParts?: number) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SfLatLng, SfMapMarker } from '../../types/maps';
|
|
2
|
+
export declare const sfFormatCoordinate: (value: number) => string;
|
|
3
|
+
export declare const sfClampLatitude: (value: number) => number;
|
|
4
|
+
export declare const sfClampLongitude: (value: number) => number;
|
|
5
|
+
export declare const sfParseCoordinate: (value: string | number, fallback?: number) => number;
|
|
6
|
+
export declare const sfLatLngToString: (point: SfLatLng) => string;
|
|
7
|
+
export declare const sfNormalizeLatLng: (value: unknown, fallback: SfLatLng) => SfLatLng;
|
|
8
|
+
export declare const sfMarkerFromLatLng: (position: SfLatLng, label?: string) => SfMapMarker;
|
|
9
|
+
export { MIN_MAP_GEOCODER_QUERY_LENGTH, formatMapGeocoderLabel, searchMapAddresses, } from './geocoder';
|
|
10
|
+
export type { MapGeocoderResult } from './geocoder';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|