@opengeoweb/shared 9.10.2 → 9.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/shared",
3
- "version": "9.10.2",
3
+ "version": "9.12.0",
4
4
  "description": "GeoWeb shared library with shared components and utils for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -9,5 +9,5 @@ export interface CustomIconProps extends IconButtonProps {
9
9
  shouldShowAsDisabled?: boolean;
10
10
  tooltipProps?: TooltipProps;
11
11
  }
12
- export declare const CustomIconButton: React.FC<CustomIconProps>;
12
+ export declare const CustomIconButton: React.NamedExoticComponent<CustomIconProps>;
13
13
  export {};
@@ -6,11 +6,12 @@ export declare const getPosition: (menuPosition: MenuPosition) => {
6
6
  anchorOrigin: PopoverOrigin;
7
7
  transformOrigin: PopoverOrigin;
8
8
  };
9
- interface MenuItemType {
9
+ export interface MenuItemType {
10
10
  text: string;
11
11
  action: (event: React.MouseEvent) => void;
12
12
  icon?: React.ReactNode;
13
13
  isDisabled?: boolean;
14
+ isSelected?: boolean;
14
15
  }
15
16
  interface ToggleMenuProps {
16
17
  buttonTestId?: string;
@@ -1,18 +1,19 @@
1
1
  import * as React from 'react';
2
2
  import { BaseSelectProps, SelectVariants } from '@mui/material';
3
+ import { SxProps } from '@mui/material/styles';
3
4
  interface ListELement {
4
5
  value: string;
5
6
  }
6
- type TooltipSelectProps = BaseSelectProps & {
7
+ type TooltipSelectProps = Omit<BaseSelectProps, 'sx'> & {
7
8
  tooltip: string;
8
9
  list?: ListELement[];
9
10
  currentIndex?: number;
10
11
  onChangeMouseWheel?: (element: ListELement) => void;
11
12
  requiresCtrlToChange?: boolean;
12
13
  isEnabled?: boolean;
13
- noStyling?: boolean;
14
14
  hasBackgroundColor?: boolean;
15
15
  variant?: SelectVariants;
16
+ additionalStyling?: SxProps;
16
17
  };
17
18
  export declare const TooltipSelect: React.FC<TooltipSelectProps>;
18
19
  export {};
@@ -1,2 +1 @@
1
1
  export * from './TooltipSelect';
2
- export * from './tooltipContainerStyles';
@@ -2,4 +2,3 @@ export * from './axiosErrorUtils';
2
2
  export * as dateUtils from './dateUtils';
3
3
  export * from './reduxTestUtils';
4
4
  export { renderCounter } from './renderCounter';
5
- export { metronome } from './metronome';
@@ -1,2 +0,0 @@
1
- import { SxProps, Theme } from '@mui/material';
2
- export declare const tooltipContainerStyles: (isEnabled: boolean, hasBackgroundColor?: boolean) => SxProps<Theme>;
@@ -1,77 +0,0 @@
1
- /// <reference types="node" />
2
- type TimerFunction = (timerId: string, tickId: number) => void;
3
- interface Timer {
4
- timerFunc: TimerFunction | null;
5
- hertz: number;
6
- timerId: string;
7
- isPaused: boolean;
8
- }
9
- /**
10
- * This class should NEVER be initialized with new Metronome(). Use the
11
- * exported variable. To reset the metronome use unregisterAllTimers()
12
- * to remove all existing timers followed by init() to initialize the
13
- * ticks.
14
- */
15
- declare class Metronome {
16
- tickId: number;
17
- timers: Timer[];
18
- interval: NodeJS.Timeout | null;
19
- handleTimerTicks: ((timerIds: string[]) => void) | null;
20
- constructor();
21
- init(): void;
22
- unregisterAllTimers(): void;
23
- step(): void;
24
- /**
25
- * Multiple timers with varying frequencies can be made at the same
26
- * time however each timerId must be unique. If you attempt to create
27
- * two timers with the same timerId, the second will silently be ignored.
28
- *
29
- * @param timerFunc The function to be executed at the given hertz frequency
30
- * @param hertz Frequency of the timer given in hertz
31
- * @param timerId Id of the timer
32
- * @returns Timer or nothing if no timer was created
33
- */
34
- register(timerFunc: TimerFunction | null, hertz: number, timerId: string): Timer | undefined;
35
- /**
36
- * Unregistering a timer completely removes it, if you want to pause a
37
- * timer, then use pauseTimer()
38
- *
39
- * @param timerId Id of the timer
40
- */
41
- unregister(timerId: string): void;
42
- /**
43
- * Checks if a timer is paused
44
- *
45
- * @param timerId Id of the timer
46
- * @returns true if the timer is paused, false if it is running
47
- */
48
- isPaused(timerId: string): boolean;
49
- /**
50
- * Continues running a timer
51
- *
52
- * @param timerId Id of the timer
53
- */
54
- continueTimer(timerId: string): void;
55
- /**
56
- * Pauses a timer
57
- *
58
- * @param timerId Id of the timer
59
- */
60
- pauseTimer(timerId: string): void;
61
- /**
62
- * Toggles a timer to be paused or running. Be careful when asking redux
63
- * to toggle a timer, it might toggle twice and therefore do nothing
64
- *
65
- * @param timerId Id of the timer
66
- */
67
- toggleTimer(timerId: string): void;
68
- /**
69
- * Sets the speed of a timer to a new frequency given in hertz
70
- *
71
- * @param timerId Id of the timer
72
- * @param hertz Frequency of the timer given in hertz
73
- */
74
- setSpeed(timerId: string, hertz: number): void;
75
- }
76
- declare const metronome: Metronome;
77
- export { metronome };
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const MetronomeCanvasPlaygroundDemo: React.FC;
7
- export declare const MetronomeCanvasDemo: React.FC;