@tmlmobilidade/ui 20250915.1518.13 → 20250915.1643.34
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/dist/index.d.ts +8 -3
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/src/components/authentication/Avatar/index.js +18 -0
- package/dist/src/components/authentication/Avatar/index.js.map +1 -0
- package/dist/src/components/filters/FiltersBar/index.js +1 -1
- package/dist/src/components/inputs/CoordinatesInput/index.js +1 -1
- package/dist/src/components/map/view/MapViewToolbar/index.js +1 -1
- package/dist/src/components/upload/FileUpload/index.js +1 -1
- package/dist/src/hooks/use-user-organization.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
+
import { User, UnixTimestamp, UserPreferenceValue, Permission } from '@tmlmobilidade/types';
|
2
3
|
import { ButtonProps as ButtonProps$2, BadgeProps as BadgeProps$1, ComboboxProps, MenuProps as MenuProps$1, MenuTargetProps as MenuTargetProps$1, MenuDropdownProps as MenuDropdownProps$1, MenuItemProps as MenuItemProps$1, MenuDividerProps as MenuDividerProps$1, MenuLabelProps as MenuLabelProps$1, TooltipProps as TooltipProps$1, CheckboxProps as CheckboxProps$1, CheckboxGroupProps as CheckboxGroupProps$1, PopoverProps as PopoverProps$1, PopoverTargetProps as PopoverTargetProps$1, PopoverDropdownProps as PopoverDropdownProps$1, SegmentedControlProps as SegmentedControlProps$1, SliderProps as SliderProps$1, SwitchProps as SwitchProps$1, TextProps as TextProps$1, NumberInputProps as NumberInputProps$1, PasswordInputProps, PillsInputProps as PillsInputProps$1, TextareaProps as TextareaProps$1, TextInputProps as TextInputProps$1 } from '@mantine/core';
|
3
4
|
export { Modal, RenderTreeNodePayload, Tree, TreeNodeData, getTreeExpandedState, useTree } from '@mantine/core';
|
4
5
|
import * as React$1 from 'react';
|
@@ -6,7 +7,6 @@ import React__default, { PropsWithChildren, ReactNode, CSSProperties, RefObject
|
|
6
7
|
import { Line, Stop } from '@carrismetropolitana/api-types/network';
|
7
8
|
export { ViewportList } from 'react-viewport-list';
|
8
9
|
import { DatePickerInputProps } from '@mantine/dates';
|
9
|
-
import { UnixTimestamp, UserPreferenceValue, User, Permission } from '@tmlmobilidade/types';
|
10
10
|
import { StyleSpecification, MapLibreEvent } from 'maplibre-gl';
|
11
11
|
import { FeatureCollection, Polygon, Point, LineString, Feature, Geometry, GeoJsonProperties } from 'geojson';
|
12
12
|
import { MapLayerMouseEvent, ViewStateChangeEvent, MapRef } from '@vis.gl/react-maplibre';
|
@@ -18,6 +18,11 @@ export * from '@mantine/hooks';
|
|
18
18
|
export * from '@mantine/form';
|
19
19
|
export { zod4Resolver, zodResolver } from 'mantine-form-zod-resolver';
|
20
20
|
|
21
|
+
interface AvatarProps {
|
22
|
+
user: User;
|
23
|
+
}
|
24
|
+
declare function Avatar({ user }: AvatarProps): react_jsx_runtime.JSX.Element;
|
25
|
+
|
21
26
|
interface HasPermissionProps {
|
22
27
|
action: string;
|
23
28
|
children: React.ReactNode;
|
@@ -1153,5 +1158,5 @@ declare function AppProvider({ children }: PropsWithChildren): react_jsx_runtime
|
|
1153
1158
|
*/
|
1154
1159
|
declare function BaseProvider({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
1155
1160
|
|
1156
|
-
export { AVAILABLE_MODES, AVAILABLE_THEMES, AlertCard, AlertMessage, AppProvider, AppWrapper, BackButton, Badge, BaseProvider, Button, CMIcon, CMLogo, Checkbox, Collapsible, ComboboxComponent as Combobox, ComponentWrapper, CoordinatesInput, DataTable, DatePicker, DateTimePicker, DeleteButton, Description, Divider, ErrorDisplay, FileButton, FileUpload, FilterTarget, FilterTypeDateRange, FilterTypeList, FilterWrapper, FiltersBar, Grid, HasPermission, IconButton, Indicator, Label, LineBadge, LineDisplay, LineName, LineSelect, Loader, LoadingOverlay, LockButton, MAP_STYLES, MAP_VIEWPORT, MapContextProvider, MapOverlayGeofences, MapOverlayMultipleStops, MapOverlayObservedPath, MapOverlayPins, MapOverlayScheduledPath, MapView, MapViewContextProvider, MeContextProvider, Menu, MultiSelect, NoDataLabel, NumberInput, Pane, PanesManager, PasswordInput, PillGroup, PillsInput, Popover, SearchInput, Section, SegmentedControl, Separator, Sidebar, SidebarContextProvider, Slider, Spacer, StopDisplay, StopDisplayName, StopSelect, Surface, Switch, TMLogo, TMLogoDark, TMLogoLight, Tag, TagGroup, Text, TextInput, Textarea, ThemeContextProvider, Toolbar, Tooltip, ValueDisplay, WhenDarkMode, WhenLightMode, WhenMode, accessorSearch, plainSearch, sidebarApps, useCssVariable, useCurrentUrl, useMapContext, useMapViewContext, useMeContext, useSearch, useSidebarContext, useThemeContext, useToast, useUserPreference };
|
1157
|
-
export type { ButtonProps$1 as ButtonProps, CheckboxGroupProps, CheckboxProps, DataItem$2 as DataItem, DataTableColumn, DataTableProps, DatePickerProps, DateTimePickerProps, FileButtonProps, LabelProps, LineBadgeProps, LineDisplayProps, LineNameProps, LineSelectProps, LoaderProps, MapOverlayGeofencesPolygonDataProps, MapOverlayMultipleStopsDataProps, MapOverlayObservedPathLineDataProps, MapOverlayObservedPathPointsDataProps, MapOverlayPinsPointDataProps, MapOverlayScheduledPathLineDataProps, MapOverlayScheduledPathPointsDataProps, MapStyle, ModeType, NoDataLabelProps, NumberInputProps, PillsInputProps, PopoverDropdownProps, PopoverProps, PopoverTargetProps, SearchInputProps, SegmentedControlProps, SurfaceProps, TagGroupProps, TagProps, TextInputProps, TextProps, TextareaProps, ThemeType, ToastPromiseParams, ToastProps };
|
1161
|
+
export { AVAILABLE_MODES, AVAILABLE_THEMES, AlertCard, AlertMessage, AppProvider, AppWrapper, Avatar, BackButton, Badge, BaseProvider, Button, CMIcon, CMLogo, Checkbox, Collapsible, ComboboxComponent as Combobox, ComponentWrapper, CoordinatesInput, DataTable, DatePicker, DateTimePicker, DeleteButton, Description, Divider, ErrorDisplay, FileButton, FileUpload, FilterTarget, FilterTypeDateRange, FilterTypeList, FilterWrapper, FiltersBar, Grid, HasPermission, IconButton, Indicator, Label, LineBadge, LineDisplay, LineName, LineSelect, Loader, LoadingOverlay, LockButton, MAP_STYLES, MAP_VIEWPORT, MapContextProvider, MapOverlayGeofences, MapOverlayMultipleStops, MapOverlayObservedPath, MapOverlayPins, MapOverlayScheduledPath, MapView, MapViewContextProvider, MeContextProvider, Menu, MultiSelect, NoDataLabel, NumberInput, Pane, PanesManager, PasswordInput, PillGroup, PillsInput, Popover, SearchInput, Section, SegmentedControl, Separator, Sidebar, SidebarContextProvider, Slider, Spacer, StopDisplay, StopDisplayName, StopSelect, Surface, Switch, TMLogo, TMLogoDark, TMLogoLight, Tag, TagGroup, Text, TextInput, Textarea, ThemeContextProvider, Toolbar, Tooltip, ValueDisplay, WhenDarkMode, WhenLightMode, WhenMode, accessorSearch, plainSearch, sidebarApps, useCssVariable, useCurrentUrl, useMapContext, useMapViewContext, useMeContext, useSearch, useSidebarContext, useThemeContext, useToast, useUserPreference };
|
1162
|
+
export type { AvatarProps, ButtonProps$1 as ButtonProps, CheckboxGroupProps, CheckboxProps, DataItem$2 as DataItem, DataTableColumn, DataTableProps, DatePickerProps, DateTimePickerProps, FileButtonProps, LabelProps, LineBadgeProps, LineDisplayProps, LineNameProps, LineSelectProps, LoaderProps, MapOverlayGeofencesPolygonDataProps, MapOverlayMultipleStopsDataProps, MapOverlayObservedPathLineDataProps, MapOverlayObservedPathPointsDataProps, MapOverlayPinsPointDataProps, MapOverlayScheduledPathLineDataProps, MapOverlayScheduledPathPointsDataProps, MapStyle, ModeType, NoDataLabelProps, NumberInputProps, PillsInputProps, PopoverDropdownProps, PopoverProps, PopoverTargetProps, SearchInputProps, SegmentedControlProps, SurfaceProps, TagGroupProps, TagProps, TextInputProps, TextProps, TextareaProps, ThemeType, ToastPromiseParams, ToastProps };
|
package/dist/index.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
export { Avatar } from './src/components/authentication/Avatar/index.js';
|
1
2
|
export { HasPermission } from './src/components/authentication/HasPermission/index.js';
|
2
3
|
export { BackButton } from './src/components/buttons/BackButton/index.js';
|
3
4
|
export { Button } from './src/components/buttons/Button/index.js';
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
'use client';
|
2
|
+
import { j as jsxRuntimeExports } from '../../../../_virtual/jsx-runtime.js';
|
3
|
+
import { Avatar as Avatar$1 } from '@mantine/core';
|
4
|
+
import { isUrl } from '@tmlmobilidade/utils';
|
5
|
+
|
6
|
+
function Avatar({ user }) {
|
7
|
+
//
|
8
|
+
//
|
9
|
+
// User has an avatar and it is a valid URL
|
10
|
+
if (user.avatar && isUrl(user.avatar)) {
|
11
|
+
return jsxRuntimeExports.jsx(Avatar$1, { src: user.avatar });
|
12
|
+
}
|
13
|
+
// User does not have an avatar or the avatar is not a valid URL
|
14
|
+
return jsxRuntimeExports.jsx(Avatar$1, { children: user.first_name.charAt(0) + user.last_name.charAt(0) });
|
15
|
+
}
|
16
|
+
|
17
|
+
export { Avatar };
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/authentication/Avatar/index.tsx"],"sourcesContent":[null],"names":["_jsx","MantineAvatar"],"mappings":";;;;;AAcM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAC,CAAA,CAAE,CAAA,CAAA,CAAA,CAAI,EAAe,CAAA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AAA,CAAA,CAAA,CAAA,CAAS,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAC,CAAC,CAAC,CAAA,CAAA,CAAiB;AAC7F;;"}
|
@@ -9,6 +9,7 @@ import '../../../contexts/Theme.context.js';
|
|
9
9
|
import '@tabler/icons-react';
|
10
10
|
import '../../sidebar/Sidebar/index.js';
|
11
11
|
import '@tmlmobilidade/lib';
|
12
|
+
import '@tmlmobilidade/utils';
|
12
13
|
import '@mantine/modals';
|
13
14
|
import 'clsx';
|
14
15
|
import 'luxon';
|
@@ -19,7 +20,6 @@ import 'ukkonen';
|
|
19
20
|
import '@mantine/hooks';
|
20
21
|
import '../../common/Popover/index.js';
|
21
22
|
import '../../datatable/DataTableContext/index.js';
|
22
|
-
import '@tmlmobilidade/utils';
|
23
23
|
import '@mantine/dates';
|
24
24
|
import '../FilterTarget/index.js';
|
25
25
|
import '../../map/view/MapViewContext/index.js';
|
@@ -20,9 +20,9 @@ import '../../../contexts/Sidebar.context.js';
|
|
20
20
|
import '../../../contexts/Theme.context.js';
|
21
21
|
import '../../sidebar/Sidebar/index.js';
|
22
22
|
import '@tmlmobilidade/lib';
|
23
|
+
import '@tmlmobilidade/utils';
|
23
24
|
import '@mantine/modals';
|
24
25
|
import '../../datatable/DataTableContext/index.js';
|
25
|
-
import '@tmlmobilidade/utils';
|
26
26
|
import '@mantine/dates';
|
27
27
|
import '../../filters/FilterTarget/index.js';
|
28
28
|
import { Section } from '../../layout/Section/index.js';
|
@@ -22,8 +22,8 @@ import '../../../../contexts/Theme.context.js';
|
|
22
22
|
import { Spacer } from '../../../layout/Spacer/index.js';
|
23
23
|
import '../../../sidebar/Sidebar/index.js';
|
24
24
|
import '@tmlmobilidade/lib';
|
25
|
-
import '../../../datatable/DataTableContext/index.js';
|
26
25
|
import '@tmlmobilidade/utils';
|
26
|
+
import '../../../datatable/DataTableContext/index.js';
|
27
27
|
import '@mantine/dates';
|
28
28
|
import '../../../filters/FilterTarget/index.js';
|
29
29
|
import { MAP_STYLES } from '../../configs/styles.js';
|
@@ -19,9 +19,9 @@ import '../../../contexts/Sidebar.context.js';
|
|
19
19
|
import '../../../contexts/Theme.context.js';
|
20
20
|
import '../../sidebar/Sidebar/index.js';
|
21
21
|
import '@tmlmobilidade/lib';
|
22
|
+
import '@tmlmobilidade/utils';
|
22
23
|
import '@mantine/modals';
|
23
24
|
import '../../datatable/DataTableContext/index.js';
|
24
|
-
import '@tmlmobilidade/utils';
|
25
25
|
import '@mantine/dates';
|
26
26
|
import '../../filters/FilterTarget/index.js';
|
27
27
|
import { Section } from '../../layout/Section/index.js';
|
@@ -1,8 +1,9 @@
|
|
1
1
|
'use client';
|
2
2
|
import { getAppConfig } from '@tmlmobilidade/lib';
|
3
3
|
import '../../_virtual/jsx-runtime.js';
|
4
|
-
import { useMeContext } from '../contexts/Me.context.js';
|
5
4
|
import '@mantine/core';
|
5
|
+
import '@tmlmobilidade/utils';
|
6
|
+
import { useMeContext } from '../contexts/Me.context.js';
|
6
7
|
import '@tabler/icons-react';
|
7
8
|
import '@mantine/modals';
|
8
9
|
import 'clsx';
|
@@ -15,7 +16,6 @@ import 'ukkonen';
|
|
15
16
|
import '@mantine/hooks';
|
16
17
|
import '../components/common/Popover/index.js';
|
17
18
|
import '../components/datatable/DataTableContext/index.js';
|
18
|
-
import '@tmlmobilidade/utils';
|
19
19
|
import '@mantine/dates';
|
20
20
|
import '../contexts/Map.context.js';
|
21
21
|
import '../contexts/Sidebar.context.js';
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tmlmobilidade/ui",
|
3
3
|
"description": "UI components for Transportes Metropolitanos de Lisboa (TML) web applications.",
|
4
|
-
"version": "20250915.
|
4
|
+
"version": "20250915.1643.34",
|
5
5
|
"author": "João de Vasconcelos & Jusi Monteiro",
|
6
6
|
"license": "AGPL-3.0-or-later",
|
7
7
|
"publishConfig": {
|